CMS 3D CMS Logo

TwoBodyDecayTrajectoryState Class Reference

#include <Alignment/ReferenceTrajectories/interface/TwoBodyDecayTrajectoryState.h>

List of all members.

Public Types

typedef std::pair
< AlgebraicMatrix,
AlgebraicMatrix
Derivatives
typedef std::pair
< TrajectoryStateOnSurface,
TrajectoryStateOnSurface
TsosContainer

Public Member Functions

const TwoBodyDecayParametersdecayParameters (void) const
const Derivativesderivatives (void) const
bool isValid (void) const
double particleMass (void) const
const TsosContainertrajectoryStates (bool useRefittedState=true) const
 TwoBodyDecayTrajectoryState (const TsosContainer &tsos, const TwoBodyDecayParameters &param, double particleMass, const MagneticField *magField)
 The constructor takes the two trajectory states that are to be updated (typically the innermost trajectory states of two tracks) and the decay parameters.
 TwoBodyDecayTrajectoryState (const TsosContainer &tsos, const TwoBodyDecay &tbd, double particleMass, const MagneticField *magField)
 The constructor takes the two trajectory states that are to be updated (typically the innermost trajectory states of two tracks) and the decay parameters.
 ~TwoBodyDecayTrajectoryState (void)

Private Member Functions

void construct (const MagneticField *magField)
bool propagateSingleState (const GlobalTrajectoryParameters &gtp, const AlgebraicMatrix &startDeriv, const Surface &surface, const MagneticField *magField, TrajectoryStateOnSurface &tsos, AlgebraicMatrix &endDeriv)

Private Attributes

Derivatives theDerivatives
TsosContainer theOriginalTsos
TwoBodyDecayParameters theParameters
double theParticleMass
TsosContainer theRefittedTsos
bool theValidityFlag

Static Private Attributes

static const unsigned int nDecayParam = TwoBodyDecayParameters::dimension
static const unsigned int nLocalParam = 5


Detailed Description

Definition at line 13 of file TwoBodyDecayTrajectoryState.h.


Member Typedef Documentation

typedef std::pair< AlgebraicMatrix, AlgebraicMatrix > TwoBodyDecayTrajectoryState::Derivatives

Definition at line 19 of file TwoBodyDecayTrajectoryState.h.

typedef std::pair< TrajectoryStateOnSurface, TrajectoryStateOnSurface > TwoBodyDecayTrajectoryState::TsosContainer

Definition at line 18 of file TwoBodyDecayTrajectoryState.h.


Constructor & Destructor Documentation

TwoBodyDecayTrajectoryState::TwoBodyDecayTrajectoryState ( const TsosContainer tsos,
const TwoBodyDecay tbd,
double  particleMass,
const MagneticField magField 
)

The constructor takes the two trajectory states that are to be updated (typically the innermost trajectory states of two tracks) and the decay parameters.

Definition at line 21 of file TwoBodyDecayTrajectoryState.cc.

References construct().

00025   : theValidityFlag( false ),
00026     theParticleMass( particleMass ),
00027     theParameters( tbd.decayParameters() ),
00028     theDerivatives( AlgebraicMatrix( nLocalParam, nDecayParam ), AlgebraicMatrix( nLocalParam, nDecayParam ) ),
00029     theOriginalTsos( tsos )
00030 {
00031   construct( magField );
00032 }

TwoBodyDecayTrajectoryState::TwoBodyDecayTrajectoryState ( const TsosContainer tsos,
const TwoBodyDecayParameters param,
double  particleMass,
const MagneticField magField 
)

The constructor takes the two trajectory states that are to be updated (typically the innermost trajectory states of two tracks) and the decay parameters.

Definition at line 35 of file TwoBodyDecayTrajectoryState.cc.

References construct().

00039   : theValidityFlag( false ),
00040     theParticleMass( particleMass ),
00041     theParameters( param ),
00042     theDerivatives( AlgebraicMatrix( 5, 9 ), AlgebraicMatrix( 5, 9 ) ),
00043     theOriginalTsos( tsos )
00044 {
00045   construct( magField );
00046 }

TwoBodyDecayTrajectoryState::~TwoBodyDecayTrajectoryState ( void   )  [inline]

Definition at line 37 of file TwoBodyDecayTrajectoryState.h.

00037 {}


Member Function Documentation

void TwoBodyDecayTrajectoryState::construct ( const MagneticField magField  )  [private]

Definition at line 49 of file TwoBodyDecayTrajectoryState.cc.

References TwoBodyDecayModel::cartesianSecondaryMomenta(), derivatives(), TwoBodyDecayParameters::mass, p1, p2, propagateSingleState(), theDerivatives, theOriginalTsos, theParameters, theParticleMass, theRefittedTsos, theValidityFlag, TwoBodyDecayParameters::x, TwoBodyDecayParameters::y, and TwoBodyDecayParameters::z.

Referenced by TwoBodyDecayTrajectoryState().

00050 {
00051   // construct global trajectory parameters at the starting point
00052   TwoBodyDecayModel tbdDecayModel( theParameters[TwoBodyDecayParameters::mass], theParticleMass );
00053   pair< AlgebraicVector, AlgebraicVector > secondaryMomenta = tbdDecayModel.cartesianSecondaryMomenta( theParameters );
00054 
00055   GlobalPoint vtx( theParameters[TwoBodyDecayParameters::x],
00056                    theParameters[TwoBodyDecayParameters::y],
00057                    theParameters[TwoBodyDecayParameters::z] );
00058 
00059   GlobalVector p1( secondaryMomenta.first[0],
00060                    secondaryMomenta.first[1],
00061                    secondaryMomenta.first[2] );
00062 
00063   GlobalVector p2( secondaryMomenta.second[0],
00064                    secondaryMomenta.second[1],
00065                    secondaryMomenta.second[2] );
00066 
00067   GlobalTrajectoryParameters gtp1( vtx, p1, theOriginalTsos.first.charge(), magField );
00068   GlobalTrajectoryParameters gtp2( vtx, p2, theOriginalTsos.second.charge(), magField );
00069 
00070   // contruct derivatives at the starting point
00071   TwoBodyDecayDerivatives tbdDerivatives( theParameters[TwoBodyDecayParameters::mass], theParticleMass );
00072   pair< AlgebraicMatrix, AlgebraicMatrix > derivatives = tbdDerivatives.derivatives( theParameters );
00073 
00074   AlgebraicMatrix deriv1( 6, 9, 0 );
00075   deriv1.sub( 1, 1, AlgebraicMatrix( 3, 3, 1 ) );
00076   deriv1.sub( 4, 4, derivatives.first );
00077 
00078   AlgebraicMatrix deriv2( 6, 9, 0 );
00079   deriv2.sub( 1, 1, AlgebraicMatrix( 3, 3, 1 ) );
00080   deriv2.sub( 4, 4, derivatives.second );
00081 
00082   // propgate states and derivatives from the starting points to the end points
00083   bool valid1 = propagateSingleState( gtp1, deriv1, theOriginalTsos.first.surface(), magField,
00084                                       theRefittedTsos.first, theDerivatives.first );
00085 
00086   bool valid2 = propagateSingleState( gtp2, deriv2, theOriginalTsos.second.surface(), magField,
00087                                       theRefittedTsos.second, theDerivatives.second );
00088 
00089   theValidityFlag = valid1 && valid2;
00090 
00091   return;
00092 }

const TwoBodyDecayParameters& TwoBodyDecayTrajectoryState::decayParameters ( void   )  const [inline]

Definition at line 42 of file TwoBodyDecayTrajectoryState.h.

References theParameters.

Referenced by TwoBodyDecayTrajectory::construct().

00042 { return theParameters; }

const Derivatives& TwoBodyDecayTrajectoryState::derivatives ( void   )  const [inline]

Definition at line 44 of file TwoBodyDecayTrajectoryState.h.

References theDerivatives.

Referenced by construct(), and TwoBodyDecayTrajectory::construct().

00044 { return theDerivatives; }

bool TwoBodyDecayTrajectoryState::isValid ( void   )  const [inline]

Definition at line 39 of file TwoBodyDecayTrajectoryState.h.

References theValidityFlag.

00039 { return theValidityFlag; }

double TwoBodyDecayTrajectoryState::particleMass ( void   )  const [inline]

Definition at line 41 of file TwoBodyDecayTrajectoryState.h.

References theParticleMass.

Referenced by TwoBodyDecayTrajectory::construct().

00041 { return theParticleMass; }

