All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbndcode/sbndcode/CosmicId/Algs/CrtHitCosmicIdAlg.cc
Go to the documentation of this file.
1 #include "CrtHitCosmicIdAlg.h"
2 
3 namespace sbnd{
4 
6 
7  this->reconfigure(config);
8 
9 } //CrtHitCosmicIdAlg()
10 
11 
13 
14 } //CrtHitCosmicIdAlg()
15 
16 
18 
19 } //~CrtHitCosmicIdAlg()
20 
21 
23 
24  t0Alg = config.T0Alg();
25  fBeamTimeMin = config.BeamTimeLimits().BeamTimeMin();
26  fBeamTimeMax = config.BeamTimeLimits().BeamTimeMax();
27 
28  return;
29 } //reconfigure()
30 
31 
32 // Returns true if matched to CRTHit outside beam time
34  recob::Track track, std::vector<sbn::crt::CRTHit> crtHits, const art::Event& event){
35 
36  // Get the closest matched time from CRT hits
37  double crtHitTime = t0Alg.T0FromCRTHits(detProp, track, crtHits, event);
38 
39  // If time is valid and outside the beam time then tag as a cosmic
40  if(crtHitTime != -99999 && (crtHitTime < fBeamTimeMin || crtHitTime > fBeamTimeMax)) return true;
41 
42  return false;
43 
44 } //CrtHitCosmicId()
45 
46 }
process_name use argoneut_mc_hitfinder track
bool CrtHitCosmicId(detinfo::DetectorPropertiesData const &detProp, recob::Track track, std::vector< sbn::crt::CRTHit > crtHits, const art::Event &event)
double T0FromCRTHits(detinfo::DetectorPropertiesData const &detProp, recob::Track tpcTrack, std::vector< sbn::crt::CRTHit > crtHits, const art::Event &event)
stream1 can override from command line with o or output services user sbnd
auto const detProp
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a &quot;fitted&quot; track: