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
ReferenceTrajectoryBase::recHits
const TransientTrackingRecHit::ConstRecHitContainer & recHits() const
Definition: ReferenceTrajectoryBase.h:215
BeamSpotTransientTrackingRecHit
Definition: BeamSpotTransientTrackingRecHit.h:27
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
ReferenceTrajectory::useBeamSpot_
const bool useBeamSpot_
Definition: ReferenceTrajectory.h:193
align::BeamSpot
Definition: StructureType.h:95
ReferenceTrajectoryBase
Definition: ReferenceTrajectoryBase.h:105
ReferenceTrajectory::clhep2eigen
void clhep2eigen(const AlgebraicVector &in, Eigen::MatrixBase< Derived > &out)
Definition: ReferenceTrajectory.cc:1132
SurfaceSideDefinition::SurfaceSide
SurfaceSide
Definition: SurfaceSideDefinition.h:8
ReferenceTrajectoryBase::Config
Definition: ReferenceTrajectoryBase.h:121
TransientTrackingRecHit.h
SurfaceSideDefinition::afterSurface
Definition: SurfaceSideDefinition.h:8
ReferenceTrajectory::ReferenceTrajectory
ReferenceTrajectory(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot, const ReferenceTrajectoryBase::Config &config)
Definition: ReferenceTrajectory.cc:52
MaterialEffects
Definition: MaterialEffects.h:51
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
ReferenceTrajectory::allowZeroMaterial_
const bool allowZeroMaterial_
Definition: ReferenceTrajectory.h:195
ReferenceTrajectory::materialEffects_
const MaterialEffects materialEffects_
Definition: ReferenceTrajectory.h:191
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
ReferenceTrajectoryBase.h
ReferenceTrajectory::propagate
virtual bool propagate(const Plane &previousSurface, const TrajectoryStateOnSurface &previousTsos, const Plane &newSurface, TrajectoryStateOnSurface &newTsos, AlgebraicMatrix &newJacobian, AlgebraicMatrix &newCurvlinJacobian, double &nextStep, const MagneticField *magField) const
Definition: ReferenceTrajectory.cc:375
ReferenceTrajectory::addMaterialEffectsCov
virtual bool addMaterialEffectsCov(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs)
Definition: ReferenceTrajectory.cc:492
HcalResponse_cfi.nPar
nPar
Definition: HcalResponse_cfi.py:33
config
Definition: config.py:1
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
nHits
const caConstants::TupleMultiplicity *__restrict__ const HitsOnGPU *__restrict__ double *__restrict__ float *__restrict__ double *__restrict__ uint32_t nHits
Definition: BrokenLineFitOnGPU.h:27
SurfaceSideDefinition::beforeSurface
Definition: SurfaceSideDefinition.h:8
reco::BeamSpot
Definition: BeamSpot.h:21
ReferenceTrajectory::~ReferenceTrajectory
~ReferenceTrajectory() override
Definition: ReferenceTrajectory.h:72
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
ReferenceTrajectory::surfaceSide
SurfaceSide surfaceSide(const PropagationDirection dir) const
Definition: ReferenceTrajectory.h:169
SurfaceSideDefinition.h
ReferenceTrajectory::createUpdator
MaterialEffectsUpdator * createUpdator(MaterialEffects materialEffects, double mass) const
Definition: ReferenceTrajectory.cc:350
ReferenceTrajectory::addMaterialEffectsLocalGbl
virtual bool addMaterialEffectsLocalGbl(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvatureChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParameterCovs)
Definition: ReferenceTrajectory.cc:952
TrackingRecHit::ConstRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: TrackingRecHit.h:32
ReferenceTrajectory::includeAPEs_
const bool includeAPEs_
Definition: ReferenceTrajectory.h:194
recoMuon::in
Definition: RecoMuonEnumerators.h:6
ReferenceTrajectory::clone
ReferenceTrajectory * clone() const override
Definition: ReferenceTrajectory.h:74
TrackingRecHit::ConstRecHitPointer
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
Definition: TrackingRecHit.h:25
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
ReferenceTrajectory::fillMeasurementAndError
virtual void fillMeasurementAndError(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr, unsigned int iRow, const TrajectoryStateOnSurface &updatedTsos)
Definition: ReferenceTrajectory.cc:428
ReferenceTrajectory::propDir_
const PropagationDirection propDir_
Definition: ReferenceTrajectory.h:192
ReferenceTrajectory::fillDerivatives
virtual void fillDerivatives(const AlgebraicMatrix &projection, const AlgebraicMatrix &fullJacobian, unsigned int iRow)
Definition: ReferenceTrajectory.cc:466
ReferenceTrajectory::construct
virtual bool construct(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot)
Definition: ReferenceTrajectory.cc:115
PropagationDirection.h
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
ReferenceTrajectory::addMaterialEffectsBrl
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)
Definition: ReferenceTrajectory.cc:620
ReferenceTrajectory
Definition: ReferenceTrajectory.h:55
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
ReferenceTrajectory::addMaterialEffectsBp
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: ReferenceTrajectory.cc:558
Plane
Definition: Plane.h:16
ReferenceTrajectory::getHitProjectionMatrixT
AlgebraicMatrix getHitProjectionMatrixT(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
Definition: ReferenceTrajectory.cc:1186
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
ReferenceTrajectory::getHitProjectionMatrix
AlgebraicMatrix getHitProjectionMatrix(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
Definition: ReferenceTrajectory.cc:1159
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
ReferenceTrajectory::addMaterialEffectsCurvlinGbl
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)
Definition: ReferenceTrajectory.cc:1033
ReferenceTrajectory::SurfaceSide
SurfaceSideDefinition::SurfaceSide SurfaceSide
Definition: ReferenceTrajectory.h:57
MagneticField
Definition: MagneticField.h:19
alongMomentum
Definition: PropagationDirection.h:4
ReferenceTrajectory::mass_
const double mass_
Definition: ReferenceTrajectory.h:190
MaterialEffectsUpdator
Definition: MaterialEffectsUpdator.h:56
ReferenceTrajectory::fillTrajectoryPositions
virtual void fillTrajectoryPositions(const AlgebraicMatrix &projection, const AlgebraicVector &mixedLocalParams, unsigned int iRow)
Definition: ReferenceTrajectory.cc:480
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23