TBRecoAna_module.cc
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////
2 // \file TBRecoAna_module.cc
3 // \brief Analyzer module for basic reco analysis of initial Beamline data files.
4 // \author lackey32@fnal.gov
5 ////////////////////////////////////////////////////////////////////////
6 
7 // C/C++ includes
8 #include <string>
9 
10 // ROOT includes
11 #include "TH1F.h"
12 #include "TH2F.h"
13 #include "TTimeStamp.h"
14 #include "TTree.h"
15 
16 // Framework includes
27 #include "fhiclcpp/ParameterSet.h"
29 
30 // NOvASoft includes
32 #include "BeamlineRecoBase/ToF.h"
35 #include "Geometry/LiveGeometry.h"
36 #include "MCCheater/BackTracker.h"
37 #include "NovaTimingUtilities/TimingUtilities.h"
38 #include "RawData/RawTrigger.h"
39 #include "RecoBase/CellHit.h"
40 #include "RecoBase/Cluster.h"
41 #include "RecoBase/FilterList.h"
42 #include "RecoBase/FitSum.h"
43 #include "RecoBase/Prong.h"
44 #include "RecoBase/RecoHit.h"
45 #include "RecoBase/Shower.h"
46 #include "RecoBase/Vertex.h"
47 
48 
49 namespace tbem {
50 
51 
52  class TBRecoAna : public art::EDAnalyzer {
53  public:
54  explicit TBRecoAna(fhicl::ParameterSet const& pset);
55  ~TBRecoAna();
56  void analyze(const art::Event& evt);
57  void reconfigure(const fhicl::ParameterSet& pset);
58  void beginJob();
59  void endJob();
60 
61  private:
62 
72 
73  Int_t nhit, run, subrun, event;
74  Double_t evtTime;
75  Double_t toftime, wcmom, ckovadc;
77 
78  std::vector<int> hitPlane, hitCell;
79  std::vector<double> hitTime;
80 
81  std::vector<int> slice;
82  std::vector<int> sliceNhit, prongNhit;
83  std::vector<double> cosVtxX, cosVtxY, cosVtxZ;
84  std::vector<double> sliceCalE, sliceADCTot, sliceMaxPlane, sliceTime;
85  std::vector<int> cosTrkNhit, winTrkNhit;
86  std::vector<double> cosTrkStrtX, cosTrkStrtY, cosTrkStrtZ;
87  std::vector<double> cosTrkStopX, cosTrkStopY, cosTrkStopZ;
88  std::vector<double> cosTrkDirX, cosTrkDirY, cosTrkDirZ;
89  std::vector<double> winTrkCalE, winTrkADCTot, winTrkMaxPlane;
90  std::vector<double> winTrkStrtX, winTrkStrtY, winTrkStrtZ;
91  std::vector<double> winTrkStopX, winTrkStopY, winTrkStopZ;
92  std::vector<double> winTrkDirX, winTrkDirY, winTrkDirZ;
93  std::vector<double> prongE, prongCalE, prongADCTot;
94  std::vector<double> prongStrtX, prongStrtY, prongStrtZ;
95  std::vector<double> prongDirX, prongDirY, prongDirZ;
96  std::vector<double> prongHitTime;
97  std::vector<double> chitHitTime;
100 
101  std::vector<int> bpfNhit;
102  std::vector<double> bpfStrtX, bpfStrtY, bpfStrtZ;
103  std::vector<double> bpfDirX, bpfDirY, bpfDirZ;
104  std::vector<double> bpfTrkHitTime;
105 
106  TTree *emshower;
107 
108  };
109 
110  //.......................................................................
111 
113  : EDAnalyzer(pset)
114  {
115  reconfigure(pset);
116  }
117 
118  //.......................................................................
119 
121  {
122  }
123 
124  //.......................................................................
125 
127  {
128  fRawDataLabel = pset.get<std::string>("RawDataLabel");
129  fClusterLabel = pset.get<std::string>("ClusterLabel");
130  fVertexLabel = pset.get<std::string>("VertexLabel");
131  fProngModLabel= pset.get<std::string>("ProngModLabel");
132  fProng2DLabel = pset.get<std::string>("Prong2DLabel");
133  fProng3DLabel = pset.get<std::string>("Prong3DLabel");
134  fRecoToFLabel = pset.get<std::string>("RecoToFLabel");
135  fRecoWCLabel = pset.get<std::string>("RecoWCLabel");
136  fRecoCherenkovLabel = pset.get<std::string>("RecoCherenkovLabel");
137  }
138 
139  //.......................................................................
140 
142  {
144 
145  emshower = tfs->make<TTree>("evts","");
146  emshower->Branch("run",&run,"run/I");
147  emshower->Branch("subrun",&subrun,"subrun/I");
148  emshower->Branch("event",&event,"event/I");
149  emshower->Branch("slice",&slice);
150  emshower->Branch("sliceTime",&sliceTime);
151  emshower->Branch("sliceNhit",&sliceNhit);
152  emshower->Branch("sliceCalE",&sliceCalE);
153  emshower->Branch("sliceADCTot",&sliceADCTot);
154  emshower->Branch("sliceMaxPlane",&sliceMaxPlane);
155  emshower->Branch("evtTime",&evtTime,"evtTime/D");
156  emshower->Branch("nhit",&nhit,"nhit/I");
157  emshower->Branch("hitPlane",&hitPlane);
158  emshower->Branch("hitCell",&hitCell);
159  emshower->Branch("hitTime",&hitTime);
160  emshower->Branch("cosVtxX",&cosVtxX);
161  emshower->Branch("cosVtxY",&cosVtxY);
162  emshower->Branch("cosVtxZ",&cosVtxZ);
163 
164  emshower->Branch("cosTrkNhit",&cosTrkNhit);
165  emshower->Branch("cosTrkMinTime",&cosTrkMinTime);
166  emshower->Branch("cosTrkMeanTime",&cosTrkMeanTime);
167  emshower->Branch("cosTrkStrtX",&cosTrkStrtX);
168  emshower->Branch("cosTrkStrtY",&cosTrkStrtY);
169  emshower->Branch("cosTrkStrtZ",&cosTrkStrtZ);
170  emshower->Branch("cosTrkStopX",&cosTrkStopX);
171  emshower->Branch("cosTrkStopY",&cosTrkStopY);
172  emshower->Branch("cosTrkStopZ",&cosTrkStopZ);
173  emshower->Branch("cosTrkDirX",&cosTrkDirX);
174  emshower->Branch("cosTrkDirY",&cosTrkDirY);
175  emshower->Branch("cosTrkDirZ",&cosTrkDirZ);
176 
177  emshower->Branch("winTrkNhit",&winTrkNhit);
178  emshower->Branch("winTrkMinTime",&winTrkMinTime);
179  emshower->Branch("winTrkMeanTime",&winTrkMeanTime);
180  emshower->Branch("winTrkCalE",&winTrkCalE);
181  emshower->Branch("winTrkADCTot",&winTrkADCTot);
182  emshower->Branch("winTrkMaxPlane",&winTrkMaxPlane);
183  emshower->Branch("winTrkStrtX",&winTrkStrtX);
184  emshower->Branch("winTrkStrtY",&winTrkStrtY);
185  emshower->Branch("winTrkStrtZ",&winTrkStrtZ);
186  emshower->Branch("winTrkStopX",&winTrkStopX);
187  emshower->Branch("winTrkStopY",&winTrkStopY);
188  emshower->Branch("winTrkStopZ",&winTrkStopZ);
189  emshower->Branch("winTrkDirX",&winTrkDirX);
190  emshower->Branch("winTrkDirY",&winTrkDirY);
191  emshower->Branch("winTrkDirZ",&winTrkDirZ);
192 
193  emshower->Branch("prongE",&prongE);
194  emshower->Branch("prongCalE",&prongCalE);
195  emshower->Branch("prongADCTot",&prongADCTot);
196  emshower->Branch("prongNhit",&prongNhit);
197  emshower->Branch("prongMinTime",&prongMinTime);
198  emshower->Branch("prongMeanTime",&prongMeanTime);
199  emshower->Branch("prongStrtX",&prongStrtX);
200  emshower->Branch("prongStrtY",&prongStrtY);
201  emshower->Branch("prongStrtZ",&prongStrtZ);
202  emshower->Branch("prongDirX",&prongDirX);
203  emshower->Branch("prongDirY",&prongDirY);
204  emshower->Branch("prongDirZ",&prongDirZ);
205  emshower->Branch("prongHitTime",&prongHitTime);
206  emshower->Branch("chitHitTime",&chitHitTime);
207 
208  emshower->Branch("bpfNhit",&bpfNhit);
209  emshower->Branch("bpfTrkMinTime",&bpfTrkMinTime);
210  emshower->Branch("bpfTrkMeanTime",&bpfTrkMeanTime);
211  emshower->Branch("bpfStrtX",&bpfStrtX);
212  emshower->Branch("bpfStrtY",&bpfStrtY);
213  emshower->Branch("bpfStrtZ",&bpfStrtZ);
214  emshower->Branch("bpfDirX",&bpfDirX);
215  emshower->Branch("bpfDirY",&bpfDirY);
216  emshower->Branch("bpfDirZ",&bpfDirZ);
217  emshower->Branch("bpfTrkHitTime",&bpfTrkHitTime);
218 
219  emshower->Branch("toftime",&toftime,"toftime/D");
220  emshower->Branch("wcmom",&wcmom,"wcmom/D");
221  emshower->Branch("ckovadc",&ckovadc,"ckovadc/D");
222  emshower->Branch("wcTrkStrtX",&wcTrkStrtX,"wcTrkStrtX/D");
223  emshower->Branch("wcTrkStrtY",&wcTrkStrtY,"wcTrkStrtY/D");
224  emshower->Branch("wcTrkDirX",&wcTrkDirX,"wcTrkDirX/D");
225  emshower->Branch("wcTrkDirY",&wcTrkDirY,"wcTrkDirY/D");
226  emshower->Branch("wcTrkDirZ",&wcTrkDirZ,"wcTrkDirZ/D");
227  emshower->Branch("wcMagDist",&wcMagDist,"wcMagDist/D");
228 
229  }
230 
231  //.......................................................................
232 
234  {
235 
236  }
237 
238  //.......................................................................
239 
241  {
242  nhit = -5;
243  toftime = -5;
244  wcmom = -5;
245  ckovadc = -5;
246  wcTrkStrtX = -500;
247  wcTrkStrtY = -500;
248  wcTrkDirX = -5;
249  wcTrkDirY = -5;
250  wcTrkDirZ = -5;
251  wcMagDist = -500;
252 
253  // Get "header" info (not all in header, but general info about event)
254  run = evt.run();
255  subrun = evt.subRun();
256  event = evt.event();
257 
258  // Get trigger time
260  evt.getByLabel(fRawDataLabel, trigs);
261  const rawdata::RawTrigger trig = trigs->at(0);
262 
263  struct timespec unixTime;
265 
266  unsigned long int unixTimeSec = unixTime.tv_sec;
267  unsigned long int unixTimeNanoSec = unixTime.tv_nsec;
268  evtTime = unixTimeSec + (1e-9)*unixTimeNanoSec;
269 
270 
272 
273  // Get Beamline info --------------------------------------------------
274  // ToFs
276  std::vector<art::Ptr<brb::ToF>> tofs;
277  if (evt.getByLabel(fRecoToFLabel, tofHandle))
278  art::fill_ptr_vector(tofs, tofHandle);
279 
280  for (auto tof : tofs) {
281  double t = tof->Time();
282  //t -= 21.0;
283  toftime = t;
284  }
285 
286  //WCs
288  std::vector<art::Ptr<brb::WCTrack>> wcs;
289  if (evt.getByLabel(fRecoWCLabel, wcHandle))
290  art::fill_ptr_vector(wcs, wcHandle);
291 
292 
293  for (auto wc : wcs) {
294  wcmom = wc->Momentum();
295  wcTrkStrtX = wc->XYFace().X();
296  wcTrkStrtY = wc->XYFace().Y();
297  wcTrkDirX = wc->Dir().X();
298  wcTrkDirY = wc->Dir().Y();
299  wcTrkDirZ = wc->Dir().Z();
300  wcMagDist = wc->TransDistToMagAxis();
301  }
302 
303 
304  //Ckov
306  std::vector<art::Ptr<brb::BeamlineDigit>> cherenkovs;
307  if (evt.getByLabel(fRecoCherenkovLabel, cherenkovHandle))
308  art::fill_ptr_vector(cherenkovs, cherenkovHandle);
309 
310  for (auto ckov : cherenkovs) {
311  ckovadc = ckov->PeakADC();
312  }
313 
314 
315  // Get Detector info --------------------------------------------------
316 
317  // Get list of CellHits for event
319  evt.getByLabel("calhit", cellhits);
320  nhit = cellhits->size();
321  // Loop over all CellHits to get location and timing information
322  for (unsigned int hitIdx=0; hitIdx<cellhits->size(); ++hitIdx){
323  art::Ptr<rb::CellHit> ihit(cellhits,hitIdx);
324  hitPlane.push_back(ihit->Plane());
325  hitCell.push_back(ihit->Cell());
326  hitTime.push_back(ihit->TNS());
327  }
328 
329 
330  // Get Slices for event
332  evt.getByLabel(fClusterLabel, sliceHandle);
333 
334  // get associations between slices and other objects
335  art::FindManyP<rb::Vertex> cosVtxAssn(sliceHandle, evt, "cosmicrayvertex");
336  art::FindManyP<rb::Track> cosTrkAssn(sliceHandle, evt, "cosmictrack");
337  art::FindManyP<rb::Track> winTrkAssn(sliceHandle, evt, "windowtrack");
338  art::FindManyP<rb::Prong> fuzzykAssn(sliceHandle, evt, "fuzzykvertex");
339  art::FindManyP<rb::Track> bpfTrkAssn(sliceHandle, evt, "breakpoint");
340 
342  for ( unsigned int i=0; i<sliceHandle->size(); ++i )
343  slices.push_back(art::Ptr<rb::Cluster>(sliceHandle, i));
344 
345 
346  // Loop over slices
347  for ( unsigned int sliceIdx = 0; sliceIdx<slices.size(); ++sliceIdx ){
348  // if (rb::IsFiltered(evt,sliceHandle,sliceIdx,"runeventfilter"))
349  // continue;
350 
351  slice.push_back(sliceIdx);
352  art::Ptr<rb::Cluster> islice = slices.at(sliceIdx);
353 
354  //sliceNhit.push_back(islice->NCell());
355  // slice E
356  if (islice->NCell() > 0) {
357  //sliceCalE.push_back(islice->CalorimetricEnergy());
358 
359  sliceNhit.push_back(islice->NCell());
360  sliceCalE.push_back(islice->CalorimetricEnergy());
361  sliceADCTot.push_back(islice->TotalADC());
362  sliceMaxPlane.push_back(islice->MaxPlane());
363  sliceTime.push_back(islice->MinTNS());
364 
365  // tracks
366  TVector3 cosTrkStrt;
367  TVector3 cosTrkStop;
368  TVector3 cosTrkDir;
369  TVector3 winTrkStrt;
370  TVector3 winTrkStop;
371  TVector3 winTrkDir;
372 
373  if ( cosTrkAssn.isValid() ) {
374  std::vector< art::Ptr< rb::Track > > tracks = cosTrkAssn.at(sliceIdx);
375  for (unsigned int trackIdx = 0; trackIdx<tracks.size(); ++trackIdx ){
376  art::Ptr<rb::Track> cosTrk = tracks.at(trackIdx);
377  cosTrkStrt = cosTrk->Start();
378  cosTrkStop = cosTrk->Stop();
379  cosTrkDir = cosTrk->Dir();
380  // force track to start downstream
381  if ( cosTrkStop.Z() < cosTrkStrt.Z() ) {
382  cosTrkStrt = cosTrk->Stop();
383  cosTrkStop = cosTrk->Start();
384  cosTrkDir = -(cosTrk->Dir());
385  }
386  cosTrkStrtX.push_back(cosTrkStrt.X());
387  cosTrkStrtY.push_back(cosTrkStrt.Y());
388  cosTrkStrtZ.push_back(cosTrkStrt.Z());
389  cosTrkStopX.push_back(cosTrkStop.X());
390  cosTrkStopY.push_back(cosTrkStop.Y());
391  cosTrkStopZ.push_back(cosTrkStop.Z());
392  cosTrkDirX.push_back(cosTrkDir.X());
393  cosTrkDirY.push_back(cosTrkDir.Y());
394  cosTrkDirZ.push_back(cosTrkDir.Z());
395  cosTrkNhit.push_back(cosTrk->NCell());
396  cosTrkMinTime.push_back(cosTrk->MinTNS());
397  cosTrkMeanTime.push_back(cosTrk->MeanTNS());
398  } // loop over cosmic tracks
399  } // valid cosmic track
400 
401 
402  if ( winTrkAssn.isValid() ) {
403  std::vector< art::Ptr< rb::Track > > tracks = winTrkAssn.at(sliceIdx);
404  for (unsigned int trackIdx = 0; trackIdx<tracks.size(); ++trackIdx ){
405  art::Ptr<rb::Track> winTrk = tracks.at(trackIdx);
406  winTrkStrt = winTrk->Start();
407  winTrkStop = winTrk->Stop();
408  winTrkDir = winTrk->Dir();
409  // force track to start downstream
410  if ( winTrkStop.Z() < winTrkStrt.Z() ) {
411  winTrkStrt = winTrk->Stop();
412  winTrkStop = winTrk->Start();
413  winTrkDir = -(winTrk->Dir());
414  }
415  winTrkStrtX.push_back(winTrkStrt.X());
416  winTrkStrtY.push_back(winTrkStrt.Y());
417  winTrkStrtZ.push_back(winTrkStrt.Z());
418  winTrkStopX.push_back(winTrkStop.X());
419  winTrkStopY.push_back(winTrkStop.Y());
420  winTrkStopZ.push_back(winTrkStop.Z());
421  winTrkDirX.push_back(winTrkDir.X());
422  winTrkDirY.push_back(winTrkDir.Y());
423  winTrkDirZ.push_back(winTrkDir.Z());
424  winTrkNhit.push_back(winTrk->NCell());
425  winTrkMinTime.push_back(winTrk->MinTNS());
426  winTrkMeanTime.push_back(winTrk->MeanTNS());
427 
428  winTrkCalE.push_back(winTrk->CalorimetricEnergy());
429  winTrkADCTot.push_back(winTrk->TotalADC());
430  winTrkMaxPlane.push_back(winTrk->MaxPlane());
431 
432  } // loop over window tracks
433  } // valid window track
434 
435 
436 
437  // get prongs
438  std::vector<art::Ptr<rb::Prong>> prongs3D;
439  art::FindManyP<rb::Prong> fmProng3D(sliceHandle, evt,
441  if ( !fmProng3D.isValid() ) continue;
442  else prongs3D = fmProng3D.at(sliceIdx);
443  if (prongs3D.size() == 0 ) continue;
444 
445  art::FindManyP<rb::Track> fmTrackBPF(prongs3D, evt, "breakpoint");
446 
447  // vertices
448  std::vector<art::Ptr<rb::Vertex>> cosVtx;
449  if (cosVtxAssn.isValid())
450  cosVtx = cosVtxAssn.at(sliceIdx);
451  if (cosVtx.size() == 1){
452  cosVtxX.push_back(cosVtx.at(0)->GetX());
453  cosVtxY.push_back(cosVtx.at(0)->GetY());
454  cosVtxZ.push_back(cosVtx.at(0)->GetZ());
455  }
456 
457 
458  // prongs
459  for (unsigned int prongIdx=0; prongIdx<prongs3D.size(); ++prongIdx){
460  art::Ptr<rb::Prong> iprong = prongs3D.at(prongIdx);
461  int nhitprong = iprong->NCell();
462  prongNhit.push_back(nhitprong);
463 
464  prongStrtX.push_back(iprong->Start().X());
465  prongStrtY.push_back(iprong->Start().Y());
466  prongStrtZ.push_back(iprong->Start().Z());
467  prongDirX.push_back(iprong->Dir().X());
468  prongDirY.push_back(iprong->Dir().Y());
469  prongDirZ.push_back(iprong->Dir().Z());
470  prongMinTime.push_back(iprong->MinTNS());
471  prongMeanTime.push_back(iprong->MeanTNS());
472 
473  for (unsigned int hitIdx = 0; hitIdx<iprong->NCell(); ++hitIdx){
474  const art::Ptr<rb::CellHit> chit = iprong->Cell(hitIdx);
475  const rb::RecoHit rhit = iprong->RecoHit(chit);
476  double hitTime = chit->TNS();
477  // Events pre-July 3 11:42 CDT (pre run 100192) were 1ms, not 100μs.
478  // Need to adjust time for timing cuts to work.
479  if (run<100192)
480  hitTime -= 450e3;
481 
482  chitHitTime.push_back(hitTime);
483  if (hitIdx==0)
484  prongHitTime.push_back(hitTime);
485 
486  } // end loop over hits
487 
488  prongE.push_back(iprong->TotalGeV());
489  prongCalE.push_back(iprong->CalorimetricEnergy());
490  prongADCTot.push_back(iprong->TotalADC());
491 
492 
493  // Get bpf tracks
494  std::vector<art::Ptr<rb::Track>> bpftracks;
495  if(fmTrackBPF.isValid()) bpftracks = fmTrackBPF.at(prongIdx);
496 
497  art::FindManyP<rb::FitSum> fmFitsum(bpftracks, evt, "breakpoint");
498 
499  for (unsigned int trackIdx = 0; trackIdx < bpftracks.size(); ++trackIdx){
500 
501  std::vector<art::Ptr<rb::FitSum>> fitsums;
502  if(fmFitsum.isValid()) fitsums = fmFitsum.at(trackIdx);
503  if(fitsums.size()==0) continue;
504 
505  // Only look at muon assumption - this should be expanded
506  if(fitsums[0]->PDG() == 13) {
507  art::Ptr<rb::Track> bpfTrk = bpftracks[trackIdx];
508  int nhitbpf = bpfTrk->NCell();
509  bpfNhit.push_back(nhitbpf);
510  bpfTrkMinTime.push_back(bpfTrk->MinTNS());
511  bpfTrkMeanTime.push_back(bpfTrk->MeanTNS());
512 
513  bpfStrtX.push_back(bpfTrk->Start().X());
514  bpfStrtY.push_back(bpfTrk->Start().Y());
515  bpfStrtZ.push_back(bpfTrk->Start().Z());
516  bpfDirX.push_back(bpfTrk->Dir().X());
517  bpfDirY.push_back(bpfTrk->Dir().Y());
518  bpfDirZ.push_back(bpfTrk->Dir().Z());
519 
520 
521  const art::Ptr<rb::CellHit> bpfhit = bpfTrk->Cell(0);
522  double trkTime = bpfhit->TNS();
523  // Events pre-July 3 11:42 CDT (pre run 100192) were 1ms, not 100μs.
524  // Need to adjust time for timing cuts to work.
525  if (run<100192)
526  trkTime -= 450e3;
527  bpfTrkHitTime.push_back(trkTime);
528  }
529  } // loop over bpf tracks
530 
531  }//loop over prongs
532 
533  } // end non-noise slice
534 
535  } // end loop over slices
536 
537 
538  emshower->Fill();
539 
540  // Cleanup vectors
541  hitPlane.clear();
542  hitCell.clear();
543  hitTime.clear();
544 
545  slice.clear();
546  cosVtxX.clear();
547  cosVtxY.clear();
548  cosVtxZ.clear();
549 
550  sliceTime.clear();
551  sliceNhit.clear();
552  sliceCalE.clear();
553  sliceADCTot.clear();
554  sliceMaxPlane.clear();
555  cosTrkNhit.clear();
556  cosTrkMinTime.clear();
557  cosTrkMeanTime.clear();
558  cosTrkStrtX.clear();
559  cosTrkStrtY.clear();
560  cosTrkStrtZ.clear();
561  cosTrkStopX.clear();
562  cosTrkStopY.clear();
563  cosTrkStopZ.clear();
564  cosTrkDirX.clear();
565  cosTrkDirY.clear();
566  cosTrkDirZ.clear();
567  winTrkNhit.clear();
568  winTrkMinTime.clear();
569  winTrkMeanTime.clear();
570  winTrkCalE.clear();
571  winTrkADCTot.clear();
572  winTrkMaxPlane.clear();
573  winTrkStrtX.clear();
574  winTrkStrtY.clear();
575  winTrkStrtZ.clear();
576  winTrkStopX.clear();
577  winTrkStopY.clear();
578  winTrkStopZ.clear();
579  winTrkDirX.clear();
580  winTrkDirY.clear();
581  winTrkDirZ.clear();
582 
583  prongNhit.clear();
584  prongMinTime.clear();
585  prongMeanTime.clear();
586  prongE.clear();
587  prongCalE.clear();
588  prongADCTot.clear();
589  prongStrtX.clear();
590  prongStrtY.clear();
591  prongStrtZ.clear();
592  prongDirX.clear();
593  prongDirY.clear();
594  prongDirZ.clear();
595  prongHitTime.clear();
596  chitHitTime.clear();
597 
598  bpfNhit.clear();
599  bpfTrkMinTime.clear();
600  bpfTrkMeanTime.clear();
601  bpfStrtX.clear();
602  bpfStrtY.clear();
603  bpfStrtZ.clear();
604  bpfDirX.clear();
605  bpfDirY.clear();
606  bpfDirZ.clear();
607  bpfTrkHitTime.clear();
608 
609  } // end analyze
610 
611  //.......................................................................
613 } // end namespace tbem
614 ///////////////////////////////////////////////////////////////////
std::vector< double > winTrkADCTot
std::vector< double > bpfDirZ
float TNS() const
Definition: CellHit.h:46
std::string fRecoToFLabel
SubRunNumber_t subRun() const
Definition: Event.h:72
back track the reconstruction to the simulation
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
std::vector< double > cosTrkStopX
std::vector< double > prongStrtZ
std::string fRawDataLabel
unsigned short Plane() const
Definition: CellHit.h:39
std::vector< double > winTrkStopX
std::vector< double > bpfTrkMeanTime
std::string fRecoCherenkovLabel
std::vector< double > cosTrkStopY
std::vector< double > prongMeanTime
void analyze(const art::Event &evt)
std::vector< double > winTrkStopZ
std::vector< double > bpfTrkMinTime
std::vector< double > hitTime
Definition of the beamline offline geometry. Also implementation of a service to obtain this informat...
DEFINE_ART_MODULE(TestTMapFile)
virtual TVector3 Start() const
Definition: Prong.h:73
bool convertNovaTimeToUnixTime(uint64_t const &inputNovaTime, struct timespec &outputUnixTime)
std::vector< double > bpfDirY
std::vector< double > cosTrkStrtY
std::vector< double > prongDirX
std::vector< double > prongE
std::vector< double > cosTrkStopZ
std::vector< double > cosTrkDirY
std::vector< double > winTrkMinTime
Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb...
Definition: RecoHit.h:19
std::vector< int > winTrkNhit
std::vector< int > cosTrkNhit
unsigned short Cell() const
Definition: CellHit.h:40
std::vector< double > prongHitTime
double MinTNS() const
Definition: Cluster.cxx:482
double TotalADC() const
Sum of the ADC of all the contained hits.
Definition: Cluster.cxx:360
std::vector< double > bpfStrtY
std::vector< double > winTrkStopY
double CalorimetricEnergy(EEnergyCalcScheme escheme=kRecomputeEnergy) const
Simple estimate of neutrino energy.
Definition: Cluster.cxx:439
std::vector< double > winTrkDirX
std::vector< double > winTrkStrtX
Encapsulation of reconstructed digitizer &#39;hits&#39;. Used for ToF PMTs and SiPMs, and Cherenkov and Muon ...
std::vector< double > winTrkMaxPlane
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
std::vector< int > hitCell
std::vector< double > cosTrkMinTime
T get(std::string const &key) const
Definition: ParameterSet.h:231
Encapsulation of reconstructed Time-of-Flight (ToF) information. Part of beamline reconstruction for ...
virtual TVector3 Dir() const
Unit vector describing prong direction.
Definition: Prong.h:77
int evt
rb::RecoHit RecoHit(const art::Ptr< rb::CellHit > &chit) const
Return calibrated hit based on assumed W coordinate.
Definition: Cluster.cxx:259
std::vector< double > cosVtxZ
std::vector< double > sliceMaxPlane
std::vector< double > prongStrtY
Encapsulation of reconstructed Wire Chamber track. Part of beamline reconstruction for NOvA test beam...
std::vector< double > winTrkDirY
std::vector< double > winTrkStrtY
EventNumber_t event() const
Definition: Event.h:67
reference at(size_type n)
Definition: PtrVector.h:365
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
std::vector< int > sliceNhit
Vertex location in position and time.
std::vector< double > bpfDirX
std::vector< double > sliceCalE
std::string fProngModLabel
std::vector< int > prongNhit
Definition: run.py:1
size_type size() const
Definition: PtrVector.h:308
std::vector< double > prongDirZ
std::string fVertexLabel
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
std::string fClusterLabel
T * make(ARGS...args) const
std::vector< double > cosVtxY
std::vector< double > winTrkStrtZ
TBRecoAna(fhicl::ParameterSet const &pset)
std::vector< double > winTrkCalE
std::vector< double > sliceTime
std::vector< double > winTrkDirZ
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
unsigned long long fTriggerTimingMarker_TimeStart
Definition: RawTrigger.h:38
std::vector< int > hitPlane
std::string fProng3DLabel
std::vector< double > cosTrkMeanTime
std::vector< double > winTrkMeanTime
double MeanTNS(rb::AveragingScheme scheme=kDefaultScheme) const
Definition: Cluster.cxx:554
std::vector< double > cosTrkStrtX
std::vector< int > bpfNhit
double TotalGeV(EEnergyCalcScheme escheme=kRecomputeEnergy) const
Simple sum of the estimated GeV of all the hits.
Definition: Cluster.cxx:378
std::vector< double > cosVtxX
std::vector< double > prongCalE
unsigned int MaxPlane(geo::View_t view=geo::kXorY) const
Definition: Cluster.cxx:508
std::vector< double > bpfStrtZ
std::string fProng2DLabel
std::string fRecoWCLabel
std::vector< double > prongStrtX
TVector3 Stop() const
Position of the final trajectory point.
Definition: Track.cxx:186
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:464
std::vector< double > cosTrkDirZ
Float_t e
Definition: plot.C:35
std::vector< int > slice
RunNumber_t run() const
Definition: Event.h:77
std::vector< double > prongDirY
std::vector< double > sliceADCTot
void reconfigure(const fhicl::ParameterSet &pset)
std::vector< double > bpfStrtX
std::vector< double > cosTrkDirX
std::vector< double > bpfTrkHitTime
std::vector< double > prongMinTime
std::vector< double > cosTrkStrtZ
std::vector< double > chitHitTime
std::vector< double > prongADCTot
enum BeamMode string