eic-smear  1.0.3
A collection of ROOT classes for Monte Carlo events and a fast-smearing code simulating detector effects for the Electron-Ion Collider task force
erhic::ParticleMCbase Class Reference

A particle produced by a Monte Carlo generator. More...

#include <ParticleMC.h>

Inheritance diagram for erhic::ParticleMCbase:
erhic::VirtualParticle erhic::ParticleMC

Public Member Functions

 ParticleMCbase ()
 
virtual ~ParticleMCbase ()
 Destructor. More...
 
virtual void Print (Option_t *="") const
 Print the contents of Particle to standard output. More...
 
virtual UInt_t GetIndex () const
 Returns the particle index in an event, in the range [1, N]. More...
 
virtual UShort_t GetStatus () const
 Returns the status of the particle. More...
 
virtual UShort_t GetParentIndex () const
 Returns the index of this particle's parent in an event. More...
 
virtual UShort_t GetParentIndex1 () const
 
virtual UShort_t GetChild1Index () const
 Returns the index of this particle's first child particle. More...
 
virtual UShort_t GetChildNIndex () const
 Returns the index of this particle's last child particle. More...
 
virtual UInt_t GetNChildren () const
 Returns the number of children of this particle. More...
 
virtual Double_t GetPx () const
 Returns the x component of 3-momentum. More...
 
virtual Double_t GetPy () const
 Returns the y component of 3-momentum. More...
 
virtual Double_t GetPz () const
 Returns the z component of 3-momentum. More...
 
virtual Double_t GetM () const
 Returns invariant mass (GeV/c2). More...
 
virtual Double_t GetPt () const
 Returns momentum transverse to the beam direction. More...
 
virtual TVector3 GetVertex () const
 Returns the origin point of the particle (cm). More...
 
virtual Pid GetParentId () const
 Returns the identity information of this particle's parent. More...
 
virtual Double_t GetP () const
 Returns the total momentum (GeV). More...
 
virtual Double_t GetTheta () const
 Returns the polar angle in the range [0, pi] radians. More...
 
virtual Double_t GetPhi () const
 Returns the polar angle in the range [0, 2pi] radians. More...
 
virtual Double_t GetRapidity () const
 Returns the rapidity. More...
 
virtual Double_t GetEta () const
 Returns the pseudorapidity. More...
 
virtual Double_t GetZ () const
 Returns the variable z. More...
 
virtual Double_t GetXFeynman () const
 Returns Feynman-x. More...
 
virtual Double_t GetThetaVsGamma () const
 Returns the angle with respect to the exchange boson. More...
 
virtual Double_t GetPtVsGamma () const
 Returns the pT with respect to the exchange boson. More...
 
const EventMCGetEvent () const
 Returns a pointer to the event containing this particle. More...
 
void SetEvent (EventMC *event)
 Set the event with which to associate this particle. More...
 
virtual TLorentzVector Get4Vector () const
 Returns the (E,p) 4-vector in the lab frame. More...
 
virtual TLorentzVector PxPyPzE () const
 Returns the (E,p) 4-vector in the lab frame. More...
 
virtual TLorentzVector Get4VectorInHadronBosonFrame () const
 Returns the (E,p) 4-vector in the hadron-boson frame. More...
 
virtual Double_t GetE () const
 Returns the energy of the particle in the lab frame. More...
 
virtual void SetE (Double_t)
 
virtual void SetM (Double_t)
 
virtual void SetP (Double_t)
 
virtual void SetPt (Double_t)
 
virtual void SetPz (Double_t)
 
virtual void SetPhi (Double_t)
 
virtual void SetTheta (Double_t)
 
virtual void SetStatus (UShort_t)
 
virtual Pid Id () const
 Returns the ID of the particle. More...
 
virtual Pid GetPdgCode () const
 Returns the ID of the particle. More...
 
virtual void ComputeDerivedQuantities ()
 Sets quantities derived from the four-momentum (E, px, py, pz), namely. More...
 
virtual void ComputeEventDependentQuantities (EventMC &)
 Sets quantities that depend on the properties of the event or associations of one particle with another, namely. More...
 
virtual void SetIndex (int i)
 Sets the index of the particle i.e. More...
 
