All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
icaruscode/icaruscode/CRT/CRTT0MatchingAna_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: CRTT0MatchingAna
3 // Module Type: analyzer
4 // File: CRTT0MatchingAna_module.cc
5 //
6 // Tom Brooks (tbrooks@fnal.gov)
7 ////////////////////////////////////////////////////////////////////////
8 
9 // icaruscode includes
15 //#include "sbndcode/Geometry/GeometryWrappers/CRTGeoAlg.h"
16 //#include "sbndcode/Geometry/GeometryWrappers/TPCGeoAlg.h"
17 
18 // LArSoft includes
22 #include "larcore/CoreUtils/ServiceUtil.h" // lar::providerFrom()
26 #include "nusimdata/SimulationBase/MCParticle.h"
27 #include "larcorealg/CoreUtils/NumericUtils.h" // util::absDiff()
28 
29 // Framework includes
30 #include "art/Framework/Core/EDAnalyzer.h"
31 #include "art/Framework/Principal/Event.h"
32 #include "art/Framework/Principal/Handle.h"
33 #include "art/Framework/Services/Registry/ServiceHandle.h"
34 #include "art_root_io/TFileService.h"
35 #include "art/Framework/Core/ModuleMacros.h"
36 #include "canvas/Persistency/Common/FindManyP.h"
37 #include "canvas/Utilities/Exception.h"
41 
42 // Utility libraries
43 #include "messagefacility/MessageLogger/MessageLogger.h"
44 #include "fhiclcpp/ParameterSet.h"
45 #include "fhiclcpp/types/Table.h"
46 #include "fhiclcpp/types/Atom.h"
47 #include "cetlib/pow.h" // cet::sum_of_squares()
48 
49 // ROOT includes. Note: To look up the properties of the ROOT classes,
50 // use the ROOT web site; e.g.,
51 // <https://root.cern.ch/doc/master/annotated.html>
52 #include "TH1.h"
53 #include "TH2.h"
54 #include "TVector3.h"
55 
56 // C++ includes
57 #include <map>
58 #include <vector>
59 #include <string>
60 
61 namespace icarus {
62 
63  class CRTT0MatchingAna : public art::EDAnalyzer {
64  public:
65 
66  explicit CRTT0MatchingAna(fhicl::ParameterSet const& p);
67 
68  // Called once, at start of the job
69  virtual void beginJob() override;
70 
71  // Called once per event
72  virtual void analyze(const art::Event& event) override;
73 
74  // Called once, at end of the job
75  virtual void endJob() override;
76 
77  // Calculate the distance from the track crossing point to CRT overlap coordinates
78  double DistToCrtHit(TVector3 trackPos, sbn::crt::CRTHit crtHit);
79 
80  void reconfigure(fhicl::ParameterSet const & p);
81 
82  private:
83 
84  // fcl file parameters
85  art::InputTag fSimModuleLabel;///< name of detsim producer
86  art::InputTag fCRTHitLabel; ///< name of CRT producer
87  std::vector<art::InputTag> fTPCTrackLabel; ///< name of CRT producer
88  art::InputTag fTriggerLabel; ///< labels for trigger
89  bool fVerbose; ///< print information about what's going on
90 
92 
93  // CRTGeoAlg fCrtGeo;
94  //TPCGeoAlg fTpcGeo;
95 
96  geo::GeometryCore const* fGeometryService; ///< pointer to Geometry provider
98  //CRTBackTracker fCrtBackTrack;
100  // Histograms
101  std::map<std::string, TH1D*> hDCA;
102  std::map<std::string, TH1D*> hMatchDCA;
103  std::map<std::string, TH1D*> hNoMatchDCA;
104 
105  std::map<std::string, TH1D*> hDoL;
106  std::map<std::string, TH1D*> hMatchDoL;
107  std::map<std::string, TH1D*> hNoMatchDoL;
108 
109  std::map<std::string, TH1D*> hT0;
110  std::map<std::string, TH1D*> hMatchT0;
111  std::map<std::string, TH1D*> hNoMatchT0;
112 
113  std::map<std::string, TH1D*> hEffDCATotal;
114  std::map<std::string, TH1D*> hEffDCAReco;
115  std::map<std::string, TH1D*> hEffDoLTotal;
116  std::map<std::string, TH1D*> hEffDoLReco;
117  std::map<std::string, TH1D*> hEffLengthTotal;
118  std::map<std::string, TH1D*> hEffLengthReco;
119 
120  std::map<std::string, TH1D*> hPurityDCATotal;
121  std::map<std::string, TH1D*> hPurityDCAReco;
122  std::map<std::string, TH1D*> hPurityDoLTotal;
123  std::map<std::string, TH1D*> hPurityDoLReco;
124  std::map<std::string, TH1D*> hPurityLengthTotal;
125  std::map<std::string, TH1D*> hPurityLengthReco;
126 
127  //add trigger data product vars
128  unsigned int m_gate_type;
129  std::string m_gate_name;
133  uint64_t m_gate_crt_diff;
134  }; // class CRTT0MatchingAna
135 
136 
137  CRTT0MatchingAna::CRTT0MatchingAna(fhicl::ParameterSet const& p)
138  : EDAnalyzer{p} // ,
139  , t0Alg(p.get<fhicl::ParameterSet>("t0Alg"))
140  , fCrtutils(new icarus::crt::CRTCommonUtils())
141  , bt(p.get<fhicl::ParameterSet>("CRTBackTrack"))
142  // More initializers here.
143  {
144  // Call appropriate consumes<>() for any products to be retrieved by this module.
145  fGeometryService = lar::providerFrom<geo::Geometry>();
146  reconfigure(p);
147  }
148 
149 
150  // Constructor
151  void CRTT0MatchingAna::reconfigure(fhicl::ParameterSet const& p)
152  {
153 
154  fSimModuleLabel = p.get<art::InputTag> ("SimModuleLabel", "largeant");
155  fCRTHitLabel = p.get<art::InputTag> ("CRTHitLabel", "crthit");
156  fTPCTrackLabel = p.get< std::vector<art::InputTag> >("TPCTrackLabel", {""});
157  fTriggerLabel = p.get<art::InputTag>("TriggerLabel","daqTrigger");
158  fVerbose = p.get<bool>("Verbose");
159  } //CRTT0MatchingAna()
160 
161 
163  {
164 
165  // Access tfileservice to handle creating and writing histograms
166  art::ServiceHandle<art::TFileService> tfs;
167  for(int i = 30; i < 50 + 1; i++){
168  std::string tagger = "All";
169  if (i > 34 && i < 40) continue;
170  if (i==48 || i==49) continue;
171  // if(i < ){
172  tagger = fCrtutils->GetRegionNameFromNum(i);//fCrtGeo.GetTagger(i).name;
173  std::cout << "tagger: " << tagger.c_str() << std::endl;
174  hDCA[tagger] = tfs->make<TH1D>(Form("DCA_%s", tagger.c_str()), "", 50, 0, 100);
175  hMatchDCA[tagger] = tfs->make<TH1D>(Form("MatchDCA_%s", tagger.c_str()), "", 50, 0, 100);
176  hNoMatchDCA[tagger] = tfs->make<TH1D>(Form("NoMatchDCA_%s", tagger.c_str()), "", 50, 0, 100);
177 
178  hDoL[tagger] = tfs->make<TH1D>(Form("DoL_%s", tagger.c_str()), "", 100, 0, 0.25);
179  hMatchDoL[tagger] = tfs->make<TH1D>(Form("MatchDoL_%s", tagger.c_str()), "", 100, 0, 0.25);
180  hNoMatchDoL[tagger] = tfs->make<TH1D>(Form("NoMatchDoL_%s", tagger.c_str()), "", 100, 0, 0.25);
181 
182  hT0[tagger] = tfs->make<TH1D>(Form("T0_%s", tagger.c_str()), "", 600, -3000, 3000);
183  hMatchT0[tagger] = tfs->make<TH1D>(Form("MatchT0_%s", tagger.c_str()), "", 600, -3000, 3000);
184  hNoMatchT0[tagger] = tfs->make<TH1D>(Form("NoMatchT0_%s", tagger.c_str()), "", 600, -3000, 3000);
185 
186  hEffDCATotal[tagger] = tfs->make<TH1D>(Form("EffDCATotal_%s", tagger.c_str()), "", 50, 0, 100);
187  hEffDCAReco[tagger] = tfs->make<TH1D>(Form("EffDCAReco_%s", tagger.c_str()), "", 50, 0, 100);
188  hEffDoLTotal[tagger] = tfs->make<TH1D>(Form("EffDoLTotal_%s", tagger.c_str()), "", 100, 0, 0.25);
189  hEffDoLReco[tagger] = tfs->make<TH1D>(Form("EffDoLReco_%s", tagger.c_str()), "", 100, 0, 0.25);
190  hEffLengthTotal[tagger] = tfs->make<TH1D>(Form("EffLengthTotal_%s", tagger.c_str()), "", 20, 0, 600);
191  hEffLengthReco[tagger] = tfs->make<TH1D>(Form("EffLengthReco_%s", tagger.c_str()), "", 20, 0, 600);
192 
193  hPurityDCATotal[tagger] = tfs->make<TH1D>(Form("PurityDCATotal_%s", tagger.c_str()), "", 50, 0, 100);
194  hPurityDCAReco[tagger] = tfs->make<TH1D>(Form("PurityDCAReco_%s", tagger.c_str()), "", 50, 0, 100);
195  hPurityDoLTotal[tagger] = tfs->make<TH1D>(Form("PurityDoLTotal_%s", tagger.c_str()), "", 100, 0, 0.25);
196  hPurityDoLReco[tagger] = tfs->make<TH1D>(Form("PurityDoLReco_%s", tagger.c_str()), "", 100, 0, 0.25);
197  hPurityLengthTotal[tagger] = tfs->make<TH1D>(Form("PurityLengthTotal_%s", tagger.c_str()), "", 20, 0, 600);
198  hPurityLengthReco[tagger] = tfs->make<TH1D>(Form("PurityLengthReco_%s", tagger.c_str()), "", 20, 0, 600);
199  }
200 
201  // Initial output
202  if(fVerbose) std::cout<<"----------------- CRT T0 Matching Ana Module -------------------"<<std::endl;
203 
204  } // CRTT0MatchingAna::beginJob()
205 
206 
207  void CRTT0MatchingAna::analyze(const art::Event& event)
208  {
209 
210  // Fetch basic event info
211  if(fVerbose){
212  std::cout<<"============================================"<<std::endl
213  <<"Run = "<<event.run()<<", SubRun = "<<event.subRun()<<", Event = "<<event.id().event()<<std::endl
214  <<"============================================"<<std::endl;
215  }
216 
217  //----------------------------------------------------------------------------------------------------------
218  // GETTING PRODUCTS
219  //----------------------------------------------------------------------------------------------------------
220 
221  //add trigger info
222  if( !fTriggerLabel.empty() ) {
223 
224  art::Handle<sbn::ExtraTriggerInfo> trigger_handle;
225  event.getByLabel( fTriggerLabel, trigger_handle );
226  if( trigger_handle.isValid() ) {
227  sbn::triggerSource bit = trigger_handle->sourceType;
228  m_gate_type = (unsigned int)bit;
229  m_gate_name = bitName(bit);
230  m_trigger_timestamp = trigger_handle->triggerTimestamp;
231  m_gate_start_timestamp = trigger_handle->beamGateTimestamp;
232  m_trigger_gate_diff = trigger_handle->triggerTimestamp - trigger_handle->beamGateTimestamp;
233 
234  }
235  else{
236  mf::LogError("CRTT0MatchingAna:") << "No raw::Trigger associated to label: " << fTriggerLabel.label() << "\n" ;
237  }
238  }
239  else {
240  mf::LogError("CRTT0MatchingAna:") << "Trigger Data product " << fTriggerLabel.label() << " not found!\n" ;
241  }
242 
243  // Get g4 particles
244  art::ServiceHandle<cheat::ParticleInventoryService> pi_serv;
245  auto particleHandle = event.getValidHandle<std::vector<simb::MCParticle>>(fSimModuleLabel);
246 
247  // Get CRT hits from the event
248  art::Handle< std::vector<sbn::crt::CRTHit>> crtHitHandle;
249  std::vector<art::Ptr<sbn::crt::CRTHit> > crtHitList;
250  if (event.getByLabel(fCRTHitLabel, crtHitHandle))
251  art::fill_ptr_vector(crtHitList, crtHitHandle);
252 
253  // Get reconstructed tracks from the event
254  //auto tpcTrackHandle = event.getValidHandle<std::vector<recob::Track>>(fTPCTrackLabel);
255  // art::FindManyP<recob::Hit> findManyHits(tpcTrackHandle, event, fTPCTrackLabel);
256 
257  // fCrtBackTrack.Initialize(event);
258 
259  //----------------------------------------------------------------------------------------------------------
260  // TRUTH MATCHING
261  //----------------------------------------------------------------------------------------------------------
262 
263  std::map<int, simb::MCParticle> particles;
264  // Loop over the true particles
265  for (auto const& particle: (*particleHandle)){
266 
267  // Make map with ID
268  int partID = particle.TrackId();
269  particles[partID] = particle;
270 
271  }
272 
273  if(fVerbose) std::cout<<"----------------- truth matching -------------------"<<std::endl;
274  std::map<int, std::vector<std::string>> crtTaggerMap;
275  std::vector<sbn::crt::CRTHit> crtHits;
276  int hit_i = 0;
277  double minHitTime = 99999;
278  double maxHitTime = -99999;
279 
280  for(auto const& hit : (*crtHitHandle)){
281  double hitTime = double(hit.ts0_ns - (m_gate_start_timestamp%1'000'000'000))/1e3;
282  if(hitTime<-0.5e6) hitTime+=1e6;
283  else if(hitTime>0.5e6) hitTime-=1e6;
284 
285  // double hitTime = (double)(int)hit.ts1_ns * 1e-3;
286  if(hitTime < minHitTime) minHitTime = hitTime;
287  if(hitTime > maxHitTime) maxHitTime = hitTime;
288 
289  crtHits.push_back(hit);
290  int trueId = bt.TrueIdFromHitId(event, hit_i);
291  hit_i++;
292  if(trueId == -99999) continue;
293  if(crtTaggerMap.find(trueId) == crtTaggerMap.end()){
294  crtTaggerMap[trueId].push_back(hit.tagger);
295  }
296  else if(std::find(crtTaggerMap[trueId].begin(), crtTaggerMap[trueId].end(), hit.tagger) == crtTaggerMap[trueId].end()){
297  crtTaggerMap[trueId].push_back(hit.tagger);
298  }
299  }
300 
301  // std::cout << " New event" << std::endl;
302  //----------------------------------------------------------------------------------------------------------
303  // DISTANCE OF CLOSEST APPROACH ANALYSIS
304  //----------------------------------------------------------------------------------------------------------
305 
306  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(event);
307  auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataFor(event, clockData);
308 
309  // if(fVerbose) std::cout<<"----------------- DCA Analysis -------------------"<<std::endl;
310  for(const auto& trackLabel : fTPCTrackLabel)
311  {
312  auto tpcTrackHandle = event.getValidHandle<std::vector<recob::Track>>(trackLabel);
313  if (!tpcTrackHandle.isValid()) continue;
314 
315  art::FindManyP<recob::Hit> findManyHits(tpcTrackHandle, event, trackLabel);
316 
317  // Loop over reconstructed tracks
318  for (auto const& tpcTrack : (*tpcTrackHandle)){
319  // std::cout<<"----------------- why only 4 times -------------------" <<std::endl;
320  // if(fVerbose) std::cout<<"----------------- # track -------------------" << (*tpcTrackHandle).size()<<std::endl;
321  // Get the associated hits
322  std::vector<art::Ptr<recob::Hit>> hits = findManyHits.at(tpcTrack.ID());
323  int trackTrueID = RecoUtils::TrueParticleIDFromTotalRecoHits(clockData, hits, false);
324  if(particles.find(trackTrueID) == particles.end()) continue;
325  // Only consider primary muons
326  if(!(std::abs(particles[trackTrueID].PdgCode()) == 13 && particles[trackTrueID].Mother() == 0)) continue;
327 
328  // Only consider particles inside the reco hit time window
329  double trueTime = particles[trackTrueID].T() * 1e-3;
330  if(trueTime < minHitTime || trueTime > maxHitTime) continue;
331  //if(fVerbose) std::cout<<"----------------- line 315 -------------------"<<std::endl;
332  std::cout << "new track " << trueTime << std::endl;
333  // Calculate t0 from CRT Hit matching
334  matchCand closest = t0Alg.GetClosestCRTHit(detProp, tpcTrack, hits, crtHits, m_gate_start_timestamp);
335  // matchCand closest = t0Alg.GetClosestCRTHit(detProp, tpcTrack, crtHits, event);
336  //std::vector <matchCand> closestvec = t0Alg.GetClosestCRTHit(detProp, tpcTrack, crtHits, event);
337  //matchCand closest = closestvec.back();
338  //std::cout << "closest match " << closest.t0 << std::endl;
339  //std::cout << "closest dca " << closest.dca << " ,tagger: "<< closest.thishit.tagger << " , sin angele: \t" << closest.dca/closest.extrapLen << std::endl;
340  double sin_angle = -99999;
341  if(closest.dca != -99999){
342  hDCA[closest.thishit.tagger]->Fill(closest.dca);
343  //hDCA["All"]->Fill(closest.dca);
344  sin_angle = closest.dca/closest.extrapLen;
345  hDoL[closest.thishit.tagger]->Fill(sin_angle);
346  // hDoL["All"]->Fill(sin_angle);
347  hT0[closest.thishit.tagger]->Fill(closest.t0);
348  //hT0["All"]->Fill(closest.t0);
349  //std::cout<< "tagger: "<< closest.thishit.tagger << " , sin angele: \t" << sin_angle << std::endl;
350 
351  // Is hit matched to that track
352  int hitTrueID = bt.TrueIdFromTotalEnergy(event, closest.thishit);
353  if(hitTrueID == trackTrueID && hitTrueID != -99999){
354  hMatchDCA[closest.thishit.tagger]->Fill(closest.dca);
355  //hMatchDCA["All"]->Fill(closest.dca);
356  hMatchDoL[closest.thishit.tagger]->Fill(sin_angle);
357  //hMatchDoL["All"]->Fill(sin_angle);
358  hMatchT0[closest.thishit.tagger]->Fill(closest.t0);
359  //hMatchT0["All"]->Fill(closest.t0);
360  }
361  else{
362  hNoMatchDCA[closest.thishit.tagger]->Fill(closest.dca);
363  //hNoMatchDCA["All"]->Fill(closest.dca);
364  hNoMatchDoL[closest.thishit.tagger]->Fill(sin_angle);
365  // hNoMatchDoL["All"]->Fill(sin_angle);
366  hNoMatchT0[closest.thishit.tagger]->Fill(closest.t0);
367  // hNoMatchT0["All"]->Fill(closest.t0);
368  }
369  //std::cout<< "---------> 2nd line tagger: "<< closest.thishit.tagger << " , sin angele: \t" << sin_angle << std::endl;
370  }else continue;
371  //if(fVerbose) std::cout<<"----------------- line 350 -------------------"<<std::endl;
372  int nbins = hEffDCATotal.begin()->second->GetNbinsX();
373  for(int i = 0; i < nbins; i++){
374  double DCAcut = hEffDCATotal.begin()->second->GetBinCenter(i);
375 
376  // Fill total efficiency histogram with each cut if track matches any hits
377  if(crtTaggerMap.find(trackTrueID) != crtTaggerMap.end()){
378  for(auto const& tagger : crtTaggerMap[trackTrueID]){
379  hEffDCATotal[tagger]->Fill(DCAcut);
380 
381  // If closest hit is below limit and track matches any hits then fill efficiency
382  if(closest.dca < DCAcut && closest.dca != -99999){
383  hEffDCAReco[tagger]->Fill(DCAcut);
384  }
385  }
386  // Fill total efficiency histograms
387  // hEffDCATotal["All"]->Fill(DCAcut);
388  if(closest.dca < DCAcut && closest.dca != -99999){
389  // hEffDCAReco["All"]->Fill(DCAcut);
390  }
391  }
392 
393  // Fill total purity histogram with each cut if closest hit is below limit
394  if(closest.dca < DCAcut && closest.dca != -99999){
395  hPurityDCATotal[closest.thishit.tagger]->Fill(DCAcut);
396  // hPurityDCATotal["All"]->Fill(DCAcut);
397 
398  // If closest hit is below limit and matched time is correct then fill purity
399  double hitTime = closest.thishit.ts1_ns * 1e-3;
400  if(particles.find(trackTrueID) != particles.end()){
401  if(std::abs(hitTime - trueTime) < 2.){
402  hPurityDCAReco[closest.thishit.tagger]->Fill(DCAcut);
403  // hPurityDCAReco["All"]->Fill(DCAcut);
404  }
405  }
406 
407  }
408  }
409 
410  nbins = hEffDoLTotal.begin()->second->GetNbinsX();
411  //if(fVerbose) std::cout<<"----------------- line 390 -------------------"<<std::endl;
412  for(int i = 0; i < nbins; i++){
413  double DCAcut = hEffDoLTotal.begin()->second->GetBinCenter(i);
414 
415  // Fill total efficiency histogram with each cut if track matches any hits
416  if(crtTaggerMap.find(trackTrueID) != crtTaggerMap.end()){
417  for(auto const& tagger : crtTaggerMap[trackTrueID]){
418  hEffDoLTotal[tagger]->Fill(DCAcut);
419 
420  // If closest hit is below limit and track matches any hits then fill efficiency
421  if(sin_angle < DCAcut && closest.dca != -99999){
422  hEffDoLReco[tagger]->Fill(DCAcut);
423  }
424  }
425  // Fill total efficiency histograms
426  // hEffDoLTotal["All"]->Fill(DCAcut);
427  if(sin_angle < DCAcut && closest.dca != -99999){
428  // hEffDoLReco["All"]->Fill(DCAcut);
429  }
430  }
431 
432  // Fill total purity histogram with each cut if closest hit is below limit
433  if(sin_angle < DCAcut && closest.dca != -99999){
434  hPurityDoLTotal[closest.thishit.tagger]->Fill(DCAcut);
435  // hPurityDoLTotal["All"]->Fill(DCAcut);
436 
437  // If closest hit is below limit and matched time is correct then fill purity
438  double hitTime = closest.thishit.ts1_ns * 1e-3;
439  if(particles.find(trackTrueID) != particles.end()){
440  if(std::abs(hitTime - trueTime) < 2.){
441  hPurityDoLReco[closest.thishit.tagger]->Fill(DCAcut);
442  // hPurityDoLReco["All"]->Fill(DCAcut);
443  }
444  }
445 
446  }
447  }
448 
449  double fixedCut = 30.;
450 
451  // Fill total efficiency histogram with each cut if track matches any hits
452  if(crtTaggerMap.find(trackTrueID) != crtTaggerMap.end()){
453  for(auto const& tagger : crtTaggerMap[trackTrueID]){
454  hEffLengthTotal[tagger]->Fill(tpcTrack.Length());
455 
456  // If closest hit is below limit and track matches any hits then fill efficiency
457  if(closest.dca < fixedCut && closest.dca >=0 ){
458  hEffLengthReco[tagger]->Fill(tpcTrack.Length());
459  }
460  }
461  // Fill total efficiency histograms
462  // hEffLengthTotal["All"]->Fill(tpcTrack.Length());
463  if(closest.dca < fixedCut && closest.dca >=0){
464  //hEffLengthReco["All"]->Fill(tpcTrack.Length());
465  }
466  }
467 
468  // Fill total purity histogram with each cut if closest hit is below limit
469  if(closest.dca < fixedCut && closest.dca >= 0){
470  hPurityLengthTotal[closest.thishit.tagger]->Fill(tpcTrack.Length());
471  // hPurityLengthTotal["All"]->Fill(tpcTrack.Length());
472 
473  // If closest hit is below limit and matched time is correct then fill purity
474  double hitTime = closest.thishit.ts1_ns * 1e-3;
475  if(particles.find(trackTrueID) != particles.end()){
476  double trueTime = particles[trackTrueID].T() * 1e-3;
477  if(std::abs(hitTime - trueTime) < 2.){
478  hPurityLengthReco[closest.thishit.tagger]->Fill(tpcTrack.Length());
479  // hPurityLengthReco["All"]->Fill(tpcTrack.Length());
480  }
481  }
482 
483  }
484  // if(fVerbose) std::cout<<"----------------- line 463 -------------------"<<std::endl;
485  }
486  } // track lable
487  // if(fVerbose) std::cout<<"----------------- line 466 -------------------"<<std::endl;
488 
489  } // CRTT0MatchingAna::analyze()
490 
491 
492  void CRTT0MatchingAna::endJob(){
493 
494 
495  } // CRTT0MatchingAna::endJob()
496 
497 
498  DEFINE_ART_MODULE(CRTT0MatchingAna)
499 } // namespace icarus
500 
Functions to help with numbers.
bool fVerbose
print information about what&#39;s going on
Utilities related to art service access.
Declaration of signal hit object.
pdgs p
Definition: selectors.fcl:22
for pfile in ack l reconfigure(.*) override"` do echo "checking $
process_name hit
Definition: cheaterreco.fcl:51
std::string bitName(triggerSource bit)
Returns a mnemonic short name of the beam type.
Definition: BeamBits.h:267
art::InputTag fSimModuleLabel
name of detsim producer
virtual void analyze(const art::Event &event) override
Description of geometry of one entire detector.
Definition of data types for geometry description.
Provides recob::Track data product.
double DistToCrtHit(TVector3 trackPos, sbn::crt::CRTHit crtHit)
object containing MC truth information necessary for making RawDigits and doing back tracking ...
std::vector< art::InputTag > fTPCTrackLabel
name of CRT producer
triggerSource
Type of beam or beam gate or other trigger source.
Definition: BeamBits.h:97
Data product holding additional trigger information.
art::ServiceHandle< art::TFileService > tfs
BEGIN_PROLOG could also be cout
geo::GeometryCore const * fGeometryService
pointer to Geometry provider