CMS 3D CMS Logo

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

#include <RawParticle.h>

Inheritance diagram for RawParticle:
BaseParticlePropagator ParticlePropagator

Public Types

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

Public Member Functions

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

Protected Attributes

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

Private Member Functions

void init ()
 

Private Attributes

const ParticleTabletab
 

Detailed Description

Definition at line 32 of file RawParticle.h.

Member Typedef Documentation

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

Definition at line 40 of file RawParticle.h.

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

Definition at line 35 of file RawParticle.h.

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

Definition at line 36 of file RawParticle.h.

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

Definition at line 37 of file RawParticle.h.

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

Definition at line 38 of file RawParticle.h.

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

Definition at line 39 of file RawParticle.h.

Constructor & Destructor Documentation

RawParticle::RawParticle ( )

Definition at line 18 of file RawParticle.cc.

References init().

18  :
20  init();
21 }
const ParticleTable * tab
Definition: RawParticle.h:259
static ParticleTable *const instance()
Definition: ParticleTable.h:30
void init()
Definition: RawParticle.cc:91
RawParticle::~RawParticle ( )
virtual

Definition at line 69 of file RawParticle.cc.

69  {
70  // nParticles--;
71 }
RawParticle::RawParticle ( const XYZTLorentzVector p)

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

Definition at line 23 of file RawParticle.cc.

References init().

25  init();
26 }
const ParticleTable * tab
Definition: RawParticle.h:259
static ParticleTable *const instance()
Definition: ParticleTable.h:30
void init()
Definition: RawParticle.cc:91
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
RawParticle::RawParticle ( const int  id,
const XYZTLorentzVector p 
)

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

Definition at line 28 of file RawParticle.cc.

References init(), and setID().

31  this->init();
32  this->setID(id);
33 }
const ParticleTable * tab
Definition: RawParticle.h:259
static ParticleTable *const instance()
Definition: ParticleTable.h:30
void setID(const int id)
Definition: RawParticle.cc:102
void init()
Definition: RawParticle.cc:91
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
RawParticle::RawParticle ( const std::string  name,
const XYZTLorentzVector p 
)

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

Definition at line 35 of file RawParticle.cc.

References init(), and setID().

38  this->init();
39  this->setID(name);
40 }
const ParticleTable * tab
Definition: RawParticle.h:259
static ParticleTable *const instance()
Definition: ParticleTable.h:30
void setID(const int id)
Definition: RawParticle.cc:102
void init()
Definition: RawParticle.cc:91
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
RawParticle::RawParticle ( const XYZTLorentzVector p,
const XYZTLorentzVector xStart 
)

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

Definition at line 42 of file RawParticle.cc.

References init(), and myVertex.

43  :
45 {
46  init();
47  myVertex = xStart;
48 }
const ParticleTable * tab
Definition: RawParticle.h:259
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:250
static ParticleTable *const instance()
Definition: ParticleTable.h:30
void init()
Definition: RawParticle.cc:91
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
RawParticle::RawParticle ( double  px,
double  py,
double  pz,
double  e 
)

Construct from fourmomentum components. Vertex is set to 0.

Definition at line 50 of file RawParticle.cc.

References init().

50  :
52 {
53  init();
54 }
const ParticleTable * tab
Definition: RawParticle.h:259
static ParticleTable *const instance()
Definition: ParticleTable.h:30
void init()
Definition: RawParticle.cc:91
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
RawParticle::RawParticle ( const RawParticle p)

Copy constructor

Definition at line 56 of file RawParticle.cc.

References myCharge, myId, myInfo, myMass, myStatus, myUsed, and myVertex.

56  :
57  XYZTLorentzVector(right.Px(),right.Py(),right.Pz(),right.E()),
59 {
60  myId = right.myId;
61  myStatus = right.myStatus;
62  myUsed = right.myUsed;
63  myCharge = right.myCharge;
64  myMass = right.myMass;
65  myVertex = (right.myVertex);
66  myInfo = (right.myInfo);
67 }
const ParticleTable * tab
Definition: RawParticle.h:259
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:250
int myId
the particle id number HEP-PID
Definition: RawParticle.h:251
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:255
static ParticleTable *const instance()
Definition: ParticleTable.h:30
int myStatus
the status code according to PYTHIA
Definition: RawParticle.h:252
double myCharge
the MEASURED charge
Definition: RawParticle.h:254
int myUsed
status of the locking
Definition: RawParticle.h:253
const ParticleData * myInfo
The pointer to the PDG info.
Definition: RawParticle.h:256
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15

Member Function Documentation

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

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

Warning
What happens to the vertex?

Definition at line 183 of file RawParticle.cc.

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

Referenced by NuclearInteractionSimulator::compute().

183  {
184  Boost b(betax,betay,betaz);
185  XYZTLorentzVector p ( b * momentum() );
186  SetXYZT(p.X(),p.Y(),p.Z(),p.T());
187 }
ROOT::Math::Boost Boost
Definition: RawParticle.h:40
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:286
double b
Definition: hdecay.h:120
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
void RawParticle::boost ( const Boost b)
inline

Definition at line 311 of file RawParticle.h.

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

311  {
312  XYZTLorentzVector p ( b(momentum()) ); SetXYZT(p.Px(),p.Py(),p.Pz(),p.E());
313 }
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:286
double b
Definition: hdecay.h:120
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
double RawParticle::charge ( void  ) 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 144 of file RawParticle.cc.

References myCharge, and myId.

144  {
145  myId = -myId;
146  myCharge = -1*myCharge;
147 }
int myId
the particle id number HEP-PID
Definition: RawParticle.h:251
double myCharge
the MEASURED charge
Definition: RawParticle.h:254
double RawParticle::cos2Theta ( ) const
inline

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

Definition at line 268 of file RawParticle.h.

Referenced by KineParticleFilter::isOKForMe().

268 { return Pz()*Pz()/Vect().Mag2(); }
double RawParticle::cos2ThetaV ( ) const
inline

Definition at line 269 of file RawParticle.h.

References myVertex, and Z().

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

269 { return Z()*Z()/myVertex.Vect().Mag2(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:250
double Z() const
z of vertex
Definition: RawParticle.h:276
double RawParticle::et ( ) const

get the transverse energy

Definition at line 307 of file RawParticle.cc.

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

307  {
308  double mypp, tmpEt=-1.;
309 
310  mypp = std::sqrt(momentum().mag2());
311  if ( mypp != 0 ) {
312  tmpEt = E() * pt() / mypp;
313  }
314  return tmpEt;
315 }
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:286
T sqrt(T t)
Definition: SSEVec.h:48
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
double RawParticle::eta ( void  ) const
inline

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

Definition at line 267 of file RawParticle.h.

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

Referenced by Particle.Particle::__str__(), Muon.Muon::absEffAreaIso(), Jet.Jet::jetID(), EcalHitMaker::preshowerCellLine(), and Jet.Jet::puJetId().

267 { return -std::log(std::tan(this->theta()/2.)); }
Geom::Theta< T > theta() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
void RawParticle::init ( void  )
private

Definition at line 91 of file RawParticle.cc.

References myCharge, myId, myInfo, myMass, myStatus, and myUsed.

Referenced by RawParticle().

91  {
92  myId=0;
93  myStatus=99;
94  myUsed=0;
95  myCharge=0.;
96  myMass=0.;
97  //tab = ParticleTable::instance();
98  myInfo=0;
99 }
int myId
the particle id number HEP-PID
Definition: RawParticle.h:251
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:255
int myStatus
the status code according to PYTHIA
Definition: RawParticle.h:252
double myCharge
the MEASURED charge
Definition: RawParticle.h:254
int myUsed
status of the locking
Definition: RawParticle.h:253
const ParticleData * myInfo
The pointer to the PDG info.
Definition: RawParticle.h:256
int RawParticle::isUsed ( ) const
inline

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

Definition at line 234 of file RawParticle.h.

References myUsed.

234 {return myUsed;}
int myUsed
status of the locking
Definition: RawParticle.h:253
double RawParticle::mass ( ) const
inline
const XYZTLorentzVector & RawParticle::momentum ( ) const
inline
RawParticle & RawParticle::operator= ( const RawParticle rhs)

Copy assignment operator

Definition at line 74 of file RawParticle.cc.

References ParticleTable::instance(), myCharge, myId, myInfo, myMass, myStatus, myUsed, myVertex, and tab.

74  {
75  // cout << "Copy assignment " << endl;
76  if (this != &right) { // don't copy into yourself
77  this->SetXYZT(right.Px(),right.Py(),right.Pz(),right.E());
78  myId = right.myId;
79  myStatus = right.myStatus;
80  myUsed = right.myUsed;
81  myCharge = right.myCharge;
82  myMass = right.myMass;
83  myVertex = right.myVertex;
85  myInfo = right.myInfo;
86  }
87  return *this;
88 }
const ParticleTable * tab
Definition: RawParticle.h:259
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:250
int myId
the particle id number HEP-PID
Definition: RawParticle.h:251
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:255
static ParticleTable *const instance()
Definition: ParticleTable.h:30
int myStatus
the status code according to PYTHIA
Definition: RawParticle.h:252
double myCharge
the MEASURED charge
Definition: RawParticle.h:254
int myUsed
status of the locking
Definition: RawParticle.h:253
const ParticleData * myInfo
The pointer to the PDG info.
Definition: RawParticle.h:256
double RawParticle::PDGcharge ( ) const

get the THEORETICAL charge

Definition at line 246 of file RawParticle.cc.

References myInfo, and lumiQueryAPI::q.

246  {
247  double q=-99999;
248  if ( myInfo ) {
249  q=myInfo->charge();
250  }
251  return q;
252 }
const ParticleData * myInfo
The pointer to the PDG info.
Definition: RawParticle.h:256
double RawParticle::PDGcTau ( ) const

get the THEORETICAL lifetime

Definition at line 264 of file RawParticle.cc.

References funct::abs(), myId, myInfo, and w.

Referenced by ParticlePropagator::initProperDecayTime().

264  {
265  double ct=1E99;
266  if ( myInfo ) {
267 
268  // The lifetime is 0. in the Pythia Particle Data Table !
269  // ct=tab->theTable()->particle(ParticleID(myId))->lifetime().value();
270 
271  // Get it from the width (apparently Gamma/c!)
272  double w = myInfo->totalWidth().value();
273  if ( w != 0. && myId != 1000022 ) {
274  ct = 6.582119e-25 / w / 10.; // ctau in cm
275  } else {
276  // Temporary fix of a bug in the particle data table
277  unsigned amyId = abs(myId);
278  if ( amyId != 22 && // photon
279  amyId != 11 && // e+/-
280  amyId != 10 && // nu_e
281  amyId != 12 && // nu_mu
282  amyId != 14 && // nu_tau
283  amyId != 1000022 && // Neutralino
284  amyId != 1000039 && // Gravitino
285  amyId != 2112 && // neutron/anti-neutron
286  amyId != 2212 && // proton/anti-proton
287  amyId != 101 && // Deutreron etc..
288  amyId != 102 && // Deutreron etc..
289  amyId != 103 && // Deutreron etc..
290  amyId != 104 ) { // Deutreron etc..
291  ct = 0.;
292  /* */
293  }
294  }
295  }
296 
297  /*
298  std::cout << setw(20) << setprecision(18)
299  << "myId/ctau/width = " << myId << " "
300  << ct << " " << w << endl;
301  */
302 
303  return ct;
304 }
const double w
Definition: UKUtility.cc:23
int myId
the particle id number HEP-PID
Definition: RawParticle.h:251
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const ParticleData * myInfo
The pointer to the PDG info.
Definition: RawParticle.h:256
double RawParticle::PDGmass ( ) const

get the THEORETICAL mass

Definition at line 255 of file RawParticle.cc.

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

Referenced by FBaseSimEvent::addSimTrack().

255  {
256  double m=-99999;
257  if ( myInfo ) {
258  m = myInfo->mass().value();
259  }
260  return m;
261 }
const ParticleData * myInfo
The pointer to the PDG info.
Definition: RawParticle.h:256
std::string RawParticle::PDGname ( ) const

get the PDG name

Definition at line 189 of file RawParticle.cc.

References myInfo, AlCaHLTBitMon_QueryRunRegistry::string, and tab.

Referenced by printName().

189  {
190  std::string MyParticleName;
191  if ( tab && myInfo ) {
192  MyParticleName = myInfo->name();
193  } else {
194  MyParticleName = "unknown ";
195  }
196  return (std::string) MyParticleName;}
const ParticleTable * tab
Definition: RawParticle.h:259
const ParticleData * myInfo
The pointer to the PDG info.
Definition: RawParticle.h:256
int RawParticle::pid ( ) const
inline
void RawParticle::print ( void  ) const

Print the formated particle information. The format is: NAME______PX______PY______PZ______E_______Mtheo___Mrec____Qrec____X_______Y_______Z_______T_______

Definition at line 212 of file RawParticle.cc.

References charge(), gather_cfg::cout, mass(), printName(), status(), T(), X(), Y(), and Z().

212  {
213  printName();
214  std::cout << std::setw(3) << status();
215  std::cout.setf(std::ios::fixed, std::ios::floatfield);
216  std::cout.setf(std::ios::right, std::ios::adjustfield);
217  std::cout << std::setw(8) << std::setprecision(2) << Px();
218  std::cout << std::setw(8) << std::setprecision(2) << Py();
219  std::cout << std::setw(8) << std::setprecision(2) << Pz();
220  std::cout << std::setw(8) << std::setprecision(2) << E();
221  std::cout << std::setw(8) << std::setprecision(2) << M();
222  std::cout << std::setw(8) << std::setprecision(2) << mass();
223  std::cout << std::setw(8) << std::setprecision(2) << charge();
224  std::cout << std::setw(8) << std::setprecision(2) << X();
225  std::cout << std::setw(8) << std::setprecision(2) << Y();
226  std::cout << std::setw(8) << std::setprecision(2) << Z();
227  std::cout << std::setw(8) << std::setprecision(2) << T();
228  std::cout << std::setw(0) << std::endl;
229 }
int status() const
get the particle status
Definition: RawParticle.h:266
void printName() const
Definition: RawParticle.cc:200
double mass() const
get the MEASURED mass
Definition: RawParticle.h:283
double Y() const
y of vertex
Definition: RawParticle.h:275
double Z() const
z of vertex
Definition: RawParticle.h:276
double charge() const
get the MEASURED charge
Definition: RawParticle.h:282
double X() const
x of vertex
Definition: RawParticle.h:274
tuple cout
Definition: gather_cfg.py:121
double T() const
vertex time
Definition: RawParticle.h:277
void RawParticle::printName ( ) const

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

Definition at line 200 of file RawParticle.cc.

References gather_cfg::cout, relval_steps::k, PDGname(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by print().

200  {
201  std::string MyParticleName = PDGname();
202  if (MyParticleName.length() != 0) {
203  std::cout << MyParticleName;
204  for(unsigned int k=0;k<9-MyParticleName.length() && k<10; k++)
205  std::cout << " " ;
206  } else {
207  std::cout << "unknown ";
208  }
209 }
std::string PDGname() const
get the PDG name
Definition: RawParticle.cc:189
tuple cout
Definition: gather_cfg.py:121
double RawParticle::r ( ) const
inline

vertex radius

Definition at line 280 of file RawParticle.h.

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

Referenced by BaseParticlePropagator::propagateToBeamCylinder(), ParticlePropagator::propagateToBoundSurface(), rotate(), rotateX(), rotateY(), and rotateZ().

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

vertex radius

Definition at line 278 of file RawParticle.h.

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

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

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

vertex radius**2

Definition at line 281 of file RawParticle.h.

References myVertex.

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

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

Unlock the particle, see isUsed()

Definition at line 242 of file RawParticle.h.

References myUsed.

242 { myUsed = 0;}
int myUsed
status of the locking
Definition: RawParticle.h:253
void RawParticle::rotate ( double  rphi,
const XYZVector raxis 
)

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

Definition at line 155 of file RawParticle.cc.

References r(), and findQualityFiles::v.

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

155  {
156  Rotation r(raxis,angle);
157  XYZVector v(r * Vect());
158  SetXYZT(v.X(),v.Y(),v.Z(),E());
159 }
math::XYZVector XYZVector
double r() const
vertex radius
Definition: RawParticle.h:280
ROOT::Math::AxisAngle Rotation
Definition: RawParticle.h:35
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 295 of file RawParticle.h.

References r(), and findQualityFiles::v.

295  {
296  XYZVector v ( r(Vect()) ); SetXYZT(v.X(),v.Y(),v.Z(),E());
297 }
math::XYZVector XYZVector
double r() const
vertex radius
Definition: RawParticle.h:280
void RawParticle::rotate ( const Rotation3D r)
inline

Definition at line 291 of file RawParticle.h.

References r(), and findQualityFiles::v.

291  {
292  XYZVector v ( r(Vect()) ); SetXYZT(v.X(),v.Y(),v.Z(),E());
293 }
math::XYZVector XYZVector
double r() const
vertex radius
Definition: RawParticle.h:280
void RawParticle::rotate ( const RotationX r)
inline

Definition at line 299 of file RawParticle.h.

References r(), and findQualityFiles::v.

299  {
300  XYZVector v ( r(Vect()) ); SetXYZT(v.X(),v.Y(),v.Z(),E());
301 }
math::XYZVector XYZVector
double r() const
vertex radius
Definition: RawParticle.h:280
void RawParticle::rotate ( const RotationY r)
inline

Definition at line 303 of file RawParticle.h.

References r(), and findQualityFiles::v.

303  {
304  XYZVector v ( r(Vect()) ); SetXYZT(v.X(),v.Y(),v.Z(),E());
305 }
math::XYZVector XYZVector
double r() const
vertex radius
Definition: RawParticle.h:280
void RawParticle::rotate ( const RotationZ r)
inline

Definition at line 307 of file RawParticle.h.

References r(), and findQualityFiles::v.

307  {
308  XYZVector v ( r(Vect()) ); SetXYZT(v.X(),v.Y(),v.Z(),E());
309 }
math::XYZVector XYZVector
double r() const
vertex radius
Definition: RawParticle.h:280
void RawParticle::rotateX ( double  rphi)
Warning
not yet implemented Rotate around x axis. Rotate rphi radian around the x axis. The Vertex is rotated as well.

Definition at line 162 of file RawParticle.cc.

References r(), and findQualityFiles::v.

162  {
163  RotationX r(rphi);
164  XYZVector v(r * Vect());
165  SetXYZT(v.X(),v.Y(),v.Z(),E());
166 }
ROOT::Math::RotationX RotationX
Definition: RawParticle.h:37
math::XYZVector XYZVector
double r() const
vertex radius
Definition: RawParticle.h:280
void RawParticle::rotateY ( double  rphi)

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

Definition at line 169 of file RawParticle.cc.

References r(), and findQualityFiles::v.

169  {
170  RotationY r(rphi);
171  XYZVector v(r * Vect());
172  SetXYZT(v.X(),v.Y(),v.Z(),E());
173 }
math::XYZVector XYZVector
ROOT::Math::RotationY RotationY
Definition: RawParticle.h:38
double r() const
vertex radius
Definition: RawParticle.h:280
void RawParticle::rotateZ ( double  rphi)

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

Definition at line 176 of file RawParticle.cc.

References r(), and findQualityFiles::v.

176  {
177  RotationZ r(rphi);
178  XYZVector v(r * Vect());
179  SetXYZT(v.X(),v.Y(),v.Z(),E());
180 }
ROOT::Math::RotationZ RotationZ
Definition: RawParticle.h:39
math::XYZVector XYZVector
double r() const
vertex radius
Definition: RawParticle.h:280
void RawParticle::setCharge ( float  q)
void RawParticle::setID ( const int  id)

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

Definition at line 102 of file RawParticle.cc.

References myCharge, myId, myInfo, myMass, RecoTau_DiTaus_pt_20-420_cfg::ParticleID, tab, and ParticleTable::theTable().

Referenced by MuonSimHitProducer::applyMaterialEffects(), NuclearInteractionSimulator::compute(), CalorimetryManager::MuonMipSimulation(), PileUpSimulator::produce(), and RawParticle().

102  {
103  myId = id;
104  if ( tab ) {
105  if ( !myInfo )
106  myInfo = tab->theTable()->particle(HepPDT::ParticleID(myId));
107  if ( myInfo ) {
108  myCharge = myInfo->charge();
109  myMass = myInfo->mass().value();
110  }
111  }
112 }
const ParticleTable * tab
Definition: RawParticle.h:259
int myId
the particle id number HEP-PID
Definition: RawParticle.h:251
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:255
double myCharge
the MEASURED charge
Definition: RawParticle.h:254
const HepPDT::ParticleDataTable * theTable() const
Get the pointer to the particle data table.
Definition: ParticleTable.h:26
const ParticleData * myInfo
The pointer to the PDG info.
Definition: RawParticle.h:256
void RawParticle::setID ( const std::string  name)

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

Definition at line 115 of file RawParticle.cc.

References myCharge, myId, myInfo, myMass, tab, and ParticleTable::theTable().

115  {
116  if ( tab ) {
117  if ( !myInfo ) myInfo = tab->theTable()->particle(name);
118  if ( myInfo ) {
119  myId = myInfo->pid();
120  myCharge = myInfo->charge();
121  myMass = myInfo->mass().value();
122  } else {
123  myId = 0;
124  }
125  }
126 }
const ParticleTable * tab
Definition: RawParticle.h:259
int myId
the particle id number HEP-PID
Definition: RawParticle.h:251
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:255
double myCharge
the MEASURED charge
Definition: RawParticle.h:254
const HepPDT::ParticleDataTable * theTable() const
Get the pointer to the particle data table.
Definition: ParticleTable.h:26
const ParticleData * myInfo
The pointer to the PDG info.
Definition: RawParticle.h:256
void RawParticle::setMass ( float  m)

set the RECONSTRUCTED mass

Definition at line 134 of file RawParticle.cc.

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

134  {
135  myMass = m;
136 }
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:255
void RawParticle::setStatus ( int  istat)

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

Definition at line 129 of file RawParticle.cc.

References myStatus.

129  {
130  myStatus = istat;
131 }
int myStatus
the status code according to PYTHIA
Definition: RawParticle.h:252
void RawParticle::setT ( const double  t)

set the time of creation

Definition at line 150 of file RawParticle.cc.

References myVertex.

150  {
151  myVertex.SetE(t);
152 }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:250
double t() const
vertex time
Definition: RawParticle.h:273
void RawParticle::setVertex ( const XYZTLorentzVector vtx)
inline
void RawParticle::setVertex ( double  xv,
double  yv,
double  zv,
double  tv 
)
inline

Definition at line 289 of file RawParticle.h.

References myVertex.

289 { myVertex.SetXYZT(a,b,c,d); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:250
tuple d
Definition: ztail.py:151
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
int RawParticle::status ( void  ) const
inline

get the particle status

Definition at line 266 of file RawParticle.h.

References myStatus.

Referenced by RawStableParticleFilter::isOKForMe(), operator<<(), and print().

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

vertex time

Definition at line 273 of file RawParticle.h.

References myVertex.

Referenced by FBaseSimEvent::addSimTrack(), and BaseParticlePropagator::setProperDecayTime().

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

vertex time

Definition at line 277 of file RawParticle.h.

References myVertex.

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

277 { return myVertex.E(); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:250
void RawParticle::translate ( const XYZVector t)
inline

Translate the vertex by a given space amount

Definition at line 315 of file RawParticle.h.

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

Referenced by MultipleScatteringSimulator::compute().

315  {
316  myVertex.SetXYZT(X()+tr.X(),Y()+tr.Y(),Z()+tr.Z(),T());
317 }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:250
double Y() const
y of vertex
Definition: RawParticle.h:275
double Z() const
z of vertex
Definition: RawParticle.h:276
double X() const
x of vertex
Definition: RawParticle.h:274
double T() const
vertex time
Definition: RawParticle.h:277
void RawParticle::use ( )
inline

Lock the particle, see isUsed()

Definition at line 238 of file RawParticle.h.

References myUsed.

238 { myUsed = 1;}
int myUsed
status of the locking
Definition: RawParticle.h:253
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 272 of file RawParticle.h.

References myVertex.

Referenced by geometryXMLparser.Alignable::pos(), PFSimParticleProducer::produce(), ParticlePropagator::propagateToBoundSurface(), and BaseParticlePropagator::propagateToClosestApproach().

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

Member Data Documentation

double RawParticle::myCharge
protected

the MEASURED charge

Definition at line 254 of file RawParticle.h.

Referenced by charge(), chargeConjugate(), init(), operator=(), RawParticle(), setCharge(), and setID().

int RawParticle::myId
protected

the particle id number HEP-PID

Definition at line 251 of file RawParticle.h.

Referenced by chargeConjugate(), init(), operator=(), PDGcTau(), pid(), RawParticle(), and setID().

const ParticleData* RawParticle::myInfo
protected

The pointer to the PDG info.

Definition at line 256 of file RawParticle.h.

Referenced by init(), operator=(), PDGcharge(), PDGcTau(), PDGmass(), PDGname(), RawParticle(), and setID().

double RawParticle::myMass
protected

the RECONSTRUCTED mass

Definition at line 255 of file RawParticle.h.

Referenced by init(), mass(), operator=(), RawParticle(), setID(), and setMass().

int RawParticle::myStatus
protected

the status code according to PYTHIA

Definition at line 252 of file RawParticle.h.

Referenced by init(), operator=(), RawParticle(), setStatus(), and status().

int RawParticle::myUsed
protected

status of the locking

Definition at line 253 of file RawParticle.h.

Referenced by init(), isUsed(), operator=(), RawParticle(), reUse(), and use().

XYZTLorentzVector RawParticle::myVertex
protected

the four vector of the vertex

Definition at line 250 of file RawParticle.h.

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

const ParticleTable* RawParticle::tab
private

Definition at line 259 of file RawParticle.h.

Referenced by Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::_updateCode(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::activated(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::activated(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::applyButtonClicked(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::cancel(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::centerView(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::centerViewMenuButtonClicked(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::centerViewMenuButtonClicked(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::chooseEditor(), Vispa.Main.TabController.TabController::close(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::codeSelected(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::currentCenterViewClassId(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::dumpPython(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::eventContent(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::eventContent(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::expandToDepthDialog(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::exportDot(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filterDialog(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::history(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::importButtonClicked(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::importConfig(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::isBusy(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::maximizeEditor(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::minimizeEditor(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::onCenterViewDoubleClicked(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::onSelected(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::onTreeViewSelected(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::openEditor(), operator=(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::originalEditor(), PDGname(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::readFile(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::refresh(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::removeButtonClicked(), Vispa.Main.TabController.TabController::save(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::save(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::saveImage(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::scriptChanged(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::select(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::selectDataAccessor(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setDataAccessor(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setEditable(), setID(), Vispa.Main.TabController.TabController::setModified(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setTab(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setZoom(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::startEditMode(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::toggleCollapsed(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::toggleUnderscoreProperties(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::treeViewMenuButtonClicked(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateCenterView(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateCenterView(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::updateCenterView(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateConfigHighlight(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::updateContent(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateContent(), Vispa.Main.TabController.TabController::updateLabel(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::updateTreeView(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateViewMenu(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::updateViewMenu(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::valueChanged(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::zoom(), Vispa.Main.TabController.TabController::zoomAll(), Vispa.Main.TabController.TabController::zoomChanged(), and Vispa.Main.TabController.TabController::zoomDialog().