CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BaseCkfTrajectoryBuilder.h
Go to the documentation of this file.
1 #ifndef RecoTracker_CkfPattern_BaseCkfTrajectoryBuilder_h
2 #define RecoTracker_CkfPattern_BaseCkfTrajectoryBuilder_h
3 
9 
10 #include<cassert>
12 
13 class CkfDebugger;
15 class DetGroup;
18 class LayerMeasurements;
19 class MeasurementTracker;
22 class NavigationSchool;
23 class Propagator;
26 class TrajectoryContainer;
28 class TrajectoryFitter;
30 class Trajectory;
31 class TempTrajectory;
32 class TrajectoryFilter;
33 class TrackingRegion;
35 class TrajectoryCleaner;
37 namespace edm {
38  class ConsumesCollector;
39 }
40 
43 
44 #include <string>
45 
54 protected:
55  // short names
59  typedef std::pair<TSOS,std::vector<const DetLayer*> > StateAndLayers;
60 
61 public:
62 
63  typedef std::vector<Trajectory> TrajectoryContainer;
64  typedef std::vector<TempTrajectory> TempTrajectoryContainer;
65  typedef TrajectoryContainer::iterator TrajectoryIterator;
66 
67  // Claims ownership of TrajectoryFilter pointers
70  TrajectoryFilter *inOutFilter=nullptr);
73  virtual ~BaseCkfTrajectoryBuilder();
74 
75  // new interface returning the start Trajectory...
78  const TrajectoryFilter*) const { assert(0==1); return TempTrajectory();}
79 
80 
81  virtual void rebuildTrajectories(TempTrajectory const& startingTraj, const TrajectorySeed& seed,
82  TrajectoryContainer& result) const { assert(0==1);}
83 
84 
86 
87  virtual void setEvent(const edm::Event& event) const ;
88  virtual void unset() const;
89 
90  void setEvent(const edm::Event& iEvent, const edm::EventSetup& iSetup, const MeasurementTrackerEvent *data);
91 
92  virtual void setDebugger( CkfDebugger * dbg) const {;}
93 
95  // int maxLostHit() {return theMaxLostHit;}
96 
98  // int maxConsecLostHit() {return theMaxConsecLostHit;}
99 
100 
102 
103  protected:
105 
106  virtual void setEvent_(const edm::Event& iEvent, const edm::EventSetup& iSetup) = 0;
107 
108  //methods for dubugging
109  virtual bool analyzeMeasurementsDebugger(Trajectory& traj, const std::vector<TrajectoryMeasurement>& meas,
111  const Propagator* theForwardPropagator,
113  const TransientTrackingRecHitBuilder * theTTRHBuilder) const {return true;}
114  virtual bool analyzeMeasurementsDebugger(TempTrajectory& traj, const std::vector<TrajectoryMeasurement>& meas,
116  const Propagator* theForwardPropagator,
118  const TransientTrackingRecHitBuilder * theTTRHBuilder) const {return true;}
119  virtual void fillSeedHistoDebugger(std::vector<TrajectoryMeasurement>::iterator begin,
120  std::vector<TrajectoryMeasurement>::iterator end) const {;}
121 
122  protected:
123 
125 
127  // If inOut is true, this is being called part-way through tracking, after the in-out tracking phase is complete.
128  // If inOut is false, it is called at the end of tracking.
129  bool toBeContinued( TempTrajectory& traj, bool inOut = false) const;
130 
132  bool qualityFilter( const TempTrajectory& traj, bool inOut = false) const;
133 
134  void addToResult(boost::shared_ptr<const TrajectorySeed> const & seed, TempTrajectory& traj, TrajectoryContainer& result, bool inOut = false) const;
135  void addToResult( TempTrajectory const& traj, TempTrajectoryContainer& result, bool inOut = false) const;
136  void moveToResult( TempTrajectory&& traj, TempTrajectoryContainer& result, bool inOut = false) const;
137 
140 
141  private:
143 
144  protected:
145  void setData(const MeasurementTrackerEvent *data) ;
146 
149  }
152  }
153 
154  protected:
156 
164 
165 
166  private:
167  // int theMaxLostHit; /**< Maximum number of lost hits per trajectory candidate.*/
168  // int theMaxConsecLostHit; /**< Maximum number of consecutive lost hits
169  // per trajectory candidate. */
170  // int theMinimumNumberOfHits; /**< Minimum number of hits for a trajectory to be returned.*/
171  // float theChargeSignificance; /**< Value to declare (q/p)/sig(q/p) significant. Negative: ignore. */
172 
173  // TrajectoryFilter* theMinPtCondition;
174  // TrajectoryFilter* theMaxHitsCondition;
175  std::unique_ptr<TrajectoryFilter> theFilter;
176  std::unique_ptr<TrajectoryFilter> theInOutFilter;
178  // for EventSetup
184 };
185 
186 
187 #endif
PropagationDirection direction() const
BaseCkfTrajectoryBuilder & operator=(const BaseCkfTrajectoryBuilder &)=delete
TrajectoryStateOnSurface TSOS
void setData(const MeasurementTrackerEvent *data)
virtual void setEvent(const edm::Event &event) const
const Propagator * forwardPropagator(const TrajectorySeed &seed) const
static TrajectoryFilter * createTrajectoryFilter(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
virtual bool analyzeMeasurementsDebugger(Trajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTrackerEvent *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
const TrajectoryStateUpdator * theUpdator
TrajectoryContainer::iterator TrajectoryIterator
bool qualityFilter(const TempTrajectory &traj, bool inOut=false) const
virtual void setEvent_(const edm::Event &iEvent, const edm::EventSetup &iSetup)=0
const TransientTrackingRecHitBuilder * hitBuilder() const
int iEvent
Definition: GenABIO.cc:230
void seedMeasurements(const TrajectorySeed &seed, TempTrajectory &result) const
virtual void rebuildTrajectories(TempTrajectory const &startingTraj, const TrajectorySeed &seed, TrajectoryContainer &result) const
const TransientTrackingRecHitBuilder * theTTRHBuilder
tuple result
Definition: query.py:137
virtual bool analyzeMeasurementsDebugger(TempTrajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTrackerEvent *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
std::unique_ptr< TrajectoryFilter > theInOutFilter
void addToResult(boost::shared_ptr< const TrajectorySeed > const &seed, TempTrajectory &traj, TrajectoryContainer &result, bool inOut=false) const
#define end
Definition: vmac.h:37
virtual TempTrajectory buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, const TrajectoryFilter *) const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
const std::string thePropagatorAlongName
BaseCkfTrajectoryBuilder(const edm::ParameterSet &conf, TrajectoryFilter *filter, TrajectoryFilter *inOutFilter=0)
tuple conf
Definition: dbtoconf.py:185
StateAndLayers findStateAndLayers(const TrajectorySeed &seed, const TempTrajectory &traj) const
const MeasurementTrackerEvent * theMeasurementTracker
std::vector< TempTrajectory > TempTrajectoryContainer
void setNavigationSchool(NavigationSchool const *nv)
const Propagator * thePropagatorOpposite
void moveToResult(TempTrajectory &&traj, TempTrajectoryContainer &result, bool inOut=false) const
#define begin
Definition: vmac.h:30
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
TrackingComponentsRecord Chi2MeasurementEstimatorRecord
bool toBeContinued(TempTrajectory &traj, bool inOut=false) const
std::pair< TSOS, std::vector< const DetLayer * > > StateAndLayers
const NavigationSchool * theNavigationSchool
const Propagator * backwardPropagator(const TrajectorySeed &seed) const
virtual void setDebugger(CkfDebugger *dbg) const
virtual void fillSeedHistoDebugger(std::vector< TrajectoryMeasurement >::iterator begin, std::vector< TrajectoryMeasurement >::iterator end) const
std::vector< Trajectory > TrajectoryContainer
const std::string thePropagatorOppositeName
const Chi2MeasurementEstimatorBase * theEstimator
std::unique_ptr< TrajectoryFilter > theFilter
TempTrajectory createStartingTrajectory(const TrajectorySeed &seed) const