All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/CrtHitCosmicIdAlg.cc
Go to the documentation of this file.
1 #include "CrtHitCosmicIdAlg.h"
2 
3 namespace ana{
4 
6 
7  this->reconfigure(manager, config);
8 
9 } //CrtHitCosmicIdAlg()
10 
11 
13 
14 } //CrtHitCosmicIdAlg()
15 
16 
18 
19 } //~CrtHitCosmicIdAlg()
20 
21 
22 void CrtHitCosmicIdAlg::reconfigure(const core::ProviderManager &manager, const Config& config){
23 
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
33 bool CrtHitCosmicIdAlg::CrtHitCosmicId(recob::Track track, std::vector<art::Ptr<recob::Hit>> hits, std::vector<sbn::crt::CRTHit> crtHits) {
34 
35  // Get the closest matched time from CRT hits
36  double crtHitTime = t0Alg.T0FromCRTHits(track, hits, crtHits);
37 
38  // If time is valid and outside the beam time then tag as a cosmic
39  if(crtHitTime != -99999 && (crtHitTime < fBeamTimeMin || crtHitTime > fBeamTimeMax)) return true;
40 
41  return false;
42 
43 } //CrtHitCosmicId()
44 
45 }
bool CrtHitCosmicId(recob::Track track, std::vector< art::Ptr< recob::Hit >> hits, std::vector< sbn::crt::CRTHit > crtHits)
const detinfo::DetectorPropertiesStandard * GetDetectorPropertiesProvider() const
process_name use argoneut_mc_hitfinder track
process_name opflashCryoW ana
void reconfigure(const core::ProviderManager &manager, const Config &config)
const geo::GeometryCore * GetGeometryProvider() const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
Interface to LArSoft services.
double T0FromCRTHits(detinfo::DetectorPropertiesData const &detProp, recob::Track tpcTrack, std::vector< sbn::crt::CRTHit > crtHits, const art::Event &event)
CrtHitCosmicIdAlg(const core::ProviderManager &manager, const Config &config)
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a &quot;fitted&quot; track: