HoughValidate_module.cc
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////
2 /// \brief Validate anything that creates HoughResults
3 /// \author mibaird@indiana.edu, gsdavies@iu.edu
4 /// \date
5 //////////////////////////////////////////////////////////////////////////
6 #include "TTree.h"
7 #include "TH1F.h"
8 #include "TH1I.h"
9 
19 #include "fhiclcpp/ParameterSet.h"
21 
23 #include "Geometry/Geometry.h"
24 #include "GeometryObjects/Geo.h"
26 #include "RecoBase/Cluster.h"
27 #include "RecoBase/FilterList.h"
28 #include "RecoBase/HitMap.h"
29 #include "RecoBase/HoughResult.h"
33 #include "Utilities/AssociationUtil.h"
34 #include "Utilities/func/MathUtil.h"
35 
36 // Required for CAFAna Cuts
38 #include "CAFAna/Cuts/Cuts.h"
39 #include "CAFAna/Cuts/TruthCuts.h"
40 #include "CAFAna/Cuts/TimingCuts.h"
41 #include "CAFAna/Vars/Vars.h"
42 
45 
46 #include "limits.h"
47 // HoughValidate header
48 namespace hough {
49  ///
50  /// \brief Validate Hough transform algorithms
51  ///
52  class HoughValidate : public art::EDAnalyzer {
53 
54  public:
55  explicit HoughValidate(fhicl::ParameterSet const &p);
56  virtual ~HoughValidate();
57 
58  void beginJob();
59  void analyze(const art::Event &e);
60  void reconfigure(const fhicl::ParameterSet& p);
61 
62  private:
63 
65  unsigned int hrIdx,
66  double* pz1,
67  double* px1,
68  double* pz2,
69  double* px2);
70 
71  TTree* fNtTree;
73 
74  std::string fMCLabel; ///< Label for process that made MCTruth
75  std::string fSliceLabel; ///< Label for process that made Cluster
76  std::string fHoughResultLabel; ///< Label for process that made HoughResult
77  bool fIsMC; ///< Flag for is MC or not
78 
79  std::string fCAFLabel; ///< label for the process that made the standard records
80  bool fApplyCAFCuts; ///< should we apply the caf level cuts?
81  int fCutType; ///< what cuts to apply (see CAFCutter.h)
82 
83  recovalid::CAFCutter fCAFCutter; ///< the CAFCutter helper class
84 
85  unsigned int fMinHit; ///< Slices must have at least this many hits
86  unsigned int fMinHitX; ///< Minimum hits in x-view/slice
87  unsigned int fMinHitY; ///< Minumum hits in y-view/slice
88 
89  // Histograms used for production validation
90  TH1I* fNumHLX;
91  TH1I* fNumHLY;
92 
93  TH1F* fThreshX;
94  TH1F* fThreshY;
95 
96  TH1I* fOnlineX[4];
97  TH1I* fOnlineY[4];
98 
99  TH1F* fRhoX[4];
100  TH1F* fRhoY[4];
101 
102  TH1F* fThetaX[4];
103  TH1F* fThetaY[4];
104 
105  TH1F* fPeakX[4];
106  TH1F* fPeakY[4];
107 
108  TH1F* fPeakThreshX[4];
109  TH1F* fPeakThreshY[4];
110 
111  TH1F* fPerpDX[4];
112  TH1F* fPerpDY[4];
113 
114  };
115 }
116 
117 
118 namespace hough
119 {
120  //......................................................................
122  : EDAnalyzer(p)
123  {
124  this->reconfigure(p);
125  }
126 
127 
128  //......................................................................
130  {
131 
133 
134  // book Ntuple
135  fNt = new HValidateNt;
136  fNtTree = tfs->make<TTree>("hough", "Hough Analysis Tree");
137  fNtTree->Branch("fHValidateNt", "hough::HValidateNt", &fNt, 1600, 99);
138 
139  // book histos
140  const TString val[4] = {"1st","2nd","3rd","4th"};
141  const unsigned int maxHists = 4;
142 
143  fNumHLX = tfs->make<TH1I>("NumHoughLinesX",
144  ";Number of X Hough lines;Number of slices",
145  11,-0.5,10.5);
146  fNumHLY = tfs->make<TH1I>("NumHoughLinesY",
147  ";Number of Y Hough lines;Number of slices",
148  11,-0.5,10.5);
149 
150  fThreshX = tfs->make<TH1F>("ThresholdValueX",
151  ";X view threshold (arbitrary units);Number of slices",
152  100,0.0,5.0);
153  fThreshY = tfs->make<TH1F>("ThresholdValueY",
154  ";Y view threshold (arbitrary units);Number of slices",
155  100,0.0,5.0);
156 
157 
158  char title[100];
159  for(unsigned int i = 0; i < maxHists; ++i){
160 
161  sprintf(title,";Number of hits on %s line in X view;Number of slices",val[i].Data());
162  fOnlineX[i] = tfs->make<TH1I>("HitsOnLineX"+val[i],
163  title,
164  301,0,300);
165 
166 
167  sprintf(title,";Number of hits on %s line in Y view;Number of slices",val[i].Data());
168  fOnlineY[i] = tfs->make<TH1I>("HitsOnLineY"+val[i],
169  title,
170  301,0,300);
171 
172  sprintf(title,";#rho for %s line in X view (cm);Number of slices",val[i].Data());
173  fRhoX[i] = tfs->make<TH1F>("RhoX"+val[i],
174  title,
175  200,-400.0,400.0);
176 
177  sprintf(title,";#rho for %s line in Y view (cm);Number of slices",val[i].Data());
178  fRhoY[i] = tfs->make<TH1F>("RhoY"+val[i],
179  title,
180  200,-400.0,400.0);
181 
182  sprintf(title,";#theta for %s line in X view (radians);Number of slices",val[i].Data());
183  fThetaX[i] = tfs->make<TH1F>("ThetaX"+val[i],
184  title,
185  40,0.0,4.0);
186 
187  sprintf(title,";#theta for %s line in Y view (radians);Number of slices",val[i].Data());
188  fThetaY[i] = tfs->make<TH1F>("ThetaY"+val[i],
189  title,
190  40,0.0,4.0);
191 
192  sprintf(title,";Peak value in Hough space map for %s line in X view (arbitrary units);Number of slices",val[i].Data());
193  fPeakX[i] = tfs->make<TH1F>("PeakX"+val[i],
194  title,
195  200,0.0,2000.0);
196 
197  sprintf(title,";Peak over threshold for %s line in X view;Number of slices",val[i].Data());
198  fPeakThreshX[i] = tfs->make<TH1F>("PeakOverThreshX"+val[i],
199  title,
200  200,0.0,10000.0);
201 
202  sprintf(title,";Peak value in Hough space map for %s line in Y view (arbitrary units);Number of slices",val[i].Data());
203  fPeakY[i] = tfs->make<TH1F>("PeakY"+val[i],
204  title,
205  200,0.0,2000.0);
206 
207  sprintf(title,";Peak over threshold for %s line in X view;Number of slices",val[i].Data());
208  fPeakThreshY[i] = tfs->make<TH1F>("PeakOverThreshY"+val[i],
209  title,
210  200,0.0,10000.0);
211 
212  sprintf(title,";Perpendicular distance from true vertex to %s line in X-view (cm);Number of slices",val[i].Data());
213  fPerpDX[i] = tfs->make<TH1F>("PerpDistX"+val[i],
214  title,
215  100,0.0,100.0);
216 
217  sprintf(title,";Perpendicular distance from true vertex to %s line in Y view (cm);Number of slices",val[i].Data());
218  fPerpDY[i] = tfs->make<TH1F>("PerpDistY"+val[i],
219  title,
220  100,0.0,100.0);
221 
222  } // end loop over histogram arrays
223 
224  }
225 
226 
227  //......................................................................
229  {
230  fMCLabel = p.get< std::string > ("MCLabel");
231  fSliceLabel = p.get< std::string > ("SliceLabel");
232  fHoughResultLabel = p.get< std::string > ("HoughResultLabel");
233  fIsMC = p.get< bool > ("IsMC");
234  fMinHit = p.get< unsigned int >("MinHit");
235  fMinHitX = p.get< unsigned int >("MinHitX");
236  fMinHitY = p.get< unsigned int >("MinHitY");
237 
238  fCAFLabel = p.get< std::string > ("CAFLabel");
239  fApplyCAFCuts = p.get< bool > ("ApplyCAFCuts");
240  fCutType = p.get< int > ("CutType");
241  }
242 
243 
244  //......................................................................
246  {
247  }
248 
249  //......................................................................
251  unsigned int lineIdx,
252  double* pz1,
253  double* px1,
254  double* pz2,
255  double* px2)
256  {
258 
259  double slope, icept;
260  hr->SlopeIcept(lineIdx, &slope, &icept);
261 
262  double x1 = 0, x2 = 0;
263  if (hr->fView == geo::kX) {
264  x1 = geom->DetHalfWidth();
265  x2 = -geom->DetHalfWidth();
266  }
267  else {
268  x1 = geom->DetHalfHeight();
269  x2 = -geom->DetHalfHeight();
270  }
271 
272  double z1, z2;
273  z1 = (x1-icept)/slope;
274  z2 = (x2-icept)/slope;
275 
276  if(z1 < 0.0){
277  z1 = 0.0;
278  x1 = slope*z1 + icept;
279  }
280  if(z1 > geom->DetLength()){
281  z1 = geom->DetLength();
282  x1 = slope*z1 + icept;
283  }
284  if(z2 < 0.0){
285  z2 = 0.0;
286  x2 = slope*z2 + icept;
287  }
288  if(z2 > geom->DetLength()){
289  z2 = geom->DetLength();
290  x2 = slope*z2 + icept;
291  }
292 
293  *pz1 = z1;
294  *px1 = x1;
295  *pz2 = z2;
296  *px2 = x2;
297 
298  }
299 
300  //......................................................................
302  {
303 
304  // get the slices and we'll then get the HoughResults associated with the slice
306  evt.getByLabel(fSliceLabel, hSlices);
307 
308  // get the MCTruth info
310  if(fIsMC == 1) evt.getByLabel(fMCLabel, mclist);
311 
312  // Get the FMP for the Standard Records
313  art::FindManyP<caf::StandardRecord> recordFMP(hSlices, evt, fCAFLabel);
314 
315  /*
316  // NOTE: I was using this for the MC dot product validation, but I'm
317  // temporarily skipping that since sim::ParticleList is no longer being used
318 
319  // get the particle list for trajectory lengths
320  art::Handle< std::vector<sim::ParticleList> > particlelist;
321  evt.getByLabel("geantgen", particlelist);
322  */
323 
324  // load event ID info into Ntuple
325  fNt->run = evt.run();
326  fNt->subrun = evt.subRun();
327  fNt->evt = evt.id().event();
328 
329  // a set of temp vectors to fill the Ntuple
330  std::vector<int> numHLXtemp;
331  std::vector<int> numHLYtemp;
332 
333  std::vector<double> nuXtemp;
334  std::vector<double> nuYtemp;
335  std::vector<double> nuZtemp;
336  std::vector<double> nuEtemp;
337 
338  std::vector<int> nupdgtemp;
339  std::vector<int> nuCCNCtemp;
340 
341  const unsigned int NUM = 4;
342  std::vector<double> perpdistxtemp[NUM];
343  std::vector<double> perpdistytemp[NUM];
344 
345  std::vector<double> mcdpxtemp[NUM];
346  std::vector<double> mcdpytemp[NUM];
347 
348  std::vector<double> onxtemp[NUM];
349  std::vector<double> onytemp[NUM];
350 
351  std::vector<double> rhoxtemp[NUM];
352  std::vector<double> rhoytemp[NUM];
353 
354  std::vector<double> thetaxtemp[NUM];
355  std::vector<double> thetaytemp[NUM];
356 
357  std::vector<double> threshxtemp;
358  std::vector<double> threshytemp;
359 
360  std::vector<double> peakxtemp[NUM]; // 1st, 2nd, 3rd peak in X
361  std::vector<double> peakytemp[NUM]; // 1st, 2nd, 3rd peak in Y
362 
363  //object to get hough lines associated with the slice
365 
366  // Loop over slices
367  for(unsigned int slIdx = 0; slIdx < hSlices->size(); ++slIdx){
368 
369 
370  // Apply the CAF-level cuts
371  bool pass = true;
372  if( fApplyCAFCuts ) {
373  // get record associated with the slice
374  std::vector< art::Ptr<caf::StandardRecord> > records = recordFMP.at(slIdx);
375  if (records.size() > 0 && recordFMP.isValid()) {
376  pass = fCAFCutter.passCuts(fCutType, records[0].get());
377  }
378  else { pass = false; }
379  }
380 
381  if(!pass) continue;
382 
383 
384 
385  if(rb::IsFiltered(evt,hSlices,slIdx)) continue;
386 
387  const rb::Cluster& slice = (*hSlices)[slIdx];
388 
389  if(slice.IsNoise()) continue;
390 
391  ///Require a minimum number of hits in each view
392  if(slice.NXCell() < fMinHitX) continue;
393  if(slice.NYCell() < fMinHitY) continue;
394  if(slice.NCell() < fMinHit) continue;
395 
396  // Get HitMap containing all slice hits
397  const rb::HitMap hitmap(slice.AllCells());
398 
399  std::vector< art::Ptr<rb::HoughResult> > hrs = fmhr.at(slIdx);
400 
401  // This validation information is gathered for both data and MC
402  for(unsigned int hrIdx = 0; hrIdx < hrs.size(); ++hrIdx) {
403 
404  // Skip empty HoughResults
405  if(hrs.size() == 0) continue;
406 
407  if(hrs[hrIdx]->fView == geo::kX) {
408 
409  const rb::HoughResult* hrxp = hrs[hrIdx].get();
410 
411  const unsigned int xpMax = hrxp->fPeak.size();
412 
413  numHLXtemp.push_back(xpMax);
414  fNumHLX->Fill(xpMax);
415 
416  if(xpMax == 0 || xpMax > NUM) continue;
417 
418  fThreshX->Fill(hrxp->fPeak[0].fThr);
419  threshxtemp.push_back(hrxp->fPeak[0].fThr); // temp in X
420 
421  // Loop over Hough Peaks
422  for(unsigned int pIdx = 0; pIdx < xpMax; ++pIdx){
423 
425 
426  double z1, z2, x1, x2;
427  std::vector< geo::OfflineChan > hrx_online;
428 
429  this->HoughLineToDetector(hrxp, pIdx, &z1, &x1, &z2, &x2);
430 
431  assert(hrxp->fView == geo::kX);
432  geom->CountCellsOnLineFast(hrxp->fView,
433  x1, z1,
434  x2, z2,
435  hrx_online);
436 
437  int online_x = -1;
438  int counter_x = 0;
439  for(unsigned int n = 0; n < hrx_online.size(); ++n){
440  const unsigned int plane = hrx_online[n].Plane();
441  const unsigned int cell = hrx_online[n].Cell();
442  if(hitmap.CellExists(plane,cell)){
443  ++counter_x;
444  }
445  }
446 
447  if(counter_x > 0) online_x = counter_x;
448 
449  fOnlineX[pIdx]->Fill(online_x);
450  fRhoX[pIdx]->Fill(hrxp->fPeak[pIdx].fRho);
451  fThetaX[pIdx]->Fill(hrxp->fPeak[pIdx].fTheta);
452  fPeakX[pIdx]->Fill(hrxp->fPeak[pIdx].fH);
453  fPeakThreshX[pIdx]->Fill((hrxp->fPeak[pIdx].fH)/(hrxp->fPeak[pIdx].fThr));
454 
455  onxtemp[pIdx].push_back(online_x);
456  rhoxtemp[pIdx].push_back(hrxp->fPeak[pIdx].fRho);
457  thetaxtemp[pIdx].push_back(hrxp->fPeak[pIdx].fTheta);
458  peakxtemp[pIdx].push_back(hrxp->fPeak[pIdx].fH);
459  } // end loop over peaks
460  } // end loop over X-view
461 
462  if(hrs[hrIdx]->fView == geo::kY) {
463 
464  const rb::HoughResult* hryp = hrs[hrIdx].get();
465 
466  const unsigned int ypMax = hryp->fPeak.size();
467 
468  numHLYtemp.push_back(ypMax);
469  fNumHLY->Fill(ypMax);
470  if(ypMax == 0 || ypMax > NUM) continue;
471  fThreshY->Fill(hryp->fPeak[0].fThr);
472  threshytemp.push_back(hryp->fPeak[0].fThr);
473 
474  for(unsigned int pIdx = 0; pIdx < ypMax; ++pIdx){
475 
477 
478  double z1, z2, x1, x2;
479  std::vector< geo::OfflineChan > hry_online;
480 
481  this->HoughLineToDetector(hryp, pIdx, &z1, &x1, &z2, &x2);
482 
483  assert(hryp->fView == geo::kY);
484  geom->CountCellsOnLineFast(hryp->fView,
485  x1, z1,
486  x2, z2,
487  hry_online);
488 
489  // Initialise number of lines in y to -1 for cases where there are X Hough
490  // lines but no Y and vice-versa
491  int online_y = -1;
492  int counter_y = 0;
493 
494  for(unsigned int n = 0; n < hry_online.size(); ++n){
495  const unsigned int plane = hry_online[n].Plane();
496  const unsigned int cell = hry_online[n].Cell();
497  if(hitmap.CellExists(plane,cell)){
498  ++counter_y;
499  }
500  }
501 
502  if(counter_y > 0) online_y = counter_y;
503 
504  fOnlineY[pIdx]->Fill(online_y);
505  fRhoY[pIdx]->Fill(hryp->fPeak[pIdx].fRho);
506  fThetaY[pIdx]->Fill(hryp->fPeak[pIdx].fTheta);
507  fPeakY[pIdx]->Fill(hryp->fPeak[pIdx].fH);
508  fPeakThreshY[pIdx]->Fill((hryp->fPeak[pIdx].fH)/(hryp->fPeak[pIdx].fThr));
509 
510  onytemp[pIdx].push_back(online_y);
511  rhoytemp[pIdx].push_back(hryp->fPeak[pIdx].fRho);
512  thetaytemp[pIdx].push_back(hryp->fPeak[pIdx].fTheta);
513  peakytemp[pIdx].push_back(hryp->fPeak[pIdx].fH);
514  } // end loop over peaks
515  } // end loop over Y-view
516  } // end loop over HoughResults
517 
518 
519  // additional validation info gathered for MC files
520  if(fIsMC == 1){
521 
522  // validate perpendicular distance to top four lines
523  if(hrs.size() > 0){
524 
525  for(unsigned int i = 0; i < mclist->size(); i++) {
526 
527  simb::MCNeutrino nu = (*mclist)[i].GetNeutrino();
528  simb::MCParticle Nu = nu.Nu();
529 
530  // BEWARE OF SEGFAULTS!!! If this MCTruth did NOT come from a neutrino,
531  // then we must skip the next bit to avoid segfaluts.
532  if(!(Nu.PdgCode() == 12 || Nu.PdgCode() == 14 || Nu.PdgCode() == 16)) continue;
533 
534  double xt = Nu.Vx();
535  double yt = Nu.Vy();
536  double zt = Nu.Vz();
537 
538  nuXtemp.push_back(xt);
539  nuYtemp.push_back(yt);
540  nuZtemp.push_back(zt);
541  nuEtemp.push_back(Nu.E());
542  nupdgtemp.push_back(Nu.PdgCode());
543  nuCCNCtemp.push_back(nu.CCNC());
544 
545 
546  for(unsigned int hrIdx = 0; hrIdx < hrs.size(); ++hrIdx) {
547 
548  // variables used in validation
549  double m1 = 0.0;
550  double b1 = 0.0;
551  double distx = 0.0, disty = 0.0;
552 
553  //x-view mc validation
554  if(hrs[hrIdx]->fView == geo::kX) {
555  const rb::HoughResult* hrxp = hrs[hrIdx].get();
556  const unsigned int xpMax = hrxp->fPeak.size();
557 
558  if(xpMax == 0 || xpMax >= NUM) continue;
559  for(unsigned int pIdx = 0;pIdx < xpMax; ++pIdx){
560  // perpendicular distance to ith line validation
561  hrxp->SlopeIcept(pIdx, &m1, &b1);
562  distx = sqrt(geo::DsqrToLine(zt, xt, 0.0, b1, 100.0, 100.0*m1 + b1));
563  perpdistxtemp[pIdx].push_back(distx);
564 
565  fPerpDX[pIdx]->Fill(distx);
566  } // end loop over x-view Peaks
567  } // end if fView == geo::kX
568 
569  //y-view mc validation
570  if(hrs[hrIdx]->fView == geo::kY) {
571  const rb::HoughResult* hryp = hrs[hrIdx].get();
572  const unsigned int ypMax = hryp->fPeak.size();
573 
574  if(ypMax == 0 || ypMax >= NUM) continue;
575  for(unsigned int pIdx = 0;pIdx < ypMax; ++pIdx){
576  // perpendicular distance to ith line validation
577  hryp->SlopeIcept(pIdx, &m1, &b1);
578  disty = sqrt(geo::DsqrToLine(zt, yt, 0.0, b1, 100.0, 100.0*m1 + b1));
579  perpdistytemp[pIdx].push_back(disty);
580 
581  fPerpDY[pIdx]->Fill(disty);
582  } // end loop over y-view Peaks
583  } // end if fView == geo::kY
584 
585  } // end for hrIdx
586  } // end for i (loop over size of MClist)
587  } // if hrs->size() > 0
588  } // end if(fIsMC)
589 
590 
591  } // end loop over slices
592 
593  // NOTE: I was using this for the MC dot product validation, but I'm
594  // temporarily skipping that since sim::ParticleList is no longer being used
595  //
596  // If I decide to put this back in, it belongs in the if(hr->size() > 0) loop found above
597  /*
598  if(hr->size() > 0) {
599 
600  // MC dot product validation
601  //
602  // NOTE: This could be a little more efficient if I had integrated this section into the other loops
603  // (instead of looping over mclist two seperate times.) BUT this already runs very quickly and it
604  // was cleaner to code and debug this way...
605 
606  for(unsigned int k = 0; k < hr->size(); ++k) {
607  if((*hHoughs)[k].fPeak.size() != 0) {
608 
609  // variables used in MC-trajectory dot product validation
610  double dp = -999.0;
611  unsigned int track1 = 999, track2 = 999;
612 
613  double xy = 0.0, z = 0.0;
614  double m = 0.0, b = 0.0;
615 
616  // x-view
617  if((*hHoughs)[k].fView == geo::kX) {
618 
619  //std::cout << "\n\nevent ID: " << evt.id() << "\n";
620 
621  // loop over the number of MC reactions
622  for(unsigned int i = 0; i < particlelist->size(); ++i) {
623 
624  art::Ptr<sim::ParticleList> plist(particlelist, i);
625 
626  // loop over all particles and find the one closest to first hough line
627  (*hHoughs)[k].SlopeIcept(0, &m, &b);
628  for (unsigned int c = 0; c != plist->fParticles.size(); ++c) {
629 
630  int pdg = (*plist).fParticles[c].PdgCode();
631 
632  // don't let a hough line match a particle that wouldn't leave a signal in the detector
633  // (nu-e, nu-mu, nu-tau, neutron, pi0)
634 
635 
636 
637  // ADD ANTI-MATTER VERSIONS OF THESE PARTICLES AS WELL!!!!!!!
638 
639 
640 
641  if(pdg != 12 && pdg != 14 && pdg != 16 && pdg != 2112 && pdg != 111) {
642 
643  double mcslope = 0.0;
644  double xytemp = 0.0;
645  double dptemp = 0.0;
646  double d = 0.0;
647 
648  xytemp = (*plist).fParticles[c].Px();
649  z = (*plist).fParticles[c].Pz();
650  // make (xy,z) a unit vector
651  xy = xytemp/sqrt(xytemp*xytemp + z*z);
652  z = z/sqrt(xytemp*xytemp + z*z);
653 
654  if(z != 0.0) mcslope = xy/z;
655  else mcslope = 1.0E9;
656 
657  dptemp = (1 + m*mcslope)/sqrt(1 + m*m + mcslope*mcslope + m*m*mcslope*mcslope);
658  if(dptemp < 0.0) dptemp = -dptemp;
659 
660  d = sqrt(geo::DsqrToLine((*plist).fParticles[c].Vz(),(*plist).fParticles[c].Vx(), 0.0, b, 100.0, 100.0*m + b));
661 
662  // dot product must be bigger than the old one AND the hough line must pass within 10.0cm of the true vertex of the particle
663  // AND the track-length of the particle must be > 20.0cm
664  if(dptemp > dp && d < 10.0 && (*plist).fParticles[c].Trajectory().TotalLength() > 10.0) {dp = dptemp; track1 = c;}
665 
666  } // end if(pdg codes)
667 
668  } // end for c
669 
670  mcdp1xtemp.push_back(dp);
671 
672  //std::cout << "height/threshold = " << (*hHoughs)[k].fPeak[0].fH/(*hHoughs)[k].fPeak[0].fThr
673  //<< " peak = " << (*hHoughs)[k].fPeak[0].fH
674  //<< " threshold = " << (*hHoughs)[k].fPeak[0].fThr
675  //<< " dp = " << dp << "\n";
676 
677  //if(dp < 0.0) std::cout << "\n\nFirst line X: (no match)\n";
678  //else std::cout << "\n\nFirst line X: particle# = " << track1 << " PDG = " << (*plist).fParticles[track1].PdgCode() << " dp = " << dp
679  // << " track length = " << (*plist).fParticles[track1].Trajectory().TotalLength() << "\n";
680 
681 
682 
683  // loop over all particles and find the one closest to second hough line
684  dp = -999.0;
685  if((*hHoughs)[k].fPeak.size() > 1) {
686 
687  (*hHoughs)[k].SlopeIcept(1, &m, &b);
688  for (unsigned int c = 0; c != plist->fParticles.size(); ++c) {
689 
690 
691  // skip particle if it is already associated with the first hough line
692  if(c != track1) {
693 
694  int pdg = (*plist).fParticles[c].PdgCode();
695 
696  // don't let a hough line match a particle that wouldn't leave a signal in the detector (nu-e, nu-mu, nu-tau, neutron, pi0)
697  if(pdg != 12 && pdg != 14 && pdg != 16 && pdg != 2112 && pdg != 111) {
698 
699  double mcslope = 0.0;
700  double xytemp = 0.0;
701  double dptemp = 0.0;
702  double d = 0.0;
703 
704  xytemp = (*plist).fParticles[c].Px();
705  z = (*plist).fParticles[c].Pz();
706  // make (xy,z) a unit vector
707  xy = xytemp/sqrt(xytemp*xytemp + z*z);
708  z = z/sqrt(xytemp*xytemp + z*z);
709 
710  if(z != 0.0) mcslope = xy/z;
711  else mcslope = 1.0E9;
712 
713  dptemp = (1 + m*mcslope)/sqrt(1 + m*m + mcslope*mcslope + m*m*mcslope*mcslope);
714  if(dptemp < 0.0) dptemp = -dptemp;
715 
716  d = sqrt(geo::DsqrToLine((*plist).fParticles[c].Vz(),(*plist).fParticles[c].Vx(), 0.0, b, 100.0, 100.0*m + b));
717 
718  // dot product must be bigger than the old one AND the hough line must pass within 10.0cm of the true vertex of the particle
719  // AND the track-length of the particle must be > 20.0cm
720  if(dptemp > dp && d < 10.0 && (*plist).fParticles[c].Trajectory().TotalLength() > 10.0) {dp = dptemp; track2 = c;}
721 
722  } // end if(pdg codes)
723 
724  } // end if(c != track1)
725  } // end for c
726 
727  mcdp2xtemp.push_back(dp);
728 
729  //if(dp < 0.0) std::cout << "\n\nSecond line X: (no match)\n";
730  //else std::cout << "\n\nSecond line X: particle# = " << track2 << " PDG = " << (*plist).fParticles[track2].PdgCode() << " dp = " << dp
731  // << " track length = " << (*plist).fParticles[track2].Trajectory().TotalLength() << "\n";
732  } // end if(peak.size > 1)
733 
734 
735 
736  // loop over all particles and find the one closest to third hough line
737  dp = -999.0;
738  if((*hHoughs)[k].fPeak.size() > 2) {
739 
740  (*hHoughs)[k].SlopeIcept(2, &m, &b);
741  for (unsigned int c = 0; c != plist->fParticles.size(); ++c) {
742 
743  // skip particle if it is already associated with the first or second hough line
744  if(c != track1 && c != track2) {
745 
746  int pdg = (*plist).fParticles[c].PdgCode();
747 
748  // don't let a hough line match a particle that wouldn't leave a signal in the detector (nu-e, nu-mu, nu-tau, neutron, pi0)
749  if(pdg != 12 && pdg != 14 && pdg != 16 && pdg != 2112 && pdg != 111) {
750 
751  double mcslope = 0.0;
752  double xytemp = 0.0;
753  double dptemp = 0.0;
754  double d = 0.0;
755 
756  xytemp = (*plist).fParticles[c].Px();
757  z = (*plist).fParticles[c].Pz();
758  // make (xy,z) a unit vector
759  xy = xytemp/sqrt(xytemp*xytemp + z*z);
760  z = z/sqrt(xytemp*xytemp + z*z);
761 
762  if(z != 0.0) mcslope = xy/z;
763  else mcslope = 1.0E9;
764 
765  dptemp = (1 + m*mcslope)/sqrt(1 + m*m + mcslope*mcslope + m*m*mcslope*mcslope);
766  if(dptemp < 0.0) dptemp = -dptemp;
767 
768  d = sqrt(geo::DsqrToLine((*plist).fParticles[c].Vz(),(*plist).fParticles[c].Vx(), 0.0, b, 100.0, 100.0*m + b));
769 
770  // dot product must be bigger than the old one AND the hough line must pass within 10.0cm of the true vertex of the particle
771  // AND the track-length of the particle must be > 20.0cm
772  if(dptemp > dp && d < 10.0 && (*plist).fParticles[c].Trajectory().TotalLength() > 10.0) dp = dptemp;
773 
774  } // end if(pdg codes)
775 
776  } // end if(c != track1 && c != track2)
777  } // end for c
778 
779  mcdp3xtemp.push_back(dp);
780 
781  //if(dp < 0.0) std::cout << "\n\nThird line X: (no match)\n";
782  //else std::cout << "\n\nThird line X: particle# = " << track3 << " PDG = " << (*plist).fParticles[track3].PdgCode() << " dp = " << dp
783  // << " track length = " << (*plist).fParticles[track3].Trajectory().TotalLength() << "\n";
784  } // end if(peak.size > 2)
785 
786  } // end for i
787  } // end if(x-view)
788 
789 
790 
791  // y-view
792  if((*hHoughs)[k].fView == geo::kY) {
793 
794  // loop over the number of MC reactions
795  for(unsigned int i = 0; i < particlelist->size(); ++i) {
796 
797  art::Ptr<sim::ParticleList> plist(particlelist, i);
798 
799  // loop over all particles and find the one closest to first hough line
800  (*hHoughs)[k].SlopeIcept(0, &m, &b);
801  for (unsigned int c = 0; c != plist->fParticles.size(); ++c) {
802 
803  int pdg = (*plist).fParticles[c].PdgCode();
804 
805  // don't let a hough line match a particle that wouldn't leave a signal in the detector (nu-e, nu-mu, nu-tau, neutron, pi0)
806  if(pdg != 12 && pdg != 14 && pdg != 16 && pdg != 2112 && pdg != 111) {
807 
808  double mcslope = 0.0;
809  double xytemp = 0.0;
810  double dptemp = 0.0;
811  double d = 0.0;
812 
813  xytemp = (*plist).fParticles[c].Py();
814  z = (*plist).fParticles[c].Pz();
815  // make (xy,z) a unit vector
816  xy = xytemp/sqrt(xytemp*xytemp + z*z);
817  z = z/sqrt(xytemp*xytemp + z*z);
818 
819  if(z != 0.0) mcslope = xy/z;
820  else mcslope = 1.0E9;
821 
822  dptemp = (1 + m*mcslope)/sqrt(1 + m*m + mcslope*mcslope + m*m*mcslope*mcslope);
823  if(dptemp < 0.0) dptemp = -dptemp;
824 
825  d = sqrt(geo::DsqrToLine((*plist).fParticles[c].Vz(),(*plist).fParticles[c].Vy(), 0.0, b, 100.0, 100.0*m + b));
826 
827  // dot product must be bigger than the old one AND the hough line must pass within 10.0cm of the true vertex of the particle
828  // AND the track-length of the particle must be > 20.0cm
829  if(dptemp > dp && d < 10.0 && (*plist).fParticles[c].Trajectory().TotalLength() > 10.0) {dp = dptemp; track1 = c;}
830 
831  } // end if(pdg codes)
832 
833  } // end for c
834 
835  mcdp1ytemp.push_back(dp);
836 
837  //if(dp < 0.0) std::cout << "\n\nFirst line Y: (no match)\n";
838  //else std::cout << "\n\nFirst line Y: particle# = " << track1 << " PDG = " << (*plist).fParticles[track1].PdgCode() << " dp = " << dp
839  // << " track length = " << (*plist).fParticles[track1].Trajectory().TotalLength() << "\n";
840 
841 
842  // loop over all particles and find the one closest to second hough line
843  dp = -999.0;
844  if((*hHoughs)[k].fPeak.size() > 1) {
845 
846  (*hHoughs)[k].SlopeIcept(1, &m, &b);
847  for (unsigned int c = 0; c != plist->fParticles.size(); ++c) {
848 
849 
850  // skip particle if it is already associated with the first hough line
851  if(c != track1) {
852 
853  int pdg = (*plist).fParticles[c].PdgCode();
854 
855  // don't let a hough line match a particle that wouldn't leave a signal in the detector (nu-e, nu-mu, nu-tau, neutron, pi0)
856  if(pdg != 12 && pdg != 14 && pdg != 16 && pdg != 2112 && pdg != 111) {
857 
858  double mcslope = 0.0;
859  double xytemp = 0.0;
860  double dptemp = 0.0;
861  double d = 0.0;
862 
863  xytemp = (*plist).fParticles[c].Py();
864  z = (*plist).fParticles[c].Pz();
865  // make (xy,z) a unit vector
866  xy = xytemp/sqrt(xytemp*xytemp + z*z);
867  z = z/sqrt(xytemp*xytemp + z*z);
868 
869  if(z != 0.0) mcslope = xy/z;
870  else mcslope = 1.0E9;
871 
872  dptemp = (1 + m*mcslope)/sqrt(1 + m*m + mcslope*mcslope + m*m*mcslope*mcslope);
873  if(dptemp < 0.0) dptemp = -dptemp;
874 
875  d = sqrt(geo::DsqrToLine((*plist).fParticles[c].Vz(),(*plist).fParticles[c].Vy(), 0.0, b, 100.0, 100.0*m + b));
876 
877  // dot product must be bigger than the old one AND the hough line must pass within 10.0cm of the true vertex of the particle
878  // AND the track-length of the particle must be > 20.0cm
879  if(dptemp > dp && d < 10.0 && (*plist).fParticles[c].Trajectory().TotalLength() > 10.0) {dp = dptemp; track2 = c;}
880 
881  } // end if(pdg codes)
882 
883  } // end if(c != track1)
884  } // end for c
885 
886  mcdp2ytemp.push_back(dp);
887 
888  //if(dp < 0.0) std::cout << "\n\nSecond line Y: (no match)\n";
889  //else std::cout << "\n\nSecond line Y: particle# = " << track2 << " PDG = " << (*plist).fParticles[track2].PdgCode() << " dp = " << dp
890  // << " track length = " << (*plist).fParticles[track2].Trajectory().TotalLength() << "\n";
891  } // end if(peak.size > 1)
892 
893 
894 
895  // loop over all particles and find the one closest to third hough line
896  dp = -999.0;
897  if((*hHoughs)[k].fPeak.size() > 2) {
898 
899  (*hHoughs)[k].SlopeIcept(2, &m, &b);
900  for (unsigned int c = 0; c != plist->fParticles.size(); ++c) {
901 
902  // skip particle if it is already associated with the first or second hough line
903  if(c != track1 && c != track2) {
904 
905  int pdg = (*plist).fParticles[c].PdgCode();
906 
907  // don't let a hough line match a particle that wouldn't leave a signal in the detector (nu-e, nu-mu, nu-tau, neutron, pi0)
908  if(pdg != 12 && pdg != 14 && pdg != 16 && pdg != 2112 && pdg != 111) {
909 
910  double mcslope = 0.0;
911  double xytemp = 0.0;
912  double dptemp = 0.0;
913  double d = 0.0;
914 
915  xytemp = (*plist).fParticles[c].Py();
916  z = (*plist).fParticles[c].Pz();
917  // make (xy,z) a unit vector
918  xy = xytemp/sqrt(xytemp*xytemp + z*z);
919  z = z/sqrt(xytemp*xytemp + z*z);
920 
921  if(z != 0.0) mcslope = xy/z;
922  else mcslope = 1.0E9;
923 
924  dptemp = (1 + m*mcslope)/sqrt(1 + m*m + mcslope*mcslope + m*m*mcslope*mcslope);
925  if(dptemp < 0.0) dptemp = -dptemp;
926 
927  d = sqrt(geo::DsqrToLine((*plist).fParticles[c].Vz(),(*plist).fParticles[c].Vy(), 0.0, b, 100.0, 100.0*m + b));
928 
929  // dot product must be bigger than the old one AND the hough line must pass within 10.0cm of the true vertex of the particle
930  // AND the track-length of the particle must be > 20.0cm
931  if(dptemp > dp && d < 10.0 && (*plist).fParticles[c].Trajectory().TotalLength() > 10.0) dp = dptemp;
932 
933  } // end if(pdg codes)
934 
935  } // end if(c != track1 && c != track2)
936  } // end for c
937 
938  mcdp3ytemp.push_back(dp);
939 
940  //if(dp < 0.0) std::cout << "\n\nThird line Y: (no match)\n";
941  //else std::cout << "\n\nThird line Y: particle# = " << track3 << " PDG = " << (*plist).fParticles[track3].PdgCode() << " dp = " << dp
942  // << " track length = " << (*plist).fParticles[track3].Trajectory().TotalLength() << "\n";
943  } // end if(peak.size > 2)
944 
945  } // end for i
946  } // end if(y-view)
947 
948  } // end if((*hHoughs)[k].size() != 0)
949  } // end for k
950  } // end dot product validation
951  */
952 
953 
954 
955 
956  fNt->numHLX = numHLXtemp;
957  fNt->numHLY = numHLYtemp;
958 
959  fNt->nuX = nuXtemp;
960  fNt->nuY = nuYtemp;
961  fNt->nuZ = nuZtemp;
962  fNt->nuE = nuEtemp;
963 
964  fNt->nupdg = nupdgtemp;
965  fNt->nuCCNC = nuCCNCtemp;
966 
967  fNt->perpdist1x = perpdistxtemp[0];
968  fNt->perpdist1y = perpdistytemp[0];
969  fNt->perpdist2x = perpdistxtemp[1];
970  fNt->perpdist2y = perpdistytemp[1];
971  fNt->perpdist3x = perpdistxtemp[2];
972  fNt->perpdist3y = perpdistytemp[2];
973  fNt->perpdist4x = perpdistxtemp[3];
974  fNt->perpdist4y = perpdistytemp[3];
975 
976  fNt->mcdp1x = mcdpxtemp[0];
977  fNt->mcdp1y = mcdpytemp[0];
978  fNt->mcdp2x = mcdpxtemp[1];
979  fNt->mcdp2y = mcdpytemp[1];
980  fNt->mcdp3x = mcdpxtemp[2];
981  fNt->mcdp3y = mcdpytemp[2];
982  fNt->mcdp4x = mcdpxtemp[3];
983  fNt->mcdp4y = mcdpytemp[3];
984 
985  fNt->on1x = onxtemp[0];
986  fNt->on2x = onxtemp[1];
987  fNt->on3x = onxtemp[2];
988  fNt->on4x = onxtemp[3];
989  fNt->on1y = onytemp[0];
990  fNt->on2y = onytemp[1];
991  fNt->on3y = onytemp[2];
992  fNt->on4y = onytemp[3];
993 
994  fNt->rho1x = rhoxtemp[0];
995  fNt->rho2x = rhoxtemp[1];
996  fNt->rho3x = rhoxtemp[2];
997  fNt->rho4x = rhoxtemp[3];
998  fNt->rho1y = rhoytemp[0];
999  fNt->rho2y = rhoytemp[1];
1000  fNt->rho3y = rhoytemp[2];
1001  fNt->rho4y = rhoytemp[3];
1002 
1003  fNt->theta1x = thetaxtemp[0];
1004  fNt->theta2x = thetaxtemp[1];
1005  fNt->theta3x = thetaxtemp[2];
1006  fNt->theta4x = thetaxtemp[3];
1007  fNt->theta1y = thetaytemp[0];
1008  fNt->theta2y = thetaytemp[1];
1009  fNt->theta3y = thetaytemp[2];
1010  fNt->theta4y = thetaytemp[3];
1011 
1012  fNt->threshx = threshxtemp;
1013  fNt->threshy = threshytemp;
1014 
1015  fNt->peak1x = peakxtemp[0];
1016  fNt->peak2x = peakxtemp[1];
1017  fNt->peak3x = peakxtemp[2];
1018  fNt->peak4x = peakxtemp[3];
1019  fNt->peak1y = peakytemp[0];
1020  fNt->peak2y = peakytemp[1];
1021  fNt->peak3y = peakytemp[2];
1022  fNt->peak4y = peakytemp[3];
1023 
1024  fNtTree->Fill();
1025 
1026  return;
1027 
1028  }
1029 
1031 } // end namespace hough
1032 ///////////////////////////////////////////////////////////////////////
double E(const int i=0) const
Definition: MCParticle.h:232
std::vector< double > on3x
Definition: HValidateNt.h:55
std::vector< double > perpdist2x
Definition: HValidateNt.h:37
std::vector< double > nuE
Definition: HValidateNt.h:30
recovalid::CAFCutter fCAFCutter
the CAFCutter helper class
SubRunNumber_t subRun() const
Definition: Event.h:72
std::vector< double > peak3y
Definition: HValidateNt.h:89
std::vector< double > mcdp3x
Definition: HValidateNt.h:48
int PdgCode() const
Definition: MCParticle.h:211
int CCNC() const
Definition: MCNeutrino.h:148
std::vector< double > mcdp4x
Definition: HValidateNt.h:50
std::vector< double > theta3x
Definition: HValidateNt.h:73
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
std::vector< double > mcdp3y
Definition: HValidateNt.h:49
std::vector< int > nupdg
Definition: HValidateNt.h:32
std::vector< double > mcdp4y
Definition: HValidateNt.h:51
std::vector< double > peak3x
Definition: HValidateNt.h:85
std::vector< double > on1x
Definition: HValidateNt.h:53
unsigned int fMinHitX
Minimum hits in x-view/slice.
std::vector< double > mcdp2x
Definition: HValidateNt.h:46
Perform a "2 point" Hough transform on a collection of hits.
Definition: Hough2P.cxx:20
std::vector< double > perpdist2y
Definition: HValidateNt.h:38
Validate Hough transform algorithms.
Float_t x1[n_points_granero]
Definition: compare.C:5
unsigned int fMinHitY
Minumum hits in y-view/slice.
std::vector< int > nuCCNC
Definition: HValidateNt.h:33
std::vector< HoughPeak > fPeak
List of peaks found in Hough space.
Definition: HoughResult.h:61
const char * p
Definition: xmltok.h:285
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:146
T sqrt(T number)
Definition: d0nt_math.hpp:156
std::string fMCLabel
Label for process that made MCTruth.
std::vector< double > threshy
Definition: HValidateNt.h:81
void HoughLineToDetector(const rb::HoughResult *hr, unsigned int hrIdx, double *pz1, double *px1, double *pz2, double *px2)
Vertical planes which measure X.
Definition: PlaneGeo.h:28
std::vector< double > on4x
Definition: HValidateNt.h:56
A collection of associated CellHits.
Definition: Cluster.h:47
double DetLength() const
std::vector< double > nuX
Definition: HValidateNt.h:27
std::vector< double > peak1x
Definition: HValidateNt.h:83
std::vector< double > theta4y
Definition: HValidateNt.h:78
DEFINE_ART_MODULE(TestTMapFile)
std::vector< double > theta1x
Definition: HValidateNt.h:71
Particle class.
std::vector< double > rho3x
Definition: HValidateNt.h:64
std::vector< double > on1y
Definition: HValidateNt.h:57
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
art::PtrVector< rb::CellHit > AllCells() const
Get all cells from both views.
Definition: Cluster.cxx:180
void CountCellsOnLineFast(double x1, double y1, double z1, double x2, double y2, double z2, std::vector< OfflineChan > &Xhitsonline, std::vector< OfflineChan > &Yhitsonline)
Make list of cells in each view traversed by a line segment.
Provides efficient lookup of CellHits by plane and cell number.
Definition: HitMap.h:22
std::vector< double > mcdp2y
Definition: HValidateNt.h:47
std::vector< double > rho2x
Definition: HValidateNt.h:63
std::vector< int > numHLX
Definition: HValidateNt.h:24
int fCutType
what cuts to apply (see CAFCutter.h)
std::vector< double > theta2x
Definition: HValidateNt.h:72
std::vector< double > mcdp1y
Definition: HValidateNt.h:45
bool passCuts(int cut, const caf::StandardRecord *sr)
Definition: CAFCutter.cxx:37
void SlopeIcept(unsigned int i, double *m, double *b) const
Slope and intercepts of Hough lines.
Definition: HoughResult.cxx:62
int subrun
subrun number
Definition: HValidateNt.h:21
std::vector< double > theta4x
Definition: HValidateNt.h:74
std::vector< double > theta2y
Definition: HValidateNt.h:76
int run
run number
Definition: HValidateNt.h:20
double DsqrToLine(double x0, double y0, double x1, double y1, double x2, double y2)
In two dimensions, return the perpendicular distance from a point (x0,y0) to a line defined by end po...
Definition: Geo.cxx:338
std::vector< double > peak1y
Definition: HValidateNt.h:87
T get(std::string const &key) const
Definition: ParameterSet.h:231
int evt
std::vector< double > mcdp1x
Definition: HValidateNt.h:44
std::vector< double > peak2y
Definition: HValidateNt.h:88
std::vector< double > peak4y
Definition: HValidateNt.h:90
Collect Geo headers and supply basic geometry functions.
unsigned int fMinHit
Slices must have at least this many hits.
void reconfigure(const fhicl::ParameterSet &p)
bool IsFiltered(const art::Event &evt, art::Ptr< T > x, const std::vector< std::string > &labels)
Is this Ptr marked "filtered out"?
Definition: FilterList.h:96
std::vector< int > numHLY
Definition: HValidateNt.h:25
double DetHalfHeight() const
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
bool fApplyCAFCuts
should we apply the caf level cuts?
std::vector< double > perpdist1y
Definition: HValidateNt.h:36
std::vector< double > theta3y
Definition: HValidateNt.h:77
std::vector< double > perpdist4x
Definition: HValidateNt.h:41
std::vector< double > rho2y
Definition: HValidateNt.h:67
geo::View_t fView
Transform of x or y view?
Definition: HoughResult.h:56
std::vector< double > on3y
Definition: HValidateNt.h:59
std::vector< double > rho1y
Definition: HValidateNt.h:66
unsigned int NYCell() const
Number of cells in the y-view.
Definition: Cluster.h:108
std::vector< double > rho3y
Definition: HValidateNt.h:68
std::string fSliceLabel
Label for process that made Cluster.
EventNumber_t event() const
Definition: EventID.h:116
double Vx(const int i=0) const
Definition: MCParticle.h:220
std::vector< double > peak4x
Definition: HValidateNt.h:86
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
std::vector< double > nuZ
Definition: HValidateNt.h:29
std::vector< double > theta1y
Definition: HValidateNt.h:75
std::vector< double > threshx
Definition: HValidateNt.h:80
T * make(ARGS...args) const
HoughValidate(fhicl::ParameterSet const &p)
double DetHalfWidth() const
Data resulting from a Hough transform on the cell hit positions.
std::vector< double > nuY
Definition: HValidateNt.h:28
std::vector< double > on2y
Definition: HValidateNt.h:58
bool fIsMC
Flag for is MC or not.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
std::vector< double > perpdist3y
Definition: HValidateNt.h:40
unsigned int NXCell() const
Number of cells in the x-view.
Definition: Cluster.h:106
std::vector< double > rho4y
Definition: HValidateNt.h:69
std::string fCAFLabel
label for the process that made the standard records
void geom(int which=0)
Definition: geom.C:163
std::vector< double > rho4x
Definition: HValidateNt.h:65
double Vz(const int i=0) const
Definition: MCParticle.h:222
assert(nhit_max >=nhit_nbins)
int evt
event number
Definition: HValidateNt.h:22
Ntuple produced by the HoughValidate module.
Definition: HValidateNt.h:17
std::vector< double > perpdist3x
Definition: HValidateNt.h:39
Helper class for Reco Validation modules.
Definition: CAFCutter.h:58
std::vector< double > perpdist4y
Definition: HValidateNt.h:42
std::vector< double > peak2x
Definition: HValidateNt.h:84
void analyze(const art::Event &e)
std::vector< double > on2x
Definition: HValidateNt.h:54
bool IsNoise() const
Is the noise flag set?
Definition: Cluster.h:163
std::string fHoughResultLabel
Label for process that made HoughResult.
Float_t e
Definition: plot.C:35
RunNumber_t run() const
Definition: Event.h:77
Summary from a Hough transform applied to a group of cell hits.
Definition: HoughResult.h:35
Event generator information.
Definition: MCNeutrino.h:18
std::vector< double > rho1x
Definition: HValidateNt.h:62
EventID id() const
Definition: Event.h:56
double Vy(const int i=0) const
Definition: MCParticle.h:221
Encapsulate the geometry of one entire detector (near, far, ndos)
std::vector< double > perpdist1x
Definition: HValidateNt.h:35
std::vector< double > on4y
Definition: HValidateNt.h:60