All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbndcode/sbndcode/CosmicId/Algs/GeometryCosmicIdAlg.cc
Go to the documentation of this file.
1 #include "GeometryCosmicIdAlg.h"
2 
3 namespace sbnd{
4 
6 
7  this->reconfigure(config);
8 
9 }
10 
11 
13 
14 }
15 
16 
18 
19 }
20 
21 
23 
24  return;
25 }
26 
27 // Remove any tracks in different TPC to beam activity
28 bool GeometryCosmicIdAlg::GeometryCosmicId(recob::Track track, std::vector<art::Ptr<recob::Hit>> hits, bool tpc0Flash, bool tpc1Flash){
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 }
49 
50 
51 }
process_name use argoneut_mc_hitfinder track
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
Point_t const & Start() const
Access to track position at different points.
bool GeometryCosmicId(recob::Track track, std::vector< art::Ptr< recob::Hit >> hits, bool tpc0Flash, bool tpc1Flash)
int DetectedInTPC(std::vector< art::Ptr< recob::Hit >> hits)
Point_t const & End() const
stream1 can override from command line with o or output services user sbnd
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a &quot;fitted&quot; track: