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

#include <CrtHitCosmicIdAlg.h>

Classes

struct  BeamTime
 
struct  Config
 

Public Member Functions

 CrtHitCosmicIdAlg (const Config &config)
 
 CrtHitCosmicIdAlg (const fhicl::ParameterSet &pset)
 
 ~CrtHitCosmicIdAlg ()
 
void reconfigure (const Config &config)
 
bool CrtHitCosmicId (detinfo::DetectorPropertiesData const &detProp, recob::Track track, std::vector< sbn::crt::CRTHit > crtHits, const art::Event &event)
 
CRTT0MatchAlg T0Alg () const
 

Private Attributes

CRTT0MatchAlg t0Alg
 
double fBeamTimeMin
 
double fBeamTimeMax
 

Detailed Description

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

Constructor & Destructor Documentation

sbnd::CrtHitCosmicIdAlg::CrtHitCosmicIdAlg ( const Config config)

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

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

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

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

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

17  {
18 
19 } //~CrtHitCosmicIdAlg()

Member Function Documentation

bool sbnd::CrtHitCosmicIdAlg::CrtHitCosmicId ( detinfo::DetectorPropertiesData const &  detProp,
recob::Track  track,
std::vector< sbn::crt::CRTHit crtHits,
const art::Event &  event 
)

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

34  {
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()
double T0FromCRTHits(detinfo::DetectorPropertiesData const &detProp, recob::Track tpcTrack, std::vector< sbn::crt::CRTHit > crtHits, const art::Event &event)
auto const detProp
void sbnd::CrtHitCosmicIdAlg::reconfigure ( const Config config)

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

22  {
23 
24  t0Alg = config.T0Alg();
25  fBeamTimeMin = config.BeamTimeLimits().BeamTimeMin();
26  fBeamTimeMax = config.BeamTimeLimits().BeamTimeMax();
27 
28  return;
29 } //reconfigure()
CRTT0MatchAlg sbnd::CrtHitCosmicIdAlg::T0Alg ( ) const
inline

Member Data Documentation

double sbnd::CrtHitCosmicIdAlg::fBeamTimeMax
private
double sbnd::CrtHitCosmicIdAlg::fBeamTimeMin
private
CRTT0MatchAlg sbnd::CrtHitCosmicIdAlg::t0Alg
private

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