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
Smear::Acceptance Class Reference

Defines a range of acceptance in one or more of: theta, phi, E, p, pt, pz. More...

#include <Acceptance.h>

Classes

class  CustomCut
 A (min, max) range in some variable evaluated as an arbitrary function of theta, phi, E and p (up to two supported). More...
 
class  Zone
 A single contiguous region of acceptance. More...
 

Public Member Functions

virtual ~Acceptance ()
 Destructor. More...
 
 Acceptance (int genre=kAll)
 Default constructor. More...
 
void AddZone (const Zone &)
 Add a new zone with user-specified coverage. More...
 
UInt_t GetNZones () const
 Returns the number of acceptance zones. More...
 
Int_t GetGenre () const
 Returns the "genre" of the particle (em, hadronic or all). More...
 
void SetGenre (int genre)
 Select the class(es) of particles to accept. More...
 
void SetCharge (ECharge charge)
 Select the charges of particles to accept. More...
 
ECharge GetCharge () const
 Returns the charge of particles to accept. More...
 
void AddParticle (int particle)
 Add a particle type to the list of particles to be smeared. More...
 
bool Is (const erhic::VirtualParticle &prt) const
 This function determines if the particle provided lies within the acceptance of the detector. More...
 

Protected Attributes

int mGenre
 
ECharge mCharge
 
std::vector< ZonemZones
 
std::set< int > mParticles
 

Detailed Description

Defines a range of acceptance in one or more of: theta, phi, E, p, pt, pz.

Comprises one or more acceptance zones, which may or may not overlap.

Todo:
Implement data hiding

Definition at line 36 of file Acceptance.h.

Constructor & Destructor Documentation

◆ ~Acceptance()

Smear::Acceptance::~Acceptance ( )
virtual

Destructor.

Definition at line 18 of file Acceptance.cxx.

◆ Acceptance()

Smear::Acceptance::Acceptance ( int  genre = kAll)
explicit

Default constructor.

The genre sets which particle types are accepted (see Smear::EGenre). By default, the device has 4pi coverage, and accepts particles with all energy and momenta.

Definition at line 21 of file Acceptance.cxx.

Member Function Documentation

◆ AddParticle()

void Smear::Acceptance::AddParticle ( int  particle)

Add a particle type to the list of particles to be smeared.

If you never add anything, the device will smear all stable particles within its acceptance. Must use PDG particle codes.

Definition at line 42 of file Acceptance.cxx.

◆ AddZone()

void Smear::Acceptance::AddZone ( const Zone z)

Add a new zone with user-specified coverage.

Particles will be accepted if they fall within any acceptance zone.

Definition at line 26 of file Acceptance.cxx.

◆ GetCharge()

ECharge Smear::Acceptance::GetCharge ( ) const
inline

Returns the charge of particles to accept.

Definition at line 186 of file Acceptance.h.

◆ GetGenre()

Int_t Smear::Acceptance::GetGenre ( ) const
inline

Returns the "genre" of the particle (em, hadronic or all).

Definition at line 182 of file Acceptance.h.

◆ GetNZones()

UInt_t Smear::Acceptance::GetNZones ( ) const
inline

Returns the number of acceptance zones.

Definition at line 178 of file Acceptance.h.

◆ Is()

bool Smear::Acceptance::Is ( const erhic::VirtualParticle prt) const

This function determines if the particle provided lies within the acceptance of the detector.

Default acceptance is a full 4*pi solid angle, with E and p in (0.,1e12) GeV. This function automatically fixes polar and azimuthal angles which are not within their proper range.

Definition at line 46 of file Acceptance.cxx.

◆ SetCharge()

void Smear::Acceptance::SetCharge ( ECharge  charge)

Select the charges of particles to accept.

Definition at line 38 of file Acceptance.cxx.

◆ SetGenre()

void Smear::Acceptance::SetGenre ( int  genre)

Select the class(es) of particles to accept.

Definition at line 30 of file Acceptance.cxx.

Member Data Documentation

◆ mCharge

ECharge Smear::Acceptance::mCharge
protected

Definition at line 171 of file Acceptance.h.

◆ mGenre

int Smear::Acceptance::mGenre
protected

Definition at line 170 of file Acceptance.h.

◆ mParticles

std::set<int> Smear::Acceptance::mParticles
protected

Definition at line 173 of file Acceptance.h.

◆ mZones

std::vector<Zone> Smear::Acceptance::mZones
protected

Definition at line 172 of file Acceptance.h.


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