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

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

Public Member Functions

 Distributor ()
 
 Distributor (const TString &formula, double lower, double upper, double minimum=-1.e6, double maximum=1.e6)
 
virtual ~Distributor ()
 
virtual double Generate (double midpoint, double width)
 

Protected Attributes

double mPlus
 
double mMinus
 
TF1 * mDistribution
 

Detailed Description

Distribution function for random sampling. Used by devices to generate smearing on some distribution. By default, smearing is generated on a Gaussian of which the Monte Carlo value is the mean, and the standard deviation is given by the device parametrization. It is intended that you access this object via the methods provided in the Device class.

Definition at line 32 of file Distributor.h.

View newest version in sPHENIX GitHub at line 32 of file Distributor.h

Constructor & Destructor Documentation

Smear::Distributor::Distributor ( )

Default constructor. Gaussian distribution.

Definition at line 18 of file Distributor.cxx.

View newest version in sPHENIX GitHub at line 18 of file Distributor.cxx

Smear::Distributor::Distributor ( const TString &  formula,
double  lower,
double  upper,
double  minimum = -1.e6,
double  maximum = 1.e6 
)

Initialise with a ROOT::TF1-style string. The function should depend on two parameters, the first of which specifies the function midpoint and the second of which species a width. See ROOT::TF1 documentation for details of the string format. For example, for a step function, one could use Distributor("abs(x-[0])<[1]"); where [0] stands for the first parameter (midpoint) and [1] is the second parameter (width). The second and third arguments limit the range of thrown values around the midpoint to [midpoint - lower, midpoint + upper]. Values of <= 0 give no limit. The 4th and 5th arguments define the valid range of the function.

Definition at line 24 of file Distributor.cxx.

View newest version in sPHENIX GitHub at line 24 of file Distributor.cxx

References mDistribution, mMinus, and mPlus.

Smear::Distributor::~Distributor ( )
virtual

Destructor.

Definition at line 38 of file Distributor.cxx.

View newest version in sPHENIX GitHub at line 38 of file Distributor.cxx

References mDistribution.

Member Function Documentation

double Smear::Distributor::Generate ( double  midpoint,
double  width 
)
virtual

Generate a random value based on a given midpoint and width.

Definition at line 45 of file Distributor.cxx.

View newest version in sPHENIX GitHub at line 45 of file Distributor.cxx

References mDistribution, mMinus, and mPlus.

Referenced by Smear::Tracker::Smear(), and Smear::Device::Smear().

+ Here is the caller graph for this function:

Member Data Documentation

TF1* Smear::Distributor::mDistribution
protected

Definition at line 70 of file Distributor.h.

View newest version in sPHENIX GitHub at line 70 of file Distributor.h

Referenced by Distributor(), Generate(), and ~Distributor().

double Smear::Distributor::mMinus
protected

Definition at line 69 of file Distributor.h.

View newest version in sPHENIX GitHub at line 69 of file Distributor.h

Referenced by Distributor(), and Generate().

double Smear::Distributor::mPlus
protected

Definition at line 68 of file Distributor.h.

View newest version in sPHENIX GitHub at line 68 of file Distributor.h

Referenced by Distributor(), and Generate().


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