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
|
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< Zone > | mZones |
std::set< int > | mParticles |
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.
Definition at line 36 of file Acceptance.h.
|
virtual |
Destructor.
Definition at line 18 of file Acceptance.cxx.
|
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.
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.
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.
|
inline |
Returns the charge of particles to accept.
Definition at line 186 of file Acceptance.h.
|
inline |
Returns the "genre" of the particle (em, hadronic or all).
Definition at line 182 of file Acceptance.h.
|
inline |
Returns the number of acceptance zones.
Definition at line 178 of file Acceptance.h.
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.
void Smear::Acceptance::SetCharge | ( | ECharge | charge | ) |
Select the charges of particles to accept.
Definition at line 38 of file Acceptance.cxx.
void Smear::Acceptance::SetGenre | ( | int | genre | ) |
Select the class(es) of particles to accept.
Definition at line 30 of file Acceptance.cxx.
|
protected |
Definition at line 171 of file Acceptance.h.
|
protected |
Definition at line 170 of file Acceptance.h.
|
protected |
Definition at line 173 of file Acceptance.h.
|
protected |
Definition at line 172 of file Acceptance.h.