All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackContainmentAlg.hh
Go to the documentation of this file.
1 /**
2  * \file TrackContainmentAlg.h
3  *
4  *
5  * @author wketchum
6 */
7 
8 #ifndef TRK_TRACKCONTAINMENTALG_H
9 #define TRK_TRACKCONTAINMENTALG_H
10 
11 #include <string>
12 #include <vector>
13 
14 namespace fhicl { class ParameterSet; }
15 
18 
19 class TTree;
20 
21 namespace geo{ class GeometryCore; }
22 
23 namespace trk{
24  class TrackContainmentAlg;
25 
26  typedef struct TrackTree{
27 
29 
31  start_x(t.Vertex().X()),start_y(t.Vertex().Y()),start_z(t.Vertex().Z()),
32  start_theta(t.VertexDirection().Theta()),start_phi(t.VertexDirection().Phi()),
33  end_x(t.End().X()),end_y(t.End().Y()),end_z(t.End().Z()),
34  end_theta(t.EndDirection().Theta()),end_phi(t.EndDirection().Phi()),
35  length(t.Length()),length_simple( (t.End()-t.Vertex()).R() ){}
36 
37  double start_x;
38  double start_y;
39  double start_z;
40  double start_theta;
41  double start_phi;
42  double end_x;
43  double end_y;
44  double end_z;
45  double end_theta;
46  double end_phi;
47  double length;
48  double length_simple;
49 
50  std::string Leaflist()
51  { return "start_x/D:start_y/D:start_z/D:start_theta/D:start_phi/D:end_x/D:end_y/D:end_z/D:end_theta/D:end_phi/D:length/D:length_simple/D"; }
52 
53  } TrackTree_t;
54 
55 }
56 
57 
59 
60 public:
61 
62  /// Default constructor
64 
65  void SetupOutputTree(TTree*);
66 
67  void Configure(fhicl::ParameterSet const&);
68 
69  void SetRunEvent(unsigned int const&, unsigned int const&);
70  void ProcessTracks(std::vector< std::vector<recob::Track> > const&,
71  geo::GeometryCore const& );
72 
73  std::vector< std::vector<int> > const& GetTrackContainmentValues()
74  { return fTrackContainmentLevel; }
75  std::vector< std::vector<double> > const& GetTrackMinDistanceValues()
76  { return fMinDistances; }
77  std::vector< std::vector<anab::CosmicTag> > const& GetTrackCosmicTags();
78 
79  void setMakeCosmicTags(bool flag=true) { fMakeCosmicTags = flag; }
80  void setFillOutputTree(bool flag=true) { fFillOutputTree = flag; }
81 
82 
83  private:
84 
85  double fZBuffer;
86  double fYBuffer;
87  double fXBuffer;
88  double fIsolation;
90  bool fDebug;
92 
93  TTree* fTrackTree;
95  unsigned int fRun;
96  unsigned int fEvent;
97  unsigned int fCollection;
98  unsigned int fTrkID;
99  double fDistance;
101 
102  std::vector< std::vector<int> > fTrackContainmentLevel;
103  std::vector< std::vector< std::pair<int,int> > > fTrackContainmentIndices;
104  std::vector< std::vector<double> > fMinDistances;
105  std::vector< std::vector<anab::CosmicTag> > fCosmicTags;
106 
107 
108  bool IsContained(recob::Track const&, geo::GeometryCore const&);
110 
111  double MinDistanceStartPt(recob::Track const&, recob::Track const&);
112  double MinDistanceEndPt(recob::Track const&, recob::Track const&);
113 
114 };
115 
116 #endif
float Length(const PFPStruct &pfp)
Definition: PFPUtils.cxx:3304
std::vector< std::vector< int > > fTrackContainmentLevel
void setMakeCosmicTags(bool flag=true)
double MinDistanceStartPt(recob::Track const &, recob::Track const &)
then echo unknown compiler flag
enum anab::cosmic_tag_id CosmicTagID_t
void setFillOutputTree(bool flag=true)
std::vector< std::vector< double > > fMinDistances
std::vector< std::vector< int > > const & GetTrackContainmentValues()
anab::CosmicTagID_t GetCosmicTagID(recob::Track const &, geo::GeometryCore const &)
then echo echo For and will not be changed by echo further linking echo echo B echo The symbol is in the uninitialized data multiple common symbols may appear with the echo same name If the symbol is defined the common echo symbols are treated as undefined references For more echo details on common see the discussion of warn common echo in *Note Linker see the discussion of warn common echo in *Note Linker such as a global int variable echo as opposed to a large global array echo echo I echo The symbol is an indirect reference to another symbol This echo is a GNU extension to the a out object file format which is echo rarely used echo echo N echo The symbol is a debugging symbol echo echo R echo The symbol is in a read only data section echo echo S echo The symbol is in an uninitialized data section for small echo objects echo echo T echo The symbol is in the the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not the value of the echo weak symbol becomes zero with no error echo echo W echo The symbol is a weak symbol that has not been specifically echo tagged as a weak object symbol When a weak defined symbol echo is linked with a normal defined the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not the value of the echo weak symbol becomes zero with no error echo echo echo The symbol is a stabs symbol in an a out object file In echo this the next values printed are the stabs other echo the stabs desc and the stab type Stabs symbols are echo used to hold debugging information For more echo see *Note or object file format specific echo echo For Mac OS X
void ProcessTracks(std::vector< std::vector< recob::Track > > const &, geo::GeometryCore const &)
std::vector< std::vector< std::pair< int, int > > > fTrackContainmentIndices
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
struct trk::TrackTree TrackTree_t
std::string Leaflist()
TrackTree(recob::Track const &t)
void Configure(fhicl::ParameterSet const &)
void SetRunEvent(unsigned int const &, unsigned int const &)
Description of geometry of one entire detector.
double MinDistanceEndPt(recob::Track const &, recob::Track const &)
Provides recob::Track data product.
std::vector< std::vector< anab::CosmicTag > > fCosmicTags
std::vector< std::vector< anab::CosmicTag > > const & GetTrackCosmicTags()
std::vector< std::vector< double > > const & GetTrackMinDistanceValues()
TrackContainmentAlg()
Default constructor.
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a &quot;fitted&quot; track:
bool IsContained(recob::Track const &, geo::GeometryCore const &)