62 evdb::Canvas::fCanvas->cd();
63 fHeaderPad =
new HeaderPad(
"fHeaderPadMultiTPC",
"Header", 0.0, 0.0, 0.15, 0.13,
"");
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,
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();
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
static unsigned int kWire
TGCompositeFrame * fVFrame
needed for the side frame
int fDrawRawDataOrCalibWires
0 for raw
TGNumberEntry * fThresEntry
ADC threshold to display.
static unsigned int kPlane
TGRadioButton * fRawCalibDraw
Draw raw and calibrated information.
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.
MCBriefPad * fMC
Short summary of MC event.
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
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
double fMinSignal
minimum ADC count to display a time bin
TGRadioButton * fRawDraw
Draw Raw information only.
TGCompositeFrame * fMetaFrame
needed for the side frame
unsigned int NTPC(unsigned int cstat=0) const
Returns the total number of TPCs in the specified cryostat.
std::vector< TQPad * > fPlaneQ
charge on each plane
TGCheckButton * fGreyScale
Display gray or color scale.
std::deque< util::PxLine > pline
list of lines in each WireProjPad used for calculating 2d and 3d angles
TGNumberEntry * fWireEntry
Wire number displayed.
LArSoft geometry interface.
void SetPlaneWire(unsigned int plane=0, unsigned int wire=0)