CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
RawParticle Class Reference

#include <RawParticle.h>

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 e () const
 energy of the momentum More...
 
double E () const
 energy of the momentum More...
 
double et () const
 get the transverse energy More...
 
double eta () const
 
int isUsed () const
 
double M2 () const
 mass squared More...
 
double mag () const
 the magnitude of the momentum More...
 
double mass () const
 get the MEASURED mass More...
 
const XYZTLorentzVectormomentum () const
 the momentum fourvector More...
 
XYZTLorentzVectormomentum ()
 the momentum fourvector More...
 
RawParticleoperator= (const RawParticle &rhs)=default
 
RawParticleoperator= (RawParticle &&rhs)=default
 
double Perp2 () const
 perpendicular momentum squared More...
 
double phi () const
 phi of momentum vector More...
 
int pid () const
 get the HEP particle ID number More...
 
void print () const
 
void printName () const
 
double Pt () const
 transverse momentum More...
 
double pt () const
 transverse momentum More...
 
double px () const
 x of the momentum More...
 
double Px () const
 x of the momentum More...
 
double py () const
 y of the momentum More...
 
double Py () const
 y of the momentum More...
 
double pz () const
 z of the momentum More...
 
double Pz () const
 z of the momentum More...
 
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 ()=default
 
 RawParticle (const XYZTLorentzVector &p)
 
 RawParticle (const XYZTLorentzVector &p, const XYZTLorentzVector &xStart, double charge=0.)
 
 RawParticle (double px, double py, double pz, double e, double charge=0.)
 
 RawParticle (const RawParticle &p)=default
 
 RawParticle (RawParticle &&p)=default
 
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 SetE (double)
 
void setMass (float m)
 set the RECONSTRUCTED mass More...
 
void setMomentum (const XYZTLorentzVector &vtx)
 set the momentum More...
 
void setMomentum (double xv, double yv, double zv, double tv)
 
void SetPx (double)
 
void SetPy (double)
 
void SetPz (double)
 
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...
 
double theta () const
 theta of momentum vector More...
 
void translate (const XYZVector &t)
 
void use ()
 
XYZVector Vect () const
 the momentum threevector More...
 
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...
 

Private Member Functions

 RawParticle (const int id, const XYZTLorentzVector &p, double mass, double charge)
 
 RawParticle (const int id, const XYZTLorentzVector &p, const XYZTLorentzVector &xStart, double mass, double charge)
 

Private Attributes

double myCharge = 0.
 the MEASURED charge More...
 
int myId = 0
 the particle id number HEP-PID More...
 
double myMass = 0.
 the RECONSTRUCTED mass More...
 
XYZTLorentzVector myMomentum
 the four vector of the momentum More...
 
int myStatus =99
 the status code according to PYTHIA More...
 
int myUsed = 0
 status of the locking More...
 
XYZTLorentzVector myVertex
 the four vector of the vertex More...
 

Friends

RawParticle rawparticle::makeMuon (bool, const XYZTLorentzVector &, const XYZTLorentzVector &)
 
RawParticle unchecked_makeParticle (int id, const math::XYZTLorentzVector &p, double mass, double charge)
 
RawParticle unchecked_makeParticle (int id, const math::XYZTLorentzVector &p, const math::XYZTLorentzVector &xStart, double mass, double charge)
 

Detailed Description

Definition at line 40 of file RawParticle.h.

Member Typedef Documentation

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

Definition at line 52 of file RawParticle.h.

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

Definition at line 47 of file RawParticle.h.

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

Definition at line 48 of file RawParticle.h.

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

Definition at line 49 of file RawParticle.h.

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

Definition at line 50 of file RawParticle.h.

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

Definition at line 51 of file RawParticle.h.

Constructor & Destructor Documentation

RawParticle::RawParticle ( )
default
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 13 of file RawParticle.cc.

14  : myMomentum(p) {
15 }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
RawParticle::RawParticle ( const XYZTLorentzVector p,
const XYZTLorentzVector xStart,
double  charge = 0. 
)

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

Definition at line 41 of file RawParticle.cc.

References charge(), and myCharge.

43  :
44  myMomentum(p),
45  myVertex{xStart},
47 {
48 }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:284
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double myCharge
the MEASURED charge
Definition: RawParticle.h:285
double charge() const
get the MEASURED charge
Definition: RawParticle.h:313
RawParticle::RawParticle ( double  px,
double  py,
double  pz,
double  e,
double  charge = 0. 
)

