EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
erhic::Pid Class Reference

#include <eic-smear/blob/master/include/eicsmear/erhic/Pid.h>

Public Member Functions

 Pid (Int_t pdg=Pid::InvalidCode())
 
virtual ~Pid ()
 
Int_t Code () const
 
void Set (Int_t pdg)
 
TParticlePDG * Info () const
 
 operator Int_t () const
 
bool operator== (Int_t i) const
 
bool operator< (Int_t i) const
 
bool operator> (Int_t i) const
 
bool operator!= (Int_t i) const
 
bool operator<= (Int_t i) const
 
bool operator>= (Int_t i) const
 

Static Public Member Functions

static Int_t InvalidCode ()
 

Protected Attributes

Int_t mCode
 The integer PDG code.
 

Detailed Description

Particle identity.

Definition at line 22 of file Pid.h.

View newest version in sPHENIX GitHub at line 22 of file Pid.h

Constructor & Destructor Documentation

erhic::Pid::Pid ( Int_t  pdg = Pid::InvalidCode())

Constructor.

Parameters
[in]pdgThe particle's PDG code, an integer

Definition at line 20 of file Pid.cxx.

View newest version in sPHENIX GitHub at line 20 of file Pid.cxx

erhic::Pid::~Pid ( )
virtual

Destructor

Definition at line 24 of file Pid.cxx.

View newest version in sPHENIX GitHub at line 24 of file Pid.cxx

Member Function Documentation

Int_t erhic::Pid::Code ( ) const
inline

Returns the PDG code, an integer.

Definition at line 105 of file Pid.h.

View newest version in sPHENIX GitHub at line 105 of file Pid.h

References mCode.

Referenced by Info(), erhic::EventRapgap::ScatteredLepton(), erhic::EventSimple::ScatteredLepton(), erhic::EventDEMP::ScatteredLepton(), erhic::EventSartre::ScatteredLepton(), and erhic::EventPythia::ScatteredLepton().

+ Here is the caller graph for this function:

TParticlePDG * erhic::Pid::Info ( ) const

Returns the particle information object corresponding to this PDG code. From this, properties such as particle name, charge and mass can be accessed.

TODO May need to cache TParticlePDG* if performance proves too slow with database lookup upon each call.

Definition at line 31 of file Pid.cxx.

View newest version in sPHENIX GitHub at line 31 of file Pid.cxx

References Code(), and Acts::UnitConstants::e.

Referenced by EicEventAssembler::AssignScatteredLepton(), EicRcParticle::GetM(), and Smear::Acceptance::Is().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Int_t erhic::Pid::InvalidCode ( )
static

Returns a code indicating 'not valid'. Use this value to consistently indicate particles without an ID number.

Definition at line 44 of file Pid.cxx.

View newest version in sPHENIX GitHub at line 44 of file Pid.cxx

References max.

erhic::Pid::operator Int_t ( ) const
inline

Type conversion operator to integer PDG code. int i = Pid(211) is equivalent to int i = Pid(211).Code();

Definition at line 103 of file Pid.h.

View newest version in sPHENIX GitHub at line 103 of file Pid.h

bool erhic::Pid::operator!= ( Int_t  i) const
inline

Comparison operator with integer. Compares the argument with this object's integer PDG code.

Definition at line 115 of file Pid.h.

View newest version in sPHENIX GitHub at line 115 of file Pid.h

References operator==().

+ Here is the call graph for this function:

bool erhic::Pid::operator< ( Int_t  i) const
inline

Comparison operator with integer. Compares the argument with this object's integer PDG code.

Definition at line 111 of file Pid.h.

View newest version in sPHENIX GitHub at line 111 of file Pid.h

References mCode.

bool erhic::Pid::operator<= ( Int_t  i) const
inline

Comparison operator with integer. Compares the argument with this object's integer PDG code.

Definition at line 117 of file Pid.h.

View newest version in sPHENIX GitHub at line 117 of file Pid.h

References mCode.

bool erhic::Pid::operator== ( Int_t  i) const
inline

Comparison operator with integer. Compares the argument with this object's integer PDG code.

Definition at line 109 of file Pid.h.

View newest version in sPHENIX GitHub at line 109 of file Pid.h

References mCode.

Referenced by operator!=().

+ Here is the caller graph for this function:

bool erhic::Pid::operator> ( Int_t  i) const
inline

Comparison operator with integer. Compares the argument with this object's integer PDG code.

Definition at line 113 of file Pid.h.

View newest version in sPHENIX GitHub at line 113 of file Pid.h

References mCode.

bool erhic::Pid::operator>= ( Int_t  i) const
inline

Comparison operator with integer. Compares the argument with this object's integer PDG code.

Definition at line 119 of file Pid.h.

View newest version in sPHENIX GitHub at line 119 of file Pid.h

References mCode.

void erhic::Pid::Set ( Int_t  pdg)
inline

Sets the integer PDG code.

Parameters
[in]pdgThe particle's PDG code, an integer

Definition at line 107 of file Pid.h.

View newest version in sPHENIX GitHub at line 107 of file Pid.h

References mCode.

Member Data Documentation

Int_t erhic::Pid::mCode
protected

The integer PDG code.

Definition at line 98 of file Pid.h.

View newest version in sPHENIX GitHub at line 98 of file Pid.h

Referenced by Code(), operator<(), operator<=(), operator==(), operator>(), operator>=(), and Set().


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