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 
91 
92 // for AlgebraicVector, -Matrix and -SymMatrix:
97 
98 #include <vector>
99 
101 
102 using namespace gbl;
103 
105 {
106 
107 public:
108 
110 
111  enum MaterialEffects { none, multipleScattering, energyLoss, combined,
112  breakPoints, brokenLinesCoarse, brokenLinesFine, localGBL, curvlinGBL };
113 
115 
116  bool isValid() { return theValidityFlag; }
117 
120  const AlgebraicVector& measurements() const { return theMeasurements; }
121 
124  const AlgebraicSymMatrix& measurementErrors() const { return theMeasurementsCov; }
125 
129  const AlgebraicVector& trajectoryPositions() const { return theTrajectoryPositions; }
130 
133  const AlgebraicSymMatrix& trajectoryPositionErrors() const { return theTrajectoryPositionCov; }
134 
138  const AlgebraicMatrix& derivatives() const { return theDerivatives; }
139 
142  const AlgebraicMatrix& trajectoryToCurv() const { return theInnerTrajectoryToCurvilinear; }
145  const AlgebraicMatrix& localToTrajectory() const { return theInnerLocalToTrajectory; }
146 
149  std::vector<std::pair<std::vector<GblPoint>, TMatrixD> >& gblInput() { return theGblInput; }
150 
153  const TMatrixD& gblExtDerivatives() const { return theGblExtDerivatives; }
154 
157  const TVectorD& gblExtMeasurements() const { return theGblExtMeasurements; }
158 
161  const TVectorD& gblExtPrecisions() const { return theGblExtPrecisions; }
162 
163 
166  const AlgebraicVector& parameters() const { return theParameters; }
167 
170  inline bool parameterErrorsAvailable() const { return theParamCovFlag; }
171 
174  inline void setParameterErrors( const AlgebraicSymMatrix& error ) { theParameterCov = error; theParamCovFlag = true; }
175 
178  inline const AlgebraicSymMatrix& parameterErrors() const { return theParameterCov; }
179 
182  const std::vector<TrajectoryStateOnSurface>& trajectoryStates() const { return theTsosVec; }
183 
187  const TransientTrackingRecHit::ConstRecHitContainer& recHits() const { return theRecHits; }
188 
189  inline unsigned int numberOfHits() const { return theNumberOfHits; }
190  inline unsigned int numberOfPar() const { return theNumberOfPars; }
191  inline unsigned int numberOfVirtualMeas() const { return theNumberOfVirtualMeas; }
192  inline unsigned int numberOfVirtualPar() const { return theNumberOfVirtualPars; }
193  inline unsigned int numberOfHitMeas() const { return theNumberOfHits * nMeasPerHit; }
194  inline int nominalField() const { return theNomField; }
195 
196  virtual ReferenceTrajectoryBase* clone() const = 0;
197 
198 protected:
199 
200  explicit ReferenceTrajectoryBase(unsigned int nPar, unsigned int nHits,
201  unsigned int nVirtualPar, unsigned int nVirtualMeas);
202 
203  unsigned int numberOfUsedRecHits(const TransientTrackingRecHit::ConstRecHitContainer &recHits) const;
204  bool useRecHit(const TransientTrackingRecHit::ConstRecHitPointer& hitPtr) const;
205 
208 
209  unsigned int theNumberOfHits; // number of (measurements from) hits
210  unsigned int theNumberOfPars; // number of (track) parameters
211  unsigned int theNumberOfVirtualMeas; // number of virtual measurements
212  unsigned int theNumberOfVirtualPars; // number of parameters for virtual measurements
213 
214  std::vector<TrajectoryStateOnSurface> theTsosVec;
216 
219 
222 
225 
227 
228 // CHK for beamspot transformation trajectory parameter to curvilinear at refTSos
230 // CHK for TwoBodyD. transformation local to trajectory parameter at refTsos
232 // CHK GBL input: list of (list of points on trajectory and transformation at inner (first) point)
233  std::vector<std::pair<std::vector<GblPoint>, TMatrixD> > theGblInput;
235 // CHK GBL TBD: virtual (mass) measurement
239 
240  static const unsigned int nMeasPerHit = 2;
241 };
242 
243 #endif // REFERENCE_TRAJECTORY_BASE_H
244 
ReferenceCountingPointer< ReferenceTrajectoryBase > ReferenceTrajectoryPtr
AlgebraicMatrix theInnerTrajectoryToCurvilinear
unsigned int numberOfHits() const
AlgebraicMatrix theInnerLocalToTrajectory
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
std::vector< std::pair< std::vector< GblPoint >, TMatrixD > > theGblInput
std::vector< std::pair< std::vector< GblPoint >, TMatrixD > > & gblInput()
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
TransientTrackingRecHit::ConstRecHitContainer theRecHits
std::vector< ConstRecHitPointer > ConstRecHitContainer
const AlgebraicMatrix & localToTrajectory() const
AlgebraicSymMatrix theMeasurementsCov
const AlgebraicVector & parameters() const
CLHEP::HepVector AlgebraicVector
unsigned int numberOfPar() const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
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
const std::vector< TrajectoryStateOnSurface > & trajectoryStates() const