CosmicTrackerAlg.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // CosmicTrackerAlg.h
3 //
4 // tjyang@fnal.gov
5 //
6 // Use Bruce's TrackTrajectoryAlg to reconstruct track
7 //
8 // Input: a vector of recob::hits
9 // output: a vector of 3D points and their assocations wit the hits
10 //
11 /////////////////////////////////////////////////////////////////////////
12 #ifndef COSMICTRACKERALG_H
13 #define COSMICTRACKERALG_H
14 
17 #include "fhiclcpp/fwd.h"
18 
22 namespace detinfo {
23  class DetectorClocksData;
24  class DetectorPropertiesData;
25  class LArProperties;
26 }
27 
28 #include <vector>
29 
30 #include "TVector3.h"
31 
32 namespace trkf {
34  public:
35  explicit CosmicTrackerAlg(fhicl::ParameterSet const& pset);
36 
37  void SPTReco(detinfo::DetectorClocksData const& clockData,
38  detinfo::DetectorPropertiesData const& detProp,
40 
41  //trajectory position and direction returned by TrackTrajectoryAlg
42  std::vector<TVector3> trajPos;
43  std::vector<TVector3> trajDir;
44  std::vector<std::vector<art::Ptr<recob::Hit>>> trajHit;
45 
46  //position and direction of each point on a track trajectory
47  std::vector<TVector3> trkPos;
48  std::vector<TVector3> trkDir;
49 
50  private:
51  int fSPTAlg; //0: Use TrackTrajectoryAlg
52  //1: Use only Track3DReco alg
53 
54  bool fTrajOnly; // if true, only return trajectory points, if false, return
55  // a 3D point for every hit
56 
57  // use TrackTrajectoryAlg to get trajectory points
58  void TrackTrajectory(detinfo::DetectorPropertiesData const& detProp,
60 
61  // use algorithm in Track3DReco
62  void Track3D(detinfo::DetectorClocksData const& clockData,
63  detinfo::DetectorPropertiesData const& detProp,
65  double ftmatch; ///< tolerance for time matching (in ticks)
66  double fsmatch; ///< tolerance for distance matching (in cm)
67 
68  // create one 3D point for each hit using trajectory points
69  void MakeSPT(detinfo::DetectorClocksData const& clockData,
70  detinfo::DetectorPropertiesData const& detProp,
72 
73  // track trajectory for a track under construction
75 
76  //projection of trajectory points on wire planes
77  std::vector<std::vector<std::vector<std::vector<double>>>> vw;
78  std::vector<std::vector<std::vector<std::vector<double>>>> vt;
79  std::vector<std::vector<std::vector<std::vector<unsigned int>>>> vtraj;
80 
83 
84  }; //class CosmicTrackerAlg
85 } // namespace trkf
86 
87 #endif //ifndef COSMICTRACKERALG_H
std::vector< std::vector< std::vector< std::vector< double > > > > vw
std::vector< std::vector< std::vector< std::vector< double > > > > vt
double ftmatch
tolerance for time matching (in ticks)
struct vector vector
std::vector< TVector3 > trajPos
std::vector< TVector3 > trkDir
art framework interface to geometry description
std::vector< std::vector< std::vector< std::vector< unsigned int > > > > vtraj
TrackTrajectoryAlg fTrackTrajectoryAlg
General LArSoft Utilities.
double fsmatch
tolerance for distance matching (in cm)
art::ServiceHandle< geo::Geometry const > geom
const detinfo::LArProperties * larprop
std::vector< TVector3 > trkPos
Declaration of signal hit object.
Contains all timing reference information for the detector.
std::vector< TVector3 > trajDir
std::vector< std::vector< art::Ptr< recob::Hit > > > trajHit