CMS 3D CMS Logo

TwoBodyDecayModel Class Reference

/class TwoBodyDecayModel More...

#include <Alignment/TwoBodyDecay/interface/TwoBodyDecayModel.h>

List of all members.

Public Member Functions

const std::pair
< AlgebraicVector,
AlgebraicVector
cartesianSecondaryMomenta (const TwoBodyDecayParameters &tbdparam)
 Momenta of the secondaries in cartesian repraesentation.
const std::pair
< AlgebraicVector,
AlgebraicVector
cartesianSecondaryMomenta (const TwoBodyDecay &tbd)
 Momenta of the secondaries in cartesian repraesentation.
const std::pair
< AlgebraicVector,
AlgebraicVector
cartesianSecondaryMomenta (const AlgebraicVector &param)
 Momenta of the secondaries in cartesian repraesentation.
AlgebraicVector convertCurvilinearToCartesian (AlgebraicVector curv, double zMagField)
 Convert vector from curvilinear to cartesian coordinates (needs the z-component of magnetic field in inverse GeV as input).
AlgebraicMatrix curvilinearToCartesianJacobian (AlgebraicVector curv, double zMagField)
 Jacobian for transformation from curvilinear to cartesian representation (needs the z-component of magnetic field in inverse GeV as input).
AlgebraicMatrix curvilinearToCartesianJacobian (double rho, double theta, double phi, double zMagField)
 Jacobian for transformation from curvilinear to cartesian representation (needs the z-component of magnetic field in inverse GeV as input).
AlgebraicMatrix rotationMatrix (double px, double py, double pz)
 Rotates a vector pointing in z-direction into the direction defined by p=(px,py,pz).
 TwoBodyDecayModel (double mPrimary=91.1876, double mSecondary=0.105658)
 ~TwoBodyDecayModel ()

Private Attributes

double thePrimaryMass
double theSecondaryMass


Detailed Description

/class TwoBodyDecayModel

This class provides useful methods needed for the two-body decay model used by implementations of e.g. class TwoBodyDecayEstimator or TwoBodyDecayLinearizationPointFinder.

/author Edmund Widl

Definition at line 16 of file TwoBodyDecayModel.h.


Constructor & Destructor Documentation

TwoBodyDecayModel::TwoBodyDecayModel ( double  mPrimary = 91.1876,
double  mSecondary = 0.105658 
)

Definition at line 5 of file TwoBodyDecayModel.cc.

00005                                                                          :
00006   thePrimaryMass( mPrimary ), theSecondaryMass( mSecondary ) {}

TwoBodyDecayModel::~TwoBodyDecayModel (  ) 

Definition at line 9 of file TwoBodyDecayModel.cc.

00009 {}


Member Function Documentation

const std::pair< AlgebraicVector, AlgebraicVector > TwoBodyDecayModel::cartesianSecondaryMomenta ( const TwoBodyDecayParameters tbdparam  ) 

Momenta of the secondaries in cartesian repraesentation.

Definition at line 135 of file TwoBodyDecayModel.cc.

References cartesianSecondaryMomenta(), and TwoBodyDecayParameters::parameters().

00136 {
00137   return cartesianSecondaryMomenta( tbdparam.parameters() );
00138 }

const std::pair< AlgebraicVector, AlgebraicVector > TwoBodyDecayModel::cartesianSecondaryMomenta ( const TwoBodyDecay tbd  ) 

Momenta of the secondaries in cartesian repraesentation.

Definition at line 130 of file TwoBodyDecayModel.cc.

References cartesianSecondaryMomenta(), and TwoBodyDecay::parameters().

00131 {
00132   return cartesianSecondaryMomenta( tbd.parameters() );
00133 }

const std::pair< AlgebraicVector, AlgebraicVector > TwoBodyDecayModel::cartesianSecondaryMomenta ( const AlgebraicVector param  ) 

Momenta of the secondaries in cartesian repraesentation.

Definition at line 88 of file TwoBodyDecayModel.cc.

References c1, c2, c3, c4, funct::cos(), p, p2, phi, TwoBodyDecayParameters::phi, TwoBodyDecayParameters::px, TwoBodyDecayParameters::py, TwoBodyDecayParameters::pz, rotationMatrix(), funct::sin(), funct::sqrt(), thePrimaryMass, theSecondaryMass, TwoBodyDecayParameters::theta, and theta.

Referenced by cartesianSecondaryMomenta(), and TwoBodyDecayTrajectoryState::construct().

00089 {
00090   double px = param[TwoBodyDecayParameters::px];
00091   double py = param[TwoBodyDecayParameters::py];
00092   double pz = param[TwoBodyDecayParameters::pz];
00093   double theta = param[TwoBodyDecayParameters::theta];
00094   double phi = param[TwoBodyDecayParameters::phi];
00095 
00096   // compute transverse and absolute momentum
00097   double pT2 = px*px + py*py;
00098   double p2 = pT2 + pz*pz;
00099   double p = sqrt( p2 );
00100 
00101   double sphi = sin( phi );
00102   double cphi = cos( phi );
00103   double stheta = sin( theta );
00104   double ctheta = cos( theta );
00105 
00106   // some constants from kinematics
00107   double c1 = 0.5*thePrimaryMass/theSecondaryMass;
00108   double c2 = sqrt( c1*c1 - 1. );
00109   double c3 = 0.5*c2*ctheta/c1;
00110   double c4 = sqrt( p2 + thePrimaryMass*thePrimaryMass );
00111 
00112   // momentum of decay particle 1 in the primary's boosted frame
00113   AlgebraicMatrix pplus( 3, 1 );
00114   pplus[0][0] = theSecondaryMass*c2*stheta*cphi;
00115   pplus[1][0] = theSecondaryMass*c2*stheta*sphi;
00116   pplus[2][0] = 0.5*p + c3*c4;
00117 
00118   // momentum of decay particle 2 in the primary's boosted frame
00119   AlgebraicMatrix pminus( 3, 1 );
00120   pminus[0][0] = -pplus[0][0];
00121   pminus[1][0] = -pplus[1][0];
00122   pminus[2][0] = 0.5*p - c3*c4;
00123 
00124   AlgebraicMatrix rotMat = rotationMatrix( px, py, pz );
00125 
00126   return std::make_pair( rotMat*pplus, rotMat*pminus );
00127 }

AlgebraicVector TwoBodyDecayModel::convertCurvilinearToCartesian ( AlgebraicVector  curv,
double  zMagField 
)

Convert vector from curvilinear to cartesian coordinates (needs the z-component of magnetic field in inverse GeV as input).

Definition at line 75 of file TwoBodyDecayModel.cc.

References funct::cos(), funct::sin(), and funct::tan().

00076 {
00077   double rt = fabs( zMagField/curv[0] );
00078 
00079   AlgebraicVector cart( 3 );
00080   cart[0] = rt*cos( curv[2] );
00081   cart[1] = rt*sin( curv[2] );
00082   cart[2] = rt/tan( curv[1] );
00083 
00084   return cart;
00085 }

AlgebraicMatrix TwoBodyDecayModel::curvilinearToCartesianJacobian ( AlgebraicVector  curv,
double  zMagField 
)

Jacobian for transformation from curvilinear to cartesian representation (needs the z-component of magnetic field in inverse GeV as input).

Definition at line 69 of file TwoBodyDecayModel.cc.

References curvilinearToCartesianJacobian().

00070 {
00071   return this->curvilinearToCartesianJacobian( curv[0], curv[1], curv[2], zMagField );
00072 }

AlgebraicMatrix TwoBodyDecayModel::curvilinearToCartesianJacobian ( double  rho,
double  theta,
double  phi,
double  zMagField 
)

Jacobian for transformation from curvilinear to cartesian representation (needs the z-component of magnetic field in inverse GeV as input).

Definition at line 39 of file TwoBodyDecayModel.cc.

References conv, funct::cos(), and funct::sin().

Referenced by curvilinearToCartesianJacobian().

00040 {
00041   double q = ( ( rho < 0 ) ? -1. : 1. );
00042   double conv = q*zMagField;
00043 
00044   double stheta = sin( theta );
00045   double ctheta = cos( theta );
00046   double sphi = sin( phi );
00047   double cphi = cos( phi );
00048 
00049   AlgebraicMatrix curv2cart( 3, 3 );
00050 
00051   curv2cart[0][0] = -rho*cphi;
00052   curv2cart[0][1] = -rho*sphi;
00053   curv2cart[0][2] = 0.;
00054 
00055   curv2cart[1][0] = cphi*stheta*ctheta;
00056   curv2cart[1][1] = sphi*stheta*ctheta;
00057   curv2cart[1][2] = -stheta*stheta;
00058 
00059   curv2cart[2][0] = -sphi;
00060   curv2cart[2][1] = cphi;
00061   curv2cart[2][2] = 0.;
00062 
00063   curv2cart *= rho/conv;
00064 
00065   return curv2cart;
00066 }

AlgebraicMatrix TwoBodyDecayModel::rotationMatrix ( double  px,
double  py,
double  pz 
)

Rotates a vector pointing in z-direction into the direction defined by p=(px,py,pz).

Definition at line 12 of file TwoBodyDecayModel.cc.

References p, p2, and funct::sqrt().

Referenced by cartesianSecondaryMomenta(), TwoBodyDecayDerivatives::dqsdm(), TwoBodyDecayDerivatives::dqsdphi(), TwoBodyDecayDerivatives::dqsdtheta(), and TwoBodyDecayLinearizationPointFinder::getLinearizationPoint().

00013 {
00014   // compute transverse and absolute momentum
00015   double pT2 = px*px + py*py;
00016   double p2 = pT2 + pz*pz;
00017   double pT = sqrt( pT2 );
00018   double p = sqrt( p2 );
00019 
00020   AlgebraicMatrix rotMat( 3, 3 );
00021 
00022   // compute rotation matrix
00023   rotMat[0][0] = px*pz/pT/p;
00024   rotMat[0][1] = -py/pT;
00025   rotMat[0][2] = px/p;
00026 
00027   rotMat[1][0] = py*pz/pT/p;
00028   rotMat[1][1] = px/pT;
00029   rotMat[1][2] = py/p;
00030 
00031   rotMat[2][0] = -pT/p;
00032   rotMat[2][1] = 0.;
00033   rotMat[2][2] = pz/p;
00034 
00035   return rotMat;
00036 }


Member Data Documentation

double TwoBodyDecayModel::thePrimaryMass [private]

Definition at line 56 of file TwoBodyDecayModel.h.

Referenced by cartesianSecondaryMomenta().

double TwoBodyDecayModel::theSecondaryMass [private]

Definition at line 57 of file TwoBodyDecayModel.h.

Referenced by cartesianSecondaryMomenta().


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