CMS 3D CMS Logo

ReferenceTrajectory.h
Go to the documentation of this file.
1 #ifndef Alignment_ReferenceTrajectories_ReferenceTrajectory_H
2 #define Alignment_ReferenceTrajectories_ReferenceTrajectory_H
3 
42 
44 
46 class MagneticField;
48 class Plane;
50 
51 namespace reco { class BeamSpot; }
52 
54 {
55 
56 public:
57 
59 
67  ReferenceTrajectory(const TrajectoryStateOnSurface& referenceTsos,
69  const MagneticField* magField,
70  const reco::BeamSpot& beamSpot,
72 
73  virtual ~ReferenceTrajectory() {}
74 
75  virtual ReferenceTrajectory* clone() const { return new ReferenceTrajectory(*this); }
76 
77 protected:
78 
79  // ReferenceTrajectory(unsigned int nPar, unsigned int nHits, MaterialEffects materialEffects);
80  ReferenceTrajectory(unsigned int nPar, unsigned int nHits,
82 
85  virtual bool construct(const TrajectoryStateOnSurface &referenceTsos,
87  const MagneticField *magField,
88  const reco::BeamSpot &beamSpot);
89 
92  MaterialEffectsUpdator* createUpdator(MaterialEffects materialEffects, double mass) const;
93 
96  virtual bool propagate(const Plane &previousSurface, const TrajectoryStateOnSurface &previousTsos,
97  const Plane &newSurface, TrajectoryStateOnSurface &newTsos, AlgebraicMatrix &newJacobian,
98  AlgebraicMatrix &newCurvlinJacobian, double &nextStep,
99  const MagneticField *magField) const;
100 
103  virtual void fillMeasurementAndError(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr,
104  unsigned int iRow,
105  const TrajectoryStateOnSurface &updatedTsos);
106 
109  virtual void fillDerivatives(const AlgebraicMatrix &projection,
110  const AlgebraicMatrix &fullJacobian, unsigned int iRow);
111 
114  virtual void fillTrajectoryPositions(const AlgebraicMatrix &projection,
115  const AlgebraicVector &mixedLocalParams,
116  unsigned int iRow);
117 
120  virtual bool addMaterialEffectsCov(const std::vector<AlgebraicMatrix> &allJacobians,
121  const std::vector<AlgebraicMatrix> &allProjections,
122  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
123  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs);
124 
127  virtual bool addMaterialEffectsBp (const std::vector<AlgebraicMatrix> &allJacobians,
128  const std::vector<AlgebraicMatrix> &allProjections,
129  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
130  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
131  const std::vector<AlgebraicMatrix> &allLocalToCurv);
132 
135  virtual bool addMaterialEffectsBrl(const std::vector<AlgebraicMatrix> &allJacobians,
136  const std::vector<AlgebraicMatrix> &allProjections,
137  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
138  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
139  const std::vector<AlgebraicMatrix> &allLocalToCurv,
140  const GlobalTrajectoryParameters &gtp);
143  virtual bool addMaterialEffectsBrl(const std::vector<AlgebraicMatrix> &allProjections,
144  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
145  const std::vector<AlgebraicMatrix> &allLocalToCurv,
146  const std::vector<double> &allSteps,
147  const GlobalTrajectoryParameters &gtp,
148  const double minStep = 1.0);
149 
152  virtual bool addMaterialEffectsLocalGbl(const std::vector<AlgebraicMatrix> &allJacobians,
153  const std::vector<AlgebraicMatrix> &allProjections,
154  const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
155  const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs);
156 
159  virtual bool addMaterialEffectsCurvlinGbl(const std::vector<AlgebraicMatrix> &allJacobians,
160  const std::vector<AlgebraicMatrix> &allProjections,
161  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
162  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
163  const std::vector<AlgebraicMatrix> &allLocalToCurv);
164 
167  inline SurfaceSide surfaceSide(const PropagationDirection dir) const
168  {
169  return ( dir == alongMomentum ) ?
172  }
173 
177  getHitProjectionMatrix(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const;
178 
181  template <unsigned int N>
183  getHitProjectionMatrixT(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const;
184 private:
185  template <typename Derived>
186  void clhep2eigen(const AlgebraicVector& in, Eigen::MatrixBase<Derived>& out);
187  template <typename Derived>
188  void clhep2eigen(const AlgebraicMatrix& in, Eigen::MatrixBase<Derived>& out);
189  template <typename Derived>
190  void clhep2eigen(const AlgebraicSymMatrix& in, Eigen::MatrixBase<Derived>& out);
191 
192  const double mass_;
195  const bool useBeamSpot_;
196  const bool includeAPEs_;
197  const bool allowZeroMaterial_;
198 };
199 
200 #endif
Definition: config.py:1
PropagationDirection
SurfaceSide surfaceSide(const PropagationDirection dir) const
virtual ReferenceTrajectory * clone() const
Definition: Plane.h:17
const PropagationDirection propDir_
SurfaceSideDefinition::SurfaceSide SurfaceSide
CLHEP::HepMatrix AlgebraicMatrix
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
const MaterialEffects materialEffects_
std::vector< ConstRecHitPointer > ConstRecHitContainer
CLHEP::HepVector AlgebraicVector
fixed size matrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
dbl *** dir
Definition: mlp_gen.cc:35