CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ReferenceTrajectoryBase.h
Go to the documentation of this file.
1 #ifndef Alignment_ReferenceTrajectories_ReferenceTrajectoryBase_H
2 #define Alignment_ReferenceTrajectories_ReferenceTrajectoryBase_H
3 
92 
93 // for AlgebraicVector, -Matrix and -SymMatrix:
98 
99 #include <vector>
100 
101 #include <Eigen/Dense>
102 
103 #include "GblTrajectory.h"
104 
106 public:
108 
119  };
120 
121  struct Config {
123  PropagationDirection direction,
126  : materialEffects(matEff), propDir(direction), mass(m), momentumEstimate(est) {}
127 
130  double mass;
132  bool useBeamSpot{false};
133  bool hitsAreReverse{false};
134  bool useRefittedState{false};
136  bool includeAPEs{false};
137  bool allowZeroMaterial{false};
138  };
139 
141 
142  bool isValid() { return theValidityFlag; }
143 
146  const AlgebraicVector& measurements() const { return theMeasurements; }
147 
151 
156 
160 
164  const AlgebraicMatrix& derivatives() const { return theDerivatives; }
165 
172 
175  std::vector<std::pair<std::vector<gbl::GblPoint>, Eigen::MatrixXd> >& gblInput() { return theGblInput; }
176 
180 
184 
188 
191  const AlgebraicVector& parameters() const { return theParameters; }
192 
195  inline bool parameterErrorsAvailable() const { return theParamCovFlag; }
196 
201  theParamCovFlag = true;
202  }
203 
206  inline const AlgebraicSymMatrix& parameterErrors() const { return theParameterCov; }
207 
210  const std::vector<TrajectoryStateOnSurface>& trajectoryStates() const { return theTsosVec; }
211 
216 
217  inline unsigned int numberOfHits() const { return theNumberOfHits; }
218  inline unsigned int numberOfPar() const { return theNumberOfPars; }
219  inline unsigned int numberOfVirtualMeas() const { return theNumberOfVirtualMeas; }
220  inline unsigned int numberOfVirtualPar() const { return theNumberOfVirtualPars; }
221  inline unsigned int numberOfHitMeas() const { return theNumberOfHits * nMeasPerHit; }
222  inline int nominalField() const { return theNomField; }
223 
224  virtual ReferenceTrajectoryBase* clone() const = 0;
225 
226 protected:
227  explicit ReferenceTrajectoryBase(unsigned int nPar,
228  unsigned int nHits,
229  unsigned int nVirtualPar,
230  unsigned int nVirtualMeas);
231 
233  bool useRecHit(const TransientTrackingRecHit::ConstRecHitPointer& hitPtr) const;
234 
237 
238  unsigned int theNumberOfHits; // number of (measurements from) hits
239  unsigned int theNumberOfPars; // number of (track) parameters
240  unsigned int theNumberOfVirtualMeas; // number of virtual measurements
241  unsigned int theNumberOfVirtualPars; // number of parameters for virtual measurements
242 
243  std::vector<TrajectoryStateOnSurface> theTsosVec;
245 
248 
251 
254 
256 
257  // CHK for beamspot transformation trajectory parameter to curvilinear at refTSos
259  // CHK for TwoBodyD. transformation local to trajectory parameter at refTsos
261  // CHK GBL input: list of (list of points on trajectory and transformation at inner (first) point)
262  std::vector<std::pair<std::vector<gbl::GblPoint>, Eigen::MatrixXd> > theGblInput;
264  // CHK GBL TBD: virtual (mass) measurement
268 
269  static constexpr unsigned int nMeasPerHit{2};
270 };
271 
272 #endif // REFERENCE_TRAJECTORY_BASE_H
const Eigen::VectorXd & gblExtMeasurements() const
ReferenceCountingPointer< ReferenceTrajectoryBase > ReferenceTrajectoryPtr
AlgebraicMatrix theInnerTrajectoryToCurvilinear
unsigned int numberOfHits() const
virtual ReferenceTrajectoryBase * clone() const =0
AlgebraicMatrix theInnerLocalToTrajectory
ReferenceTrajectoryBase(unsigned int nPar, unsigned int nHits, unsigned int nVirtualPar, unsigned int nVirtualMeas)
void setParameterErrors(const AlgebraicSymMatrix &error)
const AlgebraicMatrix & trajectoryToCurv() const
unsigned int numberOfHitMeas() const
const TransientTrackingRecHit::ConstRecHitContainer & recHits() const
unsigned int numberOfVirtualPar() const
PropagationDirection
Config(MaterialEffects matEff, PropagationDirection direction, double m=-std::numeric_limits< double >::infinity(), double est=-std::numeric_limits< double >::infinity())
const AlgebraicSymMatrix & measurementErrors() const
const AlgebraicSymMatrix & trajectoryPositionErrors() const
AlgebraicSymMatrix theTrajectoryPositionCov
std::vector< std::pair< std::vector< gbl::GblPoint >, Eigen::MatrixXd > > theGblInput
const AlgebraicMatrix & derivatives() const
const AlgebraicSymMatrix & parameterErrors() const
CLHEP::HepMatrix AlgebraicMatrix
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
Eigen::VectorXd VectorXd
Definition: FitUtils.h:12
const double infinity
TransientTrackingRecHit::ConstRecHitContainer theRecHits
std::vector< ConstRecHitPointer > ConstRecHitContainer
const AlgebraicMatrix & localToTrajectory() const
AlgebraicSymMatrix theMeasurementsCov
unsigned int numberOfUsedRecHits(const TransientTrackingRecHit::ConstRecHitContainer &recHits) const
const AlgebraicVector & parameters() const
CLHEP::HepVector AlgebraicVector
unsigned int numberOfPar() const
static constexpr unsigned int nMeasPerHit
Eigen::MatrixXd MatrixXd
Definition: FitUtils.h:13
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ uint32_t const *__restrict__ gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell const int32_t nHits
AlgebraicSymMatrix theParameterCov
std::vector< std::pair< std::vector< gbl::GblPoint >, Eigen::MatrixXd > > & gblInput()
unsigned int numberOfVirtualMeas() const
const AlgebraicVector & measurements() const
CLHEP::HepSymMatrix AlgebraicSymMatrix
std::vector< TrajectoryStateOnSurface > theTsosVec
const AlgebraicVector & trajectoryPositions() const
bool useRecHit(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr) const
const Eigen::VectorXd & gblExtPrecisions() const
const Eigen::MatrixXd & gblExtDerivatives() const
const std::vector< TrajectoryStateOnSurface > & trajectoryStates() const