Construct from fourmomentum components. Vertex is set to 0.

Definition at line 50 of file RawParticle.cc.

50  :
51  myMomentum(px,py,pz,e),
53 {
54 }
double pz() const
z of the momentum
Definition: RawParticle.h:321
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double e() const
energy of the momentum
Definition: RawParticle.h:324
double myCharge
the MEASURED charge
Definition: RawParticle.h:285
double charge() const
get the MEASURED charge
Definition: RawParticle.h:313
double px() const
x of the momentum
Definition: RawParticle.h:315
double py() const
y of the momentum
Definition: RawParticle.h:318
RawParticle::RawParticle ( const RawParticle p)
default

Copy constructor

RawParticle::RawParticle ( RawParticle &&  p)
default
RawParticle::RawParticle ( const int  id,
const XYZTLorentzVector p,
double  mass,
double  charge 
)
private

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 17 of file RawParticle.cc.

References mass(), myId, and myMass.

20  :
21  myMomentum(p),
23  myMass{mass},
24  myId{id}
25 {
26 }
int myId
the particle id number HEP-PID
Definition: RawParticle.h:287
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:286
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double mass() const
get the MEASURED mass
Definition: RawParticle.h:314
double myCharge
the MEASURED charge
Definition: RawParticle.h:285
double charge() const
get the MEASURED charge
Definition: RawParticle.h:313
RawParticle::RawParticle ( const int  id,
const XYZTLorentzVector p,
const XYZTLorentzVector xStart,
double  mass,
double  charge 
)
private

Construct from 2 fourvectosr 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.

References charge(), mass(), myCharge, myId, and myMass.

32  :
33  myMomentum(p),
34  myVertex{xStart},
36  myMass{mass},
37  myId{id}
38 {
39 }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:284
int myId
the particle id number HEP-PID
Definition: RawParticle.h:287
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:286
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double mass() const
get the MEASURED mass
Definition: RawParticle.h:314
double myCharge
the MEASURED charge
Definition: RawParticle.h:285
double charge() const
get the MEASURED charge
Definition: RawParticle.h:313

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 111 of file RawParticle.cc.

References b, momentum(), AlCaHLTBitMon_ParallelJobs::p, and setMomentum().

Referenced by NuclearInteractionSimulator::compute().

