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 37 of file RawParticle.h.

Member Typedef Documentation

◆ Boost

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

Definition at line 49 of file RawParticle.h.

◆ Rotation

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

Definition at line 44 of file RawParticle.h.

◆ Rotation3D

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

Definition at line 45 of file RawParticle.h.

◆ RotationX

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

Definition at line 46 of file RawParticle.h.

◆ RotationY

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

Definition at line 47 of file RawParticle.h.

◆ RotationZ

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

Definition at line 48 of file RawParticle.h.

Constructor & Destructor Documentation

◆ RawParticle() [1/8]

RawParticle::RawParticle ( )
default

◆ RawParticle() [2/8]

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.

13 : myMomentum(p) {}
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266

◆ RawParticle() [3/8]

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

23  : myMomentum(p), myVertex{xStart}, myCharge{charge} {}
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double charge() const
get the MEASURED charge
Definition: RawParticle.h:294
double myCharge
the MEASURED charge
Definition: RawParticle.h:268

◆ RawParticle() [4/8]

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

References charge().

26  : myMomentum(px, py, pz, e), myCharge{charge} {}
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double charge() const
get the MEASURED charge
Definition: RawParticle.h:294
double px() const
x of the momentum
Definition: RawParticle.h:296
double myCharge
the MEASURED charge
Definition: RawParticle.h:268
double py() const
y of the momentum
Definition: RawParticle.h:299
double pz() const
z of the momentum
Definition: RawParticle.h:302
double e() const
energy of the momentum
Definition: RawParticle.h:305

◆ RawParticle() [5/8]

RawParticle::RawParticle ( const RawParticle p)
default

Copy constructor

◆ RawParticle() [6/8]

RawParticle::RawParticle ( RawParticle &&  p)
default

◆ RawParticle() [7/8]

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

References charge().

16  : myMomentum(p), myCharge{charge}, myMass{mass}, myId{id} {}
int myId
the particle id number HEP-PID
Definition: RawParticle.h:270
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:269
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double charge() const
get the MEASURED charge
Definition: RawParticle.h:294
double myCharge
the MEASURED charge
Definition: RawParticle.h:268
double mass() const
get the MEASURED mass
Definition: RawParticle.h:295

◆ RawParticle() [8/8]

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

20  : myMomentum(p), myVertex{xStart}, myCharge{charge}, myMass{mass}, myId{id} {}
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267
int myId
the particle id number HEP-PID
Definition: RawParticle.h:270
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:269
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double charge() const
get the MEASURED charge
Definition: RawParticle.h:294
double myCharge
the MEASURED charge
Definition: RawParticle.h:268
double mass() const
get the MEASURED mass
Definition: RawParticle.h:295

Member Function Documentation

◆ boost() [1/2]

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

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

Referenced by NuclearInteractionSimulator::compute().

