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

#include <GeometryCosmicIdAlg.h>

Classes

struct  Config
 

Public Member Functions

 GeometryCosmicIdAlg (const Config &config)
 
 GeometryCosmicIdAlg (const fhicl::ParameterSet &pset)
 
 ~GeometryCosmicIdAlg ()
 
void reconfigure (const Config &config)
 
bool GeometryCosmicId (recob::Track track, std::vector< art::Ptr< recob::Hit >> hits, bool tpc0Flash, bool tpc1Flash)
 

Private Attributes

TPCGeoAlg fTpcGeo
 

Detailed Description

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

Constructor & Destructor Documentation

sbnd::GeometryCosmicIdAlg::GeometryCosmicIdAlg ( const Config config)

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

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

Definition at line 42 of file sbndcode/sbndcode/CosmicId/Algs/GeometryCosmicIdAlg.h.

42  :
43  GeometryCosmicIdAlg(fhicl::Table<Config>(pset, {})()) {}
sbnd::GeometryCosmicIdAlg::~GeometryCosmicIdAlg ( )

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

17  {
18 
19 }

Member Function Documentation

bool sbnd::GeometryCosmicIdAlg::GeometryCosmicId ( recob::Track  track,
std::vector< art::Ptr< recob::Hit >>  hits,
bool  tpc0Flash,
bool  tpc1Flash 
)

Definition at line 28 of file sbndcode/sbndcode/CosmicId/Algs/GeometryCosmicIdAlg.cc.

28  {
29 
30  // Remove any tracks that are detected in one TPC and reconstructed in another
31  int tpc = fTpcGeo.DetectedInTPC(hits);
32  double startX = track.Start().X();
33  double endX = track.End().X();
34 
35  // Check if track is stitched
36  if(tpc == -1) return false;
37 
38  // Check the start/end points are in same TPC (track shifted into other TPC because time outside of beam)
39  if(tpc == 0 && (startX>0 || endX>0)) return true;
40  else if(tpc == 1 && (startX<0 || endX<0)) return true;
41 
42  // Check if track was detected in TPC where there was no beam activity
43  if(tpc0Flash && !tpc1Flash && tpc == 1) return true;
44  if(tpc1Flash && !tpc0Flash && tpc == 0) return true;
45 
46  return false;
47 
48 }
Point_t const & Start() const
Access to track position at different points.
int DetectedInTPC(std::vector< art::Ptr< recob::Hit >> hits)
Point_t const & End() const
void sbnd::GeometryCosmicIdAlg::reconfigure ( const Config config)

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

22  {
23 
24  return;
25 }

Member Data Documentation

TPCGeoAlg sbnd::GeometryCosmicIdAlg::fTpcGeo
private

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