virtual void SetStatus (int i)
 Sets the status code of the particle (generally final state particles are given status == 1. More...
 
virtual void SetId (int i)
 Sets the ID of the particle. More...
 
virtual void SetParentIndex (int i)
 Sets the index of this particle's parent if it has one. More...
 
virtual void SetChild1Index (int i)
 Sets the index of this particle's first child. More...
 
virtual void SetChildNIndex (int i)
 Sets the index of this particle's last child. More...
 
virtual void Set4Vector (const TLorentzVector &)
 Sets the four-momentum of the particle. More...
 
virtual void SetVertex (const TVector3 &)
 Sets the origin coordinates. More...
 
virtual void SetParentId (int i)
 Sets the ID of this particle's parent. More...
 
- Public Member Functions inherited from erhic::VirtualParticle
virtual ~VirtualParticle ()
 Destructor. More...
 

Public Attributes

UShort_t I
 Particle index in event. More...
 
Int_t KS
 Particle status code: see PYTHIA manual. More...
 
Int_t id
 PDG particle code. More...
 
UShort_t orig
 I of parent particle. More...
 
UShort_t orig1
 I of parent particle1. More...
 
UShort_t daughter
 I of first child particle. More...
 
UShort_t ldaughter
 I of last child particle. More...
 
Double_t px
 x component of particle momentum More...
 
Double_t py
 y component of particle momentum More...
 
Double_t pz
 z component of particle momentum More...
 
Double32_t E
 Energy of particle. More...
 
Double32_t m
 Invariant mass of particle. More...
 
Double32_t pt
 Transverse momentum of particle. More...
 
Double_t xv
 x coordinate of particle production vertex More...
 
Double_t yv
 y coordinate of particle production vertex More...
 
Double_t zv
 z coordinate of particle production vertex More...
 
Int_t parentId
 PDG code of this particle's parent. More...
 
Double32_t p
 Total momentum of particle. More...
 
Double32_t theta
 Polar angle. More...
 
Double32_t phi
 Azimuthal angle. More...
 
Double32_t rapidity
 Rapidity of particle. More...
 
Double32_t eta
 Pseudorapidity of particle. More...
 
Double32_t z
 Fraction of virtual photon energy carried by particle. More...
 
Double32_t xFeynman
 Feynman x = pz/(2sqrt(s)) More...
 
Double32_t thetaGamma
 Angle between particle and the exchange boson in the hadron beam rest frame. More...
 
Double32_t ptVsGamma
 pt w.r.t. More...
 
Double32_t phiPrf
 Azimuthal angle around virtual photon in hadron beam rest frame. More...
 
TRef event
 Persistent reference to the event containing this particle. More...
 

Detailed Description

A particle produced by a Monte Carlo generator.

Definition at line 43 of file erhic/ParticleMC.h.

Constructor & Destructor Documentation

◆ ParticleMCbase()

erhic::ParticleMCbase::ParticleMCbase ( )
explicit

Definition at line 55 of file erhic/ParticleMC.cxx.

◆ ~ParticleMCbase()

virtual erhic::ParticleMCbase::~ParticleMCbase ( )
inlinevirtual

Destructor.

Definition at line 49 of file erhic/ParticleMC.h.

Member Function Documentation

◆ ComputeDerivedQuantities()

void erhic::ParticleMCbase::ComputeDerivedQuantities ( )
virtual

Sets quantities derived from the four-momentum (E, px, py, pz), namely.

  • total momentum
  • transverse momentum
  • rapidity
  • pseudorapidity
  • theta
  • phi

This should be called if (E, px, py, pz) are manually altered in order to propagate the changes to these other quantities.

Definition at line 133 of file erhic/ParticleMC.cxx.

◆ ComputeEventDependentQuantities()

void erhic::ParticleMCbase::ComputeEventDependentQuantities ( EventMC event)
virtual

Sets quantities that depend on the properties of the event or associations of one particle with another, namely.

  • z
  • Feynman x
  • angle and pt with respect to the exchanged boson
  • azimuthal angle around the exchanged boson
  • parent pdg code

Important: this particle is assumed to be in the same frame of reference as those contained in the event that is passed as an argument.

Definition at line 155 of file erhic/ParticleMC.cxx.

◆ Get4Vector()

TLorentzVector erhic::ParticleMCbase::Get4Vector ( ) const
virtual

Returns the (E,p) 4-vector in the lab frame.

Implements erhic::VirtualParticle.

Definition at line 199 of file erhic/ParticleMC.cxx.

◆ Get4VectorInHadronBosonFrame()

TLorentzVector erhic::ParticleMCbase::Get4VectorInHadronBosonFrame ( ) const
virtual

Returns the (E,p) 4-vector in the hadron-boson frame.

This frame is defined such that

  • the beam hadron is at rest
  • the z direction is the exchange boson momentum vector
  • the y direction is defined as q x e, where q is the boson and e is the scattered lepton momentum
  • x is defined to complete the right-handed coordinate system
Note
Due to details of the implementation and how ROOT handles reading events in a TTree, this function will not work for the exchange boson when using a TTree::Draw (or similar) statement. It does work for the exchange boson if reading events manually via TTree::GetEntry.

Definition at line 252 of file erhic/ParticleMC.cxx.

◆ GetChild1Index()

UShort_t erhic::ParticleMCbase::GetChild1Index ( ) const
inlinevirtual

Returns the index of this particle's first child particle.

Returns 0 if this particle has no children.

Definition at line 472 of file erhic/ParticleMC.h.

◆ GetChildNIndex()

UShort_t erhic::ParticleMCbase::GetChildNIndex ( ) const
inlinevirtual

Returns the index of this particle's last child particle.

Returns 0 if this particle has zero or one children.

Definition at line 476 of file erhic/ParticleMC.h.

◆ GetE()

Double_t erhic::ParticleMCbase::GetE ( ) const
inlinevirtual

Returns the energy of the particle in the lab frame.

Implements erhic::VirtualParticle.

Definition at line 554 of file erhic/ParticleMC.h.

◆ GetEta()

Double_t erhic::ParticleMCbase::GetEta ( ) const
inlinevirtual

Returns the pseudorapidity.

Implements erhic::VirtualParticle.

Definition at line 524 of file erhic/ParticleMC.h.

◆ GetEvent()

const EventMC * erhic::ParticleMCbase::GetEvent ( ) const

Returns a pointer to the event containing this particle.

Returns NULL if this particle has not been associated with an event.

Definition at line 203 of file erhic/ParticleMC.cxx.

◆ GetIndex()

UInt_t erhic::ParticleMCbase::GetIndex ( ) const
inlinevirtual

Returns the particle index in an event, in the range [1, N].

Definition at line 457 of file erhic/ParticleMC.h.

◆ GetM()

Double_t erhic::ParticleMCbase::GetM ( ) const
inlinevirtual

Returns invariant mass (GeV/c2).

Implements erhic::VirtualParticle.

Definition at line 492 of file erhic/ParticleMC.h.

◆ GetNChildren()

UInt_t erhic::ParticleMCbase::GetNChildren ( ) const
inlinevirtual

Returns the number of children of this particle.

Returns 0 if the particle did not decay.

Definition at line 548 of file erhic/ParticleMC.h.

◆ GetP()

Double_t erhic::ParticleMCbase::GetP ( ) const
inlinevirtual

Returns the total momentum (GeV).

Implements erhic::VirtualParticle.

Definition at line 508 of file erhic/ParticleMC.h.

◆ GetParentId()

erhic::Pid erhic::ParticleMCbase::GetParentId ( ) const
inlinevirtual

Returns the identity information of this particle's parent.

Definition at line 504 of file erhic/ParticleMC.h.

◆ GetParentIndex()

UShort_t erhic::ParticleMCbase::GetParentIndex ( ) const
inlinevirtual

Returns the index of this particle's parent in an event.

Implements erhic::VirtualParticle.

Definition at line 465 of file erhic/ParticleMC.h.

◆ GetParentIndex1()

UShort_t erhic::ParticleMCbase::GetParentIndex1 ( ) const
inlinevirtual

Definition at line 468 of file erhic/ParticleMC.h.

◆ GetPdgCode()

virtual Pid erhic::ParticleMCbase::GetPdgCode ( ) const
inlinevirtual

Returns the ID of the particle.

Definition at line 252 of file erhic/ParticleMC.h.

◆ GetPhi()

Double_t erhic::ParticleMCbase::GetPhi ( ) const
inlinevirtual

Returns the polar angle in the range [0, 2pi] radians.

Implements erhic::VirtualParticle.

Definition at line 516 of file erhic/ParticleMC.h.

◆ GetPt()

Double_t erhic::ParticleMCbase::GetPt ( ) const
inlinevirtual

Returns momentum transverse to the beam direction.

Implements erhic::VirtualParticle.

Definition at line 496 of file erhic/ParticleMC.h.

◆ GetPtVsGamma()

Double_t erhic::ParticleMCbase::GetPtVsGamma ( ) const
inlinevirtual

Returns the pT with respect to the exchange boson.

Defined in the beam hadron's rest frame.

Definition at line 540 of file erhic/ParticleMC.h.

◆ GetPx()

Double_t erhic::ParticleMCbase::GetPx ( ) const
inlinevirtual

Returns the x component of 3-momentum.

Implements erhic::VirtualParticle.

Definition at line 480 of file erhic/ParticleMC.h.

◆ GetPy()

Double_t erhic::ParticleMCbase::GetPy ( ) const
inlinevirtual

Returns the y component of 3-momentum.

Implements erhic::VirtualParticle.

Definition at line 484 of file erhic/ParticleMC.h.

◆ GetPz()

Double_t erhic::ParticleMCbase::GetPz ( ) const
inlinevirtual

Returns the z component of 3-momentum.

Implements erhic::VirtualParticle.

Definition at line 488 of file erhic/ParticleMC.h.

◆ GetRapidity()

Double_t erhic::ParticleMCbase::GetRapidity ( ) const
inlinevirtual

Returns the rapidity.

Implements erhic::VirtualParticle.

Definition at line 520 of file erhic/ParticleMC.h.

◆ GetStatus()

UShort_t erhic::ParticleMCbase::GetStatus ( ) const
inlinevirtual

Returns the status of the particle.

The meaning of the status code depends on the generator. For PYTHIA, see the description of variable K(I,1) in the manual.

Implements erhic::VirtualParticle.

Definition at line 461 of file erhic/ParticleMC.h.

◆ GetTheta()

Double_t erhic::ParticleMCbase::GetTheta ( ) const
inlinevirtual

Returns the polar angle in the range [0, pi] radians.

Implements erhic::VirtualParticle.

Definition at line 512 of file erhic/ParticleMC.h.

◆ GetThetaVsGamma()

Double_t erhic::ParticleMCbase::GetThetaVsGamma ( ) const
inlinevirtual

Returns the angle with respect to the exchange boson.

Defined in the beam hadron's rest frame. Given in the range [0,pi] radians.

Definition at line 536 of file erhic/ParticleMC.h.

◆ GetVertex()

TVector3 erhic::ParticleMCbase::GetVertex ( ) const
inlinevirtual

Returns the origin point of the particle (cm).

(0,0,0) indicates a particle originating in the collision.

Implements erhic::VirtualParticle.

Definition at line 500 of file erhic/ParticleMC.h.

◆ GetXFeynman()

Double_t erhic::ParticleMCbase::GetXFeynman ( ) const
inlinevirtual

Returns Feynman-x.

xF = 2*pz/sqrt(s).

Definition at line 532 of file erhic/ParticleMC.h.

◆ GetZ()

Double_t erhic::ParticleMCbase::GetZ ( ) const
inlinevirtual

Returns the variable z.

z = (P.p_h)/(P.q).

Definition at line 528 of file erhic/ParticleMC.h.

◆ Id()

Pid erhic::ParticleMCbase::Id ( ) const
inlinevirtual

Returns the ID of the particle.

Implements erhic::VirtualParticle.

Definition at line 544 of file erhic/ParticleMC.h.

◆ Print()

void erhic::ParticleMCbase::Print ( Option_t *  = "") const
virtual

Print the contents of Particle to standard output.

The format is that of the input Monte Carlo i.e. I KS id orig daughter ldaughter px py pz E m xv yv zv. Inherited from TObject. The argument is unused.

Definition at line 126 of file erhic/ParticleMC.cxx.

◆ PxPyPzE()

virtual TLorentzVector erhic::ParticleMCbase::PxPyPzE ( ) const
inlinevirtual

Returns the (E,p) 4-vector in the lab frame.

Definition at line 202 of file erhic/ParticleMC.h.

◆ Set4Vector()

void erhic::ParticleMCbase::Set4Vector ( const TLorentzVector &  v)
virtual

Sets the four-momentum of the particle.

Changes are propagated to derived quantities.

Implements erhic::VirtualParticle.

Definition at line 307 of file erhic/ParticleMC.cxx.

◆ SetChild1Index()

virtual void erhic::ParticleMCbase::SetChild1Index ( int  i)
inlinevirtual

Sets the index of this particle's first child.

By default this is zero, indicating no children.

Definition at line 307 of file erhic/ParticleMC.h.

◆ SetChildNIndex()

virtual void erhic::ParticleMCbase::SetChildNIndex ( int  i)
inlinevirtual

Sets the index of this particle's last child.

By default this is zero, indication zero or one children.

Definition at line 311 of file erhic/ParticleMC.h.

◆ SetE()

void erhic::ParticleMCbase::SetE ( Double_t  e)
inlinevirtual

Definition at line 558 of file erhic/ParticleMC.h.

◆ SetEvent()

void erhic::ParticleMCbase::SetEvent ( EventMC event)

Set the event with which to associate this particle.

Definition at line 303 of file erhic/ParticleMC.cxx.

◆ SetId()

virtual void erhic::ParticleMCbase::SetId ( int  i)
inlinevirtual

Sets the ID of the particle.

In order to make use of class Pid this should be the PDG code of the particle, but in principle can be any value you wish to use to identify it.

Definition at line 299 of file erhic/ParticleMC.h.

◆ SetIndex()

virtual void erhic::ParticleMCbase::SetIndex ( int  i)
inlinevirtual

Sets the index of the particle i.e.

its position in the track list (in principle this can be any integer you require to associated with the particle).

Definition at line 290 of file erhic/ParticleMC.h.

◆ SetM()

void erhic::ParticleMCbase::SetM ( Double_t  mass)
inlinevirtual

Definition at line 562 of file erhic/ParticleMC.h.

◆ SetP()

void erhic::ParticleMCbase::SetP ( Double_t  momentum)
inlinevirtual

Definition at line 566 of file erhic/ParticleMC.h.

◆ SetParentId()

virtual void erhic::ParticleMCbase::SetParentId ( int  i)
inlinevirtual

Sets the ID of this particle's parent.

See comments in SetId()

Definition at line 327 of file erhic/ParticleMC.h.

◆ SetParentIndex()

virtual void erhic::ParticleMCbase::SetParentIndex ( int  i)
inlinevirtual

Sets the index of this particle's parent if it has one.

By default this is zero, indicating no parent.

Definition at line 303 of file erhic/ParticleMC.h.

◆ SetPhi()

void erhic::ParticleMCbase::SetPhi ( Double_t  value)
inlinevirtual

Definition at line 578 of file erhic/ParticleMC.h.

◆ SetPt()

void erhic::ParticleMCbase::SetPt ( Double_t  momentum)
inlinevirtual

Definition at line 570 of file erhic/ParticleMC.h.

◆ SetPz()

void erhic::ParticleMCbase::SetPz ( Double_t  momentum)
inlinevirtual

Definition at line 574 of file erhic/ParticleMC.h.

◆ SetStatus() [1/2]

virtual void erhic::ParticleMCbase::SetStatus ( int  i)
inlinevirtual

Sets the status code of the particle (generally final state particles are given status == 1.

Definition at line 294 of file erhic/ParticleMC.h.

◆ SetStatus() [2/2]

void erhic::ParticleMCbase::SetStatus ( UShort_t  status)
inlinevirtual

Definition at line 586 of file erhic/ParticleMC.h.

◆ SetTheta()

void erhic::ParticleMCbase::SetTheta ( Double_t  value)
inlinevirtual

Definition at line 582 of file erhic/ParticleMC.h.

◆ SetVertex()

void erhic::ParticleMCbase::SetVertex ( const TVector3 &  v)
virtual

Sets the origin coordinates.

Implements erhic::VirtualParticle.

Definition at line 322 of file erhic/ParticleMC.cxx.

Member Data Documentation

◆ daughter

UShort_t erhic::ParticleMCbase::daughter

I of first child particle.

Definition at line 340 of file erhic/ParticleMC.h.

◆ E

Double32_t erhic::ParticleMCbase::E

Energy of particle.

Definition at line 368 of file erhic/ParticleMC.h.

◆ eta

Double32_t erhic::ParticleMCbase::eta

Pseudorapidity of particle.

Definition at line 382 of file erhic/ParticleMC.h.

◆ event

TRef erhic::ParticleMCbase::event

Persistent reference to the event containing this particle.

Definition at line 393 of file erhic/ParticleMC.h.

◆ I

UShort_t erhic::ParticleMCbase::I

Particle index in event.

Definition at line 331 of file erhic/ParticleMC.h.

◆ id

Int_t erhic::ParticleMCbase::id

PDG particle code.

Definition at line 335 of file erhic/ParticleMC.h.

◆ KS

Int_t erhic::ParticleMCbase::KS

Particle status code: see PYTHIA manual.

Definition at line 334 of file erhic/ParticleMC.h.

◆ ldaughter

UShort_t erhic::ParticleMCbase::ldaughter

I of last child particle.

Definition at line 341 of file erhic/ParticleMC.h.

◆ m

Double32_t erhic::ParticleMCbase::m

Invariant mass of particle.

Definition at line 369 of file erhic/ParticleMC.h.

◆ orig

UShort_t erhic::ParticleMCbase::orig

I of parent particle.

Definition at line 338 of file erhic/ParticleMC.h.

◆ orig1

UShort_t erhic::ParticleMCbase::orig1

I of parent particle1.

Definition at line 339 of file erhic/ParticleMC.h.

◆ p

Double32_t erhic::ParticleMCbase::p

Total momentum of particle.

Definition at line 378 of file erhic/ParticleMC.h.

◆ parentId

Int_t erhic::ParticleMCbase::parentId

PDG code of this particle's parent.

Definition at line 376 of file erhic/ParticleMC.h.

◆ phi

Double32_t erhic::ParticleMCbase::phi

Azimuthal angle.

Definition at line 380 of file erhic/ParticleMC.h.

◆ phiPrf

Double32_t erhic::ParticleMCbase::phiPrf

Azimuthal angle around virtual photon in hadron beam rest frame.

Definition at line 390 of file erhic/ParticleMC.h.

◆ pt

Double32_t erhic::ParticleMCbase::pt

Transverse momentum of particle.

Definition at line 370 of file erhic/ParticleMC.h.

◆ ptVsGamma

Double32_t erhic::ParticleMCbase::ptVsGamma

pt w.r.t.

the virtual photon in the hadron beam rest frame

Definition at line 388 of file erhic/ParticleMC.h.

◆ px

Double_t erhic::ParticleMCbase::px

x component of particle momentum

Definition at line 345 of file erhic/ParticleMC.h.

◆ py

Double_t erhic::ParticleMCbase::py

y component of particle momentum

Definition at line 346 of file erhic/ParticleMC.h.

◆ pz

Double_t erhic::ParticleMCbase::pz

z component of particle momentum

Definition at line 347 of file erhic/ParticleMC.h.

◆ rapidity

Double32_t erhic::ParticleMCbase::rapidity

Rapidity of particle.

Definition at line 381 of file erhic/ParticleMC.h.

◆ theta

Double32_t erhic::ParticleMCbase::theta

Polar angle.

Definition at line 379 of file erhic/ParticleMC.h.

◆ thetaGamma

Double32_t erhic::ParticleMCbase::thetaGamma

Angle between particle and the exchange boson in the hadron beam rest frame.

Definition at line 386 of file erhic/ParticleMC.h.

◆ xFeynman

Double32_t erhic::ParticleMCbase::xFeynman

Feynman x = pz/(2sqrt(s))

Definition at line 385 of file erhic/ParticleMC.h.

◆ xv

Double_t erhic::ParticleMCbase::xv

x coordinate of particle production vertex

Definition at line 371 of file erhic/ParticleMC.h.

◆ yv

Double_t erhic::ParticleMCbase::yv

y coordinate of particle production vertex

Definition at line 372 of file erhic/ParticleMC.h.

◆ z

Double32_t erhic::ParticleMCbase::z

Fraction of virtual photon energy carried by particle.

Definition at line 383 of file erhic/ParticleMC.h.

◆ zv

Double_t erhic::ParticleMCbase::zv

z coordinate of particle production vertex

Definition at line 373 of file erhic/ParticleMC.h.


The documentation for this class was generated from the following files: