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 
43 
44 #include <TMatrixDSym.h>
45 #include <TMatrixD.h>
46 #include <TVectorD.h>
47 
49 class MagneticField;
51 class Plane;
53 
54 namespace reco { class BeamSpot; }
55 
57 {
58 
59 public:
60 
62 
70  ReferenceTrajectory(const TrajectoryStateOnSurface& referenceTsos,
72  const MagneticField* magField,
73  const reco::BeamSpot& beamSpot,
75 
76  virtual ~ReferenceTrajectory() {}
77 
78  virtual ReferenceTrajectory* clone() const { return new ReferenceTrajectory(*this); }
79 
80 protected:
81 
82  // ReferenceTrajectory(unsigned int nPar, unsigned int nHits, MaterialEffects materialEffects);
83  ReferenceTrajectory(unsigned int nPar, unsigned int nHits,
85 
88  virtual bool construct(const TrajectoryStateOnSurface &referenceTsos,
90  const MagneticField *magField,
91  const reco::BeamSpot &beamSpot);
92 
95  MaterialEffectsUpdator* createUpdator(MaterialEffects materialEffects, double mass) const;
96 
99  virtual bool propagate(const Plane &previousSurface, const TrajectoryStateOnSurface &previousTsos,
100  const Plane &newSurface, TrajectoryStateOnSurface &newTsos, AlgebraicMatrix &newJacobian,
101  AlgebraicMatrix &newCurvlinJacobian, double &nextStep,
102  const MagneticField *magField) const;
103 
106  virtual void fillMeasurementAndError(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr,
107  unsigned int iRow,
108  const TrajectoryStateOnSurface &updatedTsos);
109 
112  virtual void fillDerivatives(const AlgebraicMatrix &projection,
113  const AlgebraicMatrix &fullJacobian, unsigned int iRow);
114 
117  virtual void fillTrajectoryPositions(const AlgebraicMatrix &projection,
118  const AlgebraicVector &mixedLocalParams,
119  unsigned int iRow);
120 
123  virtual bool addMaterialEffectsCov(const std::vector<AlgebraicMatrix> &allJacobians,
124  const std::vector<AlgebraicMatrix> &allProjections,
125  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
126  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs);
127 
130  virtual bool addMaterialEffectsBp (const std::vector<AlgebraicMatrix> &allJacobians,
131  const std::vector<AlgebraicMatrix> &allProjections,
132  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
133  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
134  const std::vector<AlgebraicMatrix> &allLocalToCurv);
135 
138  virtual bool addMaterialEffectsBrl(const std::vector<AlgebraicMatrix> &allJacobians,
139  const std::vector<AlgebraicMatrix> &allProjections,
140  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
141  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
142  const std::vector<AlgebraicMatrix> &allLocalToCurv,
143  const GlobalTrajectoryParameters &gtp);
146  virtual bool addMaterialEffectsBrl(const std::vector<AlgebraicMatrix> &allProjections,
147  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
148  const std::vector<AlgebraicMatrix> &allLocalToCurv,
149  const std::vector<double> &allSteps,
150  const GlobalTrajectoryParameters &gtp,
151  const double minStep = 1.0);
152 
155  virtual bool addMaterialEffectsLocalGbl(const std::vector<AlgebraicMatrix> &allJacobians,
156  const std::vector<AlgebraicMatrix> &allProjections,
157  const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
158  const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs);
159 
162  virtual bool addMaterialEffectsCurvlinGbl(const std::vector<AlgebraicMatrix> &allJacobians,
163  const std::vector<AlgebraicMatrix> &allProjections,
164  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
165  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
166  const std::vector<AlgebraicMatrix> &allLocalToCurv);
167 
170  inline SurfaceSide surfaceSide(const PropagationDirection dir) const
171  {
172  return ( dir == alongMomentum ) ?
175  }
176 
180  getHitProjectionMatrix(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const;
181 
184  template <unsigned int N>
186  getHitProjectionMatrixT(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const;
187 private:
188  void clhep2root(const AlgebraicVector& in, TVectorD& out);
189  void clhep2root(const AlgebraicMatrix& in, TMatrixD& out);
190  void clhep2root(const AlgebraicSymMatrix& in, TMatrixDSym& 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