CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  bool hitsAreReverse,
73  const MagneticField *magField,
74  MaterialEffects materialEffects,
75  PropagationDirection propDir,
76  double mass,
77  bool useBeamSpot,
78  const reco::BeamSpot &beamSpot);
79  virtual ~ReferenceTrajectory() {}
80 
81  virtual ReferenceTrajectory* clone() const { return new ReferenceTrajectory(*this); }
82 
83 protected:
84 
85  ReferenceTrajectory(unsigned int nPar, unsigned int nHits, MaterialEffects materialEffects);
86 
89  virtual bool construct(const TrajectoryStateOnSurface &referenceTsos,
91  double mass, MaterialEffects materialEffects,
92  const PropagationDirection propDir, const MagneticField *magField,
93  bool useBeamSpot,
94  const reco::BeamSpot &beamSpot);
95 
98  MaterialEffectsUpdator* createUpdator(MaterialEffects materialEffects, double mass) const;
99 
102  virtual bool propagate(const Plane &previousSurface, const TrajectoryStateOnSurface &previousTsos,
103  const Plane &newSurface, TrajectoryStateOnSurface &newTsos, AlgebraicMatrix &newJacobian,
104  AlgebraicMatrix &newCurvlinJacobian, double &nextStep,
105  const PropagationDirection propDir, const MagneticField *magField) const;
106 
110  unsigned int iRow,
111  const TrajectoryStateOnSurface &updatedTsos);
112 
115  virtual void fillDerivatives(const AlgebraicMatrix &projection,
116  const AlgebraicMatrix &fullJacobian, unsigned int iRow);
117 
120  virtual void fillTrajectoryPositions(const AlgebraicMatrix &projection,
121  const AlgebraicVector &mixedLocalParams,
122  unsigned int iRow);
123 
126  virtual bool addMaterialEffectsCov(const std::vector<AlgebraicMatrix> &allJacobians,
127  const std::vector<AlgebraicMatrix> &allProjections,
128  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
129  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs);
130 
133  virtual bool addMaterialEffectsBp (const std::vector<AlgebraicMatrix> &allJacobians,
134  const std::vector<AlgebraicMatrix> &allProjections,
135  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
136  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
137  const std::vector<AlgebraicMatrix> &allLocalToCurv);
138 
141  virtual bool addMaterialEffectsBrl(const std::vector<AlgebraicMatrix> &allJacobians,
142  const std::vector<AlgebraicMatrix> &allProjections,
143  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
144  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
145  const std::vector<AlgebraicMatrix> &allLocalToCurv,
146  const GlobalTrajectoryParameters &gtp);
149  virtual bool addMaterialEffectsBrl(const std::vector<AlgebraicMatrix> &allProjections,
150  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
151  const std::vector<AlgebraicMatrix> &allLocalToCurv,
152  const std::vector<double> &allSteps,
153  const GlobalTrajectoryParameters &gtp,
154  const double minStep = 1.0);
155 
158  virtual bool addMaterialEffectsLocalGbl(const std::vector<AlgebraicMatrix> &allJacobians,
159  const std::vector<AlgebraicMatrix> &allProjections,
160  const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
161  const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs);
162 
165  virtual bool addMaterialEffectsCurvlinGbl(const std::vector<AlgebraicMatrix> &allJacobians,
166  const std::vector<AlgebraicMatrix> &allProjections,
167  const std::vector<AlgebraicSymMatrix> &allCurvChanges,
168  const std::vector<AlgebraicSymMatrix> &allDeltaParaCovs,
169  const std::vector<AlgebraicMatrix> &allLocalToCurv);
170 
174  {
175  return ( dir == alongMomentum ) ?
178  }
179 
184 
187  template <unsigned int N>
190 private:
191  void clhep2root(const AlgebraicVector& in, TVectorD& out);
192  void clhep2root(const AlgebraicMatrix& in, TMatrixD& out);
193  void clhep2root(const AlgebraicSymMatrix& in, TMatrixDSym& out);
194 };
195 
196 #endif
AlgebraicMatrix getHitProjectionMatrix(const TransientTrackingRecHit::ConstRecHitPointer &recHit) 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)
virtual bool construct(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, double mass, MaterialEffects materialEffects, const PropagationDirection propDir, const MagneticField *magField, bool useBeamSpot, const reco::BeamSpot &beamSpot)
virtual void fillMeasurementAndError(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr, unsigned int iRow, const TrajectoryStateOnSurface &updatedTsos)
const TransientTrackingRecHit::ConstRecHitContainer & recHits() const
virtual bool addMaterialEffectsLocalGbl(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvatureChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParameterCovs)
PropagationDirection
SurfaceSide surfaceSide(const PropagationDirection dir) const
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)
virtual ReferenceTrajectory * clone() const
Definition: Plane.h:17
virtual bool propagate(const Plane &previousSurface, const TrajectoryStateOnSurface &previousTsos, const Plane &newSurface, TrajectoryStateOnSurface &newTsos, AlgebraicMatrix &newJacobian, AlgebraicMatrix &newCurvlinJacobian, double &nextStep, const PropagationDirection propDir, const MagneticField *magField) const
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
ReferenceTrajectory(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, bool hitsAreReverse, const MagneticField *magField, MaterialEffects materialEffects, PropagationDirection propDir, double mass, bool useBeamSpot, const reco::BeamSpot &beamSpot)
MaterialEffectsUpdator * createUpdator(MaterialEffects materialEffects, double mass) const
virtual void fillDerivatives(const AlgebraicMatrix &projection, const AlgebraicMatrix &fullJacobian, unsigned int iRow)
std::vector< ConstRecHitPointer > ConstRecHitContainer
AlgebraicMatrix getHitProjectionMatrixT(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
CLHEP::HepVector AlgebraicVector
void clhep2root(const AlgebraicVector &in, TVectorD &out)
CLHEP::HepSymMatrix AlgebraicSymMatrix
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)
dbl *** dir
Definition: mlp_gen.cc:35