All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Private Attributes | List of all members
ana::CrtTrackCosmicIdAlg Class Reference

#include <CrtTrackCosmicIdAlg.h>

Classes

struct  BeamTime
 
struct  Config
 

Public Member Functions

 CrtTrackCosmicIdAlg (const core::ProviderManager &manager, const Config &config)
 
 CrtTrackCosmicIdAlg (const core::ProviderManager &manager, const fhicl::ParameterSet &pset)
 
 ~CrtTrackCosmicIdAlg ()
 
void reconfigure (const core::ProviderManager &manager, const Config &config)
 
bool CrtTrackCosmicId (recob::Track track, std::vector< art::Ptr< recob::Hit >> hits, std::vector< sbn::crt::CRTTrack > crtTracks)
 
sbnd::CRTTrackMatchAlg TrackAlg () const
 

Private Attributes

sbnd::CRTTrackMatchAlg trackMatchAlg
 
double fBeamTimeMin
 
double fBeamTimeMax
 

Detailed Description

Definition at line 31 of file sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/CrtTrackCosmicIdAlg.h.

Constructor & Destructor Documentation

ana::CrtTrackCosmicIdAlg::CrtTrackCosmicIdAlg ( const core::ProviderManager manager,
const Config config 
)

Definition at line 5 of file sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/CrtTrackCosmicIdAlg.cc.

5  {
6 
7  this->reconfigure(manager, config);
8 
9 }
void reconfigure(const core::ProviderManager &manager, const Config &config)
ana::CrtTrackCosmicIdAlg::CrtTrackCosmicIdAlg ( const core::ProviderManager manager,
const fhicl::ParameterSet &  pset 
)
inline

Definition at line 68 of file sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/CrtTrackCosmicIdAlg.h.

68  :
69  CrtTrackCosmicIdAlg(manager, fhicl::Table<Config>(pset, {})()) {}
CrtTrackCosmicIdAlg(const core::ProviderManager &manager, const Config &config)
ana::CrtTrackCosmicIdAlg::~CrtTrackCosmicIdAlg ( )

Definition at line 17 of file sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/CrtTrackCosmicIdAlg.cc.

17  {
18 
19 }

Member Function Documentation

bool ana::CrtTrackCosmicIdAlg::CrtTrackCosmicId ( recob::Track  track,
std::vector< art::Ptr< recob::Hit >>  hits,
std::vector< sbn::crt::CRTTrack crtTracks 
)

Definition at line 33 of file sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/CrtTrackCosmicIdAlg.cc.

33  {
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 }
int GetMatchedCRTTrackId(detinfo::DetectorPropertiesData const &detProp, recob::Track tpcTrack, std::vector< sbn::crt::CRTTrack > crtTracks, const art::Event &event)
do i e
void ana::CrtTrackCosmicIdAlg::reconfigure ( const core::ProviderManager manager,
const Config config 
)

Definition at line 22 of file sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/CrtTrackCosmicIdAlg.cc.

22  {
23 
25  fBeamTimeMin = config.BeamTimeLimits().BeamTimeMin();
26  fBeamTimeMax = config.BeamTimeLimits().BeamTimeMax();
27 
28  return;
29 }
const detinfo::DetectorPropertiesStandard * GetDetectorPropertiesProvider() const
const geo::GeometryCore * GetGeometryProvider() const
sbnd::CRTTrackMatchAlg ana::CrtTrackCosmicIdAlg::TrackAlg ( ) const
inline

Member Data Documentation

double ana::CrtTrackCosmicIdAlg::fBeamTimeMax
private
double ana::CrtTrackCosmicIdAlg::fBeamTimeMin
private
sbnd::CRTTrackMatchAlg ana::CrtTrackCosmicIdAlg::trackMatchAlg
private

The documentation for this class was generated from the following files: