CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
15 
17 
18 
25 
26  public:
30  const Propagator* propagatorAlong,
31  const Propagator* propagatorOpposite,
33  const TransientTrackingRecHitBuilder* RecHitBuilder,
34  const TrajectoryFilter* filter,
35  const TrajectoryFilter* inOutFilter);
36 
38 
41 
43  // virtual void setEvent(const edm::Event& event) const;
44 
47 
50 
53 
56 
58  // also new interface returning the start Trajectory...
61  const TrajectoryFilter*) const;
62 
63 
64 
72  TrajectoryContainer& result) const ;
73 
74  // same as above using the precomputed startingTraj..
75  void rebuildTrajectories(TempTrajectory const & startingTraj, const TrajectorySeed&,
76  TrajectoryContainer& result) const ;
77 
78 
79  // Access to lower level components
80  const TrajectoryStateUpdator& updator() const {return *theUpdator;}
82 
83  // PropagationDirection direction() const {return theDirection;}
84 
86  double chiSquareCut() {return theChiSquareCut;}
87 
89  int maxCand() {return theMaxCand;}
90 
91 
94 
95  // /** Tells whether an intermediary cleaning stage should take place during TB. */
96  // bool intermediateCleaning() {return theIntermediateCleaning;}
97 
99  double ptCut() {return theptCut;}
100 
102  double mass() {return theMass;}
103 
104 protected:
105 
106  virtual void analyseSeed(const TrajectorySeed& seed) const{}
107 
108  virtual void analyseMeasurements( const std::vector<TM>& meas,
109  const Trajectory& traj) const{}
110  virtual void analyseResult( const TrajectoryContainer& result) const {}
111 
112 private :
113 // /// no copy constructor
114 // GroupedCkfTrajectoryBuilder (const GroupedCkfTrajectoryBuilder&) = default;
115 //
116 // /// no assignment operator
117 // GroupedCkfTrajectoryBuilder& operator= (const GroupedCkfTrajectoryBuilder&) dso_internal;
118 
119 
120  inline bool tkxor(bool a, bool b) const dso_internal {return (a||b) && !(a&&b);}
121  // to be ported later
122 
123  bool advanceOneLayer( TempTrajectory& traj,
124  const TrajectoryFilter* regionalCondition,
125  const Propagator* propagator,
126  bool inOut,
127  TempTrajectoryContainer& newCand,
129 
130  void groupedLimitedCandidates( TempTrajectory const& startingTraj,
131  const TrajectoryFilter* regionalCondition,
132  const Propagator* propagator,
133  bool inOut,
135 
137  void rebuildSeedingRegion (const TrajectorySeed&seed,
138  TempTrajectory const& startingTraj,
140 
141  //** try to find additional hits in seeding region for a candidate
142  //* (returns number of trajectories added) *
143  int rebuildSeedingRegion (const TrajectorySeed&seed,
144  const std::vector<const TrackingRecHit*>& seedHits,
145  TempTrajectory& candidate,
147 
148  // ** Backward fit of trajectory candidate except seed. Fit result is returned. invalid if fit failed
149  // * remaining hits are returned remainingHits.
150  TempTrajectory backwardFit (TempTrajectory& candidate, unsigned int nSeed,
151  const TrajectoryFitter& fitter,
152  std::vector<const TrackingRecHit*>& remainingHits) const dso_internal;
153 
156  size_t maxDepth,
157  const std::vector<const TrackingRecHit*>& hits) const dso_internal;
158 
161 
162 
165  if ( dir==alongMomentum ) return oppositeToMomentum;
166  if ( dir==oppositeToMomentum ) return alongMomentum;
167  return dir;
168  }
169 
170 
171 private:
173 
174  // typedef deque< const TrajectoryFilter*> StopCondContainer;
175  // StopCondContainer theStopConditions;
176 
179  double theptCut;
181  double theMass;
192 
193  bool theLockHits;
209 
211 
212  mutable TempTrajectoryContainer work_; // Better here than alloc every time
213  enum work_MaxSize_Size_ { work_MaxSize_ = 50 }; // if it grows above this number, it is forced to resize to half this amount when cleared
214 };
215 
216 #endif
GroupedCkfTrajectoryBuilder(const edm::ParameterSet &conf, const TrajectoryStateUpdator *updator, const Propagator *propagatorAlong, const Propagator *propagatorOpposite, const Chi2MeasurementEstimatorBase *estimator, const TransientTrackingRecHitBuilder *RecHitBuilder, const TrajectoryFilter *filter, const TrajectoryFilter *inOutFilter)
constructor from ParameterSet
virtual void analyseMeasurements(const std::vector< TM > &meas, const Trajectory &traj) const
void groupedIntermediaryClean(TempTrajectoryContainer &theTrajectories) const dso_internal
intermediate cleaning in the case of grouped measurements
TrajectoryContainer trajectories(const TrajectorySeed &) const
set Event for the internal MeasurementTracker data member
TempTrajectory buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, const TrajectoryFilter *) const
common part of both public trajectory building methods
bool advanceOneLayer(TempTrajectory &traj, const TrajectoryFilter *regionalCondition, const Propagator *propagator, bool inOut, TempTrajectoryContainer &newCand, TempTrajectoryContainer &result) const dso_internal
const TrajectoryStateUpdator * theUpdator
virtual void analyseSeed(const TrajectorySeed &seed) const
double mass()
Mass hypothesis used for propagation.
PropagationDirection
bool tkxor(bool a, bool b) const dso_internal
virtual GroupedCkfTrajectoryBuilder * clone(const MeasurementTrackerEvent *data) const
bool verifyHits(TempTrajectory::DataContainer::const_iterator rbegin, size_t maxDepth, const std::vector< const TrackingRecHit * > &hits) const dso_internal
Verifies presence of a RecHits in a range of TrajectoryMeasurements.
void rebuildTrajectories(TempTrajectory const &startingTraj, const TrajectorySeed &, TrajectoryContainer &result) const
virtual void analyseResult(const TrajectoryContainer &result) const
void groupedLimitedCandidates(TempTrajectory const &startingTraj, const TrajectoryFilter *regionalCondition, const Propagator *propagator, bool inOut, TempTrajectoryContainer &result) const dso_internal
static PropagationDirection oppositeDirection(PropagationDirection dir)
change of propagation direction
tuple result
Definition: query.py:137
const Chi2MeasurementEstimatorBase & estimator() const
#define dso_internal
Definition: Visibility.h:13
void rebuildSeedingRegion(const TrajectorySeed &, TrajectoryContainer &result) const
tuple conf
Definition: dbtoconf.py:185
virtual ~GroupedCkfTrajectoryBuilder()
destructor
std::vector< TempTrajectory > TempTrajectoryContainer
double b
Definition: hdecay.h:120
TempTrajectory backwardFit(TempTrajectory &candidate, unsigned int nSeed, const TrajectoryFitter &fitter, std::vector< const TrackingRecHit * > &remainingHits) const dso_internal
const TrajectoryStateUpdator & updator() const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
double a
Definition: hdecay.h:121
dbl *** dir
Definition: mlp_gen.cc:35
std::vector< Trajectory > TrajectoryContainer
const Chi2MeasurementEstimatorBase * theEstimator