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

#include <CrtTrackCosmicIdAlg.h>

Classes

struct  BeamTime
 
struct  Config
 

Public Member Functions

 CrtTrackCosmicIdAlg (const Config &config)
 
 CrtTrackCosmicIdAlg (const fhicl::ParameterSet &pset)
 
 ~CrtTrackCosmicIdAlg ()
 
void reconfigure (const Config &config)
 
bool CrtTrackCosmicId (detinfo::DetectorPropertiesData const &detProp, recob::Track track, std::vector< sbn::crt::CRTTrack > crtTracks, const art::Event &event)
 
CRTTrackMatchAlg TrackAlg () const
 

Private Attributes

CRTTrackMatchAlg trackMatchAlg
 
double fBeamTimeMin
 
double fBeamTimeMax
 

Detailed Description

Definition at line 31 of file sbndcode/sbndcode/CosmicId/Algs/CrtTrackCosmicIdAlg.h.

Constructor & Destructor Documentation

sbnd::CrtTrackCosmicIdAlg::CrtTrackCosmicIdAlg ( const Config config)

Definition at line 5 of file sbndcode/sbndcode/CosmicId/Algs/CrtTrackCosmicIdAlg.cc.

5  {
6 
7  this->reconfigure(config);
8 
9 }
sbnd::CrtTrackCosmicIdAlg::CrtTrackCosmicIdAlg ( const fhicl::ParameterSet &  pset)
inline

Definition at line 68 of file sbndcode/sbndcode/CosmicId/Algs/CrtTrackCosmicIdAlg.h.

68  :
69  CrtTrackCosmicIdAlg(fhicl::Table<Config>(pset, {})()) {}
sbnd::CrtTrackCosmicIdAlg::~CrtTrackCosmicIdAlg ( )

Definition at line 17 of file sbndcode/sbndcode/CosmicId/Algs/CrtTrackCosmicIdAlg.cc.

17  {
18 
19 }

Member Function Documentation

bool sbnd::CrtTrackCosmicIdAlg::CrtTrackCosmicId ( detinfo::DetectorPropertiesData const &  detProp,
recob::Track  track,
std::vector< sbn::crt::CRTTrack crtTracks,
const art::Event &  event 
)

Definition at line 33 of file sbndcode/sbndcode/CosmicId/Algs/CrtTrackCosmicIdAlg.cc.

34  {
35 
36  // Get the closest matching CRT track ID
37  int crtID = trackMatchAlg.GetMatchedCRTTrackId(detProp, track, crtTracks, event);
38 
39  // If matching failed
40  if(crtID == -99999) return false;
41 
42  // If track matched to a through going CRT track then it is a cosmic
43  if(crtTracks.at(crtID).complete) return true;
44 
45  // If it matches a track through just the top planes make sure it is outside of the beam time
46  double crtTime = ((double)(int)crtTracks.at(crtID).ts1_ns) * 1e-3; // [us]
47  if(crtTime < fBeamTimeMin || crtTime > fBeamTimeMax) return true;
48 
49  return false;
50 
51 }
int GetMatchedCRTTrackId(detinfo::DetectorPropertiesData const &detProp, recob::Track tpcTrack, std::vector< sbn::crt::CRTTrack > crtTracks, const art::Event &event)
do i e
auto const detProp
void sbnd::CrtTrackCosmicIdAlg::reconfigure ( const Config config)

Definition at line 22 of file sbndcode/sbndcode/CosmicId/Algs/CrtTrackCosmicIdAlg.cc.

22  {
23 
24  trackMatchAlg = config.TrackMatchAlg();
25  fBeamTimeMin = config.BeamTimeLimits().BeamTimeMin();
26  fBeamTimeMax = config.BeamTimeLimits().BeamTimeMax();
27 
28  return;
29 }
CRTTrackMatchAlg sbnd::CrtTrackCosmicIdAlg::TrackAlg ( ) const
inline

Member Data Documentation

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

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