CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
RawParticle Class Reference

#include <RawParticle.h>

Inheritance diagram for RawParticle:
BaseParticlePropagator ParticlePropagator

Public Types

typedef ROOT::Math::Boost Boost
 
typedef ROOT::Math::AxisAngle Rotation
 
typedef ROOT::Math::Rotation3D Rotation3D
 
typedef ROOT::Math::RotationX RotationX
 
typedef ROOT::Math::RotationY RotationY
 
typedef ROOT::Math::RotationZ RotationZ
 

Public Member Functions

void boost (double bx, double by, double bz)
 
void boost (const Boost &b)
 
double charge () const
 get the MEASURED charge More...
 
void chargeConjugate ()
 
double cos2Theta () const
 Cos**2(theta) is faster to determine than eta. More...
 
double cos2ThetaV () const
 
double et () const
 get the transverse energy More...
 
double eta () const
 
int isUsed () const
 
double mass () const
 get the MEASURED mass More...
 
const XYZTLorentzVectormomentum () const
 the momentum fourvector More...
 
RawParticleoperator= (const RawParticle &rhs)
 
double PDGcharge () const
 get the THEORETICAL charge More...
 
double PDGcTau () const
 get the THEORETICAL lifetime More...
 
double PDGmass () const
 get the THEORETICAL mass More...
 
std::string PDGname () const
 get the PDG name More...
 
int pid () const
 get the HEP particle ID number More...
 
void print () const
 
void printName () const
 
double r () const
 vertex radius More...
 
double R () const
 vertex radius More...
 
double r2 () const
 vertex radius**2 More...
 
double R2 () const
 vertex radius**2 More...
 
 RawParticle ()
 
 RawParticle (const XYZTLorentzVector &p)
 
 RawParticle (const int id, const XYZTLorentzVector &p)
 
 RawParticle (const std::string name, const XYZTLorentzVector &p)
 
 RawParticle (const XYZTLorentzVector &p, const XYZTLorentzVector &xStart)
 
 RawParticle (double px, double py, double pz, double e)
 
 RawParticle (const RawParticle &p)
 
void reUse ()
 
void rotate (double rphi, const XYZVector &raxis)
 
void rotate (const Rotation &r)
 
void rotate (const Rotation3D &r)
 
void rotate (const RotationX &r)
 
void rotate (const RotationY &r)
 
void rotate (const RotationZ &r)
 
void rotateX (double rphi)
 
void rotateY (double rphi)
 
void rotateZ (double rphi)
 
void setCharge (float q)
 set the MEASURED charge More...
 
void setID (const int id)
 
void setID (const std::string name)
 
void setMass (float m)
 set the RECONSTRUCTED mass More...
 
void setStatus (int istat)
 
void setT (const double t)
 set the time of creation More...
 
void setVertex (const XYZTLorentzVector &vtx)
 set the vertex More...
 
void setVertex (double xv, double yv, double zv, double tv)
 
int status () const
 get the particle status More...
 
double t () const
 vertex time More...
 
double T () const
 vertex time More...
 
void translate (const XYZVector &t)
 
void use ()
 
const XYZTLorentzVectorvertex () const
 the vertex fourvector More...
 
double x () const
 x of vertex More...
 
double X () const
 x of vertex More...
 
double y () const
 y of vertex More...
 
double Y () const
 y of vertex More...
 
double z () const
 z of vertex More...
 
double Z () const
 z of vertex More...
 
virtual ~RawParticle ()
 

Protected Attributes

double myCharge
 the MEASURED charge More...
 
int myId
 the particle id number HEP-PID More...
 
const ParticleDatamyInfo
 The pointer to the PDG info. More...
 
double myMass
 the RECONSTRUCTED mass More...
 
int myStatus
 the status code according to PYTHIA More...
 
int myUsed
 status of the locking More...
 
XYZTLorentzVector myVertex
 the four vector of the vertex More...
 

Private Member Functions

void init ()
 

Private Attributes

