LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
CosmicTrackerAlg.h
Go to the documentation of this file.
1 // 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 //
12 #ifndef COSMICTRACKERALG_H
13 #define COSMICTRACKERALG_H
14 
17 #include "fhiclcpp/fwd.h"
18 
23 namespace detinfo {
24  class DetectorClocksData;
25  class DetectorPropertiesData;
26  class LArProperties;
27 }
28 
29 #include <vector>
30 
31 #include "TVector3.h"
32 
33 namespace trkf {
35  public:
36  explicit CosmicTrackerAlg(fhicl::ParameterSet const& pset);
37 
38  void SPTReco(detinfo::DetectorClocksData const& clockData,
39  detinfo::DetectorPropertiesData const& detProp,
41 
42  //trajectory position and direction returned by TrackTrajectoryAlg
43  std::vector<TVector3> trajPos;
44  std::vector<TVector3> trajDir;
45  std::vector<std::vector<art::Ptr<recob::Hit>>> trajHit;
46 
47  //position and direction of each point on a track trajectory
48  std::vector<TVector3> trkPos;
49  std::vector<TVector3> trkDir;
50 
51  private:
52  int fSPTAlg; //0: Use TrackTrajectoryAlg
53  //1: Use only Track3DReco alg
54 
55  bool fTrajOnly; // if true, only return trajectory points, if false, return
56  // a 3D point for every hit
57 
58  // use TrackTrajectoryAlg to get trajectory points
59  void TrackTrajectory(detinfo::DetectorPropertiesData const& detProp,
61 
62  // use algorithm in Track3DReco
63  void Track3D(detinfo::DetectorClocksData const& clockData,
64  detinfo::DetectorPropertiesData const& detProp,
66  double ftmatch;
67  double fsmatch;
68 
69  // create one 3D point for each hit using trajectory points
70  void MakeSPT(detinfo::DetectorClocksData const& clockData,
71  detinfo::DetectorPropertiesData const& detProp,
73 
74  // track trajectory for a track under construction
76 
77  //projection of trajectory points on wire planes
78  std::vector<std::vector<std::vector<std::vector<double>>>> vw;
79  std::vector<std::vector<std::vector<std::vector<double>>>> vt;
80  std::vector<std::vector<std::vector<std::vector<unsigned int>>>> vtraj;
81 
85 
86  }; //class CosmicTrackerAlg
87 } // namespace trkf
88 
89 #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
cout<< "Opened file "<< fin<< " ixs= "<< ixs<< endl;if(ixs==0) hhh=(TH1F *) fff-> Get("h1")
Definition: AddMC.C:8
std::vector< TVector3 > trkDir
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
std::vector< std::vector< std::vector< std::vector< unsigned int > > > > vtraj
Interface for a class providing readout channel mapping to geometry.
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
Contains all timing reference information for the detector.
std::vector< TVector3 > trajDir
art framework interface to geometry description
std::vector< std::vector< art::Ptr< recob::Hit > > > trajHit