All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbnana/sbnanalysis/ana/SBNOscReco/CosmicIDAlgs/GeometryCosmicIdAlg.cc
Go to the documentation of this file.
1 #include "GeometryCosmicIdAlg.h"
2 
3 namespace ana{
4 
6  fGeometry = manager.GetGeometryProvider();
7 
8  this->reconfigure(config);
9 
10 }
11 
12 
14 
15 }
16 
17 
19 
20 }
21 
22 
24 
25  return;
26 }
27 
28 // Remove any tracks in different TPC to beam activity
29 bool GeometryCosmicIdAlg::GeometryCosmicId(recob::Track &track, std::vector<art::Ptr<recob::Hit>> &hits, std::map<geo::TPCID, bool> &tpc_flashes) {
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 }
46 
47 
48 }
bool GeometryCosmicId(recob::Track &track, std::vector< art::Ptr< recob::Hit >> &hits, std::map< geo::TPCID, bool > &tpc_flashes)
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
process_name use argoneut_mc_hitfinder track
process_name opflashCryoW ana
const geo::GeometryCore * GetGeometryProvider() const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
Interface to LArSoft services.
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
GeometryCosmicIdAlg(const core::ProviderManager &manager, const Config &config)
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.
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a &quot;fitted&quot; track: