CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CurvilinearTrajectoryParameters Class Reference

#include <CurvilinearTrajectoryParameters.h>

Public Member Functions

TrackCharge charge () const
 access to the charge More...
 
 CurvilinearTrajectoryParameters ()
 default constructor More...
 
 CurvilinearTrajectoryParameters (const AlgebraicVector5 &v, bool charged=true)
 
 CurvilinearTrajectoryParameters (const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge)
 
 CurvilinearTrajectoryParameters (double aQbp, double alambda, double aphi, double axT, double ayT, bool charged=true)
 
double lambda () const
 
double phi () const
 
double Qbp () const
 
double signedInverseMomentum () const
 access to the Signed Inverse momentum q/p (zero for neutrals) More...
 
bool updateP (double dP)
 
AlgebraicVector5 vector () const
 
double xT () const
 
double yT () const
 

Private Attributes

double thelambda
 
double thephi
 
double theQbp
 
double thexT
 
double theyT
 

Detailed Description

Class providing access to a set of relevant parameters of a trajectory in a Curvilinear frame. The set consists of the following paramters: \ q/p: charged particles: charge(plus or minus one) divided by magnitude of momentum neutral particles: inverse magnitude of momentum lambda: the helix dip angle (pi/2 minus theta(polar angle)), defined in the global frame phi: the angle of inclination with the global x-axis in the transverse (global xy) plane xT: transverse position in the global xy plane and it points left when looking into the direction of the track yT: transverse position that forms a right-handed frame with xT and zT

Note that the frame is tangent to the track at the point of definition, with Z_T parallel to the track

Definition at line 23 of file CurvilinearTrajectoryParameters.h.

Constructor & Destructor Documentation

◆ CurvilinearTrajectoryParameters() [1/4]

CurvilinearTrajectoryParameters::CurvilinearTrajectoryParameters ( )
inline

default constructor

Definition at line 27 of file CurvilinearTrajectoryParameters.h.

27 {}

◆ CurvilinearTrajectoryParameters() [2/4]

CurvilinearTrajectoryParameters::CurvilinearTrajectoryParameters ( const AlgebraicVector5 v,
bool  charged = true 
)
inline

Constructor from vector of parameters Expects a vector of parameters as defined above. For charged particles he charge will be determined by\ the sign of the first element. For neutral particles the last argument should be false, in which case the charge of the first element will be neglected.

Definition at line 35 of file CurvilinearTrajectoryParameters.h.

36  : theQbp(charged ? v[0] : 0), thelambda(v[1]), thephi(v[2]), thexT(v[3]), theyT(v[4]) {}

◆ CurvilinearTrajectoryParameters() [3/4]

CurvilinearTrajectoryParameters::CurvilinearTrajectoryParameters ( double  aQbp,
double  alambda,
double  aphi,
double  axT,
double  ayT,
bool  charged = true 
)
inline

Constructor from vector of parameters Expects a vector of parameters as defined above. For charged particles the charge will be determined by the sign of the first element. For neutral particles the last argument should be false, in which case the charge of the first element will be neglected. Constructor from individual curvilinear parameters Expects parameters as defined above.

Definition at line 48 of file CurvilinearTrajectoryParameters.h.

49  : theQbp(charged ? aQbp : 0), thelambda(alambda), thephi(aphi), thexT(axT), theyT(ayT) {}

◆ CurvilinearTrajectoryParameters() [4/4]

CurvilinearTrajectoryParameters::CurvilinearTrajectoryParameters ( const GlobalPoint aX,
const GlobalVector aP,
TrackCharge  aCharge 
)

Constructor from a global vector, global point and track charge

Definition at line 4 of file CurvilinearTrajectoryParameters.cc.

6  {
7  theQbp = aCharge / aP.mag();
8 
9  double pT2 = aP.x() * aP.x() + aP.y() * aP.y();
10  double pT = sqrt(pT2);
11  thelambda = atan(aP.z() / pT);
12  thephi = atan2(aP.y(), aP.x());
13  thexT = (-aP.y() * aX.x() + aP.x() * aX.y()) / pT;
14  theyT = (-aX.x() * aP.x() * aP.z() - aX.y() * aP.z() * aP.y() + aX.z() * (pT2)) / (aP.mag() * pT);
15 }

References PV3DBase< T, PVType, FrameType >::mag(), PVValHelper::pT, HLT_FULL_cff::pT2, mathSSE::sqrt(), thelambda, thephi, theQbp, thexT, theyT, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Member Function Documentation

◆ charge()

TrackCharge CurvilinearTrajectoryParameters::charge ( void  ) const
inline

access to the charge

Definition at line 57 of file CurvilinearTrajectoryParameters.h.

57 { return (0 == Qbp()) ? 0 : (Qbp() > 0 ? 1 : -1); }

References Qbp().

◆ lambda()

double CurvilinearTrajectoryParameters::lambda ( ) const
inline

Definition at line 69 of file CurvilinearTrajectoryParameters.h.

69 { return thelambda; }

References thelambda.

◆ phi()

double CurvilinearTrajectoryParameters::phi ( void  ) const
inline

Definition at line 70 of file CurvilinearTrajectoryParameters.h.

70 { return thephi; }

References thephi.

Referenced by Particle.Particle::__str__(), and ntupleDataFormat.Track::phiPull().

◆ Qbp()

double CurvilinearTrajectoryParameters::Qbp ( ) const
inline

Definition at line 68 of file CurvilinearTrajectoryParameters.h.

68 { return theQbp; }

References theQbp.

Referenced by charge(), signedInverseMomentum(), and updateP().

◆ signedInverseMomentum()

double CurvilinearTrajectoryParameters::signedInverseMomentum ( ) const
inline

access to the Signed Inverse momentum q/p (zero for neutrals)

Definition at line 60 of file CurvilinearTrajectoryParameters.h.

60 { return Qbp(); }

References Qbp().

◆ updateP()

bool CurvilinearTrajectoryParameters::updateP ( double  dP)

Definition at line 17 of file CurvilinearTrajectoryParameters.cc.

17  {
18  //FIXME. something is very likely to be missing here
19  double p = 1. / std::abs(Qbp());
20  if ((p += dP) <= 0.)
21  return false;
22  double newQbp = Qbp() > 0 ? 1. / p : -1. / p;
23  theQbp = newQbp;
24  return true;
25 }

References funct::abs(), AlCaHLTBitMon_ParallelJobs::p, Qbp(), and theQbp.

◆ vector()

AlgebraicVector5 CurvilinearTrajectoryParameters::vector ( ) const
inline

Vector of parameters with signed inverse momentum.

Vector of parameters as defined above, with the first element q/p.

Definition at line 66 of file CurvilinearTrajectoryParameters.h.

References thelambda, thephi, theQbp, thexT, and theyT.

◆ xT()

double CurvilinearTrajectoryParameters::xT ( ) const
inline

Definition at line 71 of file CurvilinearTrajectoryParameters.h.

71 { return thexT; }

References thexT.

◆ yT()

double CurvilinearTrajectoryParameters::yT ( ) const
inline

Definition at line 72 of file CurvilinearTrajectoryParameters.h.

72 { return theyT; }

References theyT.

Member Data Documentation

◆ thelambda

double CurvilinearTrajectoryParameters::thelambda
private

◆ thephi

double CurvilinearTrajectoryParameters::thephi
private

Definition at line 79 of file CurvilinearTrajectoryParameters.h.

Referenced by CurvilinearTrajectoryParameters(), phi(), and vector().

◆ theQbp

double CurvilinearTrajectoryParameters::theQbp
private

◆ thexT

double CurvilinearTrajectoryParameters::thexT
private

Definition at line 80 of file CurvilinearTrajectoryParameters.h.

Referenced by CurvilinearTrajectoryParameters(), vector(), and xT().

◆ theyT

double CurvilinearTrajectoryParameters::theyT
private

Definition at line 81 of file CurvilinearTrajectoryParameters.h.

Referenced by CurvilinearTrajectoryParameters(), vector(), and yT().

CurvilinearTrajectoryParameters::thephi
double thephi
Definition: CurvilinearTrajectoryParameters.h:79
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CurvilinearTrajectoryParameters::Qbp
double Qbp() const
Definition: CurvilinearTrajectoryParameters.h:68
findQualityFiles.v
v
Definition: findQualityFiles.py:179
HLT_FULL_cff.pT2
pT2
Definition: HLT_FULL_cff.py:9529
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
PVValHelper::pT
Definition: PVValidationHelpers.h:71
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
CurvilinearTrajectoryParameters::thexT
double thexT
Definition: CurvilinearTrajectoryParameters.h:80
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
AlgebraicVector5
ROOT::Math::SVector< double, 5 > AlgebraicVector5
Definition: AlgebraicROOTObjects.h:14
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
CurvilinearTrajectoryParameters::theQbp
double theQbp
Definition: CurvilinearTrajectoryParameters.h:77
CurvilinearTrajectoryParameters::theyT
double theyT
Definition: CurvilinearTrajectoryParameters.h:81
CurvilinearTrajectoryParameters::thelambda
double thelambda
Definition: CurvilinearTrajectoryParameters.h:78
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22