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

#include <GeometryCosmicIdAlg.h>

Classes

struct  Config
 

Public Member Functions

 GeometryCosmicIdAlg (const core::ProviderManager &manager, const Config &config)
 
 GeometryCosmicIdAlg (const core::ProviderManager &manager, const fhicl::ParameterSet &pset)
 
 ~GeometryCosmicIdAlg ()
 
void reconfigure (const Config &config)
 
bool GeometryCosmicId (recob::Track &track, std::vector< art::Ptr< recob::Hit >> &hits, std::map< geo::TPCID, bool > &tpc_flashes)
 

Private Attributes

geo::GeometryCore const * fGeometry
 

Detailed Description

Definition at line 34 of file sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/GeometryCosmicIdAlg.h.

Constructor & Destructor Documentation

ana::GeometryCosmicIdAlg::GeometryCosmicIdAlg ( const core::ProviderManager manager,
const Config config 
)
ana::GeometryCosmicIdAlg::GeometryCosmicIdAlg ( const core::ProviderManager manager,
const fhicl::ParameterSet &  pset 
)
inline

Definition at line 45 of file sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/GeometryCosmicIdAlg.h.

45  :
46  GeometryCosmicIdAlg(manager, fhicl::Table<Config>(pset, {})()) {}
GeometryCosmicIdAlg(const core::ProviderManager &manager, const Config &config)
ana::GeometryCosmicIdAlg::~GeometryCosmicIdAlg ( )

Definition at line 18 of file sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/GeometryCosmicIdAlg.cc.

18  {
19 
20 }

Member Function Documentation

bool ana::GeometryCosmicIdAlg::GeometryCosmicId ( recob::Track track,
std::vector< art::Ptr< recob::Hit >> &  hits,
std::map< geo::TPCID, bool > &  tpc_flashes 
)

Definition at line 29 of file sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/GeometryCosmicIdAlg.cc.

29  {
30 
31  // Remove any tracks that are detected in one TPC and reconstructed in another
33  if (!tpcid) return true;
34 
35  geo::TPCGeo tpc = fGeometry->GetElement(tpcid);
36 
37  geo::Point_t start = track.Start();
38  geo::Point_t end = track.End();
39 
40  // Check the start/end points are in same TPC (track shifted into other TPC because time outside of beam)
41  if (!tpc.ContainsPosition(start) || !tpc.ContainsPosition(end)) return true;
42 
43  // if there was a flash in time with this track, keep it
44  return tpc_flashes.at(tpcid);
45 }
CryostatGeo const & GetElement(geo::CryostatID const &cryoid) const
geo::TPCID DetectedInTPC(const std::vector< art::Ptr< recob::Hit >> &hits)
Definition: Util.cc:30
Geometry information for a single TPC.
Definition: TPCGeo.h:38
Point_t const & Start() const
Access to track position at different points.
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
The data type to uniquely identify a TPC.
Definition: geo_types.h:386
Point_t const & End() const
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:184
bool ContainsPosition(geo::Point_t const &point, double wiggle=1.0) const
Returns whether this volume contains the specified point.
void ana::GeometryCosmicIdAlg::reconfigure ( const Config config)

Definition at line 23 of file sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/GeometryCosmicIdAlg.cc.

23  {
24 
25  return;
26 }

Member Data Documentation

geo::GeometryCore const* ana::GeometryCosmicIdAlg::fGeometry
private

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