EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <eic-smear/blob/master/include/eicsmear/smear/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 |
Public Member Functions inherited from Smear::Smearer | |
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. | |
Private Member Functions | |
Device & | operator= (const Device &) |
Additional Inherited Members | |
Public Attributes inherited from Smear::Smearer | |
Acceptance | Accept |
Performs smearing of a single kinematic variable according to a simple expression defined via a string.
Definition at line 44 of file Device.h.
View newest version in sPHENIX GitHub at line 44 of file Device.h
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 56 of file Device.cxx.
View newest version in sPHENIX GitHub at line 56 of file Device.cxx
References Smear::Smearer::Accept, Smear::FormulaString::GetKinName(), Init(), and Smear::Acceptance::SetGenre().
Referenced by Clone().
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 64 of file Device.cxx.
View newest version in sPHENIX GitHub at line 64 of file Device.cxx
References Init().
Smear::Device::Device | ( | const Device & | that | ) |
Copy constructor.
Definition at line 72 of file Device.cxx.
View newest version in sPHENIX GitHub at line 72 of file Device.cxx
References Detector::AsString(), mFormula, and mKinematicFunction.
|
virtual |
Destructor.
Definition at line 87 of file Device.cxx.
View newest version in sPHENIX GitHub at line 87 of file Device.cxx
References mFormula, and mKinematicFunction.
|
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 144 of file Device.cxx.
View newest version in sPHENIX GitHub at line 144 of file Device.cxx
References Device().
|
protected |
TODO: KK It seems the use of kinematicFunction is unnecessary All it does is
Definition at line 38 of file Device.cxx.
View newest version in sPHENIX GitHub at line 38 of file Device.cxx
References Smear::Smearer::Accept, Detector::AsString(), mFormula, mKinematicFunction, mSmeared, and Smear::Acceptance::SetGenre().
Referenced by Device().
|
virtual |
Print information about this device to standard output.
Definition at line 148 of file Device.cxx.
View newest version in sPHENIX GitHub at line 148 of file Device.cxx
References Smear::FormulaString::GetInputString(), Smear::FormulaString::GetKinName(), mFormula, mSmeared, and name.
|
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 98 of file Device.cxx.
View newest version in sPHENIX GitHub at line 98 of file Device.cxx
References kdfinder::abs(), Smear::Smearer::Accept, charm_jet_coverage::args, Smear::FormulaString::Eval(), Smear::FixPhi(), Smear::FixTheta(), Smear::Distributor::Generate(), erhic::VirtualParticle::GetEta(), Smear::ParticleMCS::GetPhi(), Smear::ParticleMCS::GetTheta(), Smear::GetVariable(), Smear::ParticleMCS::HandleBogusValues(), erhic::VirtualParticle::Id(), Smear::Acceptance::Is(), Smear::kPhi, Smear::kTheta, mDistribution, mFormula, mKinematicFunction, mSmeared, Smear::ParticleMCS::SetPhi(), Smear::ParticleMCS::SetTheta(), Smear::ParticleMCS::SetVariable(), and Smear::FormulaString::Variables().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |