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 
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 
171  }
172 
176 
179  template <unsigned int N>
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
MaterialEffectsUpdator * createUpdator(MaterialEffects materialEffects, double mass) const
virtual bool addMaterialEffectsBrl(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs, const std::vector< AlgebraicMatrix > &allLocalToCurv, const GlobalTrajectoryParameters &gtp)
ReferenceTrajectory * clone() const override
AlgebraicMatrix getHitProjectionMatrixT(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
virtual void fillMeasurementAndError(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr, unsigned int iRow, const TrajectoryStateOnSurface &updatedTsos)
virtual bool addMaterialEffectsLocalGbl(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvatureChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParameterCovs)
Definition: config.py:1
PropagationDirection
void clhep2eigen(const AlgebraicVector &in, Eigen::MatrixBase< Derived > &out)
virtual bool addMaterialEffectsBp(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs, const std::vector< AlgebraicMatrix > &allLocalToCurv)
Definition: Plane.h:16
virtual bool construct(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot)
const PropagationDirection propDir_
virtual bool addMaterialEffectsCurvlinGbl(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs, const std::vector< AlgebraicMatrix > &allLocalToCurv)
SurfaceSideDefinition::SurfaceSide SurfaceSide
CLHEP::HepMatrix AlgebraicMatrix
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
AlgebraicMatrix getHitProjectionMatrix(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
ReferenceTrajectory(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot, const ReferenceTrajectoryBase::Config &config)
virtual void fillDerivatives(const AlgebraicMatrix &projection, const AlgebraicMatrix &fullJacobian, unsigned int iRow)
const MaterialEffects materialEffects_
std::vector< ConstRecHitPointer > ConstRecHitContainer
CLHEP::HepVector AlgebraicVector
SurfaceSide surfaceSide(const PropagationDirection dir) const
fixed size matrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual bool propagate(const Plane &previousSurface, const TrajectoryStateOnSurface &previousTsos, const Plane &newSurface, TrajectoryStateOnSurface &newTsos, AlgebraicMatrix &newJacobian, AlgebraicMatrix &newCurvlinJacobian, double &nextStep, const MagneticField *magField) const
virtual bool addMaterialEffectsCov(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs)
virtual void fillTrajectoryPositions(const AlgebraicMatrix &projection, const AlgebraicVector &mixedLocalParams, unsigned int iRow)
const TransientTrackingRecHit::ConstRecHitContainer & recHits() const
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits