CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 49 of file RawParticle.h.

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

Definition at line 44 of file RawParticle.h.

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

Definition at line 45 of file RawParticle.h.

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

Definition at line 46 of file RawParticle.h.

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

Definition at line 47 of file RawParticle.h.

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

Definition at line 48 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.

13 : myMomentum(p) {}
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
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 myCharge
the MEASURED charge
Definition: RawParticle.h:268
double charge() const
get the MEASURED charge
Definition: RawParticle.h:294
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.

26  : myMomentum(px, py, pz, e), myCharge{charge} {}
double pz() const
z of the momentum
Definition: RawParticle.h:302
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double e() const
energy of the momentum
Definition: RawParticle.h:305
double myCharge
the MEASURED charge
Definition: RawParticle.h:268
double charge() const
get the MEASURED charge
Definition: RawParticle.h:294
double px() const
x of the momentum
Definition: RawParticle.h:296
double py() const
y of the momentum
Definition: RawParticle.h:299
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 15 of file RawParticle.cc.

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 mass() const
get the MEASURED mass
Definition: RawParticle.h:295
double myCharge
the MEASURED charge
Definition: RawParticle.h:268
double charge() const
get the MEASURED charge
Definition: RawParticle.h:294
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 mass() const
get the MEASURED mass
Definition: RawParticle.h:295
double myCharge
the MEASURED charge
Definition: RawParticle.h:268
double charge() const
get the MEASURED charge
Definition: RawParticle.h:294

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 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
ROOT::Math::Boost Boost
Definition: RawParticle.h:49
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:321
double b
Definition: hdecay.h:118
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25
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
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 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
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(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double Pz() const
z of the momentum
Definition: RawParticle.h:303
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
double RawParticle::e ( ) const
inline
double RawParticle::E ( ) const
inline
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 pt() const
transverse momentum
Definition: RawParticle.h:309
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:321
T sqrt(T t)
Definition: SSEVec.h:19
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
double E() const
energy of the momentum
Definition: RawParticle.h:306
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 log, funct::tan(), and theta().

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

279 { return -std::log(std::tan(this->theta() / 2.)); }
static std::vector< std::string > checklist log
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
double theta() const
theta of momentum vector
Definition: RawParticle.h:315
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
double RawParticle::M2 ( ) const
inline

mass squared

Definition at line 318 of file RawParticle.h.

References myMomentum.

Referenced by NuclearInteractionSimulator::compute().

318 { return myMomentum.M2(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
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
double RawParticle::mass ( ) const
inline
const XYZTLorentzVector & RawParticle::momentum ( ) const
inline
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
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 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
double RawParticle::phi ( ) const
inline

phi of momentum vector

Definition at line 316 of file RawParticle.h.

References myMomentum.

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

316 { return myMomentum.phi(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
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 296 of file RawParticle.h.

References myMomentum.

Referenced by PFSimParticleProducer::produce().

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

y of the momentum

Definition at line 299 of file RawParticle.h.

References myMomentum.

Referenced by PFSimParticleProducer::produce().

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

z of the momentum

Definition at line 302 of file RawParticle.h.

References myMomentum.

Referenced by PFSimParticleProducer::produce().

302 { return myMomentum.pz(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
double RawParticle::Pz ( ) const
inline
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()); }
double r2() const
vertex radius**2
Definition: RawParticle.h:293
T sqrt(T t)
Definition: SSEVec.h:19
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
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
double RawParticle::R2 ( ) const
inline
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
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 E(), myMomentum, r(), setMomentum(), and findQualityFiles::v.

Referenced by MultipleScatteringSimulator::compute(), 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
ROOT::Math::AxisAngle Rotation
Definition: RawParticle.h:44
double E() const
energy of the momentum
Definition: RawParticle.h:306
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
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
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
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
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
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
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
ROOT::Math::RotationX RotationX
Definition: RawParticle.h:46
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
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
ROOT::Math::RotationY RotationY
Definition: RawParticle.h:47
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
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
ROOT::Math::RotationZ RotationZ
Definition: RawParticle.h:48
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
void RawParticle::setCharge ( float  q)
void RawParticle::SetE ( double  e)
inline

Definition at line 334 of file RawParticle.h.

References 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
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.

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

Definition at line 329 of file RawParticle.h.

References myMomentum.

329 { myMomentum.SetXYZT(a, b, c, d); }
const edm::EventSetup & c
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
tuple d
Definition: ztail.py:151
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119
void RawParticle::SetPx ( double  px)
inline

Definition at line 331 of file RawParticle.h.

References myMomentum.

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
void RawParticle::SetPy ( double  py)
inline

Definition at line 332 of file RawParticle.h.

References myMomentum.

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
void RawParticle::SetPz ( double  pz)
inline

Definition at line 333 of file RawParticle.h.

References myMomentum.

333 { myMomentum.SetPz(pz); }
double pz() const
z of the momentum
Definition: RawParticle.h:302
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
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
void RawParticle::setT ( const double  t)

set the time of creation

Definition at line 39 of file RawParticle.cc.

References myVertex.

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
void RawParticle::setVertex ( const XYZTLorentzVector vtx)
inline

set the vertex

Definition at line 325 of file RawParticle.h.

References myVertex.

Referenced by MuonSimHitProducer::applyMaterialEffects(), CalorimetryManager::EMShowerSimulation(), BaseParticlePropagator::propagate(), and BaseParticlePropagator::propagateToClosestApproach().

325 { myVertex = vtx; }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267
void RawParticle::setVertex ( double  xv,
double  yv,
double  zv,
double  tv 
)
inline

Definition at line 326 of file RawParticle.h.

References myVertex.

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

get the particle status

Definition at line 278 of file RawParticle.h.

References myStatus.

Referenced by operator<<().

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

vertex time

Definition at line 285 of file RawParticle.h.

References myVertex.

Referenced by FBaseSimEvent::addSimTrack().

285 { return myVertex.E(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:267
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
double RawParticle::theta ( ) const
inline

theta of momentum vector

Definition at line 315 of file RawParticle.h.

References myMomentum.

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

315 { return myMomentum.theta(); }
XYZTLorentzVector myMomentum
the four vector of the momentum
Definition: RawParticle.h:266
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().

Referenced by MultipleScatteringSimulator::compute().

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 Y() const
y of vertex
Definition: RawParticle.h:287
double Z() const
z of vertex
Definition: RawParticle.h:288
double X() const
x of vertex
Definition: RawParticle.h:286
double T() const
vertex time
Definition: RawParticle.h:289
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
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

y of vertex

Definition at line 283 of file RawParticle.h.

References myVertex.

Referenced by svgfig.Ellipse::__repr__(), lowptgsfeleid::features_V1(), 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
double RawParticle::Y ( ) const
inline
double RawParticle::z ( ) const
inline
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 19 of file makeParticle.cc.

19  {
20  return RawParticle(id, p, mass, charge);
21 }
double mass() const
get the MEASURED mass
Definition: RawParticle.h:295
double charge() const
get the MEASURED charge
Definition: RawParticle.h:294
RawParticle()=default
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 mass() const
get the MEASURED mass
Definition: RawParticle.h:295
double charge() const
get the MEASURED charge
Definition: RawParticle.h:294
RawParticle()=default

Member Data Documentation

double RawParticle::myCharge = 0.
private

the MEASURED charge

Definition at line 268 of file RawParticle.h.

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

int RawParticle::myId = 0
private

the particle id number HEP-PID

Definition at line 270 of file RawParticle.h.

Referenced by chargeConjugate(), and pid().

double RawParticle::myMass = 0.
private

the RECONSTRUCTED mass

Definition at line 269 of file RawParticle.h.

Referenced by mass(), and setMass().

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().

int RawParticle::myStatus = 99
private

the status code according to PYTHIA

Definition at line 271 of file RawParticle.h.

Referenced by setStatus(), and status().

int RawParticle::myUsed = 0
private

status of the locking

Definition at line 272 of file RawParticle.h.

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

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().