65  {
66  Boost b(betax, betay, betaz);
68  setMomentum(p.X(), p.Y(), p.Z(), p.T());
69 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:328
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:321
ROOT::Math::Boost Boost
Definition: RawParticle.h:49
double b
Definition: hdecay.h:118
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25

◆ boost() [2/2]

void RawParticle::boost ( const Boost b)
inline

Definition at line 361 of file RawParticle.h.

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

361  {
363  setMomentum(p.Px(), p.Py(), p.Pz(), p.E());
364 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:328
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:321
double b
Definition: hdecay.h:118
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25

◆ charge()

double RawParticle::charge ( ) const
inline

◆ chargeConjugate()

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

References myCharge, and myId.

34  {
35  myId = -myId;
36  myCharge = -1 * myCharge;
37 }
int myId
the particle id number HEP-PID
Definition: RawParticle.h:270
double myCharge
the MEASURED charge
Definition: RawParticle.h:268

◆ cos2Theta()

double RawParticle::cos2Theta ( ) const
inline

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

Definition at line 280 of file RawParticle.h.

References myMomentum, and Pz().

Referenced by KineParticleFilter::acceptParticle().

280 { return Pz() * Pz() / myMomentum.Vect().Mag2(); }
double Pz() const
z of the momentum
Definition: RawParticle.h:303
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266

◆ cos2ThetaV()

double RawParticle::cos2ThetaV ( ) const
inline

Definition at line 281 of file RawParticle.h.

References myVertex, and Z().

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

281 { return Z() * Z() / myVertex.Vect().Mag2(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267
double Z() const
z of vertex
Definition: RawParticle.h:288

◆ e()

double RawParticle::e ( ) const
inline

◆ E()

double RawParticle::E ( ) const
inline

energy of the momentum

Definition at line 306 of file RawParticle.h.

References myMomentum.

Referenced by KineParticleFilter::acceptParticle(), BaseParticlePropagator::backPropagate(), MuonBremsstrahlungSimulator::compute(), et(), MaterialEffects::interact(), BaseParticlePropagator::propagate(), rotate(), rotateX(), rotateY(), and rotateZ().

306 { return myMomentum.E(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266

◆ et()

double RawParticle::et ( ) const

get the transverse energy

Definition at line 82 of file RawParticle.cc.

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

82  {
83  double mypp, tmpEt = -1.;
84 
85  mypp = std::sqrt(momentum().mag2());
86  if (mypp != 0) {
87  tmpEt = E() * pt() / mypp;
88  }
89  return tmpEt;
90 }
double E() const
energy of the momentum
Definition: RawParticle.h:306
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:321
double pt() const
transverse momentum
Definition: RawParticle.h:309
T sqrt(T t)
Definition: SSEVec.h:19
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)

◆ eta()

double RawParticle::eta ( ) const
inline

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

Definition at line 279 of file RawParticle.h.

References dqm-mbProfile::log, funct::tan(), and theta().

Referenced by Particle.Particle::__str__(), PFTrackTransformer::addPointsAndBrems(), datamodel.Object::DeltaR(), CalorimetryManager::EMShowerSimulation(), Jet.Jet::jetID(), datamodel.Object::p4(), EcalHitMaker::preshowerCellLine(), and Jet.Jet::puJetId().

279 { 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:315

◆ isUsed()

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 244 of file RawParticle.h.

References myUsed.

244 { return myUsed; }
int myUsed
status of the locking
Definition: RawParticle.h:272

◆ M2()

double RawParticle::M2 ( ) const
inline

mass squared

Definition at line 318 of file RawParticle.h.

References myMomentum.

318 { return myMomentum.M2(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266

◆ mag()

double RawParticle::mag ( ) const
inline

the magnitude of the momentum

Definition at line 313 of file RawParticle.h.

References myMomentum.

313 { return myMomentum.mag(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266

◆ mass()

double RawParticle::mass ( ) const
inline

◆ momentum() [1/2]

const XYZTLorentzVector & RawParticle::momentum ( ) const
inline

◆ momentum() [2/2]

XYZTLorentzVector & RawParticle::momentum ( )
inline

the momentum fourvector

Definition at line 322 of file RawParticle.h.

References myMomentum.

322 { return myMomentum; }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266

◆ operator=() [1/2]

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

Copy assignment operator

◆ operator=() [2/2]

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

◆ Perp2()

double RawParticle::Perp2 ( ) const
inline

perpendicular momentum squared

Definition at line 311 of file RawParticle.h.

References myMomentum.

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

311 { return myMomentum.Perp2(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266

◆ phi()

double RawParticle::phi ( ) const
inline

phi of momentum vector

Definition at line 316 of file RawParticle.h.

References myMomentum.

Referenced by Particle.Particle::__str__(), datamodel.Object::DeltaR(), datamodel.Object::p4(), and ntupleDataFormat.Track::phiPull().

316 { return myMomentum.phi(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266

◆ pid()

int RawParticle::pid ( ) const
inline

get the HEP particle ID number

Definition at line 277 of file RawParticle.h.

References myId.

Referenced by KineParticleFilter::acceptParticle(), ParticlePropagator::initProperDecayTime(), MaterialEffects::interact(), and PythiaDecays::particleDaughters().

277 { return myId; }
int myId
the particle id number HEP-PID
Definition: RawParticle.h:270

◆ print()

void RawParticle::print ( ) const

Print the formated particle information. The format is: NAME______PX______PY______PZ______E_______Mtheo___Mrec____Qrec____X_______Y_______Z_______T_______

◆ printName()

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.

◆ Pt()

double RawParticle::Pt ( ) const
inline

◆ pt()

double RawParticle::pt ( ) const
inline

◆ px()

double RawParticle::px ( ) const
inline

x of the momentum

Definition at line 296 of file RawParticle.h.

References myMomentum.

Referenced by PFSimParticleProducer::produce(), and SetPx().

296 { return myMomentum.px(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266

◆ Px()

double RawParticle::Px ( ) const
inline

◆ py()

double RawParticle::py ( ) const
inline

y of the momentum

Definition at line 299 of file RawParticle.h.

References myMomentum.

Referenced by PFSimParticleProducer::produce(), and SetPy().

299 { return myMomentum.py(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266

◆ Py()

double RawParticle::Py ( ) const
inline

◆ pz()

double RawParticle::pz ( ) const
inline

z of the momentum

Definition at line 302 of file RawParticle.h.

References myMomentum.

Referenced by PFSimParticleProducer::produce(), and SetPz().

302 { return myMomentum.pz(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266

◆ Pz()

double RawParticle::Pz ( ) const
inline

◆ r()

double RawParticle::r ( ) const
inline

vertex radius

Definition at line 292 of file RawParticle.h.

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

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

292 { return std::sqrt(r2()); }
T sqrt(T t)
Definition: SSEVec.h:19
double r2() const
vertex radius**2
Definition: RawParticle.h:293

◆ R()

double RawParticle::R ( ) const
inline

vertex radius

Definition at line 290 of file RawParticle.h.

References R2(), and mathSSE::sqrt().

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

290 { return std::sqrt(R2()); }
double R2() const
vertex radius**2
Definition: RawParticle.h:291
T sqrt(T t)
Definition: SSEVec.h:19

◆ r2()

double RawParticle::r2 ( ) const
inline

vertex radius**2

Definition at line 293 of file RawParticle.h.

References myVertex.

Referenced by r().

293 { return myVertex.Perp2(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267

◆ R2()

double RawParticle::R2 ( ) const
inline

◆ reUse()

void RawParticle::reUse ( )
inline

Unlock the particle, see isUsed()

Definition at line 252 of file RawParticle.h.

References myUsed.

252 { myUsed = 0; }
int myUsed
status of the locking
Definition: RawParticle.h:272

◆ rotate() [1/6]

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

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

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

41  {
42  Rotation r(raxis, angle);
43  XYZVector v(r * myMomentum.Vect());
44  setMomentum(v.X(), v.Y(), v.Z(), E());
45 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:328
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double r() const
vertex radius
Definition: RawParticle.h:292
double E() const
energy of the momentum
Definition: RawParticle.h:306
ROOT::Math::AxisAngle Rotation
Definition: RawParticle.h:44
math::XYZVector XYZVector
Definition: RawParticle.h:26
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11

◆ rotate() [2/6]

void RawParticle::rotate ( const Rotation r)
inline

Definition at line 341 of file RawParticle.h.

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

341  {
342  XYZVector v(r(myMomentum.Vect()));
343  setMomentum(v.X(), v.Y(), v.Z(), E());
344 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:328
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double r() const
vertex radius
Definition: RawParticle.h:292
double E() const
energy of the momentum
Definition: RawParticle.h:306
math::XYZVector XYZVector
Definition: RawParticle.h:26

◆ rotate() [3/6]

void RawParticle::rotate ( const Rotation3D r)
inline

Definition at line 336 of file RawParticle.h.

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

336  {
337  XYZVector v(r(myMomentum.Vect()));
338  setMomentum(v.X(), v.Y(), v.Z(), E());
339 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:328
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double r() const
vertex radius
Definition: RawParticle.h:292
double E() const
energy of the momentum
Definition: RawParticle.h:306
math::XYZVector XYZVector
Definition: RawParticle.h:26

◆ rotate() [4/6]

void RawParticle::rotate ( const RotationX r)
inline

Definition at line 346 of file RawParticle.h.

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

346  {
347  XYZVector v(r(myMomentum.Vect()));
348  setMomentum(v.X(), v.Y(), v.Z(), E());
349 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:328
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double r() const
vertex radius
Definition: RawParticle.h:292
double E() const
energy of the momentum
Definition: RawParticle.h:306
math::XYZVector XYZVector
Definition: RawParticle.h:26

◆ rotate() [5/6]

void RawParticle::rotate ( const RotationY r)
inline

Definition at line 351 of file RawParticle.h.

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

351  {
352  XYZVector v(r(myMomentum.Vect()));
353  setMomentum(v.X(), v.Y(), v.Z(), E());
354 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:328
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double r() const
vertex radius
Definition: RawParticle.h:292
double E() const
energy of the momentum
Definition: RawParticle.h:306
math::XYZVector XYZVector
Definition: RawParticle.h:26

◆ rotate() [6/6]

void RawParticle::rotate ( const RotationZ r)
inline

Definition at line 356 of file RawParticle.h.

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

356  {
357  XYZVector v(r(myMomentum.Vect()));
358  setMomentum(v.X(), v.Y(), v.Z(), E());
359 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:328
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double r() const
vertex radius
Definition: RawParticle.h:292
double E() const
energy of the momentum
Definition: RawParticle.h:306
math::XYZVector XYZVector
Definition: RawParticle.h:26

◆ rotateX()

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

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

47  {
48  RotationX r(rphi);
49  XYZVector v(r * myMomentum.Vect());
50  setMomentum(v.X(), v.Y(), v.Z(), E());
51 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:328
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double r() const
vertex radius
Definition: RawParticle.h:292
double E() const
energy of the momentum
Definition: RawParticle.h:306
ROOT::Math::RotationX RotationX
Definition: RawParticle.h:46
math::XYZVector XYZVector
Definition: RawParticle.h:26

◆ rotateY()

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

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

53  {
54  RotationY r(rphi);
55  XYZVector v(r * myMomentum.Vect());
56  setMomentum(v.X(), v.Y(), v.Z(), E());
57 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:328
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double r() const
vertex radius
Definition: RawParticle.h:292
double E() const
energy of the momentum
Definition: RawParticle.h:306
ROOT::Math::RotationY RotationY
Definition: RawParticle.h:47
math::XYZVector XYZVector
Definition: RawParticle.h:26

◆ rotateZ()

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

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

59  {
60  RotationZ r(rphi);
61  XYZVector v(r * myMomentum.Vect());
62  setMomentum(v.X(), v.Y(), v.Z(), E());
63 }
void setMomentum(const XYZTLorentzVector &vtx)
set the momentum
Definition: RawParticle.h:328
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double r() const
vertex radius
Definition: RawParticle.h:292
double E() const
energy of the momentum
Definition: RawParticle.h:306
ROOT::Math::RotationZ RotationZ
Definition: RawParticle.h:48
math::XYZVector XYZVector
Definition: RawParticle.h:26

◆ setCharge()

void RawParticle::setCharge ( float  q)

set the MEASURED charge

Definition at line 32 of file RawParticle.cc.

References myCharge, and submitPVResolutionJobs::q.

Referenced by BaseParticlePropagator::backPropagate(), and BaseParticlePropagator::propagateToBeamCylinder().

32 { myCharge = q; }
double myCharge
the MEASURED charge
Definition: RawParticle.h:268

◆ SetE()

void RawParticle::SetE ( double  e)
inline

Definition at line 334 of file RawParticle.h.

References e(), and myMomentum.

Referenced by BaseParticlePropagator::propagateToBeamCylinder().

334 { myMomentum.SetE(e); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double e() const
energy of the momentum
Definition: RawParticle.h:305

◆ setMass()

void RawParticle::setMass ( float  m)

set the RECONSTRUCTED mass

Definition at line 30 of file RawParticle.cc.

References visualization-live-secondInstance_cfg::m, and myMass.

◆ setMomentum() [1/2]

void RawParticle::setMomentum ( const XYZTLorentzVector vtx)
inline

◆ setMomentum() [2/2]

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

Definition at line 329 of file RawParticle.h.

References a, b, HltBtagPostValidation_cff::c, ztail::d, and myMomentum.

329 { myMomentum.SetXYZT(a, b, c, d); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
d
Definition: ztail.py:151
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119

◆ SetPx()

void RawParticle::SetPx ( double  px)
inline

Definition at line 331 of file RawParticle.h.

References myMomentum, and px().

Referenced by BaseParticlePropagator::propagateToNominalVertex().

331 { myMomentum.SetPx(px); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double px() const
x of the momentum
Definition: RawParticle.h:296

◆ SetPy()

void RawParticle::SetPy ( double  py)
inline

Definition at line 332 of file RawParticle.h.

References myMomentum, and py().

Referenced by BaseParticlePropagator::propagateToNominalVertex().

332 { myMomentum.SetPy(py); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double py() const
y of the momentum
Definition: RawParticle.h:299

◆ SetPz()

void RawParticle::SetPz ( double  pz)
inline

Definition at line 333 of file RawParticle.h.

References myMomentum, and pz().

333 { myMomentum.SetPz(pz); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double pz() const
z of the momentum
Definition: RawParticle.h:302

◆ setStatus()

void RawParticle::setStatus ( int  istat)

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

Definition at line 28 of file RawParticle.cc.

References myStatus.

28 { myStatus = istat; }
int myStatus
the status code according to PYTHIA
Definition: RawParticle.h:271

◆ setT()

void RawParticle::setT ( const double  t)

set the time of creation

Definition at line 39 of file RawParticle.cc.

References myVertex, and t().

39 { myVertex.SetE(t); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267
double t() const
vertex time
Definition: RawParticle.h:285

◆ setVertex() [1/2]

void RawParticle::setVertex ( const XYZTLorentzVector vtx)
inline

◆ setVertex() [2/2]

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

Definition at line 326 of file RawParticle.h.

References a, b, HltBtagPostValidation_cff::c, ztail::d, and myVertex.

326 { myVertex.SetXYZT(a, b, c, d); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267
d
Definition: ztail.py:151
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119

◆ status()

int RawParticle::status ( ) const
inline

get the particle status

Definition at line 278 of file RawParticle.h.

References myStatus.

278 { return myStatus; }
int myStatus
the status code according to PYTHIA
Definition: RawParticle.h:271

◆ t()

double RawParticle::t ( ) const
inline

vertex time

Definition at line 285 of file RawParticle.h.

References myVertex.

Referenced by setT().

285 { return myVertex.E(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267

◆ T()

double RawParticle::T ( ) const
inline

vertex time

Definition at line 289 of file RawParticle.h.

References myVertex.

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

289 { return myVertex.E(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267

◆ theta()

double RawParticle::theta ( ) const
inline

theta of momentum vector

Definition at line 315 of file RawParticle.h.

References myMomentum.

Referenced by eta(), and Tau.Tau::zImpact().

315 { return myMomentum.theta(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266

◆ translate()

void RawParticle::translate ( const XYZVector t)
inline

Translate the vertex by a given space amount

Definition at line 366 of file RawParticle.h.

References myVertex, T(), X(), Y(), and Z().

366  {
367  myVertex.SetXYZT(X() + tr.X(), Y() + tr.Y(), Z() + tr.Z(), T());
368 }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267
double Z() const
z of vertex
Definition: RawParticle.h:288
double T() const
vertex time
Definition: RawParticle.h:289
double Y() const
y of vertex
Definition: RawParticle.h:287
double X() const
x of vertex
Definition: RawParticle.h:286

◆ use()

void RawParticle::use ( )
inline

Lock the particle, see isUsed()

Definition at line 248 of file RawParticle.h.

References myUsed.

248 { myUsed = 1; }
int myUsed
status of the locking
Definition: RawParticle.h:272

◆ Vect()

XYZVector RawParticle::Vect ( ) const
inline

◆ vertex()

const XYZTLorentzVector & RawParticle::vertex ( ) const
inline

◆ x()

double RawParticle::x ( ) const
inline

x of vertex

Definition at line 282 of file RawParticle.h.

References myVertex.

Referenced by svgfig.Curve.Sample::__repr__(), svgfig.Ellipse::__repr__(), geometryXMLparser.Alignable::pos(), PFSimParticleProducer::produce(), ntupleDataFormat._HitObject::r(), and ntupleDataFormat._HitObject::r3D().

282 { return myVertex.Px(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267

◆ X()

double RawParticle::X ( ) const
inline

◆ y()

double RawParticle::y ( ) const
inline

y of vertex

Definition at line 283 of file RawParticle.h.

References myVertex.

Referenced by svgfig.Ellipse::__repr__(), geometryXMLparser.Alignable::pos(), PFSimParticleProducer::produce(), ntupleDataFormat._HitObject::r(), and ntupleDataFormat._HitObject::r3D().

283 { return myVertex.Py(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267

◆ Y()

double RawParticle::Y ( ) const
inline

◆ z()

double RawParticle::z ( ) const
inline

z of vertex

Definition at line 284 of file RawParticle.h.

References myVertex.

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

284 { return myVertex.Pz(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267

◆ Z()

double RawParticle::Z ( ) const
inline

Friends And Related Function Documentation

◆ rawparticle::makeMuon

RawParticle rawparticle::makeMuon ( bool  ,
const XYZTLorentzVector ,
const XYZTLorentzVector  
)
friend

◆ unchecked_makeParticle [1/2]

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

Definition at line 19 of file makeParticle.cc.

19  {
20  return RawParticle(id, p, mass, charge);
21 }
double charge() const
get the MEASURED charge
Definition: RawParticle.h:294
double mass() const
get the MEASURED mass
Definition: RawParticle.h:295
RawParticle()=default

◆ unchecked_makeParticle [2/2]

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

Definition at line 23 of file makeParticle.cc.

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

Member Data Documentation

◆ myCharge

double RawParticle::myCharge = 0.
private

the MEASURED charge

Definition at line 268 of file RawParticle.h.

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

◆ myId

int RawParticle::myId = 0
private

the particle id number HEP-PID

Definition at line 270 of file RawParticle.h.

Referenced by chargeConjugate(), and pid().

◆ myMass

double RawParticle::myMass = 0.
private

the RECONSTRUCTED mass

Definition at line 269 of file RawParticle.h.

Referenced by mass(), and setMass().

◆ myMomentum

XYZTLorentzVector RawParticle::myMomentum
private

the four vector of the momentum

Definition at line 266 of file RawParticle.h.

Referenced by cos2Theta(), e(), E(), M2(), mag(), momentum(), Perp2(), phi(), Pt(), pt(), px(), Px(), py(), Py(), pz(), Pz(), rotate(), rotateX(), rotateY(), rotateZ(), SetE(), setMomentum(), SetPx(), SetPy(), SetPz(), theta(), and Vect().

◆ myStatus

int RawParticle::myStatus = 99
private

the status code according to PYTHIA

Definition at line 271 of file RawParticle.h.

Referenced by setStatus(), and status().

◆ myUsed

int RawParticle::myUsed = 0
private

status of the locking

Definition at line 272 of file RawParticle.h.

Referenced by isUsed(), reUse(), and use().

◆ myVertex

XYZTLorentzVector RawParticle::myVertex
private

the four vector of the vertex

Definition at line 267 of file RawParticle.h.

Referenced by cos2ThetaV(), r2(), R2(), setT(), setVertex(), t(), T(), translate(), vertex(), x(), X(), y(), Y(), z(), and Z().