All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/CrtTrackCosmicIdAlg.cc
Go to the documentation of this file.
1 #include "CrtTrackCosmicIdAlg.h"
2 
3 namespace ana{
4 
6 
7  this->reconfigure(manager, config);
8 
9 }
10 
11 
13 
14 }
15 
16 
18 
19 }
20 
21 
23 
25  fBeamTimeMin = config.BeamTimeLimits().BeamTimeMin();
26  fBeamTimeMax = config.BeamTimeLimits().BeamTimeMax();
27 
28  return;
29 }
30 
31 
32 // Tags track as cosmic if it matches a CRTTrack
33 bool CrtTrackCosmicIdAlg::CrtTrackCosmicId(recob::Track track, std::vector<art::Ptr<recob::Hit>> hits, std::vector<sbn::crt::CRTTrack> crtTracks) {
34 
35  // Get the closest matching CRT track ID
36  int crtID = trackMatchAlg.GetMatchedCRTTrackId(track, hits, crtTracks);
37 
38  // If matching failed
39  if(crtID == -99999) return false;
40 
41  // If track matched to a through going CRT track then it is a cosmic
42  if(crtTracks.at(crtID).complete) return true;
43 
44  // If it matches a track through just the top planes make sure it is outside of the beam time
45  double crtTime = ((double)(int)crtTracks.at(crtID).ts1_ns) * 1e-3; // [us]
46  if(crtTime < fBeamTimeMin || crtTime > fBeamTimeMax) return true;
47 
48  return false;
49 
50 }
51 
52 }
bool CrtTrackCosmicId(recob::Track track, std::vector< art::Ptr< recob::Hit >> hits, std::vector< sbn::crt::CRTTrack > crtTracks)
const detinfo::DetectorPropertiesStandard * GetDetectorPropertiesProvider() const
int GetMatchedCRTTrackId(detinfo::DetectorPropertiesData const &detProp, recob::Track tpcTrack, std::vector< sbn::crt::CRTTrack > crtTracks, const art::Event &event)
process_name use argoneut_mc_hitfinder track
process_name opflashCryoW ana
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.
CrtTrackCosmicIdAlg(const core::ProviderManager &manager, const Config &config)
void reconfigure(const core::ProviderManager &manager, const Config &config)
do i e
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a &quot;fitted&quot; track: