![]() |
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
|
#include <Device.h>
Public Member Functions | |
Device (KinType=kE, const TString &formula="0", EGenre=kAll) | |
Device (const TString &, const TString &resolution="0", EGenre=kAll) | |
Device (const Device &) | |
virtual | ~Device () |
virtual Device * | Clone (const char *="") const |
virtual void | Smear (const erhic::VirtualParticle &, ParticleMCS &) |
virtual void | SetDistribution (const Distributor &) |
virtual void | Print (Option_t *="") const |
![]() | |
virtual | ~Smearer () |
Protected Member Functions | |
bool | Init (const TString &, const TString &, int) |
Protected Attributes | |
KinType | mSmeared |
Smeared variable. | |
TF1 * | mKinematicFunction |
FormulaString * | mFormula |
Expression for resolution standard deviation. | |
std::vector< Smear::KinType > | mDimensions |
Distributor | mDistribution |
Random distribution. | |
Additional Inherited Members | |
![]() | |
Acceptance | Accept |
Performs smearing of a single kinematic variable according to a simple expression defined via a string.
Smear::Device::Device | ( | KinType | type = kE , |
const TString & | formula = "0" , |
||
EGenre | genre = kAll |
||
) |
Constructor. The first argument is the type of kinematic variable to smear. The second argument is a formula giving the width of the resolution in the variable selected with the first argument, i.e. sigma(A) = f(B, C...) where A, B, C... are selected from: E, P, theta, phi, pZ and pT, A is the variable type given for the first argument and B, C... are the variables listed in the formula. For example, for resolution in pT of 1% pT times sin of polar angle: Smear::Device(Smear::kPt, "0.01 * pT * sin(theta)"); See ROOT::TFormula for the form of valid expressions. Formulae can be a function of up to four variables. The third argument allows selection of the types of particles that are smeared: electromagnetic, hadronic or all.
Definition at line 43 of file Device.cxx.
Smear::Device::Device | ( | const TString & | variable, |
const TString & | resolution = "0" , |
||
EGenre | genre = kAll |
||
) |
Constructor for smearing with an arbitrary function of a single variable. The first argument is a function of E, P, theta, phi, pT, or pZ. See ROOT::TFormula for syntax. For example, to smear in 1/pT: Smear::Device('1/pT', '<some resolution="" function>="">')
Definition at line 51 of file Device.cxx.
Smear::Device::Device | ( | const Device & | that | ) |
Copy constructor.
Definition at line 59 of file Device.cxx.
|
virtual |
Destructor.
Definition at line 74 of file Device.cxx.
|
virtual |
Returns a dynamically allocated copy of this object. The argument is unused and is present for compatibility with ROOT::TObject::Clone().
Implements Smear::Smearer.
Definition at line 112 of file Device.cxx.
|
virtual |
Print information about this device to standard output.
Definition at line 116 of file Device.cxx.
|
inlinevirtual |
|
virtual |
Smear the kinematic value of the input particle and store the result in the ParticleMCS. Smearing works in the following way. If we smear a variable VirtualParticle.X == x with parametrization f(x), then z[x,f(x)] will be stored in ParticleMCS.X, where z is a randomly generated number from a distribution of which x is the mean and f(xi) is the standard deviation. By default a Gaussian distribution is used. Use SetDistribution() for other distributions (and see Smear::Distributor).
Implements Smear::Smearer.
Reimplemented in Smear::Bremsstrahlung.
Definition at line 85 of file Device.cxx.
|
protected |