111  {
112  Boost b(betax,betay,betaz);
113  XYZTLorentzVector p ( b * momentum() );
114  setMomentum(p.X(),p.Y(),p.Z(),p.T());
115 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:347
ROOT::Math::Boost Boost
Definition: RawParticle.h:52
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:340
double b
Definition: hdecay.h:120
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:27
void RawParticle::boost ( const Boost b)
inline

Definition at line 376 of file RawParticle.h.

References b, and AlCaHLTBitMon_ParallelJobs::p.

376  {
377  XYZTLorentzVector p ( b(momentum()) ); setMomentum(p.Px(),p.Py(),p.Pz(),p.E());
378 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:347
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:340
double b
Definition: hdecay.h:120
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:27
double RawParticle::charge ( ) const
inline
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 72 of file RawParticle.cc.

References myCharge, and myId.

72  {
73  myId = -myId;
74  myCharge = -1*myCharge;
75 }
int myId
the particle id number HEP-PID
Definition: RawParticle.h:287
double myCharge
the MEASURED charge
Definition: RawParticle.h:285
double RawParticle::cos2Theta ( ) const
inline

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

Definition at line 299 of file RawParticle.h.

Referenced by KineParticleFilter::acceptParticle().

299 { return Pz()*Pz()/myMomentum.Vect().Mag2(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double Pz() const
z of the momentum
Definition: RawParticle.h:322
double RawParticle::cos2ThetaV ( ) const
inline

Definition at line 300 of file RawParticle.h.

References DOFs::Z.

Referenced by FBaseSimEvent::fill(), BaseParticlePropagator::propagateToEcalEntrance(), BaseParticlePropagator::propagateToHcalEntrance(), and BaseParticlePropagator::propagateToVFcalEntrance().

300 { return Z()*Z()/myVertex.Vect().Mag2(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:284
double Z() const
z of vertex
Definition: RawParticle.h:307
double RawParticle::e ( ) const
inline
double RawParticle::E ( ) const
inline
double RawParticle::et ( ) const

get the transverse energy

Definition at line 133 of file RawParticle.cc.

References E(), mag2(), momentum(), pt(), and mathSSE::sqrt().

133  {
134  double mypp, tmpEt=-1.;
135 
136  mypp = std::sqrt(momentum().mag2());
137  if ( mypp != 0 ) {
138  tmpEt = E() * pt() / mypp;
139  }
140  return tmpEt;
141 }
double pt() const
transverse momentum
Definition: RawParticle.h:328
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:340
T sqrt(T t)
Definition: SSEVec.h:18
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
double E() const
energy of the momentum
Definition: RawParticle.h:325
double RawParticle::eta ( ) const
inline

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

Definition at line 298 of file RawParticle.h.

References cmsBatch::log, funct::tan(), and theta().

Referenced by Particle.Particle::__str__(), CalorimetryManager::EMShowerSimulation(), Jet.Jet::jetID(), EcalHitMaker::preshowerCellLine(), and Jet.Jet::puJetId().

298 { return -std::log(std::tan(this->theta()/2.)); }
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
double theta() const
theta of momentum vector
Definition: RawParticle.h:334
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 250 of file RawParticle.h.

250 {return myUsed;}
int myUsed
status of the locking
Definition: RawParticle.h:289
double RawParticle::M2 ( ) const
inline

mass squared

Definition at line 337 of file RawParticle.h.

Referenced by NuclearInteractionSimulator::compute().

337 { return myMomentum.M2(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double RawParticle::mag ( ) const
inline

the magnitude of the momentum

Definition at line 332 of file RawParticle.h.

332 { return myMomentum.mag(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double RawParticle::mass ( ) const
inline
const XYZTLorentzVector & RawParticle::momentum ( ) const
inline
XYZTLorentzVector & RawParticle::momentum ( )
inline

the momentum fourvector

Definition at line 341 of file RawParticle.h.

341 { return myMomentum; }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
RawParticle& RawParticle::operator= ( const RawParticle rhs)
default

Copy assignment operator

RawParticle& RawParticle::operator= ( RawParticle &&  rhs)
default
double RawParticle::Perp2 ( ) const
inline

perpendicular momentum squared

Definition at line 330 of file RawParticle.h.

Referenced by KineParticleFilter::acceptParticle(), BaseParticlePropagator::propagate(), and BaseParticlePropagator::zImpactParameter().

330 { return myMomentum.Perp2(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double RawParticle::phi ( ) const
inline

phi of momentum vector

Definition at line 335 of file RawParticle.h.

Referenced by Particle.Particle::__str__(), PairProductionSimulator::compute(), BremsstrahlungSimulator::compute(), MuonBremsstrahlungSimulator::compute(), and ntupleDataFormat.Track::phiPull().

335 { return myMomentum.phi(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
int RawParticle::pid ( ) const
inline
void RawParticle::print ( ) const

Print the formated particle information. The format is: NAME______PX______PY______PZ______E_______Mtheo___Mrec____Qrec____X_______Y_______Z_______T_______

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.

double RawParticle::Pt ( ) const
inline
double RawParticle::pt ( ) const
inline
double RawParticle::px ( ) const
inline

x of the momentum

Definition at line 315 of file RawParticle.h.

Referenced by PFSimParticleProducer::produce().

315 { return myMomentum.px() ; }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double RawParticle::Px ( ) const
inline
double RawParticle::py ( ) const
inline

y of the momentum

Definition at line 318 of file RawParticle.h.

Referenced by PFSimParticleProducer::produce().

318 { return myMomentum.py() ; }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double RawParticle::Py ( ) const
inline
double RawParticle::pz ( ) const
inline

z of the momentum

Definition at line 321 of file RawParticle.h.

Referenced by PFSimParticleProducer::produce().

321 { return myMomentum.pz() ; }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double RawParticle::Pz ( ) const
inline
double RawParticle::r ( ) const
inline

vertex radius

Definition at line 311 of file RawParticle.h.

References diffTwoXMLs::r2, and mathSSE::sqrt().

Referenced by rotate(), rotateX(), rotateY(), and rotateZ().

311 { return std::sqrt(r2()); }
double r2() const
vertex radius**2
Definition: RawParticle.h:312
T sqrt(T t)
Definition: SSEVec.h:18
double RawParticle::R ( ) const
inline

vertex radius

Definition at line 309 of file RawParticle.h.

References mathSSE::sqrt().

Referenced by MaterialEffects::normalVector(), and MaterialEffects::radLengths().

309 { return std::sqrt(R2()); }
double R2() const
vertex radius**2
Definition: RawParticle.h:310
T sqrt(T t)
Definition: SSEVec.h:18
double RawParticle::r2 ( ) const
inline

vertex radius**2

Definition at line 312 of file RawParticle.h.

312 { return myVertex.Perp2(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:284
double RawParticle::R2 ( ) const
inline
void RawParticle::reUse ( )
inline

Unlock the particle, see isUsed()

Definition at line 258 of file RawParticle.h.

258 { myUsed = 0;}
int myUsed
status of the locking
Definition: RawParticle.h:289
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 83 of file RawParticle.cc.

References E(), myMomentum, r(), setMomentum(), and findQualityFiles::v.

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

83  {
84  Rotation r(raxis,angle);
85  XYZVector v(r * myMomentum.Vect());
86  setMomentum(v.X(),v.Y(),v.Z(),E());
87 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:347
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double r() const
vertex radius
Definition: RawParticle.h:311
ROOT::Math::AxisAngle Rotation
Definition: RawParticle.h:47
double E() const
energy of the momentum
Definition: RawParticle.h:325
math::XYZVector XYZVector
Definition: RawParticle.h:28
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
void RawParticle::rotate ( const Rotation r)
inline

Definition at line 360 of file RawParticle.h.

References alignCSCRings::r, and findQualityFiles::v.

360  {
361  XYZVector v ( r(myMomentum.Vect()) ); setMomentum(v.X(),v.Y(),v.Z(),E());
362 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:347
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double r() const
vertex radius
Definition: RawParticle.h:311
double E() const
energy of the momentum
Definition: RawParticle.h:325
math::XYZVector XYZVector
Definition: RawParticle.h:28
void RawParticle::rotate ( const Rotation3D r)
inline

Definition at line 356 of file RawParticle.h.

References alignCSCRings::r, and findQualityFiles::v.

356  {
357  XYZVector v ( r(myMomentum.Vect()) ); setMomentum(v.X(),v.Y(),v.Z(),E());
358 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:347
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double r() const
vertex radius
Definition: RawParticle.h:311
double E() const
energy of the momentum
Definition: RawParticle.h:325
math::XYZVector XYZVector
Definition: RawParticle.h:28
void RawParticle::rotate ( const RotationX r)
inline

Definition at line 364 of file RawParticle.h.

References alignCSCRings::r, and findQualityFiles::v.

364  {
365  XYZVector v ( r(myMomentum.Vect()) ); setMomentum(v.X(),v.Y(),v.Z(),E());
366 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:347
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double r() const
vertex radius
Definition: RawParticle.h:311
double E() const
energy of the momentum
Definition: RawParticle.h:325
math::XYZVector XYZVector
Definition: RawParticle.h:28
void RawParticle::rotate ( const RotationY r)
inline

Definition at line 368 of file RawParticle.h.

References alignCSCRings::r, and findQualityFiles::v.

368  {
369  XYZVector v ( r(myMomentum.Vect()) ); setMomentum(v.X(),v.Y(),v.Z(),E());
370 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:347
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double r() const
vertex radius
Definition: RawParticle.h:311
double E() const
energy of the momentum
Definition: RawParticle.h:325
math::XYZVector XYZVector
Definition: RawParticle.h:28
void RawParticle::rotate ( const RotationZ r)
inline

Definition at line 372 of file RawParticle.h.

References alignCSCRings::r, and findQualityFiles::v.

372  {
373  XYZVector v ( r(myMomentum.Vect()) ); setMomentum(v.X(),v.Y(),v.Z(),E());
374 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:347
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double r() const
vertex radius
Definition: RawParticle.h:311
double E() const
energy of the momentum
Definition: RawParticle.h:325
math::XYZVector XYZVector
Definition: RawParticle.h:28
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 90 of file RawParticle.cc.

References E(), myMomentum, r(), setMomentum(), and findQualityFiles::v.

90  {
91  RotationX r(rphi);
92  XYZVector v(r * myMomentum.Vect());
93  setMomentum(v.X(),v.Y(),v.Z(),E());
94 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:347
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
ROOT::Math::RotationX RotationX
Definition: RawParticle.h:49
double r() const
vertex radius
Definition: RawParticle.h:311
double E() const
energy of the momentum
Definition: RawParticle.h:325
math::XYZVector XYZVector
Definition: RawParticle.h:28
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 97 of file RawParticle.cc.

References E(), myMomentum, r(), setMomentum(), and findQualityFiles::v.

97  {
98  RotationY r(rphi);
99  XYZVector v(r * myMomentum.Vect());
100  setMomentum(v.X(),v.Y(),v.Z(),E());
101 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:347
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
ROOT::Math::RotationY RotationY
Definition: RawParticle.h:50
double r() const
vertex radius
Definition: RawParticle.h:311
double E() const
energy of the momentum
Definition: RawParticle.h:325
math::XYZVector XYZVector
Definition: RawParticle.h:28
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 104 of file RawParticle.cc.

References E(), myMomentum, r(), setMomentum(), and findQualityFiles::v.

104  {
105  RotationZ r(rphi);
106  XYZVector v(r * myMomentum.Vect());
107  setMomentum(v.X(),v.Y(),v.Z(),E());
108 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:347
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
ROOT::Math::RotationZ RotationZ
Definition: RawParticle.h:51
double r() const
vertex radius
Definition: RawParticle.h:311
double E() const
energy of the momentum
Definition: RawParticle.h:325
math::XYZVector XYZVector
Definition: RawParticle.h:28
void RawParticle::setCharge ( float  q)
void RawParticle::SetE ( double  e)
inline

Definition at line 353 of file RawParticle.h.

Referenced by BaseParticlePropagator::propagateToBeamCylinder().

353 {myMomentum.SetE(e);}
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double e() const
energy of the momentum
Definition: RawParticle.h:324
void RawParticle::setMass ( float  m)

set the RECONSTRUCTED mass

Definition at line 62 of file RawParticle.cc.

References funct::m, and myMass.

62  {
63  myMass = m;
64 }
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:286
void RawParticle::setMomentum ( const XYZTLorentzVector vtx)
inline
void RawParticle::setMomentum ( double  xv,
double  yv,
double  zv,
double  tv 
)
inline

Definition at line 348 of file RawParticle.h.

348 { myMomentum.SetXYZT(a,b,c,d); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
void RawParticle::SetPx ( double  px)
inline

Definition at line 350 of file RawParticle.h.

Referenced by BaseParticlePropagator::propagateToNominalVertex().

350 {myMomentum.SetPx(px);}
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double px() const
x of the momentum
Definition: RawParticle.h:315
void RawParticle::SetPy ( double  py)
inline

Definition at line 351 of file RawParticle.h.

Referenced by BaseParticlePropagator::propagateToNominalVertex().

351 {myMomentum.SetPy(py);}
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
double py() const
y of the momentum
Definition: RawParticle.h:318
void RawParticle::SetPz ( double  pz)
inline

Definition at line 352 of file RawParticle.h.

352 {myMomentum.SetPz(pz);}
double pz() const
z of the momentum
Definition: RawParticle.h:321
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
void RawParticle::setStatus ( int  istat)

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

Definition at line 57 of file RawParticle.cc.

References myStatus.

57  {
58  myStatus = istat;
59 }
int myStatus
the status code according to PYTHIA
Definition: RawParticle.h:288
void RawParticle::setT ( const double  t)

set the time of creation

Definition at line 78 of file RawParticle.cc.

References myVertex.

78  {
79  myVertex.SetE(t);
80 }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:284
double t() const
vertex time
Definition: RawParticle.h:304
void RawParticle::setVertex ( const XYZTLorentzVector vtx)
inline
void RawParticle::setVertex ( double  xv,
double  yv,
double  zv,
double  tv 
)
inline

Definition at line 345 of file RawParticle.h.

345 { myVertex.SetXYZT(a,b,c,d); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:284
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
int RawParticle::status ( ) const
inline

get the particle status

Definition at line 297 of file RawParticle.h.

Referenced by operator<<().

297 { return myStatus; }
int myStatus
the status code according to PYTHIA
Definition: RawParticle.h:288
double RawParticle::t ( ) const
inline

vertex time

Definition at line 304 of file RawParticle.h.

Referenced by FBaseSimEvent::addSimTrack().

304 { return myVertex.E(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:284
double RawParticle::T ( ) const
inline

vertex time

Definition at line 308 of file RawParticle.h.

Referenced by PythiaDecays::particleDaughters(), and BaseParticlePropagator::propagate().

308 { return myVertex.E(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:284
double RawParticle::theta ( ) const
inline

theta of momentum vector

Definition at line 334 of file RawParticle.h.

Referenced by PairProductionSimulator::compute(), BremsstrahlungSimulator::compute(), MuonBremsstrahlungSimulator::compute(), and Tau.Tau::zImpact().

334 { return myMomentum.theta(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:283
void RawParticle::translate ( const XYZVector t)
inline

Translate the vertex by a given space amount

Definition at line 380 of file RawParticle.h.

References X, DOFs::Y, and DOFs::Z.

Referenced by MultipleScatteringSimulator::compute().

380  {
381  myVertex.SetXYZT(X()+tr.X(),Y()+tr.Y(),Z()+tr.Z(),T());
382 }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:284
double Y() const
y of vertex
Definition: RawParticle.h:306
double Z() const
z of vertex
Definition: RawParticle.h:307
double X() const
x of vertex
Definition: RawParticle.h:305
double T() const
vertex time
Definition: RawParticle.h:308
void RawParticle::use ( )
inline

Lock the particle, see isUsed()

Definition at line 254 of file RawParticle.h.

254 { myUsed = 1;}
int myUsed
status of the locking
Definition: RawParticle.h:289
XYZVector RawParticle::Vect ( ) const
inline
const XYZTLorentzVector & RawParticle::vertex ( ) const
inline
double RawParticle::x ( ) const
inline
double RawParticle::X ( ) const
inline
double RawParticle::y ( ) const
inline
double RawParticle::Y ( ) const
inline
double RawParticle::z ( ) const
inline

z of vertex

Definition at line 303 of file RawParticle.h.

Referenced by lowptgsfeleid::features_V1(), geometryXMLparser.Alignable::pos(), PFSimParticleProducer::produce(), LowPtGsfElectronSeedProducer::propagateTrackToCalo(), and ntupleDataFormat._HitObject::r3D().

303 { return myVertex.Pz(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:284
double RawParticle::Z ( ) const
inline

Friends And Related Function Documentation

RawParticle rawparticle::makeMuon ( bool  ,
const XYZTLorentzVector ,
const XYZTLorentzVector  
)
friend
RawParticle unchecked_makeParticle ( int  id,
const math::XYZTLorentzVector p,
double  mass,
double  charge 
)
friend

Definition at line 20 of file makeParticle.cc.

20  {
21  return RawParticle(id,p,mass, charge);
22 }
double mass() const
get the MEASURED mass
Definition: RawParticle.h:314
double charge() const
get the MEASURED charge
Definition: RawParticle.h:313
RawParticle()=default
RawParticle unchecked_makeParticle ( int  id,
const math::XYZTLorentzVector p,
const math::XYZTLorentzVector xStart,
double  mass,
double  charge 
)
friend

Definition at line 24 of file makeParticle.cc.

24  {
25  return RawParticle(id,p, xStart, mass, charge);
26 }
double mass() const
get the MEASURED mass
Definition: RawParticle.h:314
double charge() const
get the MEASURED charge
Definition: RawParticle.h:313
RawParticle()=default

Member Data Documentation

double RawParticle::myCharge = 0.
private

the MEASURED charge

Definition at line 285 of file RawParticle.h.

Referenced by chargeConjugate(), RawParticle(), and setCharge().

int RawParticle::myId = 0
private

the particle id number HEP-PID

Definition at line 287 of file RawParticle.h.

Referenced by chargeConjugate(), and RawParticle().

double RawParticle::myMass = 0.
private

the RECONSTRUCTED mass

Definition at line 286 of file RawParticle.h.

Referenced by RawParticle(), and setMass().

XYZTLorentzVector RawParticle::myMomentum
private

the four vector of the momentum

Definition at line 283 of file RawParticle.h.

Referenced by rotate(), rotateX(), rotateY(), and rotateZ().

int RawParticle::myStatus =99
private

the status code according to PYTHIA

Definition at line 288 of file RawParticle.h.

Referenced by setStatus().

int RawParticle::myUsed = 0
private

status of the locking

Definition at line 289 of file RawParticle.h.

XYZTLorentzVector RawParticle::myVertex
private

the four vector of the vertex

Definition at line 284 of file RawParticle.h.

Referenced by setT().