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

ParticleTabletab
 

Detailed Description

Definition at line 31 of file RawParticle.h.

Member Typedef Documentation

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

Definition at line 39 of file RawParticle.h.

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

Definition at line 34 of file RawParticle.h.

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

Definition at line 35 of file RawParticle.h.

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

Definition at line 36 of file RawParticle.h.

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

Definition at line 37 of file RawParticle.h.

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

Definition at line 38 of file RawParticle.h.

Constructor & Destructor Documentation

RawParticle::RawParticle ( )

Definition at line 18 of file RawParticle.cc.

References init().

18  {
19  init();
20 }
void init()
Definition: RawParticle.cc:90
RawParticle::~RawParticle ( )
virtual

Definition at line 68 of file RawParticle.cc.

68  {
69  // nParticles--;
70 }
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 22 of file RawParticle.cc.

References init().

23  : XYZTLorentzVector(p) {
24  init();
25 }
void init()
Definition: RawParticle.cc:90
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 27 of file RawParticle.cc.

References init(), and setID().

29  : XYZTLorentzVector(p) {
30  this->init();
31  this->setID(id);
32 }
void setID(const int id)
Definition: RawParticle.cc:101
void init()
Definition: RawParticle.cc:90
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 34 of file RawParticle.cc.

References init(), and setID().

36  : XYZTLorentzVector(p) {
37  this->init();
38  this->setID(name);
39 }
void setID(const int id)
Definition: RawParticle.cc:101
void init()
Definition: RawParticle.cc:90
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 41 of file RawParticle.cc.

References init(), and myVertex.

42  :
44 {
45  init();
46  myVertex = xStart;
47 }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:249
void init()
Definition: RawParticle.cc:90
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 49 of file RawParticle.cc.

References init().

49  :
50  XYZTLorentzVector(px,py,pz,e)
51 {
52  init();
53 }
void init()
Definition: RawParticle.cc:90
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
RawParticle::RawParticle ( const RawParticle p)

Copy constructor

Definition at line 55 of file RawParticle.cc.

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

55  :
56  XYZTLorentzVector(right.Px(),right.Py(),right.Pz(),right.E())
57 {
58  myId = right.myId;
59  myStatus = right.myStatus;
60  myUsed = right.myUsed;
61  myCharge = right.myCharge;
62  myMass = right.myMass;
63  myVertex = (right.myVertex);
64  tab = (right.tab);
65  myInfo = (right.myInfo);
66 }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:249
int myId
the particle id number HEP-PID
Definition: RawParticle.h:250
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:254
ParticleTable * tab
Definition: RawParticle.h:258
int myStatus
the status code according to PYTHIA
Definition: RawParticle.h:251
double myCharge
the MEASURED charge
Definition: RawParticle.h:253
int myUsed
status of the locking
Definition: RawParticle.h:252
const ParticleData * myInfo
The pointer to the PDG info.
Definition: RawParticle.h:255
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 182 of file RawParticle.cc.

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

Referenced by NuclearInteractionSimulator::compute().

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

Definition at line 310 of file RawParticle.h.

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

310  {
311  XYZTLorentzVector p ( b(momentum()) ); SetXYZT(p.Px(),p.Py(),p.Pz(),p.E());
312 }
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:285
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 143 of file RawParticle.cc.

References myCharge, and myId.

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

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

Definition at line 267 of file RawParticle.h.

Referenced by KineParticleFilter::isOKForMe().

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

Definition at line 268 of file RawParticle.h.

References myVertex, and Z().

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

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

get the transverse energy

Definition at line 306 of file RawParticle.cc.

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

306  {
307  double mypp, tmpEt=-1.;
308 
309  mypp = std::sqrt(momentum().mag2());
310  if ( mypp != 0 ) {
311  tmpEt = E() * pt() / mypp;
312  }
313  return tmpEt;
314 }
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:285
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 266 of file RawParticle.h.

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

Referenced by EcalHitMaker::preshowerCellLine().

266 { 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 90 of file RawParticle.cc.

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

Referenced by RawParticle().

90  {
91  myId=0;
92  myStatus=99;
93  myUsed=0;
94  myCharge=0.;
95  myMass=0.;
97  myInfo=0;
98 }
int myId
the particle id number HEP-PID
Definition: RawParticle.h:250
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:254
ParticleTable * tab
Definition: RawParticle.h:258
int myStatus
the status code according to PYTHIA
Definition: RawParticle.h:251
double myCharge
the MEASURED charge
Definition: RawParticle.h:253
int myUsed
status of the locking
Definition: RawParticle.h:252
static ParticleTable * instance()
Definition: ParticleTable.h:15
const ParticleData * myInfo
The pointer to the PDG info.
Definition: RawParticle.h:255
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 233 of file RawParticle.h.

References myUsed.

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

Copy assignment operator

Definition at line 73 of file RawParticle.cc.

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

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

get the THEORETICAL charge

Definition at line 245 of file RawParticle.cc.

References myInfo, and lumiQueryAPI::q.

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

get the THEORETICAL lifetime

Definition at line 263 of file RawParticle.cc.

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

Referenced by ParticlePropagator::initProperDecayTime().

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

get the THEORETICAL mass

Definition at line 254 of file RawParticle.cc.

References m, and myInfo.

Referenced by FBaseSimEvent::addSimTrack().

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

get the PDG name

Definition at line 188 of file RawParticle.cc.

References myInfo, AlCaHLTBitMon_QueryRunRegistry::string, and tab.

Referenced by printName().

188  {
189  std::string MyParticleName;
190  if ( tab && myInfo ) {
191  MyParticleName = myInfo->name();
192  } else {
193  MyParticleName = "unknown ";
194  }
195  return (std::string) MyParticleName;}
ParticleTable * tab
Definition: RawParticle.h:258
const ParticleData * myInfo
The pointer to the PDG info.
Definition: RawParticle.h:255
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 211 of file RawParticle.cc.

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

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

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

Referenced by print().

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

vertex radius

Definition at line 279 of file RawParticle.h.

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

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

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

vertex radius

Definition at line 277 of file RawParticle.h.

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

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

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

vertex radius**2

Definition at line 280 of file RawParticle.h.

References myVertex.

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

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

Unlock the particle, see isUsed()

Definition at line 241 of file RawParticle.h.

References myUsed.

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

References r(), and findQualityFiles::v.

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

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

References r(), and findQualityFiles::v.

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

Definition at line 290 of file RawParticle.h.

References r(), and findQualityFiles::v.

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

Definition at line 298 of file RawParticle.h.

References r(), and findQualityFiles::v.

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

Definition at line 302 of file RawParticle.h.

References r(), and findQualityFiles::v.

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

Definition at line 306 of file RawParticle.h.

References r(), and findQualityFiles::v.

306  {
307  XYZVector v ( r(Vect()) ); SetXYZT(v.X(),v.Y(),v.Z(),E());
308 }
math::XYZVector XYZVector
double r() const
vertex radius
Definition: RawParticle.h:279
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 161 of file RawParticle.cc.

References r(), and findQualityFiles::v.

161  {
162  RotationX r(rphi);
163  XYZVector v(r * Vect());
164  SetXYZT(v.X(),v.Y(),v.Z(),E());
165 }
ROOT::Math::RotationX RotationX
Definition: RawParticle.h:36
math::XYZVector XYZVector
double r() const
vertex radius
Definition: RawParticle.h:279
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 168 of file RawParticle.cc.

References r(), and findQualityFiles::v.

168  {
169  RotationY r(rphi);
170  XYZVector v(r * Vect());
171  SetXYZT(v.X(),v.Y(),v.Z(),E());
172 }
math::XYZVector XYZVector
ROOT::Math::RotationY RotationY
Definition: RawParticle.h:37
double r() const
vertex radius
Definition: RawParticle.h:279
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 175 of file RawParticle.cc.

References r(), and findQualityFiles::v.

175  {
176  RotationZ r(rphi);
177  XYZVector v(r * Vect());
178  SetXYZT(v.X(),v.Y(),v.Z(),E());
179 }
ROOT::Math::RotationZ RotationZ
Definition: RawParticle.h:38
math::XYZVector XYZVector
double r() const
vertex radius
Definition: RawParticle.h:279
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 101 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().

101  {
102  myId = id;
103  if ( tab ) {
104  if ( !myInfo )
105  myInfo = tab->theTable()->particle(HepPDT::ParticleID(myId));
106  if ( myInfo ) {
107  myCharge = myInfo->charge();
108  myMass = myInfo->mass().value();
109  }
110  }
111 }
int myId
the particle id number HEP-PID
Definition: RawParticle.h:250
double myMass
the RECONSTRUCTED mass
Definition: RawParticle.h:254
ParticleTable * tab
Definition: RawParticle.h:258
double myCharge
the MEASURED charge
Definition: RawParticle.h:253
const HepPDT::ParticleDataTable * theTable() const
Get the pointer to the particle data table.
Definition: ParticleTable.h:12
const ParticleData * myInfo
The pointer to the PDG info.
Definition: RawParticle.h:255
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 114 of file RawParticle.cc.

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

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

set the RECONSTRUCTED mass

Definition at line 133 of file RawParticle.cc.

References m, and myMass.

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

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

Definition at line 128 of file RawParticle.cc.

References myStatus.

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

set the time of creation

Definition at line 149 of file RawParticle.cc.

References myVertex.

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

Definition at line 288 of file RawParticle.h.

References myVertex.

288 { myVertex.SetXYZT(a,b,c,d); }
XYZTLorentzVector myVertex
the four vector of the vertex
Definition: RawParticle.h:249
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 265 of file RawParticle.h.

References myStatus.

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

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

vertex time

Definition at line 272 of file RawParticle.h.

References myVertex.

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

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

vertex time

Definition at line 276 of file RawParticle.h.

References myVertex.

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

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

Translate the vertex by a given space amount

Definition at line 314 of file RawParticle.h.

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

Referenced by MultipleScatteringSimulator::compute().

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

Lock the particle, see isUsed()

Definition at line 237 of file RawParticle.h.

References myUsed.

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

References myVertex.

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

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

Member Data Documentation

double RawParticle::myCharge
protected

the MEASURED charge

Definition at line 253 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 250 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 255 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 254 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 251 of file RawParticle.h.

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

int RawParticle::myUsed
protected

status of the locking

Definition at line 252 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 249 of file RawParticle.h.

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

ParticleTable* RawParticle::tab
private

Definition at line 258 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(), init(), 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(), RawParticle(), 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().