test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
102 
103 
105 {
106 
107 public:
108 
110 
113 
114  struct Config {
117  double est = -std::numeric_limits<double>::infinity()) :
118  materialEffects(matEff),
119  propDir(direction),
120  mass(m),
121  momentumEstimate(est)
122  {}
123 
126  double mass;
128  bool useBeamSpot{false};
129  bool hitsAreReverse{false};
130  bool useRefittedState{false};
132  bool includeAPEs{false};
133  };
134 
136 
137  bool isValid() { return theValidityFlag; }
138 
141  const AlgebraicVector& measurements() const { return theMeasurements; }
142 
146 
151 
155 
159  const AlgebraicMatrix& derivatives() const { return theDerivatives; }
160 
167 
170  std::vector<std::pair<std::vector<gbl::GblPoint>, TMatrixD> >& gblInput() { return theGblInput; }
171 
174  const TMatrixD& gblExtDerivatives() const { return theGblExtDerivatives; }
175 
178  const TVectorD& gblExtMeasurements() const { return theGblExtMeasurements; }
179 
182  const TVectorD& gblExtPrecisions() const { return theGblExtPrecisions; }
183 
184 
187  const AlgebraicVector& parameters() const { return theParameters; }
188 
191  inline bool parameterErrorsAvailable() const { return theParamCovFlag; }
192 
196 
199  inline const AlgebraicSymMatrix& parameterErrors() const { return theParameterCov; }
200 
203  const std::vector<TrajectoryStateOnSurface>& trajectoryStates() const { return theTsosVec; }
204 
209 
210  inline unsigned int numberOfHits() const { return theNumberOfHits; }
211  inline unsigned int numberOfPar() const { return theNumberOfPars; }
212  inline unsigned int numberOfVirtualMeas() const { return theNumberOfVirtualMeas; }
213  inline unsigned int numberOfVirtualPar() const { return theNumberOfVirtualPars; }
214  inline unsigned int numberOfHitMeas() const { return theNumberOfHits * nMeasPerHit; }
215  inline int nominalField() const { return theNomField; }
216 
217  virtual ReferenceTrajectoryBase* clone() const = 0;
218 
219 protected:
220 
221  explicit ReferenceTrajectoryBase(unsigned int nPar, unsigned int nHits,
222  unsigned int nVirtualPar, unsigned int nVirtualMeas);
223 
225  bool useRecHit(const TransientTrackingRecHit::ConstRecHitPointer& hitPtr) const;
226 
229 
230  unsigned int theNumberOfHits; // number of (measurements from) hits
231  unsigned int theNumberOfPars; // number of (track) parameters
232  unsigned int theNumberOfVirtualMeas; // number of virtual measurements
233  unsigned int theNumberOfVirtualPars; // number of parameters for virtual measurements
234 
235  std::vector<TrajectoryStateOnSurface> theTsosVec;
237 
240 
243 
246 
248 
249 // CHK for beamspot transformation trajectory parameter to curvilinear at refTSos
251 // CHK for TwoBodyD. transformation local to trajectory parameter at refTsos
253 // CHK GBL input: list of (list of points on trajectory and transformation at inner (first) point)
254  std::vector<std::pair<std::vector<gbl::GblPoint>, TMatrixD> > theGblInput;
256 // CHK GBL TBD: virtual (mass) measurement
260 
261  static const unsigned int nMeasPerHit = 2;
262 };
263 
264 #endif // REFERENCE_TRAJECTORY_BASE_H
265 
ReferenceCountingPointer< ReferenceTrajectoryBase > ReferenceTrajectoryPtr
AlgebraicMatrix theInnerTrajectoryToCurvilinear
unsigned int numberOfHits() const
virtual ReferenceTrajectoryBase * clone() const =0
std::vector< std::pair< std::vector< gbl::GblPoint >, TMatrixD > > & gblInput()
AlgebraicMatrix theInnerLocalToTrajectory
static const unsigned int nMeasPerHit
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
const TVectorD & gblExtPrecisions() 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
const AlgebraicMatrix & derivatives() const
const AlgebraicSymMatrix & parameterErrors() const
CLHEP::HepMatrix AlgebraicMatrix
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
const double infinity
TransientTrackingRecHit::ConstRecHitContainer theRecHits
std::vector< std::pair< std::vector< gbl::GblPoint >, TMatrixD > > theGblInput
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
const TMatrixD & gblExtDerivatives() const
AlgebraicSymMatrix theParameterCov
unsigned int numberOfVirtualMeas() const
const AlgebraicVector & measurements() const
CLHEP::HepSymMatrix AlgebraicSymMatrix
std::vector< TrajectoryStateOnSurface > theTsosVec
const AlgebraicVector & trajectoryPositions() const
const TVectorD & gblExtMeasurements() const
bool useRecHit(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr) const
const std::vector< TrajectoryStateOnSurface > & trajectoryStates() const