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 
43 #include "GblTrajectory.h"
44 
46 class MagneticField;
48 class Plane;
50 
51 namespace reco {
52  class BeamSpot;
53 }
54 
56 public:
58 
66  ReferenceTrajectory(const TrajectoryStateOnSurface &referenceTsos,
68  const MagneticField *magField,
69  const reco::BeamSpot &beamSpot,
71 
72  ~ReferenceTrajectory() override {}
73 
74  ReferenceTrajectory *clone() const override { return new ReferenceTrajectory(*this); }
75 
76 protected:
77  // ReferenceTrajectory(unsigned int nPar, unsigned int nHits, MaterialEffects materialEffects);
78  ReferenceTrajectory(unsigned int nPar, unsigned int nHits, const ReferenceTrajectoryBase::Config &config);
79 
82  virtual bool construct(const TrajectoryStateOnSurface &referenceTsos,
84  const MagneticField *magField,
85  const reco::BeamSpot &beamSpot);
86 
89  MaterialEffectsUpdator *createUpdator(MaterialEffects materialEffects, double mass) const;
90 
93  virtual bool propagate(const Plane &previousSurface,
94  const TrajectoryStateOnSurface &previousTsos,
95  const Plane &newSurface,
96  TrajectoryStateOnSurface &newTsos,
97  AlgebraicMatrix &newJacobian,
98  AlgebraicMatrix &newCurvlinJacobian,
99  double &nextStep,
100  const MagneticField *magField) const;
101 
104  virtual void fillMeasurementAndError(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr,
105  unsigned int iRow,
106  const TrajectoryStateOnSurface &updatedTsos);
107 
110  virtual void fillDerivatives(const AlgebraicMatrix &projection,
111  const AlgebraicMatrix &fullJacobian,
112  unsigned int iRow);
113 
116  virtual void fillTrajectoryPositions(const AlgebraicMatrix &projection,
117  const AlgebraicVector &mixedLocalParams,
118  unsigned int iRow);
119 
122  virtual bool addMaterialEffectsCov(const std::vector<AlgebraicMatrix> &allJacobians,
123  const std::vector<AlgebraicMatrix> &allProjections,
124  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
125  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs);
126 
129  virtual bool addMaterialEffectsBp(const std::vector<AlgebraicMatrix> &allJacobians,
130  const std::vector<AlgebraicMatrix> &allProjections,
131  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
132  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
133  const std::vector<AlgebraicMatrix> &allLocalToCurv);
134 
137  virtual bool addMaterialEffectsBrl(const std::vector<AlgebraicMatrix> &allJacobians,
138  const std::vector<AlgebraicMatrix> &allProjections,
139  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
140  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
141  const std::vector<AlgebraicMatrix> &allLocalToCurv,
142  const GlobalTrajectoryParameters &gtp);
145  virtual bool addMaterialEffectsBrl(const std::vector<AlgebraicMatrix> &allProjections,
146  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
147  const std::vector<AlgebraicMatrix> &allLocalToCurv,
148  const std::vector<double> &allSteps,
149  const GlobalTrajectoryParameters &gtp,
150  const double minStep = 1.0);
151 
154  virtual bool addMaterialEffectsLocalGbl(const std::vector<AlgebraicMatrix> &allJacobians,
155  const std::vector<AlgebraicMatrix> &allProjections,
156  const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
157  const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs);
158 
161  virtual bool addMaterialEffectsCurvlinGbl(const std::vector<AlgebraicMatrix> &allJacobians,
162  const std::vector<AlgebraicMatrix> &allProjections,
163  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
164  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
165  const std::vector<AlgebraicMatrix> &allLocalToCurv);
166 
169  inline SurfaceSide surfaceSide(const PropagationDirection dir) const {
171  }
172 
175  AlgebraicMatrix getHitProjectionMatrix(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const;
176 
179  template <unsigned int N>
180  AlgebraicMatrix getHitProjectionMatrixT(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const;
181 
182 private:
183  template <typename Derived>
184  void clhep2eigen(const AlgebraicVector &in, Eigen::MatrixBase<Derived> &out);
185  template <typename Derived>
186  void clhep2eigen(const AlgebraicMatrix &in, Eigen::MatrixBase<Derived> &out);
187  template <typename Derived>
188  void clhep2eigen(const AlgebraicSymMatrix &in, Eigen::MatrixBase<Derived> &out);
189 
190  const double mass_;
193  const bool useBeamSpot_;
194  const bool includeAPEs_;
195  const bool allowZeroMaterial_;
196 };
197 
198 #endif
Definition: config.py:1
PropagationDirection
SurfaceSide surfaceSide(const PropagationDirection dir) 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
ReferenceTrajectory * clone() const override
CLHEP::HepVector AlgebraicVector
fixed size matrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
dbl *** dir
Definition: mlp_gen.cc:35