bool TwoBodyDecayTrajectoryState::propagateSingleState ( const GlobalTrajectoryParameters gtp,
const AlgebraicMatrix startDeriv,
const Surface surface,
const MagneticField magField,
TrajectoryStateOnSurface tsos,
AlgebraicMatrix endDeriv 
) [private]

Definition at line 95 of file TwoBodyDecayTrajectoryState.cc.

References asHepMatrix(), JacobianCartesianToCurvilinear::jacobian(), and AnalyticalPropagator::propagateWithPath().

Referenced by construct().

00101 {
00102   AnalyticalPropagator propagator( magField );
00103 
00104   // propagate state
00105   pair< TrajectoryStateOnSurface, double > tsosWithPath = propagator.propagateWithPath( FreeTrajectoryState( gtp ), surface );
00106 
00107   // check if propagation was successful
00108   if ( !tsosWithPath.first.isValid() ) return false;
00109 
00110   // jacobian for transformation from cartesian to curvilinear frame at the starting point
00111   JacobianCartesianToCurvilinear cartToCurv( gtp );
00112   const AlgebraicMatrix56& matCartToCurv = cartToCurv.jacobian();
00113 
00114   // jacobian in curvilinear frame for propagation from the starting point to the end point
00115   AnalyticalCurvilinearJacobian curvJac( gtp, tsosWithPath.first.globalPosition(),
00116                                          tsosWithPath.first.globalMomentum(),
00117                                          tsosWithPath.second );
00118   const AlgebraicMatrix55& matCurvJac = curvJac.jacobian();
00119 
00120   // jacobian for transformation from curvilinear to local frame at the end point
00121   JacobianCurvilinearToLocal curvToLoc( surface, tsosWithPath.first.localParameters(), *magField );
00122   const AlgebraicMatrix55& matCurvToLoc = curvToLoc.jacobian();
00123 
00124   AlgebraicMatrix56 tmpDeriv = matCurvToLoc*matCurvJac*matCartToCurv;
00125   AlgebraicMatrix hepMatDeriv( asHepMatrix( tmpDeriv ) );
00126   //AlgebraicMatrix hepMatDeriv = asHepMatrix< 5, 6 >( tmpDeriv );
00127 
00128   // replace original state with new state
00129   tsos = tsosWithPath.first;
00130 
00131   // propagate derivative matrix
00132   endDeriv = hepMatDeriv*startDeriv;
00133 
00134   return true;
00135 }

const TsosContainer& TwoBodyDecayTrajectoryState::trajectoryStates ( bool  useRefittedState = true  )  const [inline]

Definition at line 43 of file TwoBodyDecayTrajectoryState.h.

References theOriginalTsos, and theRefittedTsos.

Referenced by TwoBodyDecayTrajectory::construct().

00043 { return useRefittedState ? theRefittedTsos : theOriginalTsos; }


Member Data Documentation

const unsigned int TwoBodyDecayTrajectoryState::nDecayParam = TwoBodyDecayParameters::dimension [static, private]

Definition at line 68 of file TwoBodyDecayTrajectoryState.h.

const unsigned int TwoBodyDecayTrajectoryState::nLocalParam = 5 [static, private]

Definition at line 67 of file TwoBodyDecayTrajectoryState.h.

Derivatives TwoBodyDecayTrajectoryState::theDerivatives [private]

Definition at line 62 of file TwoBodyDecayTrajectoryState.h.

Referenced by construct(), and derivatives().

TsosContainer TwoBodyDecayTrajectoryState::theOriginalTsos [private]

Definition at line 63 of file TwoBodyDecayTrajectoryState.h.

Referenced by construct(), and trajectoryStates().

TwoBodyDecayParameters TwoBodyDecayTrajectoryState::theParameters [private]

Definition at line 61 of file TwoBodyDecayTrajectoryState.h.

Referenced by construct(), and decayParameters().

double TwoBodyDecayTrajectoryState::theParticleMass [private]

Definition at line 59 of file TwoBodyDecayTrajectoryState.h.

Referenced by construct(), and particleMass().

TsosContainer TwoBodyDecayTrajectoryState::theRefittedTsos [private]

Definition at line 64 of file TwoBodyDecayTrajectoryState.h.

Referenced by construct(), and trajectoryStates().

bool TwoBodyDecayTrajectoryState::theValidityFlag [private]

Definition at line 57 of file TwoBodyDecayTrajectoryState.h.

Referenced by construct(), and isValid().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:34:47 2009 for CMSSW by  doxygen 1.5.4