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  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 
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 
171  {
172  return ( dir == alongMomentum ) ?
175  }
176 
181 
184  template <unsigned int N>
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 };
198 
199 #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 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 propagate(const Plane &previousSurface, const TrajectoryStateOnSurface &previousTsos, const Plane &newSurface, TrajectoryStateOnSurface &newTsos, AlgebraicMatrix &newJacobian, AlgebraicMatrix &newCurvlinJacobian, double &nextStep, const MagneticField *magField) 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 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
MaterialEffectsUpdator * createUpdator(MaterialEffects materialEffects, double mass) 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
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