#include <TwoBodyDecayModel.h>
Public Member Functions | |
const std::pair < AlgebraicVector, AlgebraicVector > | cartesianSecondaryMomenta (const AlgebraicVector ¶m) |
const std::pair < AlgebraicVector, AlgebraicVector > | cartesianSecondaryMomenta (const TwoBodyDecay &tbd) |
const std::pair < AlgebraicVector, AlgebraicVector > | cartesianSecondaryMomenta (const TwoBodyDecayParameters &tbdparam) |
AlgebraicVector | convertCurvilinearToCartesian (AlgebraicVector curv, double zMagField) |
AlgebraicMatrix | curvilinearToCartesianJacobian (AlgebraicVector curv, double zMagField) |
AlgebraicMatrix | curvilinearToCartesianJacobian (double rho, double theta, double phi, double zMagField) |
AlgebraicMatrix | rotationMatrix (double px, double py, double pz) |
TwoBodyDecayModel (double mPrimary=91.1876, double mSecondary=0.105658) | |
~TwoBodyDecayModel () | |
Private Attributes | |
double | thePrimaryMass |
double | theSecondaryMass |
/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.
TwoBodyDecayModel::TwoBodyDecayModel | ( | double | mPrimary = 91.1876 , |
double | mSecondary = 0.105658 |
||
) |
Definition at line 5 of file TwoBodyDecayModel.cc.
: thePrimaryMass( mPrimary ), theSecondaryMass( mSecondary ) {}
TwoBodyDecayModel::~TwoBodyDecayModel | ( | ) |
Definition at line 9 of file TwoBodyDecayModel.cc.
{}
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 alignmentValidation::c1, funct::cos(), L1TEmulatorMonitor_cff::p, p2, phi, TwoBodyDecayParameters::px, TwoBodyDecayParameters::py, TwoBodyDecayParameters::pz, rotationMatrix(), funct::sin(), mathSSE::sqrt(), thePrimaryMass, theSecondaryMass, and theta().
Referenced by cartesianSecondaryMomenta(), TwoBodyDecayTrajectoryState::construct(), and TwoBodyDecayEstimator::constructMatrices().
{ double px = param[TwoBodyDecayParameters::px]; double py = param[TwoBodyDecayParameters::py]; double pz = param[TwoBodyDecayParameters::pz]; double theta = param[TwoBodyDecayParameters::theta]; double phi = param[TwoBodyDecayParameters::phi]; // compute transverse and absolute momentum double pT2 = px*px + py*py; double p2 = pT2 + pz*pz; double p = sqrt( p2 ); double sphi = sin( phi ); double cphi = cos( phi ); double stheta = sin( theta ); double ctheta = cos( theta ); // some constants from kinematics double c1 = 0.5*thePrimaryMass/theSecondaryMass; double c2 = sqrt( c1*c1 - 1. ); double c3 = 0.5*c2*ctheta/c1; double c4 = sqrt( p2 + thePrimaryMass*thePrimaryMass ); // momentum of decay particle 1 in the primary's boosted frame AlgebraicMatrix pplus( 3, 1 ); pplus[0][0] = theSecondaryMass*c2*stheta*cphi; pplus[1][0] = theSecondaryMass*c2*stheta*sphi; pplus[2][0] = 0.5*p + c3*c4; // momentum of decay particle 2 in the primary's boosted frame AlgebraicMatrix pminus( 3, 1 ); pminus[0][0] = -pplus[0][0]; pminus[1][0] = -pplus[1][0]; pminus[2][0] = 0.5*p - c3*c4; AlgebraicMatrix rotMat = rotationMatrix( px, py, pz ); return std::make_pair( rotMat*pplus, rotMat*pminus ); }
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().
{ return cartesianSecondaryMomenta( tbdparam.parameters() ); }
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().
{ return cartesianSecondaryMomenta( tbd.parameters() ); }
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().
{ double rt = fabs( zMagField/curv[0] ); AlgebraicVector cart( 3 ); cart[0] = rt*cos( curv[2] ); cart[1] = rt*sin( curv[2] ); cart[2] = rt/tan( curv[1] ); return cart; }
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(), lumiQueryAPI::q, and funct::sin().
Referenced by curvilinearToCartesianJacobian().
{ double q = ( ( rho < 0 ) ? -1. : 1. ); double conv = q*zMagField; double stheta = sin( theta ); double ctheta = cos( theta ); double sphi = sin( phi ); double cphi = cos( phi ); AlgebraicMatrix curv2cart( 3, 3 ); curv2cart[0][0] = -rho*cphi; curv2cart[0][1] = -rho*sphi; curv2cart[0][2] = 0.; curv2cart[1][0] = cphi*stheta*ctheta; curv2cart[1][1] = sphi*stheta*ctheta; curv2cart[1][2] = -stheta*stheta; curv2cart[2][0] = -sphi; curv2cart[2][1] = cphi; curv2cart[2][2] = 0.; curv2cart *= rho/conv; return curv2cart; }
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().
{ return this->curvilinearToCartesianJacobian( curv[0], curv[1], curv[2], zMagField ); }
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 L1TEmulatorMonitor_cff::p, p2, and mathSSE::sqrt().
Referenced by cartesianSecondaryMomenta(), TwoBodyDecayDerivatives::dqsdm(), TwoBodyDecayDerivatives::dqsdphi(), TwoBodyDecayDerivatives::dqsdtheta(), and TwoBodyDecayLinearizationPointFinder::getLinearizationPoint().
{ // compute transverse and absolute momentum double pT2 = px*px + py*py; double p2 = pT2 + pz*pz; double pT = sqrt( pT2 ); double p = sqrt( p2 ); AlgebraicMatrix rotMat( 3, 3 ); // compute rotation matrix rotMat[0][0] = px*pz/pT/p; rotMat[0][1] = -py/pT; rotMat[0][2] = px/p; rotMat[1][0] = py*pz/pT/p; rotMat[1][1] = px/pT; rotMat[1][2] = py/p; rotMat[2][0] = -pT/p; rotMat[2][1] = 0.; rotMat[2][2] = pz/p; return rotMat; }
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().