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

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

Public Member Functions

 ParticleIdentifier (const int leptonPdg=~unsigned(0)/2)
 
virtual ~ParticleIdentifier ()
 
virtual bool isBeamLepton (const erhic::VirtualParticle &) const
 
virtual bool isBeamNucleon (const erhic::VirtualParticle &) const
 
virtual bool isScatteredLepton (const erhic::VirtualParticle &) const
 
virtual bool IsVirtualPhoton (const erhic::VirtualParticle &) const
 
virtual bool SkipParticle (const erhic::VirtualParticle &) const
 
virtual void SetLeptonBeamPdgCode (int pdg)
 
virtual int GetLeptonBeamPdgCode () const
 
virtual bool SetChargedCurrent (bool isChargedCurrent)
 

Static Public Member Functions

static bool IdentifyBeams (const erhic::VirtualEvent &, BeamParticles &)
 
static bool IdentifyBeams (const erhic::VirtualEvent &, std::vector< const erhic::VirtualParticle * > &)
 

Protected Member Functions

Int_t DetermineScatteredType (Int_t)
 

Protected Attributes

Bool_t mChargedCurrent
 
Int_t mLeptonBeamPdgCode
 
Int_t mScatteredPdgCode
 

Detailed Description

Implements methods to identify particles based on their species and status codes.

Definition at line 25 of file ParticleIdentifier.h.

View newest version in sPHENIX GitHub at line 25 of file ParticleIdentifier.h

Constructor & Destructor Documentation

ParticleIdentifier::ParticleIdentifier ( const int  leptonPdg = ~unsigned(0)/2)

Default constructor. Initialise with the PDG code of the lepton beam. The default is an invalid value.

Definition at line 31 of file ParticleIdentifier.cxx.

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

virtual ParticleIdentifier::~ParticleIdentifier ( )
inlinevirtual

Definition at line 34 of file ParticleIdentifier.h.

View newest version in sPHENIX GitHub at line 34 of file ParticleIdentifier.h

Member Function Documentation

Int_t ParticleIdentifier::DetermineScatteredType ( Int_t  beamType)
protected

Determine the scattered lepton type from an incident lepton type.

For neutral current events these are equal. For charged current events the scattered lepton will be a neutrino, the type of which depends on the incident lepton type e.g. beam electron (11) –> scattered nu_e (12) beam positron (-11) –> scattered nu_e_bar (-12) Even though we would not envisage mu or tau beams (!) the algorithm is still robust for these inputs.

Definition at line 139 of file ParticleIdentifier.cxx.

View newest version in sPHENIX GitHub at line 139 of file ParticleIdentifier.cxx

References kdfinder::abs(), mChargedCurrent, and sign().

Referenced by SetChargedCurrent(), and SetLeptonBeamPdgCode().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ParticleIdentifier::GetLeptonBeamPdgCode ( ) const
inlinevirtual

Returns the PDG code to use when identifying the lepton beam.

Definition at line 121 of file ParticleIdentifier.h.

View newest version in sPHENIX GitHub at line 121 of file ParticleIdentifier.h

References mLeptonBeamPdgCode.

Referenced by isBeamLepton(), and SkipParticle().

+ Here is the caller graph for this function:

bool ParticleIdentifier::IdentifyBeams ( const erhic::VirtualEvent event,
BeamParticles beams 
)
static

Identify the beams from an event and store their properties in a BeamParticles object. See BeamParticles.h for the quantities stored. Returns true if all beams are found, false if not. Important: finding the scattered hadron beam is not implemented.

Definition at line 176 of file ParticleIdentifier.cxx.

View newest version in sPHENIX GitHub at line 176 of file ParticleIdentifier.cxx

References BeamParticles::Reset(), BeamParticles::SetBeamHadron(), BeamParticles::SetBeamLepton(), BeamParticles::SetBoson(), and BeamParticles::SetScatteredLepton().

Referenced by erhic::Pythia6EventBuilder::BuildEvent(), and erhic::EventFromAsciiFactory< T >::FinishEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ParticleIdentifier::IdentifyBeams ( const erhic::VirtualEvent event,
std::vector< const erhic::VirtualParticle * > &  beams 
)
static

Identify the beams from an event and store their properties in a vector of pointers to the particle objects in the event. Do not delete the pointers, as they belong to the event. The returned vector has four entries, in this order: incident lepton, incident hadron, exchanged boson, scattered lepton. Any particle not found yields a NULL pointer in the vector. Returns true if all beams are found (i.e. no NULL pointers), false if not. Important: finding the scattered hadron beam is not implemented.

Definition at line 198 of file ParticleIdentifier.cxx.

View newest version in sPHENIX GitHub at line 198 of file ParticleIdentifier.cxx

