ROOT logo
HYDRA - THE HADES ANALYSIS PACKAGE » (UNKNOWN) » HParticleRunningMeanI

class HParticleRunningMeanI: public TObject

_HADES_CLASS_DESCRIPTION

 Calculate running mean of a distribution of integer values e.g. multiplicities.
 calculate the sigma (RMS) of the distribution.
 A cutoff at a maximum value is defined as mean value plus sigma * a scaling factor.
 A minimum value can be specified as well (default = 1).
 If the mean value gets below 1, the cutoff value is calculated by (minimum value + 1) + scaling factor*(sigma=1)
 instead of mean value + sigma* scaling factor.
 This allows for recovery from large sets with input values of 0 (e.g. sparks).
 It accounts as well for the fact that input values are integer (0 or 1 or 2 ...), thus cutoff values must be > 1.
 The array size used for averaging can be specified in initParam (default = 2000).
 The values of the distribution have to be >= 0
 add an offset if the original distibution extends to negative values
 W. Koenig April 2015

Function Members (Methods)

public:
HParticleRunningMeanI()
HParticleRunningMeanI(const HParticleRunningMeanI&)
virtual~HParticleRunningMeanI()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
Float_tcalcMean(Int_t val)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
Int_tgetMax()
Int_tgetMaxMin()
Float_tgetMean()
Float_tgetMeanScaleToMax()
Int_tgetMin()
virtual const char*TObject::GetName() const
Int_tgetNMax()
Int_tgetNMin()
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Float_tgetSigma()
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Bool_tgetValid()
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
Int_tinitParam(const Int_t Max = 2000, const Int_t minEvents = 100, const Float_t scaleFacSigma = sqrt(12.0F), const Float_t initMean = -999999, const Float_t initSigma = -999999, const Int_t min = 1)
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
HParticleRunningMeanI&operator=(const HParticleRunningMeanI&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidreset(Bool_t full = kTRUE)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Bool_tisValid()
voidTObject::MakeZombie()
Int_tsetInitialMean(const Float_t initialMean, const Float_t initialSigma)

Data Members

protected:
Int_tfSum(floating) sum of all acumulated means
Int_tfSum2(floating) sum of all acumulated means squared
Int_tfindexcurrent index in mean array
Int_tfmax(floating) maximum allowed value
Float_tfmaxMin(fixed) minimum value allowed for fmax
Float_tfmean(floating) mean value
Int_tfmin(fixed) minimum allowed value
Int_tfminEvts(fixed) minimum events for valid mean value
Int_tfnactual counter of entries until fnMax
Int_tfnMax(fixed) maximum no of events used to calculate mean multiplicity
Int_t*fnPointsused to calculate a moving average
Float_tfscaleFacSigma(fixed) scaling factor for cutoff of val distribution in units of the distribution width sigma
Float_tfsigma(floating) mean value
Bool_tfvalidvalue < max or fn (event counter) < fminEvts
Float_tinitialMean(fixed) init values for first fminEvts events
Float_tinitialSigma(fixed) init values for first fminEvts events

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

Float_t calcMean(Int_t val)
 calculate new mean and new sigma by replacing old  point by actual one.
Int_t initParam(const Int_t Max = 2000, const Int_t minEvents = 100, const Float_t scaleFacSigma = sqrt(12.0F), const Float_t initMean = -999999, const Float_t initSigma = -999999, const Int_t min = 1)
 Reset moving average, clear multiplicity array,
 Set minimum number of events to generate a valid multiplicity mean value
 Set default scaling factor (mean + factor * sigma) to maximum multiplicity (in order to reject monsters from calculating mean)
Int_t setInitialMean(const Float_t initialMean, const Float_t initialSigma)
 create a set of initial mean values filling first 'fminEvts'
 multiplicity array members. returns number of initialized multiplicity
 array members (= fminEvts set in 'initParam' before
void reset(Bool_t full = kTRUE)
clear multiplicity sum, multiplicity array, reset findex counter
Bool_t isValid(void)
 returns true if event no > fminEvts (reliable mean) and
 last val < fmax (no outlier)
HParticleRunningMeanI(const HParticleRunningMeanI& )
{ fnPoints = NULL;}
~HParticleRunningMeanI(void)
{ if(fnPoints != NULL) delete[] fnPoints;}
Float_t getMean(void)
{ return fmean; }
Float_t getSigma(void)
{ return fsigma; }
Bool_t getValid(void)
{ return fvalid;}
Int_t getMax(void)
{ return fmax ;}
Int_t getMin(void)
{ return fmin ;}
Int_t getMaxMin(void)
{ return fmaxMin;}
Int_t getNMax(void)
{ return fnMax;}
Int_t getNMin(void)
{ return fminEvts;}
Float_t getMeanScaleToMax(void)
{ return fscaleFacSigma;}