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" 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,
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);
183 fMCOn =
new TGCheckButton(fFrame,
"MC Truth", 5);
184 fMCOn->Connect(
"Clicked()",
"evd::TWQMultiTPCProjectionView",
this,
"SetMCInfo()");
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()");
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));
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();
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));
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);
362 evdb::Canvas::fCanvas->cd();
376 curr_zooming_plane = -1;
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();
452 for (
size_t iplane = 0; iplane <
fPlanes.size(); ++iplane) {
454 double ch = 0, convch = 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);
464 <<
"\ncharge collected at collection plane: " << iplane <<
" " << ch <<
" " << convch;
475 int event = gPad->GetEvent();
489 if (shift_lock == 1)
break;
491 case kButton1Down: shift_lock = 0;
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;
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);
544 curr_zooming_plane = -1;
547 int repeat_plane = -1;
548 for (
size_t ii = 0; ii < this->
ppoints.size(); ++ii)
549 if (ppx.
plane == this->ppoints[ii].plane) {
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();
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.;
631 bool wires_cross =
false;
632 bool time_good =
false;
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;
657 xx0 = (xyz_vertex_fit[0] + second_time) / 2;
665 TGText*
tt =
new TGText(
"cross");
666 tt->InsLine(1,
"wires do not");
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;
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();
743 std::cerr <<
"No event available\n";
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.};
764 double larv = detProp.DriftVelocity(detProp.Efield(), detProp.Temperature());
772 bool wires_cross =
false;
773 bool time_good =
false;
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;
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;
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;
830 pos[1] = xyz_vertex_fit[1];
831 pos[2] = xyz_vertex_fit[2];
836 ((xyz_vertex_fit[0]) / detProp.DriftVelocity(detProp.Efield(), detProp.Temperature())) *
840 (pos[0] / detProp.DriftVelocity(detProp.Efield(), detProp.Temperature())) *
845 fPlanes[wplane]->View()->Clear();
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);
909 curr_zooming_plane = plane;
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)) &&
979 (fabs(tend - tstart) > 0.01 * (yy2 - yy1) && curr_zooming_plane == plane)) {
981 this->
SetZoom(plane, wstart, wend, tstart, tend);
1009 for (
size_t iplane = 0; iplane <
fPlanes.size(); ++iplane) {
1010 int minw, maxw, mint, maxt;
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;
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()");
1087 fVFrame->AddFrame(
fZoomBack,
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 5, 1));
1096 if (parameter == 1 || parameter == 2) {
fToggleZoom->SetState(kButtonUp); }
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()");
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],
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) {
1206 curr_zooming_plane = -1;
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();
1252 kPlane = (
unsigned int)
fPlaneEntry->GetNumberEntry()->GetNumber();
1261 kWire = (
unsigned int)
fWireEntry->GetNumberEntry()->GetNumber();
1270 kDistance = (double)
fDistance->GetNumberEntry()->GetNumber();
1277 double threshold =
fThresEntry->GetNumberEntry()->GetNumber();
1282 TVirtualPad* ori = gPad;
1284 evdb::Canvas::fCanvas->cd();
1285 evdb::Canvas::fCanvas->Modified();
1286 evdb::Canvas::fCanvas->Update();
1299 TGButton*
b = (TGButton*)gTQSender;
1300 if (b->GetState() == kButtonDown) { cst->
fColorOrGray = 1; }
1305 TVirtualPad* ori = gPad;
1307 evdb::Canvas::fCanvas->cd();
1308 evdb::Canvas::fCanvas->Modified();
1309 evdb::Canvas::fCanvas->Update();
1322 TGButton*
b = (TGButton*)gTQSender;
1323 int id = b->WidgetId();
1345 TVirtualPad* ori = gPad;
1353 evdb::Canvas::fCanvas->cd();
1354 evdb::Canvas::fCanvas->Modified();
1355 evdb::Canvas::fCanvas->Update();
1368 TGButton*
b = (TGButton*)gTQSender;
1369 if (b->GetState() == kButtonDown) {
1378 TVirtualPad* ori = gPad;
1381 evdb::Canvas::fCanvas->cd();
1382 evdb::Canvas::fCanvas->Modified();
1383 evdb::Canvas::fCanvas->Update();
code to link reconstructed objects back to the MC truth information
TGRadioButton * fCalibDraw
Draw calibrated information only.
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
TQPad * fWireQ
Histogram of charge vs time on selected wire.
int fEnableMCTruthCheckBox
1 to have the check box appear, 0 otherwise
unsigned int fTPC
TPC number to draw, typically set by TWQProjectionView.
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
static unsigned int kWire
Drawing pad showing a single X-Z or Y-Z projection of an event.
TGCompositeFrame * fVFrame
needed for the side frame
int fDrawRawDataOrCalibWires
0 for raw
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
bool ChannelsIntersect(raw::ChannelID_t c1, raw::ChannelID_t c2, double &y, double &z) const
Returns an intersection point of two channels.
static unsigned int kPlane
SigType_t SignalType(geo::PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
TGTextButton * fUnZoomInterest
Unzoom on iteresting region.
TGRadioButton * fRawCalibDraw
Draw raw and calibrated information.
void ChangeWire(int plane)
unsigned short fShowMCTruthVectors
std::vector< TWireProjPad * > fPlanes
time vs wire projection for each plane
unsigned int Nwires(unsigned int p, unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wires in the specified plane.
static Argument * parameter
art framework interface to geometry description
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.
int fShowEndPointSection
Show section corresponding to EndPoint finding.
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.
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
int fShowSideBar
1 to show, 0 don't show
TGTextButton * fZoomBack
Unzoom on iteresting region.
A drawing pad for time vs wire.
int fAutoZoomInterest
Set the automatic zoom to the interest region.
void SelectPoint(int plane)
TGCheckButton * fToggleAutoZoom
Toggle the autozoom setting.
TGTextButton * fClearPPoints
Clear current list of End Points.
unsigned int fCryostat
Cryostat number to draw, typically set by TWQProjectionView.
static int curr_zooming_plane
geo::WireID::WireID_t NearestWire(geo::Point_t const &point, geo::PlaneID const &planeid) const
Returns the index of wire closest to position in the specified TPC.
int fShowEndPointMarkers
Draw EndPoint Markers if clicked.
double fMinSignal
minimum ADC count to display a time bin
TGTextView * fXYZPosition
Display the xyz position.
TGRadioButton * fRawDraw
Draw Raw information only.
geo::TPCID CurrentTPC() const
Returns the current TPC as a TPCID.
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
auto select(T const &...t)
void SetMouseZoomRegion(int plane)
unsigned int NTPC(unsigned int cstat=0) const
Returns the total number of TPCs in the specified cryostat.
std::map< int, double > wmax
TWQMultiTPCProjectionView(TGMainFrame *mf)
TGTextButton * fZoomInterest
Zoom on iteresting region.
static void MouseDispatch(int plane, void *wqpv)
raw::ChannelID_t PlaneWireToChannel(WireID const &wireid) const
Returns the ID of the TPC channel connected to the specified wire.
Encapsulate the construction of a single detector plane.
int fChangeWire
1 to click mouse and change wire, 0 don't
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 fColorOrGray
0 = color, 1 = gray
int trigger_offset(DetectorClocksData const &data)
static const char * zoom_opt
std::vector< ZoomOptionsMultiTPC > fPrevZoomOpt
int fPrintTotalCharge
Print out the total charge in an event.
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
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
ZoomOptionsMultiTPC fZoomOpt
LArSoft geometry interface.
~TWQMultiTPCProjectionView()
void LocalToWorld(const double *plane, double *world) const
Transform point from local plane frame to world frame.
TGNumberEntry * fDistance
Distance from line to find hits in cluster.
constexpr Point origin()
Returns a origin position with a point of the specified type.
QTextStream & endl(QTextStream &s)
Event finding and building.
TGCheckButton * fToggleShowMarkers
Toggle the ShowEndPointMarkersSetting.
Signal from collection planes.
void SetPlaneWire(unsigned int plane=0, unsigned int wire=0)