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 
49  TrajectoryContainer& ret,
50  unsigned int& nCandPerSeed,
51  const TrajectoryFilter*) const override;
52 
59  void rebuildSeedingRegion(const TrajectorySeed&, TrajectoryContainer& result) const override;
60  // same as above FIXME
61  void rebuildTrajectories(const TrajectorySeed&, TrajectoryContainer& result) const override;
62 
63  // Access to lower level components
64  const TrajectoryStateUpdator& updator() const { return *theUpdator; }
66 
67  // PropagationDirection direction() const {return theDirection;}
68 
70  double chiSquareCut() { return theChiSquareCut; }
71 
73  int maxCand() { return theMaxCand; }
74 
76  float lostHitPenalty() { return theLostHitPenalty; }
77 
78  // /** Tells whether an intermediary cleaning stage should take place during TB. */
79  // bool intermediateCleaning() {return theIntermediateCleaning;}
80 
82  double ptCut() { return theptCut; }
83 
85  double mass() { return theMass; }
86 
87 protected:
88  void setEvent_(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
89 
90  virtual void analyseSeed(const TrajectorySeed& seed) const {}
91 
92  virtual void analyseMeasurements(const std::vector<TM>& meas, const Trajectory& traj) const {}
93  virtual void analyseResult(const TrajectoryContainer& result) const {}
94 
95 private:
96  // /// no copy constructor
97  // GroupedCkfTrajectoryBuilder (const GroupedCkfTrajectoryBuilder&) = default;
98  //
99  // /// no assignment operator
100  // GroupedCkfTrajectoryBuilder& operator= (const GroupedCkfTrajectoryBuilder&) dso_internal;
101 
102  inline bool tkxor(bool a, bool b) const dso_internal { return (a || b) && !(a && b); }
103  // to be ported later
104 
105  bool advanceOneLayer(const TrajectorySeed& seed,
106  TempTrajectory& traj,
107  const TrajectoryFilter* regionalCondition,
108  const Propagator* propagator,
109  bool inOut,
110  TempTrajectoryContainer& newCand,
111  TempTrajectoryContainer& result) const dso_internal;
112 
113  unsigned int groupedLimitedCandidates(const TrajectorySeed& seed,
114  TempTrajectory const& startingTraj,
115  const TrajectoryFilter* regionalCondition,
116  const Propagator* propagator,
117  bool inOut,
118  TempTrajectoryContainer& result) const dso_internal;
119 
121  void rebuildSeedingRegion(const TrajectorySeed& seed, TempTrajectoryContainer& result) const dso_internal;
122 
123  // ** try to find additional hits in seeding region for a candidate
124  // * (returns number of trajectories added) *
126  const std::vector<const TrackingRecHit*>& seedHits,
127  TempTrajectory& candidate,
128  TempTrajectoryContainer& result) const dso_internal;
129 
130  // ** Backward fit of trajectory candidate except seed. Fit result is returned. invalid if fit failed
131  // * remaining hits are returned remainingHits.
133  unsigned int nSeed,
134  const TrajectoryFitter& fitter,
135  std::vector<const TrackingRecHit*>& remainingHits) const dso_internal;
136 
138  bool verifyHits(TempTrajectory::DataContainer::const_iterator rbegin,
139  size_t maxDepth,
140  const std::vector<const TrackingRecHit*>& hits) const dso_internal;
141 
143  void groupedIntermediaryClean(TempTrajectoryContainer& theTrajectories) const dso_internal;
144 
147  if (dir == alongMomentum)
148  return oppositeToMomentum;
149  if (dir == oppositeToMomentum)
150  return alongMomentum;
151  return dir;
152  }
153 
154 private:
156 
157  // typedef deque< const TrajectoryFilter*> StopCondContainer;
158  // StopCondContainer theStopConditions;
159 
162  double theptCut;
164  double theMass;
175 
176  bool theLockHits;
192 
194 
195  // mutable TempTrajectoryContainer work_; // Better here than alloc every time
197  work_MaxSize_ = 50
198  }; // if it grows above this number, it is forced to resize to half this amount when cleared
199 };
200 
201 #endif
const Chi2MeasurementEstimatorBase & estimator() 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:120
const TrajectoryStateUpdator & updator() const
virtual void analyseSeed(const TrajectorySeed &seed) const
virtual void buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const
double a
Definition: hdecay.h:121
virtual void rebuildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &result) const
std::vector< Trajectory > TrajectoryContainer
const Chi2MeasurementEstimatorBase * theEstimator
virtual void rebuildSeedingRegion(const TrajectorySeed &, TrajectoryContainer &result) const