CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GroupedCkfTrajectoryBuilder.h
Go to the documentation of this file.
1 #ifndef GroupedCkfTrajectoryBuilder_H
2 #define GroupedCkfTrajectoryBuilder_H
3 
6 
9 
11 
12 #include <vector>
13 
15 
22 public:
25 
28 
30  // virtual void setEvent(const edm::Event& event) const;
31 
33  TrajectoryContainer trajectories(const TrajectorySeed&) const override;
34 
36  void trajectories(const TrajectorySeed&, TrajectoryContainer& ret) const override;
37 
39  TrajectoryContainer trajectories(const TrajectorySeed&, const TrackingRegion&) const;
40 
42  void trajectories(const TrajectorySeed&, TrajectoryContainer& ret, const TrackingRegion&) const;
43 
45  // also new interface returning the start Trajectory...
47  TrajectoryContainer& ret,
48  unsigned int& nCandPerSeed,
49  const TrajectoryFilter*) const override;
50 
57  void rebuildSeedingRegion(const TrajectorySeed&, TrajectoryContainer& result) const override;
58 
59  // same as above using the precomputed startingTraj..
60  void rebuildTrajectories(TempTrajectory const& startingTraj,
61  const TrajectorySeed&,
62  TrajectoryContainer& result) const override;
63 
64  // Access to lower level components
65  const TrajectoryStateUpdator& updator() const { return *theUpdator; }
67 
68  // PropagationDirection direction() const {return theDirection;}
69 
71  double chiSquareCut() { return theChiSquareCut; }
72 
74  int maxCand() { return theMaxCand; }
75 
77  float lostHitPenalty() { return theLostHitPenalty; }
78 
79  // /** Tells whether an intermediary cleaning stage should take place during TB. */
80  // bool intermediateCleaning() {return theIntermediateCleaning;}
81 
83  double ptCut() { return theptCut; }
84 
86  double mass() { return theMass; }
87 
88 protected:
89  void setEvent_(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
90 
91  virtual void analyseSeed(const TrajectorySeed& seed) const {}
92 
93  virtual void analyseMeasurements(const std::vector<TM>& meas, const Trajectory& traj) const {}
94  virtual void analyseResult(const TrajectoryContainer& result) const {}
95 
96 private:
97  // /// no copy constructor
98  // GroupedCkfTrajectoryBuilder (const GroupedCkfTrajectoryBuilder&) = default;
99  //
100  // /// no assignment operator
101  // GroupedCkfTrajectoryBuilder& operator= (const GroupedCkfTrajectoryBuilder&) dso_internal;
102 
103  inline bool tkxor(bool a, bool b) const dso_internal { return (a || b) && !(a && b); }
104  // to be ported later
105 
106  bool advanceOneLayer(const TrajectorySeed& seed,
107  TempTrajectory& traj,
108  const TrajectoryFilter* regionalCondition,
109  const Propagator* propagator,
110  bool inOut,
111  TempTrajectoryContainer& newCand,
112  TempTrajectoryContainer& result) const dso_internal;
113 
114  unsigned int groupedLimitedCandidates(const TrajectorySeed& seed,
115  TempTrajectory const& startingTraj,
116  const TrajectoryFilter* regionalCondition,
117  const Propagator* propagator,
118  bool inOut,
119  TempTrajectoryContainer& result) const dso_internal;
120 
123  TempTrajectory const& startingTraj,
124  TempTrajectoryContainer& result) const dso_internal;
125 
126  //** try to find additional hits in seeding region for a candidate
127  //* (returns number of trajectories added) *
129  const std::vector<const TrackingRecHit*>& seedHits,
130  TempTrajectory& candidate,
131  TempTrajectoryContainer& result) const dso_internal;
132 
133  // ** Backward fit of trajectory candidate except seed. Fit result is returned. invalid if fit failed
134  // * remaining hits are returned remainingHits.
135  TempTrajectory backwardFit(TempTrajectory& candidate,
136  unsigned int nSeed,
137  const TrajectoryFitter& fitter,
138  std::vector<const TrackingRecHit*>& remainingHits) const dso_internal;
139 
141  bool verifyHits(TempTrajectory::DataContainer::const_iterator rbegin,
142  size_t maxDepth,
143  const std::vector<const TrackingRecHit*>& hits) const dso_internal;
144 
146  void groupedIntermediaryClean(TempTrajectoryContainer& theTrajectories) const dso_internal;
147 
150  if (dir == alongMomentum)
151  return oppositeToMomentum;
152  if (dir == oppositeToMomentum)
153  return alongMomentum;
154  return dir;
155  }
156 
157 private:
159 
160  // typedef deque< const TrajectoryFilter*> StopCondContainer;
161  // StopCondContainer theStopConditions;
162 
165  double theptCut;
167  double theMass;
178 
179  bool theLockHits;
195 
197 
198  // mutable TempTrajectoryContainer work_; // Better here than alloc every time
200  work_MaxSize_ = 50
201  }; // if it grows above this number, it is forced to resize to half this amount when cleared
202 };
203 
204 #endif
tuple propagator
virtual void analyseMeasurements(const std::vector< TM > &meas, const Trajectory &traj) const
tuple ret
prodAgent to be discontinued
virtual void rebuildSeedingRegion(const TrajectorySeed &, TrajectoryContainer &result) const
~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
tuple result
Definition: mps_fire.py:311
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
virtual TrajectoryContainer trajectories(const TrajectorySeed &) const =0
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