56 art::ServiceHandle<geo::Geometry const> geo;
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,
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();
TGRadioButton * fCalibDraw
Draw calibrated information only.
TQPad * fWireQ
Histogram of charge vs time on selected wire.
static unsigned int kWire
TGCompositeFrame * fVFrame
needed for the side frame
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
MCBriefPad * fMC
Short summary of MC event.
TGNumberEntry * fPlaneEntry
Plane number displayed.
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.
TGRadioButton * fRawDraw
Draw Raw information only.
TGCompositeFrame * fMetaFrame
needed for the side frame
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.
void SetPlaneWire(unsigned int plane=0, unsigned int wire=0)