LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
TWireProjPad.cxx
Go to the documentation of this file.
1 #include <algorithm>
9 
11 #include "TPad.h"
12 #include "TH1F.h"
13 #include "TString.h"
14 #include "TMarker.h"
15 #include "TLine.h"
16 #include "TPolyLine.h"
17 #include "TClass.h"
18 #include "TVirtualPad.h"
19 #include "TCanvas.h"
20 #include "TList.h"
21 
34 #include "TFrame.h"
35 
36 
41 
42 namespace {
43 
44  template <typename Stream>
45  void DumpPad(Stream&& log, TVirtualPad* pPad) {
46  if (!pPad) {
47  log << "pad not available";
48  return;
49  }
50 
51  log << pPad->IsA()->GetName() << "[" << ((void*) pPad) << "](\"" << pPad->GetName() << "\")";
52  TFrame const* pFrame = pPad->GetFrame();
53  if (pFrame) {
54  double const low_wire = pFrame->GetX1(), high_wire = pFrame->GetX2();
55  double const low_tdc = pFrame->GetY1(), high_tdc = pFrame->GetY2();
56  double const wire_pixels = pPad->XtoAbsPixel(high_wire) - pPad->XtoAbsPixel(low_wire);
57  double const tdc_pixels = -(pPad->YtoAbsPixel(high_tdc) - pPad->YtoAbsPixel(low_tdc));
58  log << " has frame spanning wires "
59  << low_wire << "-" << high_wire << " and TDC " << low_tdc << "-" << high_tdc
60  << " in a window " << wire_pixels << "x" << tdc_pixels << " pixel big";
61  }
62  else {
63  log << " has no frame";
64  }
65 
66  } // DumpPad()
67 
68 
69  [[gnu::unused]] void DumpPadsInCanvas
70  (TVirtualPad* pPad, std::string caller, std::string msg = "")
71  {
72  mf::LogDebug log(caller);
73  if (!msg.empty()) log << msg << ": ";
74  if (!pPad) {
75  log << "pad not available";
76  return;
77  }
78 
79  DumpPad(log, pPad);
80 
81  TCanvas const* pCanvas = pPad->GetCanvas();
82  log << "\nCanvas is: (TCanvas*) (" << ((void*)pPad->GetCanvas())
83  << ") with " << pCanvas->GetListOfPrimitives()->GetSize() << " primitives and the following pads:";
84  TIterator* pIter = pCanvas->GetListOfPrimitives()->MakeIterator();
85  TObject const* pObject;
86  while ((pObject = pIter->Next())) {
87  if (!pObject->InheritsFrom(TVirtualPad::Class())) continue;
88  log << "\n " << ((pObject == pPad)? '*': '-') << " ";
89  DumpPad(log, (TVirtualPad*) pObject);
90  }
91  log << "\n";
92  delete pIter;
93  } // DumpPadsInCanvas()
94 
95 } // local namespace
96 
97 namespace evd{
98 
110  const char* ti,
111  double x1, double x2,
112  double y1, double y2,
113  unsigned int plane)
114  : DrawingPad(nm, ti, x1, x2, y1, y2)
115  , fPlane(plane)
116  {
117 
118  fCurrentZoom.resize(4);
119 
121 
122  // this->Pad()->SetBit(kCannotPick); // workaround for issue #16169
123  // this->Pad()->SetBit(TPad::kCannotMove);
124  this->Pad()->cd();
125 
126  this->Pad()->SetLeftMargin (0.070);
127  this->Pad()->SetRightMargin (0.010);
128 
129  // how many planes in the detector and
130  // which plane is this one?
131 
132  unsigned int planes = geo->Nplanes();
133  this->Pad()->SetTopMargin (0.005);
134  this->Pad()->SetBottomMargin(0.110);
135 
136  // there has to be a better way of doing this that does
137  // not have a case for each number of planes in a detector
138  if(planes == 2 && fPlane > 0){
139  this->Pad()->SetTopMargin (0.110);
140  this->Pad()->SetBottomMargin(0.005);
141  }
142  else if(planes > 2){
143  if(fPlane == 1){
144  this->Pad()->SetTopMargin (0.055);
145  this->Pad()->SetBottomMargin(0.055);
146  }
147  else if(fPlane == 2){
148  this->Pad()->SetTopMargin (0.110);
149  this->Pad()->SetBottomMargin(0.005);
150  }
151  }
152 
153  TString planeNo = "fTWirePlane";
154  planeNo += fPlane;
155 
156  // picking the information from the current TPC
158  auto const signalType = geo->SignalType({ rawopt->CurrentTPC(), fPlane });
159  TString xtitle = ";Induction Wire;t (tdc)";
160  if(signalType == geo::kCollection) xtitle = ";Collection Wire;t (tdc)";
161 
162  unsigned int const nWires = geo->Nwires(fPlane);
163  unsigned int const nTicks = RawDataDraw()->TotalClockTicks();
164 
165  fXLo = -0.005 * (nWires - 1);
166  fXHi = 1.005 * (nWires - 1);
167  fYLo = 0.990*(unsigned int)(this->RawDataDraw()->StartTick());
168  fYHi = 1.005*std::min((unsigned int)(this->RawDataDraw()->StartTick()+nTicks), nTicks);
169 
170  fOri = rawopt->fAxisOrientation;
171  if(fOri > 0){
172  fYLo = -0.005 * (nWires - 1);
173  fYHi = 1.005 * (nWires - 1);
174  fYLo = 0.990*(unsigned int)(this->RawDataDraw()->StartTick());
175  fYHi = 1.005*std::min((unsigned int)(this->RawDataDraw()->StartTick()+nTicks), nTicks);
176  fXLo = -0.005 * nTicks;
177  fXHi = 1.010 * nTicks;
178  xtitle = ";t (tdc);InductionWire";
179  if(signalType == geo::kCollection) xtitle = ";t (tdc);Collection Wire";
180  }
181 
182  // make the range of the histogram be the biggest extent
183  // in both directions and then use SetRangeUser() to shrink it down
184  // that will allow us to change the axes on the fly
185  double min = std::min(fXLo, fYLo);
186  double max = std::max(fXHi, fYHi);
187 
188  fHisto = new TH1F(*(fPad->DrawFrame(min, min, max, max)));
189 
190  fHisto->SetTitleOffset(0.5,"Y");
191  fHisto->SetTitleOffset(0.75,"X");
193  fHisto->GetYaxis()->SetLabelSize(0.05);
194  fHisto->GetYaxis()->CenterTitle();
195  fHisto->GetXaxis()->SetLabelSize(0.05);
196  fHisto->GetXaxis()->CenterTitle();
197  fHisto->Draw("AB");
198 
199  fView = new evdb::View2D();
200  }
201 
202  //......................................................................
204  {
205  if (fHisto) { delete fHisto; fHisto = 0; }
206  if (fView) { delete fView; fView = 0; }
207  }
208 
209  //......................................................................
210  void TWireProjPad::Draw(const char* opt)
211  {
212  // DumpPadsInCanvas(fPad, "TWireProjPad", "Draw()");
213  LOG_DEBUG("TWireProjPad") << "Started to draw plane " << fPlane;
214 
216  int kSelectedColor = 4;
217  fView->Clear();
218 
219  // grab the singleton holding the art::Event
221  if(evt){
223 
224  this->SimulationDraw()->MCTruthVectors2D(*evt, fView, fPlane);
225 
226  // the 2D pads have too much detail to be rendered on screen;
227  // to act smarter, RawDataDrawer needs to know the range being plotted
228  this->RawDataDraw()-> ExtractRange (fPad, &GetCurrentZoom());
229  this->RawDataDraw()-> RawDigit2D
230  (*evt, fView, fPlane, GetDrawOptions().bZoom2DdrawToRoI);
231 
232  this->RecoBaseDraw()-> Wire2D (*evt, fView, fPlane);
233  this->RecoBaseDraw()-> Hit2D (*evt, fView, fPlane);
234 
235  if(recoOpt->fUseHitSelector)
236  this->RecoBaseDraw()->Hit2D(this->HitSelectorGet()->GetSelectedHits(fPlane),
237  kSelectedColor,
238  fView);
239 
240  this->RecoBaseDraw()-> Slice2D (*evt, fView, fPlane);
241  this->RecoBaseDraw()-> Cluster2D (*evt, fView, fPlane);
242  this->RecoBaseDraw()-> EndPoint2D (*evt, fView, fPlane);
243  this->RecoBaseDraw()-> Prong2D (*evt, fView, fPlane);
244  this->RecoBaseDraw()-> Vertex2D (*evt, fView, fPlane);
245  this->RecoBaseDraw()-> Seed2D (*evt, fView, fPlane);
246  this->RecoBaseDraw()-> BezierTrack2D (*evt, fView, fPlane);
247  this->RecoBaseDraw()-> OpFlash2D (*evt, fView, fPlane);
248  this->RecoBaseDraw()-> Event2D (*evt, fView, fPlane);
249  this->RecoBaseDraw()-> DrawTrackVertexAssns2D(*evt, fView, fPlane);
250 
251  // DumpPadsInCanvas(fPad, "TWireProjPad", "Before UpdatePad()");
252  UpdatePad();
253  } // if (evt)
254 
255  // DumpPadsInCanvas(fPad, "TWireProjPad", "Before ClearandUpdatePad()");
257 
258  // DumpPadsInCanvas(fPad, "TWireProjPad", "After ClearandUpdatePad()");
259 
260  // check if we need to swap the axis ranges
262  if(fOri != rawopt->fAxisOrientation){
263  fOri = rawopt->fAxisOrientation;
264  double max = fXHi;
265  double min = fXLo;
266  fXHi = fYHi;
267  fXLo = fYLo;
268  fYHi = max;
269  fYLo = min;
270 
272 
273  TString xtitle = fHisto->GetXaxis()->GetTitle();
274  fHisto->GetXaxis()->SetTitle(fHisto->GetYaxis()->GetTitle());
275  fHisto->GetYaxis()->SetTitle(xtitle);
276  }
277 
278  if (fPlane > 0) fHisto->Draw("X+");
279  else fHisto->Draw("");
280 
281 
282  // Check if we should zoom the displays;
283  // if there is no event, we have no clue about the region of interest
284  // and therefore we don't touch anything
285  if (opt==0 && evt) {
286  // if (drawopt->fAutoZoom) this->AutoZoom();
287  // else this->ShowFull();
288  this->ShowFull();
289  }
290 
291  LOG_DEBUG("TWireProjPad") << "Started rendering plane " << fPlane;
292 
293  fView->Draw();
294 
295  LOG_DEBUG("TWireProjPad") << "Drawing of plane " << fPlane << " completed";
296  }
297 
298  //......................................................................
300  {
302  if(recoOpt->fUseHitSelector){
304  this->Draw();
305  }
306 
307  return;
308  }
309 
310  //......................................................................
311 
317  // void TWireProjPad::AutoZoom()
318  // {
319  // double xmin, ymin, zmin;
320  // double xmax, ymax, zmax;
321  // this->RawDataDraw()->GetLimits(&xmin, &xmax,
322  // &ymin, &ymax,
323  // &zmin, &zmax);
324  // double dx = xmax-xmin;
325  // double dy = ymax-ymin;
326  // double dz = zmax-zmin;
327 
328  // if (dx<dy) dx = dy;
329  // else dy = dx;
330  // xmin = 0.5*(xmin+xmax)-0.6*dx;
331  // xmax = 0.5*(xmin+xmax)+0.6*dx;
332  // ymin = 0.5*(ymin+ymax)-0.6*dy;
333  // ymax = 0.5*(ymin+ymax)+0.6*dy;
334  // zmin -= 0.1*dz;
335  // zmax += 0.1*dz;
336 
337  // fHisto->GetXaxis()->SetRangeUser(zmin,zmax);
338  // if (fXorY==kX) fHisto->GetYaxis()->SetRangeUser(xmin,xmax);
339  // else fHisto->GetYaxis()->SetRangeUser(ymin,ymax);
340  // }
341 
342  //......................................................................
343  // the override parameter is needed to unzoom to full range when the fAutoZoomInterest is on.
344 
345  void TWireProjPad::ShowFull(int override)
346  {
348 
349  // x values are wire numbers, y values are ticks of the clock
350  int xmin = fXLo;
351  int xmax = fXHi;
352  int ymax = fYHi;
353  int ymin = fYLo;
354 
357 
358  if(GetDrawOptions().bZoom2DdrawToRoI && !override){
359  int test=0;
360  if(rawopt->fDrawRawDataOrCalibWires == 0)
361  test=RawDataDraw()->GetRegionOfInterest((int)fPlane,xmin,xmax,ymin,ymax);
362  else
363  test=RecoBaseDraw()->GetRegionOfInterest((int)fPlane,xmin,xmax,ymin,ymax);
364 
365  if(test != 0) return;
366  }
367 
368  SetZoomRange(xmin, xmax, ymin, ymax);
369 
370  return;
371  }
372 
373  //......................................................................
374  void TWireProjPad::GetWireRange(int* i1, int* i2) const
375  {
376  if(fOri < 1){
377  *i1 = fHisto->GetXaxis()->GetFirst();
378  *i2 = fHisto->GetXaxis()->GetLast();
379  }
380  else{
381  *i1 = fHisto->GetYaxis()->GetFirst();
382  *i2 = fHisto->GetYaxis()->GetLast();
383  }
384 
385  return;
386  }
387 
388  //......................................................................
389  // Set the X axis range only
390  //
391  void TWireProjPad::SetWireRange(int i1, int i2)
392  {
393  if(fOri < 1){
394  fHisto->GetXaxis()->SetRange(i1,i2);
395  }
396  else{
397  fHisto->GetYaxis()->SetRange(i1,i2);
398  }
399  fCurrentZoom[0] = i1;
400  fCurrentZoom[1] = i2;
401 
402  return;
403  }
404 
405  //......................................................................
406  // Set the visible range of the wire / time view
407  //
408  void TWireProjPad::SetZoomRange(int i1, int i2,int y1, int y2)
409  {
410  LOG_DEBUG("TWireProjPad")
411  << "SetZoomRange(" << i1 << ", " << i2 << ", " << y1 << ", " << y2
412  << ") on plane #" << fPlane;
413 
414  fHisto->GetXaxis()->SetRangeUser(i1,i2);
415  fHisto->GetYaxis()->SetRangeUser(y1,y2);
416  fCurrentZoom[0]=i1;
417  fCurrentZoom[1]=i2;
418  fCurrentZoom[2]=y1;
419  fCurrentZoom[3]=y2;
420  }
421  //......................................................................
422  // Set the visible range of the wire / time view from the view
423  //
425  TAxis const& xaxis = *(fHisto->GetXaxis());
426  fCurrentZoom[0] = xaxis.GetBinLowEdge(xaxis.GetFirst());
427  fCurrentZoom[1] = xaxis.GetBinUpEdge(xaxis.GetLast());
428  fCurrentZoom[2] = fHisto->GetMinimum();
429  fCurrentZoom[3] = fHisto->GetMaximum();
430  LOG_DEBUG("TWireProjPad") << "Zoom set to wires ("
431  << fCurrentZoom[0] << "; " << fCurrentZoom[1] << " ), tick ("
432  << fCurrentZoom[2] << "; " << fCurrentZoom[3] << ") for plane #"
433  << fPlane;
434  } // TWireProjPad::SetZoomFromView()
435  //......................................................................
436  void TWireProjPad::SaveHitList(double i1,
437  double i2,
438  double y1,
439  double y2,
440  double distance,
441  const char* zoom_opt,
442  bool good_plane)
443  {
445  if(evt){
447  if(recoopt->fUseHitSelector){
448  this->HitSelectorGet()->SaveHits(*evt, fView, fPlane, i1, i2, y1, y2, distance, good_plane);
449  this->Draw(zoom_opt);
450  }
451  }
452 
453  return;
454  }
455 
457  // Pass the seed list onwards to InfoTransfer
458  //
459  double TWireProjPad::SaveSeedList(std::vector< util::PxLine > seedlines,
460  double distance)
461  {
462  double KineticEnergy = util::kBogusD;
464  if(evt){
466  if(recoopt->fUseHitSelector)
467  KineticEnergy = this->HitSelectorGet()->SaveSeedLines(*evt, fView,seedlines, distance);
468  }
469  return KineticEnergy;
470  }
471 
472  //......................................................................
474  double y,
475  const char* zoom_opt)
476  {
477 
479  if(evt){
481  if(recoopt->fUseHitSelector){
482  this->HitSelectorGet()->ChangeHit(*evt, fView, fPlane,x,y);
483  this->Draw(zoom_opt);
484  }
485  }
486 
487  return;
488  }
489 
490  //......................................................................
492  {
493  fPad->Clear();
494  this->UpdatePad();
495 
496  return;
497  }
498 
499  //......................................................................
501  fPad->cd();
502  fPad->Modified();
503  fPad->Update();
504  fPad->GetFrame()->SetBit(TPad::kCannotMove,true);
505  fPad->SetBit(TPad::kCannotMove,true);
506 
507  return;
508  }
509 
510  //......................................................................
511  void TWireProjPad::DrawLinesinView(std::vector< util::PxLine > lines,
512  bool deleting,
513  const char * zoom_opt)
514  {
515 
517  detinfo::DetectorProperties const* det = lar::providerFrom<detinfo::DetectorPropertiesService>();
518 
519  fPad->cd();
520  if(deleting) {
521  fPad->Clear();
522  this->Draw(zoom_opt);
523  }
524  else {
525  fView->Clear();
526  fView->Draw();
527  }
528 
529  mf::LogVerbatim("TWireProjPad") << "Drawing " << lines.size() <<" lines";
530 
531  for(size_t is = 0; is < lines.size(); ++is){
532  if(fPlane!=lines[is].plane)
533  continue;
534 
535  TLine& l = fView->AddLine(lines[is].w0,lines[is].t0,lines[is].w1,lines[is].t1);
536 
537  fView->Draw();
538  evd::Style::FromPDG(l,11);
539 
540  // In Seed mode, colour of "sealed" seeds to green
541  if(evdlayoutopt->fMakeSeeds){
542  if( ( (lines.size()%3)==0 ) ||
543  ( is < ( lines.size()-(lines.size()%3) ) )) {
544  l.SetLineColor(kGreen);
545  }
546  else
547  l.SetLineColor(kRed);
548  }
549  }
550 
551  // Seed mode guide lines
552 
553  if(evdlayoutopt->fMakeSeeds){
554  TLine &lg1 = fView->AddLine(0,0,0,0);
555  fView->Draw();
556  TLine &lg0 = fView->AddLine(0,0,0,0);
557  fView->Draw();
558  lg1.SetLineStyle(kDashed);
559  lg0.SetLineStyle(kDashed);
560  lg0.SetLineWidth(1);
561  lg1.SetLineWidth(1);
562  lg0.SetLineColor(kGray);
563  lg1.SetLineColor(kGray);
564  lg0.SetBit(kCannotPick);
565  lg1.SetBit(kCannotPick);
566 
567  if((lines.size()%3)==1){
568  mf::LogVerbatim("TWireProjPad") << "adding guide lines";
569  util::PxLine TopLine = lines.at(lines.size()-1);
570  lg0.SetX1(1);
571  lg0.SetX2(5000);
572 
573  double TopT0 = det->ConvertXToTicks(det->ConvertTicksToX(TopLine.t0,TopLine.plane,0,0),fPlane,0,0);
574  double TopT1 = det->ConvertXToTicks(det->ConvertTicksToX(TopLine.t1,TopLine.plane,0,0),fPlane,0,0);
575 
576  lg0.SetY1(TopT0);
577  lg0.SetY2(TopT0);
578 
579  lg1.SetX1(1);
580  lg1.SetX2(5000);
581 
582  lg1.SetY1(TopT1);
583  lg1.SetY2(TopT1);
584 
585 
586  }
587  }
588  fView->Draw();
589  UpdatePad();
590  fView->Draw();
591 
592  return;
593  }
594 
596  //
597  // This method creates and draws a curve on
598  // each view, given the seeds selected by
599  // the user in the HitSelector.
600  //
601  // The return value is the length of the 3D
602  // track
603  //
604  double TWireProjPad::UpdateSeedCurve(std::vector<recob::Seed> SeedVec, int plane)
605  {
606  mf::LogVerbatim("TWireProjPad") <<"running updateseedcurve for plane " << plane;
607  fView->Draw();
608  UpdatePad();
609  int N=100;
610 
611  double ReturnVal=0;
612 
613  // For some reason, this line is needed to prevent lines being drawn twice
614  // TPolyLine& pldummy1 = fView->AddPolyLine(2,kBlue,1,0);
615  // pldummy1.SetPoint(0,0,0);
616  // pldummy1.SetPoint(1,0,0);
617 
618  int c=0; int t=0;
619  int LastGoodValue=0;
620  double ticks[3];
621  double projpt[3];
622 
623  if(SeedVec.size() > 1){
624  TPolyLine& pl = fView->AddPolyLine(N,kOrange+9,2,0);
625  fView->Draw();
626 
627  trkf::BezierTrack BTrack(SeedVec);
628 
629  for(int i = 0; i != N; ++i){
630  try{
631  BTrack.GetProjectedPointUVWT(float(i)/N,projpt,ticks,c,t );
632  LastGoodValue=i;
633  LOG_DEBUG("TWireProjPad") << i << " ";
634  }
635  catch(cet::exception excp){
636  BTrack.GetProjectedPointUVWT(float(LastGoodValue)/N, projpt, ticks, c, t);
637  }
638 
639  double x = projpt[plane];
640  double y = ticks[plane];
641  pl.SetPoint(i,x,y);
642 
643  if(LastGoodValue!=i){
644  TMarker& mrk = fView->AddMarker(x, y, 3, 34, 1.5);
645  mrk.SetMarkerColor(3);
646  }
647  }
648  ReturnVal = BTrack.GetLength();
649  }
650  else
651  ReturnVal=0;
652 
653  fView->Draw();
654  UpdatePad();
655 
656  return ReturnVal;
657  }
658 
659 }// namespace
661 
662 
663 
664 
665 
Float_t x
Definition: compare.C:6
int GetRegionOfInterest(int plane, int &minw, int &maxw, int &mint, int &maxt)
code to link reconstructed objects back to the MC truth information
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
const art::Event * GetEvent() const
Definition: EventHolder.cxx:45
double t1
defined to be the ending t-position (of line or seed depending)
Definition: PxUtils.h:72
TTree * t1
Definition: plottest35.C:26
Float_t y1[n_points_granero]
Definition: compare.C:5
TPolyLine & AddPolyLine(int n, int c, int w, int s)
Definition: View2D.cxx:210
Drawing pad showing a single X-Z or Y-Z projection of an event.
int fDrawRawDataOrCalibWires
0 for raw
Float_t x1[n_points_granero]
Definition: compare.C:5
TLine & AddLine(double x1, double y1, double x2, double y2)
Definition: View2D.cxx:187
unsigned int fPlane
Which plane in the detector.
Definition: TWireProjPad.h:91
Float_t y
Definition: compare.C:6
double SaveSeedList(std::vector< util::PxLine > seedlines, double distance)
void Draw(const char *opt=0)
void ShowFull(int override=0)
double fXLo
Low value of x axis.
Definition: TWireProjPad.h:95
A collection of drawable 2-D objects.
static void FromPDG(TLine &line, int pdgcode)
Definition: Style.cxx:139
SigType_t SignalType(geo::PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
TGaxis * xaxis
Definition: plot_hist.C:61
void Clear()
Definition: View2D.cxx:109
Singleton to hold the current art::Event for the event display.
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.
Float_t y2[n_points_geant4]
Definition: compare.C:26
virtual double ConvertXToTicks(double X, int p, int t, int c) const =0
int fMakeSeeds
Draw two lines to make clusters if clicked.
std::vector< double > const & GetCurrentZoom() const
Definition: TWireProjPad.h:79
void SaveHits(const art::Event &evt, evdb::View2D *view, unsigned int plane, double x, double y, double x1, double y1, double distance, bool good_plane=true)
void SaveHitList(double i1, double i2, double y1, double y2, double distance, const char *zoom_opt, bool good_plane=true)
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
Int_t max
Definition: plot.C:27
void ClearHitList(unsigned int plane)
void SelectOneHit(double x, double y, const char *zoom_opt)
LArSoft includes.
RawDataDrawer * RawDataDraw()
Definition: DrawingPad.cxx:109
void Draw()
Definition: View2D.cxx:89
int fOri
Orientation of the axes - see RawDrawingOptions for values.
Definition: TWireProjPad.h:99
Class to perform operations needed to select hits and pass them to a cluster.
static EventHolder * Instance()
Definition: EventHolder.cxx:15
double fXHi
High value of x axis.
Definition: TWireProjPad.h:96
DrawOptions_t const & GetDrawOptions() const
Return the current draw options.
Definition: TWireProjPad.h:50
Base class for event display drawing pads.
Definition: DrawingPad.h:29
RecoBaseDrawer * RecoBaseDraw()
Definition: DrawingPad.cxx:120
int Hit2D(const art::Event &evt, evdb::View2D *view, unsigned int plane)
TPad * Pad()
Definition: DrawingPad.h:37
geo::TPCID CurrentTPC() const
Returns the current TPC as a TPCID.
double TotalClockTicks() const
Definition: RawDataDrawer.h:85
void GetProjectedPointUVWT(double s, double *uvw, double *ticks, int c, int t) const
double fYLo
Low value of y axis.
Definition: TWireProjPad.h:97
SimulationDrawer * SimulationDraw()
Definition: DrawingPad.cxx:99
Class to aid in the rendering of RecoBase objects.
TH1F * fHisto
Histogram to draw object on.
Definition: TWireProjPad.h:92
Class to aid in the rendering of RawData objects.
void DrawLinesinView(std::vector< util::PxLine > lines, bool deleting=false, const char *zoom_opt=0)
void SetWireRange(int i1, int i2)
virtual double ConvertTicksToX(double ticks, int p, int t, int c) const =0
double StartTick() const
Definition: RawDataDrawer.h:84
double SaveSeedLines(const art::Event &evt, evdb::View2D *view, std::vector< util::PxLine > seedline, double distance)
Definition: HitSelector.cxx:56
Encapsulate the construction of a single detector plane.
Int_t min
Definition: plot.C:26
void SetZoomRange(int i1, int i2, int y1, int y2)
Render the objects from the Simulation package.
HitSelector * HitSelectorGet()
Definition: DrawingPad.cxx:144
int fAxisOrientation
0 = TDC values on y-axis, wire number on x-axis, 1 = swapped
#define LOG_DEBUG(id)
static const char * zoom_opt
int GetRegionOfInterest(int plane, int &minw, int &maxw, int &mint, int &maxt)
void MCTruthVectors2D(const art::Event &evt, evdb::View2D *view, unsigned int plane)
constexpr double kBogusD
obviously bogus double value
TPad * fPad
The ROOT graphics pad.
Definition: DrawingPad.h:53
void SetZoomFromView()
Sets the zoom parameters from the current histogram view.
TCEvent evt
Definition: DataStructs.cxx:5
void GetWireRange(int *i1, int *i2) const
Float_t x2[n_points_geant4]
Definition: compare.C:26
unsigned int plane
Definition: PxUtils.h:73
double GetLength() const
double UpdateSeedCurve(std::vector< recob::Seed > SeedVec, int plane)
std::vector< double > fCurrentZoom
Definition: TWireProjPad.h:87
Namespace collecting geometry-related classes utilities.
TMarker & AddMarker(double x, double y, int c, int st, double sz)
Definition: View2D.cxx:124
double fYHi
High value of y axis.
Definition: TWireProjPad.h:98
double t0
defined to be the vertex t-position
Definition: PxUtils.h:70
art framework interface to geometry description
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
evdb::View2D * fView
Collection of graphics objects to render.
Definition: TWireProjPad.h:93
Signal from collection planes.
Definition: geo_types.h:93
TWireProjPad(const char *nm, const char *ti, double x1, double y1, double x2, double y2, unsigned int plane)
void ChangeHit(const art::Event &evt, evdb::View2D *view, unsigned int plane, double x, double y)