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 
33  // virtual void setEvent(const edm::Event& event) const;
34 
36  TrajectoryContainer trajectories(const TrajectorySeed&) const override;
37 
39  void trajectories(const TrajectorySeed&, TrajectoryContainer& ret) const override;
40 
42  TrajectoryContainer trajectories(const TrajectorySeed&, const TrackingRegion&) const;
43 
45  void trajectories(const TrajectorySeed&, TrajectoryContainer& ret, const TrackingRegion&) const;
46 
48  // also new interface returning the start Trajectory...
50  TrajectoryContainer& ret,
51  unsigned int& nCandPerSeed,
52  const TrajectoryFilter*) const override;
53 
60  void rebuildSeedingRegion(const TrajectorySeed&, TrajectoryContainer& result) const override;
61 
62  // same as above using the precomputed startingTraj..
63  void rebuildTrajectories(TempTrajectory const& startingTraj,
64  const TrajectorySeed&,
65  TrajectoryContainer& result) const override;
66 
67  // Access to lower level components
68  const TrajectoryStateUpdator& updator() const { return *theUpdator; }
70 
71  // PropagationDirection direction() const {return theDirection;}
72 
74  double chiSquareCut() { return theChiSquareCut; }
75 
77  int maxCand() { return theMaxCand; }
78 
80  float lostHitPenalty() { return theLostHitPenalty; }
81 
82  // /** Tells whether an intermediary cleaning stage should take place during TB. */
83  // bool intermediateCleaning() {return theIntermediateCleaning;}
84 
86  double ptCut() { return theptCut; }
87 
89  double mass() { return theMass; }
90 
91 protected:
92  void setEvent_(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
93 
94  virtual void analyseSeed(const TrajectorySeed& seed) const {}
95 
96  virtual void analyseMeasurements(const std::vector<TM>& meas, const Trajectory& traj) const {}
97  virtual void analyseResult(const TrajectoryContainer& result) const {}
98 
99 private:
100  // /// no copy constructor
101  // GroupedCkfTrajectoryBuilder (const GroupedCkfTrajectoryBuilder&) = default;
102  //
103  // /// no assignment operator
104  // GroupedCkfTrajectoryBuilder& operator= (const GroupedCkfTrajectoryBuilder&) dso_internal;
105 
106  inline bool tkxor(bool a, bool b) const dso_internal { return (a || b) && !(a && b); }
107  // to be ported later
108 
109  bool advanceOneLayer(const TrajectorySeed& seed,
110  TempTrajectory& traj,
111  const TrajectoryFilter* regionalCondition,
112  const Propagator* propagator,
113  bool inOut,
114  TempTrajectoryContainer& newCand,
115  TempTrajectoryContainer& result) const dso_internal;
116 
117  unsigned int groupedLimitedCandidates(const TrajectorySeed& seed,
118  TempTrajectory const& startingTraj,
119  const TrajectoryFilter* regionalCondition,
120  const Propagator* propagator,
121  bool inOut,
122  TempTrajectoryContainer& result) const dso_internal;
123 
126  TempTrajectory const& startingTraj,
127  TempTrajectoryContainer& result) const dso_internal;
128 
129  //** try to find additional hits in seeding region for a candidate
130  //* (returns number of trajectories added) *
132  const std::vector<const TrackingRecHit*>& seedHits,
133  TempTrajectory& candidate,
134  TempTrajectoryContainer& result) const dso_internal;
135 
136  // ** Backward fit of trajectory candidate except seed. Fit result is returned. invalid if fit failed
137  // * remaining hits are returned remainingHits.
139  unsigned int nSeed,
140  const TrajectoryFitter& fitter,
141  std::vector<const TrackingRecHit*>& remainingHits) const dso_internal;
142 
144  bool verifyHits(TempTrajectory::DataContainer::const_iterator rbegin,
145  size_t maxDepth,
146  const std::vector<const TrackingRecHit*>& hits) const dso_internal;
147 
149  void groupedIntermediaryClean(TempTrajectoryContainer& theTrajectories) const dso_internal;
150 
153  if (dir == alongMomentum)
154  return oppositeToMomentum;
155  if (dir == oppositeToMomentum)
156  return alongMomentum;
157  return dir;
158  }
159 
160 private:
162 
163  // typedef deque< const TrajectoryFilter*> StopCondContainer;
164  // StopCondContainer theStopConditions;
165 
168  double theptCut;
170  double theMass;
181 
182  bool theLockHits;
198 
200 
201  // mutable TempTrajectoryContainer work_; // Better here than alloc every time
203  work_MaxSize_ = 50
204  }; // if it grows above this number, it is forced to resize to half this amount when cleared
205 };
206 
207 #endif
const Chi2MeasurementEstimatorBase & estimator() const
virtual TempTrajectory buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const
ret
prodAgent to be discontinued
virtual void analyseResult(const TrajectoryContainer &result) const
~GroupedCkfTrajectoryBuilder() override
destructor
const TrajectoryStateUpdator * theUpdator
double mass()
Mass hypothesis used for propagation.
PropagationDirection
virtual void setEvent_(const edm::Event &iEvent, const edm::EventSetup &iSetup)=0
int iEvent
Definition: GenABIO.cc:224
static PropagationDirection oppositeDirection(PropagationDirection dir)
change of propagation direction
#define dso_internal
Definition: Visibility.h:13
static void fillPSetDescription(edm::ParameterSetDescription &iDesc)
virtual TrajectoryContainer trajectories(const TrajectorySeed &) const =0
virtual void analyseMeasurements(const std::vector< TM > &meas, const Trajectory &traj) const
double b
Definition: hdecay.h:118
const TrajectoryStateUpdator & updator() const
virtual void analyseSeed(const TrajectorySeed &seed) const
virtual void rebuildTrajectories(TempTrajectory const &startingTraj, const TrajectorySeed &seed, TrajectoryContainer &result) const
double a
Definition: hdecay.h:119
std::vector< Trajectory > TrajectoryContainer
const Chi2MeasurementEstimatorBase * theEstimator
virtual void rebuildSeedingRegion(const TrajectorySeed &, TrajectoryContainer &result) const