LArSoft  v06_85_00
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()-> Cluster2D (*evt, fView, fPlane);
241  this->RecoBaseDraw()-> EndPoint2D (*evt, fView, fPlane);
242  this->RecoBaseDraw()-> Prong2D (*evt, fView, fPlane);
243  this->RecoBaseDraw()-> Vertex2D (*evt, fView, fPlane);
244  this->RecoBaseDraw()-> Seed2D (*evt, fView, fPlane);
245  this->RecoBaseDraw()-> BezierTrack2D (*evt, fView, fPlane);
246  this->RecoBaseDraw()-> OpFlash2D (*evt, fView, fPlane);
247  this->RecoBaseDraw()-> Event2D (*evt, fView, fPlane);
248  this->RecoBaseDraw()-> DrawTrackVertexAssns2D(*evt, fView, fPlane);
249 
250  // DumpPadsInCanvas(fPad, "TWireProjPad", "Before UpdatePad()");
251  UpdatePad();
252  } // if (evt)
253 
254  // DumpPadsInCanvas(fPad, "TWireProjPad", "Before ClearandUpdatePad()");
256 
257  // DumpPadsInCanvas(fPad, "TWireProjPad", "After ClearandUpdatePad()");
258 
259  // check if we need to swap the axis ranges
261  if(fOri != rawopt->fAxisOrientation){
262  fOri = rawopt->fAxisOrientation;
263  double max = fXHi;
264  double min = fXLo;
265  fXHi = fYHi;
266  fXLo = fYLo;
267  fYHi = max;
268  fYLo = min;
269 
271 
272  TString xtitle = fHisto->GetXaxis()->GetTitle();
273  fHisto->GetXaxis()->SetTitle(fHisto->GetYaxis()->GetTitle());
274  fHisto->GetYaxis()->SetTitle(xtitle);
275  }
276 
277  if (fPlane > 0) fHisto->Draw("X+");
278  else fHisto->Draw("");
279 
280 
281  // Check if we should zoom the displays;
282  // if there is no event, we have no clue about the region of interest
283  // and therefore we don't touch anything
284  if (opt==0 && evt) {
285  // if (drawopt->fAutoZoom) this->AutoZoom();
286  // else this->ShowFull();
287  this->ShowFull();
288  }
289 
290  LOG_DEBUG("TWireProjPad") << "Started rendering plane " << fPlane;
291 
292  fView->Draw();
293 
294  LOG_DEBUG("TWireProjPad") << "Drawing of plane " << fPlane << " completed";
295  }
296 
297  //......................................................................
299  {
301  if(recoOpt->fUseHitSelector){
303  this->Draw();
304  }
305 
306  return;
307  }
308 
309  //......................................................................
310 
316  // void TWireProjPad::AutoZoom()
317  // {
318  // double xmin, ymin, zmin;
319  // double xmax, ymax, zmax;
320  // this->RawDataDraw()->GetLimits(&xmin, &xmax,
321  // &ymin, &ymax,
322  // &zmin, &zmax);
323  // double dx = xmax-xmin;
324  // double dy = ymax-ymin;
325  // double dz = zmax-zmin;
326 
327  // if (dx<dy) dx = dy;
328  // else dy = dx;
329  // xmin = 0.5*(xmin+xmax)-0.6*dx;
330  // xmax = 0.5*(xmin+xmax)+0.6*dx;
331  // ymin = 0.5*(ymin+ymax)-0.6*dy;
332  // ymax = 0.5*(ymin+ymax)+0.6*dy;
333  // zmin -= 0.1*dz;
334  // zmax += 0.1*dz;
335 
336  // fHisto->GetXaxis()->SetRangeUser(zmin,zmax);
337  // if (fXorY==kX) fHisto->GetYaxis()->SetRangeUser(xmin,xmax);
338  // else fHisto->GetYaxis()->SetRangeUser(ymin,ymax);
339  // }
340 
341  //......................................................................
342  // the override parameter is needed to unzoom to full range when the fAutoZoomInterest is on.
343 
344  void TWireProjPad::ShowFull(int override)
345  {
347 
348  // x values are wire numbers, y values are ticks of the clock
349  int xmin = fXLo;
350  int xmax = fXHi;
351  int ymax = fYHi;
352  int ymin = fYLo;
353 
356 
357  if(GetDrawOptions().bZoom2DdrawToRoI && !override){
358  int test=0;
359  if(rawopt->fDrawRawDataOrCalibWires == 0)
360  test=RawDataDraw()->GetRegionOfInterest((int)fPlane,xmin,xmax,ymin,ymax);
361  else
362  test=RecoBaseDraw()->GetRegionOfInterest((int)fPlane,xmin,xmax,ymin,ymax);
363 
364  if(test != 0) return;
365  }
366 
367  SetZoomRange(xmin, xmax, ymin, ymax);
368 
369  return;
370  }
371 
372  //......................................................................
373  void TWireProjPad::GetWireRange(int* i1, int* i2) const
374  {
375  if(fOri < 1){
376  *i1 = fHisto->GetXaxis()->GetFirst();
377  *i2 = fHisto->GetXaxis()->GetLast();
378  }
379  else{
380  *i1 = fHisto->GetYaxis()->GetFirst();
381  *i2 = fHisto->GetYaxis()->GetLast();
382  }
383 
384  return;
385  }
386 
387  //......................................................................
388  // Set the X axis range only
389  //
390  void TWireProjPad::SetWireRange(int i1, int i2)
391  {
392  if(fOri < 1){
393  fHisto->GetXaxis()->SetRange(i1,i2);
394  }
395  else{
396  fHisto->GetYaxis()->SetRange(i1,i2);
397  }
398  fCurrentZoom[0] = i1;
399  fCurrentZoom[1] = i2;
400 
401  return;
402  }
403 
404  //......................................................................
405  // Set the visible range of the wire / time view
406  //
407  void TWireProjPad::SetZoomRange(int i1, int i2,int y1, int y2)
408  {
409  LOG_DEBUG("TWireProjPad")
410  << "SetZoomRange(" << i1 << ", " << i2 << ", " << y1 << ", " << y2
411  << ") on plane #" << fPlane;
412 
413  fHisto->GetXaxis()->SetRangeUser(i1,i2);
414  fHisto->GetYaxis()->SetRangeUser(y1,y2);
415  fCurrentZoom[0]=i1;
416  fCurrentZoom[1]=i2;
417  fCurrentZoom[2]=y1;
418  fCurrentZoom[3]=y2;
419  }
420  //......................................................................
421  // Set the visible range of the wire / time view from the view
422  //
424  TAxis const& xaxis = *(fHisto->GetXaxis());
425  fCurrentZoom[0] = xaxis.GetBinLowEdge(xaxis.GetFirst());
426  fCurrentZoom[1] = xaxis.GetBinUpEdge(xaxis.GetLast());
427  fCurrentZoom[2] = fHisto->GetMinimum();
428  fCurrentZoom[3] = fHisto->GetMaximum();
429  LOG_DEBUG("TWireProjPad") << "Zoom set to wires ("
430  << fCurrentZoom[0] << "; " << fCurrentZoom[1] << " ), tick ("
431  << fCurrentZoom[2] << "; " << fCurrentZoom[3] << ") for plane #"
432  << fPlane;
433  } // TWireProjPad::SetZoomFromView()
434  //......................................................................
435  void TWireProjPad::SaveHitList(double i1,
436  double i2,
437  double y1,
438  double y2,
439  double distance,
440  const char* zoom_opt,
441  bool good_plane)
442  {
444  if(evt){
446  if(recoopt->fUseHitSelector){
447  this->HitSelectorGet()->SaveHits(*evt, fView, fPlane, i1, i2, y1, y2, distance, good_plane);
448  this->Draw(zoom_opt);
449  }
450  }
451 
452  return;
453  }
454 
456  // Pass the seed list onwards to InfoTransfer
457  //
458  double TWireProjPad::SaveSeedList(std::vector< util::PxLine > seedlines,
459  double distance)
460  {
461  double KineticEnergy = util::kBogusD;
463  if(evt){
465  if(recoopt->fUseHitSelector)
466  KineticEnergy = this->HitSelectorGet()->SaveSeedLines(*evt, fView,seedlines, distance);
467  }
468  return KineticEnergy;
469  }
470 
471  //......................................................................
473  double y,
474  const char* zoom_opt)
475  {
476 
478  if(evt){
480  if(recoopt->fUseHitSelector){
481  this->HitSelectorGet()->ChangeHit(*evt, fView, fPlane,x,y);
482  this->Draw(zoom_opt);
483  }
484  }
485 
486  return;
487  }
488 
489  //......................................................................
491  {
492  fPad->Clear();
493  this->UpdatePad();
494 
495  return;
496  }
497 
498  //......................................................................
500  fPad->cd();
501  fPad->Modified();
502  fPad->Update();
503  fPad->GetFrame()->SetBit(TPad::kCannotMove,true);
504  fPad->SetBit(TPad::kCannotMove,true);
505 
506  return;
507  }
508 
509  //......................................................................
510  void TWireProjPad::DrawLinesinView(std::vector< util::PxLine > lines,
511  bool deleting,
512  const char * zoom_opt)
513  {
514 
516  detinfo::DetectorProperties const* det = lar::providerFrom<detinfo::DetectorPropertiesService>();
517 
518  fPad->cd();
519  if(deleting) {
520  fPad->Clear();
521  this->Draw(zoom_opt);
522  }
523  else {
524  fView->Clear();
525  fView->Draw();
526  }
527 
528  mf::LogVerbatim("TWireProjPad") << "Drawing " << lines.size() <<" lines";
529 
530  for(size_t is = 0; is < lines.size(); ++is){
531  if(fPlane!=lines[is].plane)
532  continue;
533 
534  TLine& l = fView->AddLine(lines[is].w0,lines[is].t0,lines[is].w1,lines[is].t1);
535 
536  fView->Draw();
537  evd::Style::FromPDG(l,11);
538 
539  // In Seed mode, colour of "sealed" seeds to green
540  if(evdlayoutopt->fMakeSeeds){
541  if( ( (lines.size()%3)==0 ) ||
542  ( is < ( lines.size()-(lines.size()%3) ) )) {
543  l.SetLineColor(kGreen);
544  }
545  else
546  l.SetLineColor(kRed);
547  }
548  }
549 
550  // Seed mode guide lines
551 
552  if(evdlayoutopt->fMakeSeeds){
553  TLine &lg1 = fView->AddLine(0,0,0,0);
554  fView->Draw();
555  TLine &lg0 = fView->AddLine(0,0,0,0);
556  fView->Draw();
557  lg1.SetLineStyle(kDashed);
558  lg0.SetLineStyle(kDashed);
559  lg0.SetLineWidth(1);
560  lg1.SetLineWidth(1);
561  lg0.SetLineColor(kGray);
562  lg1.SetLineColor(kGray);
563  lg0.SetBit(kCannotPick);
564  lg1.SetBit(kCannotPick);
565 
566  if((lines.size()%3)==1){
567  mf::LogVerbatim("TWireProjPad") << "adding guide lines";
568  util::PxLine TopLine = lines.at(lines.size()-1);
569  lg0.SetX1(1);
570  lg0.SetX2(5000);
571 
572  double TopT0 = det->ConvertXToTicks(det->ConvertTicksToX(TopLine.t0,TopLine.plane,0,0),fPlane,0,0);
573  double TopT1 = det->ConvertXToTicks(det->ConvertTicksToX(TopLine.t1,TopLine.plane,0,0),fPlane,0,0);
574 
575  lg0.SetY1(TopT0);
576  lg0.SetY2(TopT0);
577 
578  lg1.SetX1(1);
579  lg1.SetX2(5000);
580 
581  lg1.SetY1(TopT1);
582  lg1.SetY2(TopT1);
583 
584 
585  }
586  }
587  fView->Draw();
588  UpdatePad();
589  fView->Draw();
590 
591  return;
592  }
593 
595  //
596  // This method creates and draws a curve on
597  // each view, given the seeds selected by
598  // the user in the HitSelector.
599  //
600  // The return value is the length of the 3D
601  // track
602  //
603  double TWireProjPad::UpdateSeedCurve(std::vector<recob::Seed> SeedVec, int plane)
604  {
605  mf::LogVerbatim("TWireProjPad") <<"running updateseedcurve for plane " << plane;
606  fView->Draw();
607  UpdatePad();
608  int N=100;
609 
610  double ReturnVal=0;
611 
612  // For some reason, this line is needed to prevent lines being drawn twice
613  // TPolyLine& pldummy1 = fView->AddPolyLine(2,kBlue,1,0);
614  // pldummy1.SetPoint(0,0,0);
615  // pldummy1.SetPoint(1,0,0);
616 
617  int c=0; int t=0;
618  int LastGoodValue=0;
619  double ticks[3];
620  double projpt[3];
621 
622  if(SeedVec.size() > 1){
623  TPolyLine& pl = fView->AddPolyLine(N,kOrange+9,2,0);
624  fView->Draw();
625 
626  trkf::BezierTrack BTrack(SeedVec);
627 
628  for(int i = 0; i != N; ++i){
629  try{
630  BTrack.GetProjectedPointUVWT(float(i)/N,projpt,ticks,c,t );
631  LastGoodValue=i;
632  LOG_DEBUG("TWireProjPad") << i << " ";
633  }
634  catch(cet::exception excp){
635  BTrack.GetProjectedPointUVWT(float(LastGoodValue)/N, projpt, ticks, c, t);
636  }
637 
638  double x = projpt[plane];
639  double y = ticks[plane];
640  pl.SetPoint(i,x,y);
641 
642  if(LastGoodValue!=i){
643  TMarker& mrk = fView->AddMarker(x, y, 3, 34, 1.5);
644  mrk.SetMarkerColor(3);
645  }
646  }
647  ReturnVal = BTrack.GetLength();
648  }
649  else
650  ReturnVal=0;
651 
652  fView->Draw();
653  UpdatePad();
654 
655  return ReturnVal;
656  }
657 
658 }// namespace
660 
661 
662 
663 
664 
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:138
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.
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)