const ParticleTabletab
 

Detailed Description

Definition at line 32 of file RawParticle.h.

Member Typedef Documentation

typedef ROOT::Math::Boost RawParticle::Boost

Definition at line 40 of file RawParticle.h.

typedef ROOT::Math::AxisAngle RawParticle::Rotation

Definition at line 35 of file RawParticle.h.

typedef ROOT::Math::Rotation3D RawParticle::Rotation3D

Definition at line 36 of file RawParticle.h.

typedef ROOT::Math::RotationX RawParticle::RotationX

Definition at line 37 of file RawParticle.h.

typedef ROOT::Math::RotationY RawParticle::RotationY

Definition at line 38 of file RawParticle.h.

typedef ROOT::Math::RotationZ RawParticle::RotationZ

Definition at line 39 of file RawParticle.h.

Constructor & Destructor Documentation

RawParticle::RawParticle ( )

Definition at line 18 of file RawParticle.cc.

RawParticle::~RawParticle ( )
virtual

Definition at line 69 of file RawParticle.cc.

RawParticle::RawParticle ( const XYZTLorentzVector p)

Construct from a fourvector. The fourvector is taken for the particle, the vertex is set to 0.

Definition at line 23 of file RawParticle.cc.

RawParticle::RawParticle ( const int  id,
const XYZTLorentzVector p 
)

Construct from a fourvector and a PID. The fourvector and PID are taken for the particle, the vertex is set to 0.

Definition at line 28 of file RawParticle.cc.

RawParticle::RawParticle ( const std::string  name,
const XYZTLorentzVector p 
)

Construct from a fourvector and a name. The fourvector and name are taken for the particle, the vertex is set to 0.

Definition at line 35 of file RawParticle.cc.

RawParticle::RawParticle ( const XYZTLorentzVector p,
const XYZTLorentzVector xStart 
)

Construct from 2 fourvectors. The first fourvector is taken for the particle, the second for its vertex.

Definition at line 42 of file RawParticle.cc.

RawParticle::RawParticle ( double  px,
double  py,
double  pz,
double  e 
)

Construct from fourmomentum components. Vertex is set to 0.

Definition at line 50 of file RawParticle.cc.

RawParticle::RawParticle ( const RawParticle p)

Copy constructor

Definition at line 56 of file RawParticle.cc.

Member Function Documentation

void RawParticle::boost ( double  bx,
double  by,
double  bz 
)

Boost the particle. The arguments are the $\beta$ values of the boost in x, y and z direction.

Warning
What happens to the vertex?

Definition at line 183 of file RawParticle.cc.

void RawParticle::boost ( const Boost b)
inline

Definition at line 311 of file RawParticle.h.

double RawParticle::charge ( void  ) const
inline

get the MEASURED charge

Definition at line 282 of file RawParticle.h.

Referenced by MultipleScatteringSimulator::compute(), EnergyLossSimulator::compute(), and KineParticleFilter::isOKForMe().

void RawParticle::chargeConjugate ( )

Convert the particle to its charge conjugate state. This operation resets the particle ID to that of the charge conjugated particle (if one exists). Also the measured charge is multiplied by -1.

Definition at line 144 of file RawParticle.cc.

double RawParticle::cos2Theta ( ) const
inline

Cos**2(theta) is faster to determine than eta.

Definition at line 268 of file RawParticle.h.

Referenced by KineParticleFilter::isOKForMe().

double RawParticle::cos2ThetaV ( ) const
inline

Definition at line 269 of file RawParticle.h.

Referenced by KineParticleFilter::isOKForMe().

double RawParticle::et ( ) const

get the transverse energy

Definition at line 307 of file RawParticle.cc.

double RawParticle::eta ( void  ) const
inline

Get the pseudo rapidity of the particle. $ \eta = -\log ( \tan ( \vartheta/2)) $

Definition at line 267 of file RawParticle.h.

Referenced by Particle.Particle::__str__().

void RawParticle::init ( void  )
private

Definition at line 91 of file RawParticle.cc.

int RawParticle::isUsed ( ) const
inline

Is the particle marked as used. The three methods isUsed(), use() and reUse() implement a simple locking mechanism.

Definition at line 234 of file RawParticle.h.

double RawParticle::mass ( ) const
inline
const XYZTLorentzVector & RawParticle::momentum ( ) const
inline

the momentum fourvector

Definition at line 286 of file RawParticle.h.

Referenced by BremsstrahlungSimulator::compute(), and PythiaDecays::particleDaughters().

RawParticle & RawParticle::operator= ( const RawParticle rhs)

Copy assignment operator

Definition at line 74 of file RawParticle.cc.

double RawParticle::PDGcharge ( ) const

get the THEORETICAL charge

Definition at line 246 of file RawParticle.cc.

double RawParticle::PDGcTau ( ) const

get the THEORETICAL lifetime

Definition at line 264 of file RawParticle.cc.

double RawParticle::PDGmass ( ) const

get the THEORETICAL mass

Definition at line 255 of file RawParticle.cc.

std::string RawParticle::PDGname ( ) const

get the PDG name

Definition at line 189 of file RawParticle.cc.

int RawParticle::pid ( ) const
inline
void RawParticle::print ( void  ) const

Print the formated particle information. The format is: NAME______PX______PY______PZ______E_______Mtheo___Mrec____Qrec____X_______Y_______Z_______T_______

Definition at line 212 of file RawParticle.cc.

void RawParticle::printName ( ) const

Print the name of the particle. The name is deduced from the particle ID using a particle data table. It is printed with a length of 10 characters. If the id number cannot be found in the table "unknown" is printed as name.

Definition at line 200 of file RawParticle.cc.

double RawParticle::r ( ) const
inline

vertex radius

Definition at line 280 of file RawParticle.h.

double RawParticle::R ( ) const
inline

vertex radius

Definition at line 278 of file RawParticle.h.

double RawParticle::r2 ( ) const
inline

vertex radius**2

Definition at line 281 of file RawParticle.h.

double RawParticle::R2 ( ) const
inline

vertex radius**2

Definition at line 279 of file RawParticle.h.

Referenced by KineParticleFilter::isOKForMe().

void RawParticle::reUse ( )
inline

Unlock the particle, see isUsed()

Definition at line 242 of file RawParticle.h.

void RawParticle::rotate ( double  rphi,
const XYZVector raxis 
)

Rotate the particle around an axis in space. The arguments give the amount to rotate rphi in radian and a vector raxis in 3D space around which the rotation is done. The vertex is rotated using the same transformation.

Definition at line 155 of file RawParticle.cc.

Referenced by MultipleScatteringSimulator::compute(), and BremsstrahlungSimulator::compute().

void RawParticle::rotate ( const Rotation r)
inline

Definition at line 295 of file RawParticle.h.

void RawParticle::rotate ( const Rotation3D r)
inline

Definition at line 291 of file RawParticle.h.

void RawParticle::rotate ( const RotationX r)
inline

Definition at line 299 of file RawParticle.h.

void RawParticle::rotate ( const RotationY r)
inline

Definition at line 303 of file RawParticle.h.

void RawParticle::rotate ( const RotationZ r)
inline

Definition at line 307 of file RawParticle.h.

void RawParticle::rotateX ( double  rphi)
Warning
not yet implemented Rotate around x axis. Rotate rphi radian around the x axis. The Vertex is rotated as well.

Definition at line 162 of file RawParticle.cc.

void RawParticle::rotateY ( double  rphi)

Rotate around z axis. Rotate rphi radian around the z axis. The Vertex is rotated as well.

Definition at line 169 of file RawParticle.cc.

void RawParticle::rotateZ ( double  rphi)

Rotate around z axis. Rotate rphi radian around the z axis. The Vertex is rotated as well.

Definition at line 176 of file RawParticle.cc.

void RawParticle::setCharge ( float  q)

set the MEASURED charge

Definition at line 139 of file RawParticle.cc.

void RawParticle::setID ( const int  id)

Set identifier for this particle. This should be a standard HEP-PID number. It will be used to deduce the name and the properties of the particle from a particle data table.

Definition at line 102 of file RawParticle.cc.

void RawParticle::setID ( const std::string  name)

Set identifier for this particle. This should be a standard HEP-PID name. It will be used to deduce the particle properties from a particle data table.

Definition at line 115 of file RawParticle.cc.

void RawParticle::setMass ( float  m)

set the RECONSTRUCTED mass

Definition at line 134 of file RawParticle.cc.

void RawParticle::setStatus ( int  istat)

Set the status of this particle. The coding follows PYTHIAs convention: 1 = stable

Definition at line 129 of file RawParticle.cc.

void RawParticle::setT ( const double  t)

set the time of creation

Definition at line 150 of file RawParticle.cc.

void RawParticle::setVertex ( const XYZTLorentzVector vtx)
inline

set the vertex

Definition at line 288 of file RawParticle.h.

void RawParticle::setVertex ( double  xv,
double  yv,
double  zv,
double  tv 
)
inline

Definition at line 289 of file RawParticle.h.

int RawParticle::status ( void  ) const
inline

get the particle status

Definition at line 266 of file RawParticle.h.

Referenced by RawStableParticleFilter::isOKForMe().

double RawParticle::t ( ) const
inline

vertex time

Definition at line 273 of file RawParticle.h.

double RawParticle::T ( ) const
inline

vertex time

Definition at line 277 of file RawParticle.h.

Referenced by PythiaDecays::particleDaughters().

void RawParticle::translate ( const XYZVector t)
inline

Translate the vertex by a given space amount

Definition at line 315 of file RawParticle.h.

Referenced by MultipleScatteringSimulator::compute().

void RawParticle::use ( )
inline

Lock the particle, see isUsed()

Definition at line 238 of file RawParticle.h.

const XYZTLorentzVector & RawParticle::vertex ( ) const
inline

the vertex fourvector

Definition at line 285 of file RawParticle.h.

Referenced by Tau.Tau::dxy(), KineParticleFilter::isOKForMe(), operator<<(), and FastHFShowerLibrary::recoHFShowerLibrary().

double RawParticle::x ( ) const
inline

x of vertex

Definition at line 270 of file RawParticle.h.

double RawParticle::X ( ) const
inline

x of vertex

Definition at line 274 of file RawParticle.h.

Referenced by PythiaDecays::particleDaughters(), and FastHFShowerLibrary::recoHFShowerLibrary().

double RawParticle::y ( ) const
inline

y of vertex

Definition at line 271 of file RawParticle.h.

double RawParticle::Y ( ) const
inline

y of vertex

Definition at line 275 of file RawParticle.h.

Referenced by PythiaDecays::particleDaughters(), and FastHFShowerLibrary::recoHFShowerLibrary().

double RawParticle::z ( ) const
inline

z of vertex

Definition at line 272 of file RawParticle.h.

double RawParticle::Z ( ) const
inline

Member Data Documentation

double RawParticle::myCharge
protected

the MEASURED charge

Definition at line 254 of file RawParticle.h.

int RawParticle::myId
protected

the particle id number HEP-PID

Definition at line 251 of file RawParticle.h.

const ParticleData* RawParticle::myInfo
protected

The pointer to the PDG info.

Definition at line 256 of file RawParticle.h.

double RawParticle::myMass
protected

the RECONSTRUCTED mass

Definition at line 255 of file RawParticle.h.

int RawParticle::myStatus
protected

the status code according to PYTHIA

Definition at line 252 of file RawParticle.h.

int RawParticle::myUsed
protected

status of the locking

Definition at line 253 of file RawParticle.h.

XYZTLorentzVector RawParticle::myVertex
protected

the four vector of the vertex

Definition at line 250 of file RawParticle.h.

const ParticleTable* RawParticle::tab
private