LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
PMAlgStitching.h
Go to the documentation of this file.
1 // Class: PMAlgStitching
3 // Author: L.Whitehead (leigh.howard.whitehead@cern.ch) January 2017
5 
6 #ifndef PMAlgStitching_h
7 #define PMAlgStitching_h
8 
9 #include <map>
10 
11 #include "fhiclcpp/types/Atom.h"
13 
16 
17 #include "TVector3.h"
18 
19 namespace pma{
20  class PMAlgStitching;
21 }
22 
24 
25 public:
26 
27  struct Config {
28  using Name = fhicl::Name;
30 
32  Name("StitchingThreshold"),
33  Comment("The maximum value allowed for the stitching score. Has dimensions of length, and 10.0(cm) is a reasonable value.")
34  };
35 
37  Name("NodesFromEnd"),
38  Comment("Number of nodes we step back from the ends of the tracks to perform the stitching extrapolation.")
39  };
40 
41  };
42 
43  // Constructor
45 
46  // Destructor
48 
49  // CPA and APA stitching wrappers
52 
53 private:
54  // Main function of the algorithm
55  void StitchTracks(pma::TrkCandidateColl &tracks, bool isCPA);
56 
57  double GetOptimalStitchShift(TVector3 &pos1, TVector3 &pos2, TVector3 &dir1, TVector3 &dir2, double &shift);
58  double GetTrackPairDelta(TVector3 &pos1, TVector3 &pos2, TVector3 &dir1, TVector3 &dir2);
59 
60  void GetTPCXOffsets();
61  double GetTPCOffset(unsigned int tpc, unsigned int cryo, bool isCPA);
62 
63  std::map<geo::TPCID,double> fTPCXOffsetsAPA;
64  std::map<geo::TPCID,double> fTPCXOffsetsCPA;
65 
66  // Tuneable parameters
67  double fStitchingThreshold; // The maximum stitching score allowed for a successful stitch.
68  unsigned int fNodesFromEnd; // Number of nodes we step back to make the stitch extrapolation. Require to mitigate end effects on tracks.
69 
70 };
71 
72 #endif
73 
double GetTrackPairDelta(TVector3 &pos1, TVector3 &pos2, TVector3 &dir1, TVector3 &dir2)
double GetTPCOffset(unsigned int tpc, unsigned int cryo, bool isCPA)
PMAlgStitching(const pma::PMAlgStitching::Config &config)
unsigned int fNodesFromEnd
void StitchTracksCPA(pma::TrkCandidateColl &tracks)
fhicl::Atom< int > StitchingThreshold
Definition of data types for geometry description.
Track finding helper for the Projection Matching Algorithm.
double GetOptimalStitchShift(TVector3 &pos1, TVector3 &pos2, TVector3 &dir1, TVector3 &dir2, double &shift)
void StitchTracksAPA(pma::TrkCandidateColl &tracks)
fhicl::Atom< unsigned int > NodesFromEnd
std::map< geo::TPCID, double > fTPCXOffsetsCPA
std::map< geo::TPCID, double > fTPCXOffsetsAPA
void StitchTracks(pma::TrkCandidateColl &tracks, bool isCPA)