13 #include "TGNumberEntry.h"
14 #include "TGTextView.h"
17 #include "TRootEmbeddedCanvas.h"
19 #include "TVirtualX.h"
36 #include "nuevdb/EventDisplayBase/EventHolder.h"
37 #include "nuevdb/EventDisplayBase/View2D.h"
39 #include "art/Framework/Services/Registry/ServiceHandle.h"
40 #include "messagefacility/MessageLogger/MessageLogger.h"
56 art::ServiceHandle<geo::Geometry const> geo;
62 evdb::Canvas::fCanvas->cd();
66 evdb::Canvas::fCanvas->cd();
67 fMC =
new MCBriefPad(
"fMCPadMultiTPC",
"MC Info.", 0.15, 0.13, 1.0, 0.17,
"");
70 evdb::Canvas::fCanvas->cd();
71 fWireQ =
new TQPad(
"fWireQPadMultiTPC",
"ADCvsTime", 0.15, 0.0, 1.0, 0.13,
"TQ", 0, 0);
72 fWireQ->
Pad()->SetBit(TPad::kCannotMove,
true);
76 fMetaFrame =
new TGCompositeFrame(mf, 60, 60, kHorizontalFrame);
83 new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5);
85 mf->RemoveFrame((TGFrame*)fEmbCanvas);
86 mf->RemoveFrame(fFrame);
88 fEmbCanvas->ReparentWindow(
fMetaFrame, fXsize, fYsize);
90 fMetaFrame->AddFrame(
fVFrame,
new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandY));
101 TGNumberFormat::kNESInteger,
102 TGNumberFormat::kNEAAnyNumber,
103 TGNumberFormat::kNELLimitMinMax,
108 kWire = TMath::Nint(0.5 * geo->Nwires(0));
118 fPlaneEntry->Connect(
"ValueSet(Long_t)",
"evd::TWQMultiTPCProjectionView",
this,
"SetPlane()");
120 "ReturnPressed()",
"evd::TWQMultiTPCProjectionView",
this,
"SetPlane()");
129 TGNumberFormat::kNESInteger,
130 TGNumberFormat::kNEAAnyNumber,
131 TGNumberFormat::kNELLimitMinMax,
140 fWireEntry->Connect(
"ValueSet(Long_t)",
"evd::TWQMultiTPCProjectionView",
this,
"SetWire()");
142 "ReturnPressed()",
"evd::TWQMultiTPCProjectionView",
this,
"SetWire()");
152 TGNumberFormat::kNESInteger,
153 TGNumberFormat::kNEAAnyNumber,
154 TGNumberFormat::kNELLimitMinMax,
158 art::ServiceHandle<evd::ColorDrawingOptions const> cst;
159 art::ServiceHandle<evd::SimulationDrawingOptions const> sdo;
160 art::ServiceHandle<evd::RawDrawingOptions const> rawopt;
161 art::ServiceHandle<evd::EvdLayoutOptions> evdlayoutopt;
169 "ValueSet(Long_t)",
"evd::TWQMultiTPCProjectionView",
this,
"SetThreshold()");
171 "ReturnPressed()",
"evd::TWQMultiTPCProjectionView",
this,
"SetThreshold()");
174 fThresLabel =
new TGLabel(fFrame,
"ADC Threshold");
177 fGreyScale =
new TGCheckButton(fFrame,
"Grayscale", 1);
178 fGreyScale->Connect(
"Clicked()",
"evd::TWQMultiTPCProjectionView",
this,
"SetGreyscale()");
179 if (cst->fColorOrGray == 1)
fGreyScale->SetState(kButtonDown);
182 if (evdlayoutopt->fEnableMCTruthCheckBox) {
183 fMCOn =
new TGCheckButton(fFrame,
"MC Truth", 5);
184 fMCOn->Connect(
"Clicked()",
"evd::TWQMultiTPCProjectionView",
this,
"SetMCInfo()");
185 if (sdo->fShowMCTruthText == 1)
fMCOn->SetState(kButtonDown);
190 fCalibDraw =
new TGRadioButton(fFrame,
"Reconstructed", 3);
191 fRawDraw =
new TGRadioButton(fFrame,
"Raw", 4);
192 fRawDraw->Connect(
"Clicked()",
"evd::TWQMultiTPCProjectionView",
this,
"SetRawCalib()");
193 fCalibDraw->Connect(
"Clicked()",
"evd::TWQMultiTPCProjectionView",
this,
"SetRawCalib()");
194 fRawCalibDraw->Connect(
"Clicked()",
"evd::TWQMultiTPCProjectionView",
this,
"SetRawCalib()");
195 if (rawopt->fDrawRawDataOrCalibWires == 0)
197 else if (rawopt->fDrawRawDataOrCalibWires == 1)
199 else if (rawopt->fDrawRawDataOrCalibWires == 2)
205 if (evdlayoutopt->fEnableMCTruthCheckBox) {
206 fFrame->AddFrame(
fMCOn,
new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 1));
208 fFrame->AddFrame(
fGreyScale,
new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 1));
209 fFrame->AddFrame(
fRawCalibDraw,
new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 1));
210 fFrame->AddFrame(
fCalibDraw,
new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 1));
211 fFrame->AddFrame(
fRawDraw,
new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 1));
212 fFrame->AddFrame(
fPlaneEntry,
new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 2, 1));
213 fFrame->AddFrame(
fPlaneLabel,
new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 1));
214 fFrame->AddFrame(
fWireEntry,
new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 2, 1));
215 fFrame->AddFrame(
fWireLabel,
new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 1));
216 fFrame->AddFrame(
fThresEntry,
new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 2, 1));
217 fFrame->AddFrame(
fThresLabel,
new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 1));
219 if (evdlayoutopt->fShowSideBar)
222 evdlayoutopt->fShowEndPointSection =
230 unsigned int ntpc = geo->NTPC();
233 unsigned int nplanes = geo->Nplanes();
237 for (
unsigned int t = 0; t < ntpc; ++t) {
238 for (
unsigned int i = 0; i < nplanes; ++i) {
239 double twx1 = 0. + t * 0.97 / (1. * ntpc);
240 double twx2 = t * 0.97 / (1. * ntpc);
242 double twy1 = 0.17 + (i) * (1.0 - 0.171) / (1. * nplanes);
243 double twy2 = 0.17 + (i + 1) * (1.0 - 0.171) / (1. * nplanes);
245 TString padname =
"fWireProjTPC";
250 TString padtitle =
"TPC";
255 evdb::Canvas::fCanvas->cd();
257 mf::LogVerbatim(
"MultiTPC") <<
"make new plane ";
259 new TWireProjPad(padname, padtitle, twx1, twy1, twx2, twy2, i + t * nplanes));
265 fPlanes.back()->Pad()->AddExec(
267 Form(
"evd::TWQMultiTPCProjectionView::MouseDispatch(%d, (void*)%lu)",
269 (
unsigned long)
this));
271 mf::LogVerbatim(
"MultiTPC") <<
"size of planes vec is now " <<
fPlanes.size();
274 padname =
"fQPadTPC";
284 evdb::Canvas::fCanvas->cd();
285 fPlaneQ.push_back(
new TQPad(padname, padtitle, twx2, twy1, twx3, twy2,
"Q", i, 0));
291 evdb::Canvas::fCanvas->Update();
325 for (
unsigned int i = 0; i <
fPlanes.size(); ++i) {
343 for (
unsigned int i = 0; i <
fPlanes.size(); ++i) {
346 fPlanes[i]->Pad()->GetFrame()->SetBit(TPad::kCannotMove,
true);
348 for (
unsigned int j = 0; j <
fPlaneQ.size(); ++j) {
351 fPlaneQ[j]->Pad()->GetFrame()->SetBit(TPad::kCannotMove,
true);
358 art::ServiceHandle<geo::Geometry const> geo;
362 evdb::Canvas::fCanvas->cd();
368 art::ServiceHandle<evd::EvdLayoutOptions const> evdlayoutopt;
370 if (evdlayoutopt->fPrintTotalCharge)
PrintCharge();
379 for (
size_t i = 0; i <
fPlanes.size(); ++i) {
382 fPlanes[i]->Pad()->GetFrame()->SetBit(TPad::kCannotMove,
true);
384 std::vector<double> ZoomParams =
fPlanes[i]->GetCurrentZoom();
396 evdb::Canvas::fCanvas->Update();
447 art::ServiceHandle<geo::Geometry const> geo;
448 art::ServiceHandle<evd::RawDrawingOptions const> rawopt;
452 for (
size_t iplane = 0; iplane <
fPlanes.size(); ++iplane) {
454 double ch = 0, convch = 0;
455 if (rawopt->fDrawRawDataOrCalibWires == 0) {
456 fPlanes[iplane]->RawDataDraw()->GetChargeSum(iplane, ch, convch);
457 mf::LogVerbatim(
"TWQMultiTPCProjectionView") <<
"Warning! Calculating for RawData! ";
460 fPlanes[iplane]->RecoBaseDraw()->GetChargeSum(iplane, ch, convch);
463 mf::LogVerbatim(
"TWQMultiTPCProjectionView")
464 <<
"\ncharge collected at collection plane: " << iplane <<
" " << ch <<
" " << convch;
475 int event = gPad->GetEvent();
477 art::ServiceHandle<evd::EvdLayoutOptions const> evdlayoutopt;
490 if (evdlayoutopt->fChangeWire == 1) wqpp->
ChangeWire(plane);
504 int event = gPad->GetEvent();
505 int px = gPad->GetEventX();
506 if (event != 11)
return;
507 TObject* select = gPad->GetSelected();
509 if (!select->InheritsFrom(
"TBox"))
return;
512 float xx = gPad->AbsPixeltoX(px);
513 float x = gPad->PadtoX(xx);
516 kWire = (
unsigned int)TMath::Nint(x);
528 int event = gPad->GetEvent();
530 if (event != 7)
return;
532 art::ServiceHandle<evd::EvdLayoutOptions const> evdlayoutopt;
533 if (evdlayoutopt->fShowEndPointSection != 1)
return;
535 int px = gPad->GetEventX();
536 double w0 = gPad->AbsPixeltoX(px);
537 double x = gPad->PadtoX(w0);
539 int py = gPad->GetEventY();
540 double t0 = gPad->AbsPixeltoY(py);
541 double y = gPad->PadtoY(t0);
547 int repeat_plane = -1;
548 for (
size_t ii = 0; ii < this->
ppoints.size(); ++ii)
549 if (ppx.
plane ==
this->ppoints[ii].plane) {
553 if (evdlayoutopt->fShowEndPointMarkers)
554 this->
fPlanes[this->
ppoints[ii].plane]->View()->AddMarker(ppx.
w, ppx.
t, kRed, 29, 2.0);
556 this->
fPlanes[plane]->View()->AddMarker(0.0, 0.0, 2, 1, 0.1);
558 repeat_plane = this->
ppoints[ii].plane;
564 if (repeat_plane == -1) {
565 if (this->
ppoints.size() >= 2) {
572 this->
fPlanes[plane]->Pad()->cd();
573 this->
fPlanes[plane]->View()->Clear();
574 if (evdlayoutopt->fShowEndPointMarkers)
575 this->
fPlanes[plane]->View()->AddMarker(ppx.
w, ppx.
t, kRed, 29, 2.0);
577 this->
fPlanes[plane]->View()->AddMarker(0.0, 0.0, 2, 1, 0.1);
578 this->
fPlanes[plane]->View()->Draw();
591 fPlanes[
x]->View()->AddMarker(0.0, 0.0, 2, 1, 0.1);
608 if (
pline.size() >= 2) {
610 double xyz_vertex_fit[3];
613 const double origin[3] = {0., 0., 0.};
614 double xx0 = 0., yy0 = 0., zz0 = 0.;
615 double xx1 = 0., yy1 = 0., zz1 = 0.;
620 art::ServiceHandle<geo::Geometry const> geom;
621 art::ServiceHandle<evd::RawDrawingOptions const> rawOpt;
627 geom->PlaneWireToChannel(
pline[0].plane,
pline[0].w0, rawOpt->fTPC, rawOpt->fCryostat);
629 geom->PlaneWireToChannel(
pline[1].plane,
pline[1].w0, rawOpt->fTPC, rawOpt->fCryostat);
631 bool wires_cross =
false;
632 bool time_good =
false;
635 wires_cross = geom->ChannelsIntersect(chan1, chan2, y, z);
639 TGText* tt =
new TGText(
"too big");
640 tt->InsLine(1,
"time distance");
647 TGText* tt =
new TGText(
"wires cross");
650 xyz_vertex_fit[1] =
y;
651 xyz_vertex_fit[2] =
z;
652 geom->Plane(
pline[0].plane).LocalToWorld(origin, pos);
654 geom->Plane(
pline[1].plane).LocalToWorld(origin, pos);
657 xx0 = (xyz_vertex_fit[0] + second_time) / 2;
665 TGText* tt =
new TGText(
"cross");
666 tt->InsLine(1,
"wires do not");
674 geom->PlaneWireToChannel(
pline[0].plane,
pline[0].w1, rawOpt->fTPC, rawOpt->fCryostat);
676 geom->PlaneWireToChannel(
pline[1].plane,
pline[1].w1, rawOpt->fTPC, rawOpt->fCryostat);
682 wires_cross = geom->ChannelsIntersect(chan1, chan2, y, z);
686 TGText* tt =
new TGText(
"too big");
687 tt->InsLine(1,
"time distance");
694 TGText* tt =
new TGText(
"wires do cross");
697 xyz_vertex_fit[1] =
y;
698 xyz_vertex_fit[2] =
z;
699 geom->Plane(
pline[0].plane).LocalToWorld(origin, pos);
701 geom->Plane(
pline[1].plane).LocalToWorld(origin, pos);
704 xx1 = (xyz_vertex_fit[0] + second_time) / 2;
710 TGText* tt =
new TGText(
"cross");
711 tt->InsLine(1,
"wires do not");
722 length = pow(xx0 - xx1, 2) + pow(yy0 - yy1, 2) + pow(zz0 - zz1, 2);
723 length = pow(length, 0.5);
728 TGText* tt =
new TGText(
"selected points");
729 tt->InsLine(1,
"not enough");
741 art::Event
const* pEvent = evdb::EventHolder::Instance()->GetEvent();
747 auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService>()->DataFor(*pEvent);
748 auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService>()->DataFor(*pEvent, clockData);
754 double xyz_vertex_fit[3] = {0.};
755 double second_time = 0.;
756 double pos[3] = {0.};
757 const double origin[3] = {0., 0., 0.};
761 art::ServiceHandle<geo::Geometry const> geom;
762 art::ServiceHandle<evd::RawDrawingOptions const> rawOpt;
768 geom->PlaneWireToChannel(
ppoints[0].plane,
ppoints[0].
w, rawOpt->fTPC, rawOpt->fCryostat);
770 geom->PlaneWireToChannel(
ppoints[1].plane,
ppoints[1].w, rawOpt->fTPC, rawOpt->fCryostat);
772 bool wires_cross =
false;
773 bool time_good =
false;
776 wires_cross = geom->ChannelsIntersect(chan1, chan2, y, z);
780 TGText* tt =
new TGText(
"too big");
781 tt->InsLine(1,
"time distance");
788 xyz_vertex_fit[1] =
y;
789 xyz_vertex_fit[2] =
z;
790 geom->Plane(
ppoints[0].plane).LocalToWorld(origin, pos);
792 geom->Plane(
ppoints[1].plane).LocalToWorld(origin, pos);
795 TGText* tt =
new TGText(Form(
"z:%4.1f", z));
796 tt->InsLine(1, Form(
"x:%4.1f,", (xyz_vertex_fit[0] + second_time) / 2));
797 tt->InsLine(1, Form(
"y:%4.1f,", y));
804 TGText* tt =
new TGText(
"cross");
805 tt->InsLine(1,
"wires do not");
814 unsigned int wplane = 0;
815 unsigned int wirevertex = 0;
816 art::ServiceHandle<evd::EvdLayoutOptions const> evdlayoutopt;
818 for (
size_t xx = 0; xx <
fPlanes.size(); ++xx) {
820 for (
int yy = 0; yy < 2; ++yy)
821 if (
ppoints[yy].plane == xx) ++wplane;
829 geom->Plane(wplane).LocalToWorld(origin, pos);
830 pos[1] = xyz_vertex_fit[1];
831 pos[2] = xyz_vertex_fit[2];
833 wirevertex = geom->NearestWire(pos, wplane, rawOpt->fTPC, rawOpt->fCryostat);
845 fPlanes[wplane]->View()->Clear();
846 if (wires_cross && evdlayoutopt->fShowEndPointMarkers)
847 fPlanes[wplane]->View()->AddMarker(wirevertex, timestart, kMagenta, 29, 2.0);
849 fPlanes[wplane]->View()->AddMarker(0.0, 0.0, 2, 1, 0.1);
850 fPlanes[wplane]->Pad()->Update();
851 fPlanes[wplane]->View()->Draw();
859 TGText* tt =
new TGText(
"selected points");
860 tt->InsLine(1,
"not enough");
875 TObject* select = gPad->GetSelected();
877 if (!select->InheritsFrom(
"TBox"))
return;
879 static Float_t w0 = -1,
t0 = -1, w1 = -1, t1 = -1;
881 static Int_t pxold, pyold;
882 static Int_t pw0, pt0;
883 static Int_t linedrawn;
887 static int wstart, wend;
888 static float tstart, tend;
890 int event = gPad->GetEvent();
891 int px = gPad->GetEventX();
892 int py = gPad->GetEventY();
897 gVirtualX->SetLineColor(-1);
898 w0 = gPad->AbsPixeltoX(px);
899 t0 = gPad->AbsPixeltoY(py);
905 float x = gPad->PadtoX(w0);
906 tstart = gPad->PadtoY(
t0);
908 wstart = (
unsigned int)TMath::Nint(x);
912 case kButton1Motion: {
932 if (linedrawn) gVirtualX->DrawBox(lx, ly, hx, hy, TVirtualX::kHollow);
955 gVirtualX->DrawBox(lx, ly, hx, hy, TVirtualX::kHollow);
959 if (px == pw0 && py == pt0)
break;
960 w1 = gPad->AbsPixeltoX(px);
961 t1 = gPad->AbsPixeltoY(py);
962 gPad->Modified(kTRUE);
967 float x = gPad->PadtoX(w1);
968 tend = gPad->PadtoY(t1);
969 wend = (
unsigned int)TMath::Nint(x);
971 gROOT->SetEditorMode();
974 double xx1, yy1, xx2, yy2;
976 gPad->GetRangeAxis(xx1, yy1, xx2, yy2);
978 if (wstart != 0 && tstart != 0 && (fabs(wend - wstart) > 0.01 * (xx2 - xx1)) &&
981 this->
SetZoom(plane, wstart, wend, tstart, tend);
995 mf::LogVerbatim(
"TWQMultiTPCProjectionView") <<
"ZoomInterest called";
1002 art::ServiceHandle<geo::Geometry const> geo;
1003 art::ServiceHandle<evd::RawDrawingOptions const> rawopt;
1009 for (
size_t iplane = 0; iplane <
fPlanes.size(); ++iplane) {
1010 int minw, maxw, mint, maxt;
1013 if (rawopt->fDrawRawDataOrCalibWires == 0)
1014 fPlanes[iplane]->RawDataDraw()->GetRegionOfInterest(iplane, minw, maxw, mint, maxt);
1016 fPlanes[iplane]->RecoBaseDraw()->GetRegionOfInterest(iplane, minw, maxw, mint, maxt);
1018 if (test == -1)
continue;
1021 minw = -0.005 * (geo->Nwires(iplane) - 1);
1022 maxw = 1.005 * (geo->Nwires(iplane) - 1);
1023 mint = -0.005 *
fPlanes[iplane]->RawDataDraw()->TotalClockTicks();
1024 maxt = 1.01 *
fPlanes[iplane]->RawDataDraw()->TotalClockTicks();
1027 SetZoom(iplane, minw, maxw, mint, maxt,
false);
1028 zo.
wmin[iplane] = minw;
1029 zo.
tmin[iplane] = mint;
1030 zo.
wmax[iplane] = maxw;
1031 zo.
tmax[iplane] = maxt;
1049 art::ServiceHandle<evd::EvdLayoutOptions> evdlayoutopt;
1057 art::ServiceHandle<evd::EvdLayoutOptions> evdlayoutopt;
1066 art::ServiceHandle<evd::EvdLayoutOptions const> evdlayoutopt;
1069 fZoomInterest->Connect(
"Clicked()",
"evd::TWQMultiTPCProjectionView",
this,
"ZoomInterest()");
1073 "Clicked()",
"evd::TWQMultiTPCProjectionView",
this,
"ZoomInterest(=false)");
1076 fZoomBack->Connect(
"Clicked()",
"evd::TWQMultiTPCProjectionView",
this,
"ZoomBack()");
1081 "Clicked()",
"evd::TWQMultiTPCProjectionView",
this,
"SetZoomInterest()");
1082 if (evdlayoutopt->fAutoZoomInterest == 1)
fToggleAutoZoom->SetState(kButtonDown);
1087 fVFrame->AddFrame(
fZoomBack,
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 5, 1));
1096 if (parameter == 1 || parameter == 2) {
fToggleZoom->SetState(kButtonUp); }
1104 art::ServiceHandle<evd::EvdLayoutOptions const> evdlayoutopt;
1105 if (!evdlayoutopt->fShowEndPointSection)
return;
1110 fFindEndpoint->Connect(
"Clicked()",
"evd::TWQMultiTPCProjectionView",
this,
"FindEndPoint()");
1113 fVFrame, 100, 55, 999, TGView::kNoHSB | TGView::kNoVSB);
1115 TGText* tt =
new TGText(
"x,y,z");
1120 "Clicked()",
"evd::TWQMultiTPCProjectionView",
this,
"ClearEndPoints()");
1123 new TGCheckButton(
fVFrame,
"ShowMarkers", 0);
1125 "Clicked()",
"evd::TWQMultiTPCProjectionView",
this,
"ToggleEndPointMarkers()");
1126 if (evdlayoutopt->fShowEndPointMarkers == 1)
fToggleShowMarkers->SetState(kButtonDown);
1145 ThePrevZoomOpt.
wmin[plane],
1146 ThePrevZoomOpt.
wmax[plane],
1147 ThePrevZoomOpt.
tmin[plane],
1148 ThePrevZoomOpt.
tmax[plane],
1152 for (
size_t iplane = 0; iplane !=
fPlanes.size(); ++iplane) {
1154 ThePrevZoomOpt.
wmin[iplane],
1155 ThePrevZoomOpt.
wmax[iplane],
1156 ThePrevZoomOpt.
tmin[iplane],
1157 ThePrevZoomOpt.
tmax[iplane],
1165 mf::LogVerbatim(
"TWQMultiTPCProjectionView")
1166 <<
"unable to unzoom further - no zoom settings left on stack" << std::endl;
1189 TVirtualPad* ori = gPad;
1193 if (wirehi < wirelow) {
1199 if (timehi < timelow) {
1208 fPlanes[plane]->SetZoomRange(wirelow, wirehi, timelow, timehi);
1212 evdb::Canvas::fCanvas->cd();
1213 evdb::Canvas::fCanvas->Modified();
1214 evdb::Canvas::fCanvas->Update();
1227 TVirtualPad* ori = gPad;
1235 fWireQ->
Pad()->SetBit(TPad::kCannotMove,
true);
1236 fWireQ->
Pad()->GetFrame()->SetBit(TPad::kCannotMove,
true);
1241 evdb::Canvas::fCanvas->cd();
1242 evdb::Canvas::fCanvas->Modified();
1243 evdb::Canvas::fCanvas->Update();
1277 double threshold =
fThresEntry->GetNumberEntry()->GetNumber();
1279 art::ServiceHandle<evd::RawDrawingOptions> rawopt;
1280 rawopt->fMinSignal = threshold;
1282 TVirtualPad* ori = gPad;
1284 evdb::Canvas::fCanvas->cd();
1285 evdb::Canvas::fCanvas->Modified();
1286 evdb::Canvas::fCanvas->Update();
1297 art::ServiceHandle<evd::ColorDrawingOptions> cst;
1299 TGButton* b = (TGButton*)gTQSender;
1300 if (b->GetState() == kButtonDown) { cst->fColorOrGray = 1; }
1302 cst->fColorOrGray = 0;
1305 TVirtualPad* ori = gPad;
1307 evdb::Canvas::fCanvas->cd();
1308 evdb::Canvas::fCanvas->Modified();
1309 evdb::Canvas::fCanvas->Update();
1320 art::ServiceHandle<evd::RawDrawingOptions> rawopt;
1322 TGButton* b = (TGButton*)gTQSender;
1323 int id = b->WidgetId();
1327 rawopt->fDrawRawDataOrCalibWires = 0;
1333 rawopt->fDrawRawDataOrCalibWires = 1;
1339 rawopt->fDrawRawDataOrCalibWires = 2;
1345 TVirtualPad* ori = gPad;
1353 evdb::Canvas::fCanvas->cd();
1354 evdb::Canvas::fCanvas->Modified();
1355 evdb::Canvas::fCanvas->Update();
1366 art::ServiceHandle<evd::SimulationDrawingOptions> sdo;
1368 TGButton* b = (TGButton*)gTQSender;
1369 if (b->GetState() == kButtonDown) {
1370 sdo->fShowMCTruthText = 1;
1371 sdo->fShowMCTruthVectors = 1;
1374 sdo->fShowMCTruthText = 0;
1375 sdo->fShowMCTruthVectors = 0;
1378 TVirtualPad* ori = gPad;
1381 evdb::Canvas::fCanvas->cd();
1382 evdb::Canvas::fCanvas->Modified();
1383 evdb::Canvas::fCanvas->Update();
TGRadioButton * fCalibDraw
Draw calibrated information only.
process_name opflash particleana ie ie ie z
TQPad * fWireQ
Histogram of charge vs time on selected wire.
static unsigned int kWire
process_name opflash particleana ie x
BEGIN_PROLOG could also be cerr
Drawing pad for short summary of an MC event.
Drawing pad showing a single X-Z or Y-Z projection of an event.
then echo unknown compiler flag
TGCompositeFrame * fVFrame
needed for the side frame
The data type to uniquely identify a Plane.
Drawing pad for time or charge histograms.
double Temperature() const
In kelvin.
TGNumberEntry * fThresEntry
ADC threshold to display.
std::map< int, double > tmin
static unsigned int kPlane
TGTextButton * fUnZoomInterest
Unzoom on iteresting region.
TGRadioButton * fRawCalibDraw
Draw raw and calibrated information.
void ChangeWire(int plane)
std::vector< TWireProjPad * > fPlanes
time vs wire projection for each plane
void ZoomInterest(bool flag=true)
void Draw(const char *opt="")
MCBriefPad * fMC
Short summary of MC event.
double FindLineLength(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp)
double Efield(unsigned int planegap=0) const
kV/cm
void RadioButtonsDispatch(int parameter)
TGNumberEntry * fPlaneEntry
Plane number displayed.
The color scales used by the event display.
HeaderPad * fHeaderPad
Show header information.
std::deque< util::PxPoint > ppoints
list of points in each WireProjPad used for x,y,z finding
TGTextButton * fFindEndpoint
Calculate XYZ position of two points in wire planes.
TGCheckButton * fMCOn
Display MC truth information.
TGTextButton * fZoomBack
Unzoom on iteresting region.
process_name opflash particleana ie ie y
A drawing pad for time vs wire.
void SelectPoint(int plane)
TGCheckButton * fToggleAutoZoom
Toggle the autozoom setting.
TGTextButton * fClearPPoints
Clear current list of End Points.
static int curr_zooming_plane
TGTextView * fXYZPosition
Display the xyz position.
TGRadioButton * fRawDraw
Draw Raw information only.
void DrawPads(const char *opt="")
double DriftVelocity(double efield=0., double temperature=0.) const
cm/us
The data type to uniquely identify a TPC.
TGCompositeFrame * fMetaFrame
needed for the side frame
Class to aid in the rendering of RecoBase objects.
Class to aid in the rendering of RawData objects.
void SetMouseZoomRegion(int plane)
std::map< int, double > wmax
TWQMultiTPCProjectionView(TGMainFrame *mf)
TGTextButton * fZoomInterest
Zoom on iteresting region.
static void MouseDispatch(int plane, void *wqpv)
Encapsulate the construction of a single detector plane.
process_name physics producers generator physics producers generator physics producers generator py
Contains all timing reference information for the detector.
TGRadioButton * fToggleZoom
Use zoom setting.
void ToggleEndPointMarkers()
std::vector< TQPad * > fPlaneQ
charge on each plane
TGCheckButton * fGreyScale
Display gray or color scale.
int trigger_offset(DetectorClocksData const &data)
static const char * zoom_opt
std::vector< ZoomOptionsMultiTPC > fPrevZoomOpt
std::deque< util::PxLine > pline
list of lines in each WireProjPad used for calculating 2d and 3d angles
std::map< int, double > wmin
void SetZoom(int plane, int wirelow, int wirehi, int timelo, int timehi, bool StoreZoom=true)
TGNumberEntry * fWireEntry
Wire number displayed.
std::map< int, double > tmax
BEGIN_PROLOG hitmakerfive clustermakerfour pfparticlemakerthree showermakertwo END_PROLOG hitmakerfive clustermakerfour pfparticlemakerthree sequence::inline_paths sequence::inline_paths sequence::inline_paths showermakers test
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
ZoomOptionsMultiTPC fZoomOpt
~TWQMultiTPCProjectionView()
art framework interface to geometry description
TGNumberEntry * fDistance
Distance from line to find hits in cluster.
constexpr Point origin()
Returns a origin position with a point of the specified type.
TGCheckButton * fToggleShowMarkers
Toggle the ShowEndPointMarkersSetting.
Signal from collection planes.
void SetPlaneWire(unsigned int plane=0, unsigned int wire=0)