AliPhysics  608b256 (608b256)
AliEmcalList.h
Go to the documentation of this file.
1 #ifndef ALIEMCALLIST_H
2 #define ALIEMCALLIST_H
3 /* Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
18 //
19 
20 class TH1;
21 
22 #include "TList.h"
23 #include "TString.h"
24 
25 class AliEmcalList : public TList {
26 
27 public:
28  AliEmcalList();
30  Long64_t Merge(TCollection *hlist);
31  void SetUseScaling(Bool_t val) {fUseScaling = val;}
32  Bool_t IsUseScaling() const { return fUseScaling; }
33  void SetNameXsec(const char *name) { fNameXsec = name; }
34  void SetNameTrials(const char *name) { fNameNTrials = name; }
35 
36 private:
37  // ####### Helper functions
38  void ScaleAllHistograms(TCollection *hlist, Double_t scalingFactor);
39  Double_t GetScalingFactor(const TH1* xsection, const TH1* ntrials) const;
40  Bool_t IsLastMergeLevel(const TCollection* collection) const;
41  Int_t GetFilledBinNumber(const TH1* hist) const;
42  Bool_t IsScalingSupported(const TObject *scaleobject) const;
43 
47 
49  ClassDef(AliEmcalList, 2);
51 };
52 
53 #endif
double Double_t
Definition: External.C:58
Bool_t fUseScaling
if true, scaling will be done. if false AliEmcalList simplifies to TList
Definition: AliEmcalList.h:44
AliEmcalList()
constructor
long long Long64_t
Definition: External.C:43
void SetNameTrials(const char *name)
Definition: AliEmcalList.h:34
Double_t GetScalingFactor(const TH1 *xsection, const TH1 *ntrials) const
Helper function scaling factor.
void ScaleAllHistograms(TCollection *hlist, Double_t scalingFactor)
Function that does the scaling of all histograms in hlist recursively.
void SetNameXsec(const char *name)
Definition: AliEmcalList.h:33
int Int_t
Definition: External.C:63
TString fNameXsec
Name of the cross section histogram.
Definition: AliEmcalList.h:45
void SetUseScaling(Bool_t val)
Definition: AliEmcalList.h:31
Bool_t IsScalingSupported(const TObject *scaleobject) const
Helper function checking whether type is supported for scaling.
Long64_t Merge(TCollection *hlist)
Overridden Merge function.
Bool_t IsUseScaling() const
Definition: AliEmcalList.h:32
Enhanced TList-derived class that implements correct merging for pt_hard binned production.
Definition: AliEmcalList.h:25
Bool_t IsLastMergeLevel(const TCollection *collection) const
Helper function to determine whether we are in last merge step.
TString fNameNTrials
Name of the histogram with the number of trials.
Definition: AliEmcalList.h:46
bool Bool_t
Definition: External.C:53
Int_t GetFilledBinNumber(const TH1 *hist) const
Helper function that returns the bin in a TH1 that is filled.
Definition: External.C:196