CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DualKalmanTrajectory.h
Go to the documentation of this file.
1 #ifndef Alignment_ReferenceTrajectories_DualKalmanTrajectory_H
2 #define Alignment_ReferenceTrajectories_DualKalmanTrajectory_H
3 
22 
23 
28 
29 #include <vector>
30 
32 namespace reco { class BeamSpot;}
33 
35 {
36 
37 public:
38 
39  DualKalmanTrajectory(const Trajectory::DataContainer &trajMeasurements,
40  const TrajectoryStateOnSurface &referenceTsos,
41  const std::vector<unsigned int> &forwardRecHitNums,
42  const std::vector<unsigned int> &backwardRecHitNums,
43  const MagneticField *magField,
44  MaterialEffects materialEffects,
45  PropagationDirection propDir,
46  double mass,
47  bool useBeamSpot,
48  const reco::BeamSpot &beamSpot,
49  int residualMethod);
50 
51  virtual ~DualKalmanTrajectory() {}
52 
53  virtual DualKalmanTrajectory* clone() const { return new DualKalmanTrajectory(*this); }
54 
55 protected:
56 
57  DualKalmanTrajectory( unsigned int nPar = 0, unsigned int nHits = 0 );
58 
60  virtual bool construct(const Trajectory::DataContainer &trajMeasurements,
61  const TrajectoryStateOnSurface &referenceTsos,
62  const std::vector<unsigned int> &forwardRecHitNums,
63  const std::vector<unsigned int> &backwardRecHitNums,
64  double mass, MaterialEffects materialEffects,
65  const PropagationDirection propDir, const MagneticField *magField,
66  bool useBeamSpot, const reco::BeamSpot &beamSpot,
67  int residualMethod);
68 
70  virtual ReferenceTrajectory* construct(const Trajectory::DataContainer &trajMeasurements,
71  const TrajectoryStateOnSurface &referenceTsos,
72  const std::vector<unsigned int> &recHits,
73  double mass, MaterialEffects materialEffects,
74  const PropagationDirection propDir,
75  const MagneticField *magField,
76  bool useBeamSpot,
77  const reco::BeamSpot &beamSpot) const;
79  bool fillKalmanPart(const Trajectory::DataContainer &trajMeasurements,
80  const std::vector<unsigned int> &recHitNums, bool startFirst,
81  unsigned int iNextHit, int residualMethod);
85  unsigned int iHit, const TrajectoryMeasurement &trajMeasurement);
90  unsigned int iHit, const TrajectoryMeasurement &trajMeasurement,
91  bool doPull);
92 
94  void fillTrajectoryPositions(const AlgebraicMatrix &projection,
95  const TrajectoryStateOnSurface &tsos, unsigned int iHit);
96 
99 
100  virtual AlgebraicVector extractParameters(const TrajectoryStateOnSurface &referenceTsos) const;
101 
102  inline const PropagationDirection oppositeDirection( const PropagationDirection propDir ) const
103  { return ((propDir == anyDirection) ? anyDirection
104  : ((propDir == alongMomentum) ? oppositeToMomentum : alongMomentum));
105  }
106 
107 };
108 
109 #endif
const PropagationDirection oppositeDirection(const PropagationDirection propDir) const
void fillTrajectoryPositions(const AlgebraicMatrix &projection, const TrajectoryStateOnSurface &tsos, unsigned int iHit)
fill trajectoryPositions
TrajectoryStateOnSurface fillMeasurementAndError1(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr, unsigned int iHit, const TrajectoryMeasurement &trajMeasurement)
helper for &#39;unbiased residual&#39; method (i.e. returns merged fwd/bwd states)
bool fillKalmanPart(const Trajectory::DataContainer &trajMeasurements, const std::vector< unsigned int > &recHitNums, bool startFirst, unsigned int iNextHit, int residualMethod)
Fill that part of data members that is different from DualReferenceTrajectory.
virtual AlgebraicVector extractParameters(const TrajectoryStateOnSurface &referenceTsos) const
const TransientTrackingRecHit::ConstRecHitContainer & recHits() const
PropagationDirection
TrajectoryStateOnSurface fillMeasurementAndError2(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr, unsigned int iHit, const TrajectoryMeasurement &trajMeasurement, bool doPull)
std::vector< TrajectoryMeasurement > DataContainer
Definition: Trajectory.h:42
CLHEP::HepMatrix AlgebraicMatrix
virtual DualKalmanTrajectory * clone() const
LocalError hitErrorWithAPE(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr) const
local error including APE if APE is on
CLHEP::HepVector AlgebraicVector
virtual bool construct(const Trajectory::DataContainer &trajMeasurements, const TrajectoryStateOnSurface &referenceTsos, const std::vector< unsigned int > &forwardRecHitNums, const std::vector< unsigned int > &backwardRecHitNums, double mass, MaterialEffects materialEffects, const PropagationDirection propDir, const MagneticField *magField, bool useBeamSpot, const reco::BeamSpot &beamSpot, int residualMethod)
calculate members
DualKalmanTrajectory(const Trajectory::DataContainer &trajMeasurements, const TrajectoryStateOnSurface &referenceTsos, const std::vector< unsigned int > &forwardRecHitNums, const std::vector< unsigned int > &backwardRecHitNums, const MagneticField *magField, MaterialEffects materialEffects, PropagationDirection propDir, double mass, bool useBeamSpot, const reco::BeamSpot &beamSpot, int residualMethod)