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 MeasurementTracker* measurementTracker,
35  const TrajectoryFilter* filter,
36  const TrajectoryFilter* inOutFilter);
37 
40 
42  // virtual void setEvent(const edm::Event& event) const;
43 
46 
49 
52 
55 
57  // also new interface returning the start Trajectory...
60  const TrajectoryFilter*) const;
61 
62 
63 
71  TrajectoryContainer& result) const ;
72 
73  // same as above using the precomputed startingTraj..
74  void rebuildTrajectories(TempTrajectory const & startingTraj, const TrajectorySeed&,
75  TrajectoryContainer& result) const ;
76 
77 
78  // Access to lower level components
79  const TrajectoryStateUpdator& updator() const {return *theUpdator;}
81 
82  // PropagationDirection direction() const {return theDirection;}
83 
85  double chiSquareCut() {return theChiSquareCut;}
86 
88  int maxCand() {return theMaxCand;}
89 
90 
93 
94  // /** Tells whether an intermediary cleaning stage should take place during TB. */
95  // bool intermediateCleaning() {return theIntermediateCleaning;}
96 
98  double ptCut() {return theptCut;}
99 
101  double mass() {return theMass;}
102 
103 protected:
104 
105  virtual void analyseSeed(const TrajectorySeed& seed) const{}
106 
107  virtual void analyseMeasurements( const std::vector<TM>& meas,
108  const Trajectory& traj) const{}
109  virtual void analyseResult( const TrajectoryContainer& result) const {}
110 
111 private :
114 
117 
118 
119  inline bool tkxor(bool a, bool b) const dso_internal {return (a||b) && !(a&&b);}
120  // to be ported later
121 
122  bool advanceOneLayer( TempTrajectory& traj,
123  const TrajectoryFilter* regionalCondition,
124  const Propagator* propagator,
125  bool inOut,
126  TempTrajectoryContainer& newCand,
128 
129  void groupedLimitedCandidates( TempTrajectory const& startingTraj,
130  const TrajectoryFilter* regionalCondition,
131  const Propagator* propagator,
132  bool inOut,
134 
136  void rebuildSeedingRegion (const TrajectorySeed&seed,
137  TempTrajectory const& startingTraj,
139 
140  //** try to find additional hits in seeding region for a candidate
141  //* (returns number of trajectories added) *
142  int rebuildSeedingRegion (const TrajectorySeed&seed,
143  const std::vector<const TrackingRecHit*>& seedHits,
144  TempTrajectory& candidate,
146 
147  // ** Backward fit of trajectory candidate except seed. Fit result is returned. invalid if fit failed
148  // * remaining hits are returned remainingHits.
149  TempTrajectory backwardFit (TempTrajectory& candidate, unsigned int nSeed,
150  const TrajectoryFitter& fitter,
151  std::vector<const TrackingRecHit*>& remainingHits) const dso_internal;
152 
155  size_t maxDepth,
156  const std::vector<const TrackingRecHit*>& hits) const dso_internal;
157 
160 
161 
164  if ( dir==alongMomentum ) return oppositeToMomentum;
165  if ( dir==oppositeToMomentum ) return alongMomentum;
166  return dir;
167  }
168 
169 
170 private:
172 
173  // typedef deque< const TrajectoryFilter*> StopCondContainer;
174  // StopCondContainer theStopConditions;
175 
178  double theptCut;
180  double theMass;
191 
192  bool theLockHits;
208 
210 
211  mutable TempTrajectoryContainer work_; // Better here than alloc every time
212  enum work_MaxSize_Size_ { work_MaxSize_ = 50 }; // if it grows above this number, it is forced to resize to half this amount when cleared
213 };
214 
215 #endif
virtual void analyseMeasurements(const std::vector< TM > &meas, const Trajectory &traj) const
#define maxDepth
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
GroupedCkfTrajectoryBuilder(const edm::ParameterSet &conf, const TrajectoryStateUpdator *updator, const Propagator *propagatorAlong, const Propagator *propagatorOpposite, const Chi2MeasurementEstimatorBase *estimator, const TransientTrackingRecHitBuilder *RecHitBuilder, const MeasurementTracker *measurementTracker, const TrajectoryFilter *filter, const TrajectoryFilter *inOutFilter)
constructor from ParameterSet
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
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
string const
Definition: compareJSON.py:14
TempTrajectory backwardFit(TempTrajectory &candidate, unsigned int nSeed, const TrajectoryFitter &fitter, std::vector< const TrackingRecHit * > &remainingHits) const dso_internal
const TrajectoryStateUpdator & updator() const
double a
Definition: hdecay.h:121
dbl *** dir
Definition: mlp_gen.cc:35
std::vector< Trajectory > TrajectoryContainer
const Chi2MeasurementEstimatorBase * theEstimator