All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
15 #include "art/Framework/Services/Registry/ServiceHandle.h"
16 #include "canvas/Persistency/Common/Ptr.h"
17 
18 
19 namespace fhicl {
20  class ParameterSet;
21 }
22 
26 namespace detinfo {
27  class DetectorClocksData;
28  class DetectorPropertiesData;
29  class LArProperties;
30 }
31 
32 #include <vector>
33 
34 #include "TVector3.h"
35 
36 namespace trkf {
38  public:
39  explicit CosmicTrackerAlg(fhicl::ParameterSet const& pset);
40 
41  void SPTReco(detinfo::DetectorClocksData const& clockData,
43  std::vector<art::Ptr<recob::Hit>>& fHits);
44 
45  //trajectory position and direction returned by TrackTrajectoryAlg
46  std::vector<TVector3> trajPos;
47  std::vector<TVector3> trajDir;
48  std::vector<std::vector<art::Ptr<recob::Hit>>> trajHit;
49 
50  //position and direction of each point on a track trajectory
51  std::vector<TVector3> trkPos;
52  std::vector<TVector3> trkDir;
53 
54  private:
55  int fSPTAlg; //0: Use TrackTrajectoryAlg
56  //1: Use only Track3DReco alg
57 
58  bool fTrajOnly; // if true, only return trajectory points, if false, return
59  // a 3D point for every hit
60 
61  // use TrackTrajectoryAlg to get trajectory points
63  std::vector<art::Ptr<recob::Hit>>& fHits);
64 
65  // use algorithm in Track3DReco
66  void Track3D(detinfo::DetectorClocksData const& clockData,
67  detinfo::DetectorPropertiesData const& detProp,
68  std::vector<art::Ptr<recob::Hit>>& fHits);
69  double ftmatch; ///< tolerance for time matching (in ticks)
70  double fsmatch; ///< tolerance for distance matching (in cm)
71 
72  // create one 3D point for each hit using trajectory points
73  void MakeSPT(detinfo::DetectorClocksData const& clockData,
74  detinfo::DetectorPropertiesData const& detProp,
75  std::vector<art::Ptr<recob::Hit>>& fHits);
76 
77  // track trajectory for a track under construction
79 
80  //projection of trajectory points on wire planes
81  std::vector<std::vector<std::vector<std::vector<double>>>> vw;
82  std::vector<std::vector<std::vector<std::vector<double>>>> vt;
83  std::vector<std::vector<std::vector<std::vector<unsigned int>>>> vtraj;
84 
85  art::ServiceHandle<geo::Geometry const> geom;
87 
88  }; //class CosmicTrackerAlg
89 } // namespace trkf
90 
91 #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)
Declaration of signal hit object.
std::vector< TVector3 > trajPos
std::vector< TVector3 > trkDir
void TrackTrajectory(detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> &fHits)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
std::vector< std::vector< std::vector< std::vector< unsigned int > > > > vtraj
TrackTrajectoryAlg fTrackTrajectoryAlg
CosmicTrackerAlg(fhicl::ParameterSet const &pset)
double fsmatch
tolerance for distance matching (in cm)
art::ServiceHandle< geo::Geometry const > geom
const detinfo::LArProperties * larprop
std::vector< TVector3 > trkPos
void MakeSPT(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> &fHits)
Contains all timing reference information for the detector.
void SPTReco(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> &fHits)
std::vector< TVector3 > trajDir
void Track3D(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> &fHits)
art framework interface to geometry description
auto const detProp
std::vector< std::vector< art::Ptr< recob::Hit > > > trajHit