References kdfinder::abs(), erhic::VirtualEvent::GetTrack(), erhic::VirtualParticle::Id(), isBeamLepton(), isBeamNucleon(), isScatteredLepton(), IsVirtualPhoton(), n, particle, SetChargedCurrent(), and SetLeptonBeamPdgCode().

+ Here is the call graph for this function:

bool ParticleIdentifier::isBeamLepton ( const erhic::VirtualParticle particle) const
virtual

Returns whether the particle is the beam lepton.

Definition at line 40 of file ParticleIdentifier.cxx.

View newest version in sPHENIX GitHub at line 40 of file ParticleIdentifier.cxx

References GetLeptonBeamPdgCode(), erhic::VirtualParticle::GetParentIndex(), erhic::VirtualParticle::GetStatus(), and erhic::VirtualParticle::Id().

Referenced by IdentifyBeams().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ParticleIdentifier::isBeamNucleon ( const erhic::VirtualParticle particle) const
virtual

Returns whether the particle is the beam hadron.

Definition at line 118 of file ParticleIdentifier.cxx.

View newest version in sPHENIX GitHub at line 118 of file ParticleIdentifier.cxx

References kdfinder::abs(), erhic::VirtualParticle::GetParentIndex(), erhic::VirtualParticle::GetStatus(), and erhic::VirtualParticle::Id().

Referenced by IdentifyBeams().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ParticleIdentifier::isScatteredLepton ( const erhic::VirtualParticle particle) const
virtual

Returns whether the particle is the scattered lepton beam particle.

Definition at line 58 of file ParticleIdentifier.cxx.

View newest version in sPHENIX GitHub at line 58 of file ParticleIdentifier.cxx

References erhic::VirtualParticle::GetStatus(), and erhic::VirtualParticle::Id().

Referenced by IdentifyBeams().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ParticleIdentifier::IsVirtualPhoton ( const erhic::VirtualParticle particle) const
virtual

Returns whether the particle is a virtual photon.

Definition at line 101 of file ParticleIdentifier.cxx.

View newest version in sPHENIX GitHub at line 101 of file ParticleIdentifier.cxx

References kdfinder::abs(), erhic::VirtualParticle::GetStatus(), erhic::VirtualParticle::Id(), and pdg.

Referenced by IdentifyBeams().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ParticleIdentifier::SetChargedCurrent ( bool  isChargedCurrent)
virtual

Look for charged current events.

In this case, the scattered lepton searched for will be the neutrino corresponding to the incident lepton beam type (e.g. W- for electron, W+ for proton).

Definition at line 158 of file ParticleIdentifier.cxx.

View newest version in sPHENIX GitHub at line 158 of file ParticleIdentifier.cxx

References DetermineScatteredType(), mChargedCurrent, mLeptonBeamPdgCode, and mScatteredPdgCode.

Referenced by IdentifyBeams().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ParticleIdentifier::SetLeptonBeamPdgCode ( int  pdg)
virtual

Sets the PDG code to use when identifying the lepton beam.

Definition at line 149 of file ParticleIdentifier.cxx.

View newest version in sPHENIX GitHub at line 149 of file ParticleIdentifier.cxx

References DetermineScatteredType(), mChargedCurrent, mLeptonBeamPdgCode, and mScatteredPdgCode.

Referenced by IdentifyBeams().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ParticleIdentifier::SkipParticle ( const erhic::VirtualParticle particle) const
virtual

Returns whether the particles should be skipped by the tree building code.

Definition at line 74 of file ParticleIdentifier.cxx.

View newest version in sPHENIX GitHub at line 74 of file ParticleIdentifier.cxx

References kdfinder::abs(), GetLeptonBeamPdgCode(), erhic::VirtualParticle::GetParentIndex(), erhic::VirtualParticle::GetStatus(), and erhic::VirtualParticle::Id().

+ Here is the call graph for this function:

Member Data Documentation

Bool_t ParticleIdentifier::mChargedCurrent
protected

Definition at line 116 of file ParticleIdentifier.h.

View newest version in sPHENIX GitHub at line 116 of file ParticleIdentifier.h

Referenced by DetermineScatteredType(), SetChargedCurrent(), and SetLeptonBeamPdgCode().

Int_t ParticleIdentifier::mLeptonBeamPdgCode
protected

Definition at line 117 of file ParticleIdentifier.h.

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

Referenced by GetLeptonBeamPdgCode(), SetChargedCurrent(), and SetLeptonBeamPdgCode().

Int_t ParticleIdentifier::mScatteredPdgCode
protected

Definition at line 118 of file ParticleIdentifier.h.

View newest version in sPHENIX GitHub at line 118 of file ParticleIdentifier.h

Referenced by SetChargedCurrent(), and SetLeptonBeamPdgCode().


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