AliPhysics  9b6b435 (9b6b435)

Enhanced TList-derived class that implements correct merging for pt_hard binned production. More...

#include <AliEmcalList.h>

Inheritance diagram for AliEmcalList:

Public Member Functions

 AliEmcalList ()
 constructor More...
 
 ~AliEmcalList ()
 
Long64_t Merge (TCollection *hlist)
 Overridden Merge function. More...
 
void SetUseScaling (Bool_t val)
 
Bool_t IsUseScaling () const
 
void SetNameXsec (const char *name)
 
void SetNameTrials (const char *name)
 

Private Member Functions

void ScaleAllHistograms (TCollection *hlist, Double_t scalingFactor)
 Function that does the scaling of all histograms in hlist recursively. More...
 
Double_t GetScalingFactor (const TH1 *xsection, const TH1 *ntrials) const
 Helper function scaling factor. More...
 
Bool_t IsLastMergeLevel (const TCollection *collection) const
 Helper function to determine whether we are in last merge step. More...
 
Int_t GetFilledBinNumber (const TH1 *hist) const
 Helper function that returns the bin in a TH1 that is filled. More...
 
Bool_t IsScalingSupported (const TObject *scaleobject) const
 Helper function checking whether type is supported for scaling. More...
 

Private Attributes

Bool_t fUseScaling
 if true, scaling will be done. if false AliEmcalList simplifies to TList More...
 
TString fNameXsec
 Name of the cross section histogram. More...
 
TString fNameNTrials
 Name of the histogram with the number of trials. More...
 

Detailed Description

Enhanced TList-derived class that implements correct merging for pt_hard binned production.

Must be activated using SetUseScaling(kTRUE). Otherwise the behavior is like a TList Scaling is recursively applied also to all nested lists deriving from TCollection fHistXsection and fHistTrials must be added directly to the list (not to a nested list)

Author
Ruediger Haake ruedi.nosp@m.ger..nosp@m.haake.nosp@m.@cer.nosp@m.n.ch, CERN
Date
May 05, 2016

Definition at line 25 of file AliEmcalList.h.

Constructor & Destructor Documentation

AliEmcalList::AliEmcalList ( )

constructor

Definition at line 32 of file AliEmcalList.cxx.

AliEmcalList::~AliEmcalList ( )
inline

Definition at line 29 of file AliEmcalList.h.

Member Function Documentation

Int_t AliEmcalList::GetFilledBinNumber ( const TH1 hist) const
private

Helper function that returns the bin in a TH1 that is filled.

Parameters
histHistogram
Returns
bin number that is filled. If no or more than one bin is filled, 0.

Definition at line 212 of file AliEmcalList.cxx.

Referenced by GetScalingFactor(), IsLastMergeLevel(), and SetNameTrials().

Double_t AliEmcalList::GetScalingFactor ( const TH1 xsection,
const TH1 ntrials 
) const
private

Helper function scaling factor.

Definition at line 151 of file AliEmcalList.cxx.

Referenced by Merge(), and SetNameTrials().

Bool_t AliEmcalList::IsLastMergeLevel ( const TCollection collection) const
private

Helper function to determine whether we are in last merge step.

Parameters
collectionCollection of AliEmcalList objects

Definition at line 173 of file AliEmcalList.cxx.

Referenced by Merge(), and SetNameTrials().

bool AliEmcalList::IsScalingSupported ( const TObject scaleobject) const
private

Helper function checking whether type is supported for scaling.

Supported types are:

  • all TH1-derived / THnBase-derived histograms
  • objects inheriting from RooUnfoldResponse if AliPhysics is built with RooUnfold support
Parameters
scaleobjectObject for which to deterime scaling support
Returns
true if object can be scaled, false otherwise

Definition at line 200 of file AliEmcalList.cxx.

Referenced by ScaleAllHistograms(), and SetNameTrials().

Bool_t AliEmcalList::IsUseScaling ( ) const
inline

Definition at line 32 of file AliEmcalList.h.

Long64_t AliEmcalList::Merge ( TCollection hlist)

Overridden Merge function.

Definition at line 41 of file AliEmcalList.cxx.

Referenced by ~AliEmcalList().

void AliEmcalList::ScaleAllHistograms ( TCollection hlist,
Double_t  scalingFactor 
)
private

Function that does the scaling of all histograms in hlist recursively.

Definition at line 91 of file AliEmcalList.cxx.

Referenced by Merge(), and SetNameTrials().

void AliEmcalList::SetNameTrials ( const char *  name)
inline

Definition at line 34 of file AliEmcalList.h.

void AliEmcalList::SetNameXsec ( const char *  name)
inline

Definition at line 33 of file AliEmcalList.h.

void AliEmcalList::SetUseScaling ( Bool_t  val)
inline

Member Data Documentation

TString AliEmcalList::fNameNTrials
private

Name of the histogram with the number of trials.

Definition at line 46 of file AliEmcalList.h.

Referenced by Merge(), and SetNameTrials().

TString AliEmcalList::fNameXsec
private

Name of the cross section histogram.

Definition at line 45 of file AliEmcalList.h.

Referenced by Merge(), and SetNameXsec().

Bool_t AliEmcalList::fUseScaling
private

if true, scaling will be done. if false AliEmcalList simplifies to TList

Definition at line 44 of file AliEmcalList.h.

Referenced by IsUseScaling(), Merge(), and SetUseScaling().


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