CMS 3D CMS Logo

GroupedCkfTrajectoryBuilder.h
Go to the documentation of this file.
1 #ifndef GroupedCkfTrajectoryBuilder_H
2 #define GroupedCkfTrajectoryBuilder_H
3 
7 
10 
12 
13 #include <vector>
14 
16 
23 public:
26 
29 
31  // virtual void setEvent(const edm::Event& event) const;
32 
34  TrajectoryContainer trajectories(const TrajectorySeed&) const override;
35 
37  void trajectories(const TrajectorySeed&, TrajectoryContainer& ret) const override;
38 
41 
43  void trajectories(const TrajectorySeed&, TrajectoryContainer& ret, const TrackingRegion&) const;
44 
46  // also new interface returning the start Trajectory...
49  unsigned int& nCandPerSeed,
50  const TrajectoryFilter*) const override;
51 
58  void rebuildSeedingRegion(const TrajectorySeed&, TrajectoryContainer& result) const override;
59 
60  // same as above using the precomputed startingTraj..
61  void rebuildTrajectories(TempTrajectory const& startingTraj,
62  const TrajectorySeed&,
63  TrajectoryContainer& result) const override;
64 
65  // Access to lower level components
66  const TrajectoryStateUpdator& updator() const { return *theUpdator; }
68 
69  // PropagationDirection direction() const {return theDirection;}
70 
72  double chiSquareCut() { return theChiSquareCut; }
73 
75  int maxCand() { return theMaxCand; }
76 
78  float lostHitPenalty() { return theLostHitPenalty; }
79 
80  // /** Tells whether an intermediary cleaning stage should take place during TB. */
81  // bool intermediateCleaning() {return theIntermediateCleaning;}
82 
84  double ptCut() { return theptCut; }
85 
87  double mass() { return theMass; }
88 
89 protected:
90  void setEvent_(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
91 
92  virtual void analyseSeed(const TrajectorySeed& seed) const {}
93 
94  virtual void analyseMeasurements(const std::vector<TM>& meas, const Trajectory& traj) const {}
95  virtual void analyseResult(const TrajectoryContainer& result) const {}
96 
97 private:
98  // /// no copy constructor
99  // GroupedCkfTrajectoryBuilder (const GroupedCkfTrajectoryBuilder&) = default;
100  //
101  // /// no assignment operator
102  // GroupedCkfTrajectoryBuilder& operator= (const GroupedCkfTrajectoryBuilder&) dso_internal;
103 
104  inline bool tkxor(bool a, bool b) const dso_internal { return (a || b) && !(a && b); }
105  // to be ported later
106 
107  bool advanceOneLayer(const TrajectorySeed& seed,
108  TempTrajectory& traj,
109  const TrajectoryFilter* regionalCondition,
110  const Propagator* propagator,
111  bool inOut,
112  TempTrajectoryContainer& newCand,
113  TempTrajectoryContainer& result) const dso_internal;
114 
115  unsigned int groupedLimitedCandidates(const TrajectorySeed& seed,
116  TempTrajectory const& startingTraj,
117  const TrajectoryFilter* regionalCondition,
118  const Propagator* propagator,
119  bool inOut,
120  TempTrajectoryContainer& result) const dso_internal;
121 
123  void rebuildSeedingRegion(const TrajectorySeed& seed,
124  TempTrajectory const& startingTraj,
125  TempTrajectoryContainer& result) const dso_internal;
126 
127  //** try to find additional hits in seeding region for a candidate
128  //* (returns number of trajectories added) *
129  int rebuildSeedingRegion(const TrajectorySeed& seed,
130  const std::vector<const TrackingRecHit*>& seedHits,
131  TempTrajectory& candidate,
132  TempTrajectoryContainer& result) const dso_internal;
133 
134  // ** Backward fit of trajectory candidate except seed. Fit result is returned. invalid if fit failed
135  // * remaining hits are returned remainingHits.
136  TempTrajectory backwardFit(TempTrajectory& candidate,
137  unsigned int nSeed,
138  const TrajectoryFitter& fitter,
139  std::vector<const TrackingRecHit*>& remainingHits) const dso_internal;
140 
142  bool verifyHits(TempTrajectory::DataContainer::const_iterator rbegin,
143  size_t maxDepth,
144  const std::vector<const TrackingRecHit*>& hits) const dso_internal;
145 
147  void groupedIntermediaryClean(TempTrajectoryContainer& theTrajectories) const dso_internal;
148 
151  if (dir == alongMomentum)
152  return oppositeToMomentum;
153  if (dir == oppositeToMomentum)
154  return alongMomentum;
155  return dir;
156  }
157 
158 private:
160 
161  // typedef deque< const TrajectoryFilter*> StopCondContainer;
162  // StopCondContainer theStopConditions;
163 
166  double theptCut;
168  double theMass;
179 
180  bool theLockHits;
196 
198 
199  // mutable TempTrajectoryContainer work_; // Better here than alloc every time
201  work_MaxSize_ = 50
202  }; // if it grows above this number, it is forced to resize to half this amount when cleared
203 };
204 
205 #endif
virtual void analyseMeasurements(const std::vector< TM > &meas, const Trajectory &traj) const
virtual void rebuildSeedingRegion(const TrajectorySeed &, TrajectoryContainer &result) const
ret
prodAgent to be discontinued
~GroupedCkfTrajectoryBuilder() override
destructor
const TrajectoryStateUpdator * theUpdator
virtual void analyseSeed(const TrajectorySeed &seed) const
double mass()
Mass hypothesis used for propagation.
PropagationDirection
virtual TempTrajectory buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const
virtual TrajectoryContainer trajectories(const TrajectorySeed &) const =0
virtual void setEvent_(const edm::Event &iEvent, const edm::EventSetup &iSetup)=0
int iEvent
Definition: GenABIO.cc:224
virtual void analyseResult(const TrajectoryContainer &result) const
static PropagationDirection oppositeDirection(PropagationDirection dir)
change of propagation direction
virtual void rebuildTrajectories(TempTrajectory const &startingTraj, const TrajectorySeed &seed, TrajectoryContainer &result) const
const Chi2MeasurementEstimatorBase & estimator() const
#define dso_internal
Definition: Visibility.h:13
std::vector< TempTrajectory > TempTrajectoryContainer
double b
Definition: hdecay.h:118
const TrajectoryStateUpdator & updator() const
double a
Definition: hdecay.h:119
bool tkxor(bool a, bool b) const
std::vector< Trajectory > TrajectoryContainer
const Chi2MeasurementEstimatorBase * theEstimator