LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Track3DKalmanHitAlg.h
Go to the documentation of this file.
1 // Configuration parameters:
11 // MaxTcut - Maximum delta ray energy in Mev for dE/dx.
12 // DoDedx - Global dE/dx enable flag.
13 // SelfSeed - Self seed flag.
14 // LineSurface - Hits on line surfaces (true) or plane surfaces (false).
15 // MinSeedHits - Minimum number of hits per track seed.
16 // MinSeedChopHits: - Potentially chop seeds that exceed this length.
17 // MaxChopHits - Maximum number of hits to chop from each end of seed.
18 // MaxSeedChiDF - Maximum seed track chisquare/dof.
19 // MinSeedSlope - Minimum seed slope (dx/dz).
20 // InitialMomentum - Initial momentum guess.
21 // KalmanFilterAlg - Parameter set for KalmanFilterAlg.
22 // SeedFinderAlg - Parameter set for seed finder algorithm object.
24 
25 #ifndef TRACK3DKALMANHITALG_H
26 #define TRACK3DKALMANHITALG_H
27 
28 #include <deque>
29 #include <memory>
30 #include <stddef.h>
31 #include <vector>
32 
34 namespace fhicl {
35  class ParameterSet;
36 }
37 
46 namespace detinfo {
47  class DetectorClocksData;
48  class DetectorPropertiesData;
49 }
50 
51 namespace trkf {
52  class KHitContainer;
53  class Propagator;
54 }
55 
56 #include <memory>
57 #include <vector>
58 
59 namespace trkf {
61  public:
62  explicit Track3DKalmanHitAlg(const fhicl::ParameterSet& pset);
63 
64  std::vector<trkf::KalmanOutput> makeTracks(detinfo::DetectorClocksData const& clockData,
65  detinfo::DetectorPropertiesData const& detProp,
66  KalmanInputs& kalman_inputs);
67  void fetchPFParticleSeeds(const art::PtrVector<recob::Seed>& pfseeds,
68  const std::vector<Hits>& pfseedhits,
69  std::vector<recob::Seed>& seeds,
70  std::vector<Hits>& hitsperseed) const;
71  recob::Seed makeSeed(detinfo::DetectorPropertiesData const& detProp, const Hits& hits) const;
72  void growSeedsIntoTracks(detinfo::DetectorPropertiesData const& detProp,
73  const bool pfseed,
74  const std::vector<recob::Seed>& seeds,
75  const std::vector<Hits>& hitsperseed,
76  Hits& unusedhits,
77  Hits& hits,
78  std::deque<KGTrack>& kalman_tracks);
79  void growSeedIntoTracks(detinfo::DetectorPropertiesData const& detProp,
80  const bool pfseed,
81  const recob::Seed& seed,
82  const Hits& hpsit,
83  Hits& unusedhits,
84  Hits& hits,
85  std::deque<KGTrack>& kgtracks);
86  void chopHitsOffSeeds(Hits const& hpsit, bool pfseed, Hits& seedhits) const;
87  bool testSeedSlope(const double* dir) const;
88  std::shared_ptr<Surface> makeSurface(const recob::Seed& seed, double* dir) const;
89  bool makeKalmanTracks(detinfo::DetectorPropertiesData const& detProp,
90  const std::shared_ptr<trkf::Surface> psurf,
91  const Surface::TrackDirection trkdir,
92  Hits& seedhits,
93  Hits& hits,
94  std::deque<KGTrack>& kalman_tracks);
95  bool smoothandextendTrack(detinfo::DetectorPropertiesData const& detProp,
96  Propagator const& propagator,
97  KGTrack& trg0,
98  const Hits hits,
99  unsigned int prefplane,
100  std::deque<KGTrack>& kalman_tracks);
101  bool extendandsmoothLoop(detinfo::DetectorPropertiesData const& detProp,
102  Propagator const& propagator,
103  KGTrack& trg1,
104  unsigned int prefplane,
105  Hits& trackhits) const;
106  void filterHitsOnKalmanTrack(const KGTrack& trg, Hits& hits, Hits& seederhits) const;
107  std::unique_ptr<KHitContainer> fillHitContainer(detinfo::DetectorPropertiesData const& detProp,
108  const Hits& hits) const;
109 
110  bool qualityCutsOnSeedTrack(const KGTrack& trg0) const;
111 
112  void fitnupdateMomentum(Propagator const& propagator, KGTrack& trg1, KGTrack& trg2) const;
113 
114  private:
115  // Fcl parameters.
116  bool fDoDedx;
117  bool fSelfSeed;
118  double fMaxTcut;
120  size_t fMinSeedHits;
123  double fMaxSeedChiDF;
124  double fMinSeedSlope;
126 
127  // Algorithm objects.
128 
131 
132  // Statistics.
133  int fNumTrack;
134  };
135 }
136 
137 #endif
TrackDirection
Track direction enum.
Definition: Surface.h:54
size_t fMinSeedHits
Minimum number of hits per track seed.
A collection of KHitGroups.
bool fDoDedx
Global dE/dx enable flag.
double fMaxSeedChiDF
Maximum seed track chisquare/dof.
int fMinSeedChopHits
Potentially chop seeds that exceed this length.
double fInitialMomentum
Initial (or constant) momentum.
void hits()
Definition: readHits.C:15
long seed
Definition: chem4.cc:67
parameter set interface
Base class for Kalman filter surface.
Propagate between any two surfaces.
General LArSoft Utilities.
KalmanFilterAlg fKFAlg
Kalman filter algorithm.
Kalman Filter.
std::vector< TrajPoint > seeds
Definition: DataStructs.cxx:14
Contains all timing reference information for the detector.
int fNumTrack
Number of tracks produced.
TDirectory * dir
Definition: macro.C:5
bool fLineSurface
Line surface flag.
SeedFinderAlgorithm fSeedFinderAlg
Seed finder.
A collection of KHitTracks.
int fMaxChopHits
Maximum number of hits to chop from each end of seed.
std::vector< KalmanInput > KalmanInputs
bool fSelfSeed
Self seed flag.
double fMinSeedSlope
Minimum seed slope (dx/dz).
double fMaxTcut
Maximum delta ray energy in MeV for restricted dE/dx.