Go to the documentation of this file.00001 #ifndef Alignment_ReferenceTrajectories_TwoBodyDecayTrajectoryState_h
00002 #define Alignment_ReferenceTrajectories_TwoBodyDecayTrajectoryState_h
00003
00004 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00005 #include "Alignment/TwoBodyDecay/interface/TwoBodyDecay.h"
00006
00010 class GlobalTrajectoryParameters;
00011
00012
00013 class TwoBodyDecayTrajectoryState
00014 {
00015
00016 public:
00017
00018 typedef std::pair< TrajectoryStateOnSurface, TrajectoryStateOnSurface > TsosContainer;
00019 typedef std::pair< AlgebraicMatrix, AlgebraicMatrix > Derivatives;
00020
00024 TwoBodyDecayTrajectoryState( const TsosContainer & tsos,
00025 const TwoBodyDecay & tbd,
00026 double particleMass,
00027 const MagneticField* magField,
00028 bool propagateErrors = false );
00029
00033 TwoBodyDecayTrajectoryState( const TsosContainer & tsos,
00034 const TwoBodyDecayParameters & param,
00035 double particleMass,
00036 const MagneticField* magField,
00037 bool propagateErrors = false );
00038
00039 ~TwoBodyDecayTrajectoryState( void ) {}
00040
00041 inline bool isValid( void ) const { return theValidityFlag; }
00042
00043 inline double particleMass( void ) const { return theParticleMass; }
00044 inline const TwoBodyDecayParameters & decayParameters( void ) const { return theParameters; }
00045 inline const TsosContainer& trajectoryStates( bool useRefittedState = true ) const { return useRefittedState ? theRefittedTsos : theOriginalTsos; }
00046 inline const Derivatives& derivatives( void ) const { return theDerivatives; }
00047
00048 void rescaleError( double scale );
00049
00050 inline const double primaryMass( void ) const { return thePrimaryMass; }
00051 inline const double primaryWidth( void ) const { return thePrimaryWidth; }
00052
00053 private:
00054
00055 void construct( const MagneticField* magField,
00056 bool propagateErrors );
00057
00058 bool propagateSingleState( const FreeTrajectoryState & fts,
00059 const GlobalTrajectoryParameters & gtp,
00060 const AlgebraicMatrix & startDeriv,
00061 const Surface & surface,
00062 const MagneticField* magField,
00063 TrajectoryStateOnSurface & tsos,
00064 AlgebraicMatrix & endDeriv ) const;
00065
00066
00067 void setError( FreeTrajectoryState& fts,
00068 AlgebraicMatrix& derivative ) const;
00069
00070 bool theValidityFlag;
00071
00072 double theParticleMass;
00073
00074 TwoBodyDecayParameters theParameters;
00075 Derivatives theDerivatives;
00076 TsosContainer theOriginalTsos;
00077 TsosContainer theRefittedTsos;
00078
00079 double thePrimaryMass;
00080 double thePrimaryWidth;
00081
00082 static const unsigned int nLocalParam = 5;
00083 static const unsigned int nDecayParam = TwoBodyDecayParameters::dimension;
00084 };
00085
00086
00087 #endif