Working on the electron cut
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / ChargedHadrons / multPbPb / AliAnalysisMultPbTrackHistoManager.h
CommitLineData
a23f7c97 1#ifndef ALIANALYSISMULTPBTRACKHISTOMANAGER_H
2#define ALIANALYSISMULTPBTRACKHISTOMANAGER_H
3
4#include "AliHistoListWrapper.h"
5#include "TH3D.h"
6
7class TH3D;
8class TH1D;
9class TH1I;
3b8cbf2d 10class AliMCParticle;
5ad99723 11class TMap;
a23f7c97 12
bcc49144 13//#define WEIGHTED_DCA
14#define TRANSVERSE_DCA
15
16
a23f7c97 17//-------------------------------------------------------------------------
18// AliAnalysisMultPbTrackHistoManager
19//
20//
21//
22//
23// Author: Michele Floris, CERN
24//-------------------------------------------------------------------------
25
26
a23f7c97 27class AliAnalysisMultPbTrackHistoManager : public AliHistoListWrapper {
28
29public:
30
abd808b9 31 typedef enum {kHistoGen, kHistoRec, kHistoRecPrim, kHistoRecSecWeak, kHistoRecSecMat, kHistoRecFake, kHistoRecHighestMeanPt, kHistoRecLowestMeanPt, kNHistos} Histo_t;
32 typedef enum {kStatAll, kStatCentr, kStatPhysSel, kStatVtx, kStatZDCCut, kStatVtxRangeCut, kNStatBins} Stat_t;
3b8cbf2d 33 typedef enum {kPartPiPlus, kPartKPlus, kPartP, kPartLPlus, kPartPiMinus, kPartKMinus, kPartPBar, kPartLMinus, kPartOther, kNPart} Part_t;
34
abd808b9 35 // these bits define the behaviour at merging
36 // if kKeepMax(Mib)Mean is set, the histogram with the highest (lowest) mean is kept
37 enum {kKeepMaxMean = BIT(22), kKeepMinMean = BIT(23)};
38
39
a23f7c97 40
41 AliAnalysisMultPbTrackHistoManager();
42 AliAnalysisMultPbTrackHistoManager(const char * name,const char * title);
43 AliAnalysisMultPbTrackHistoManager(const AliAnalysisMultPbTrackHistoManager& obj) ;
44 ~AliAnalysisMultPbTrackHistoManager();
45
46 // Setters
47 void SetSuffix(const char * suffix) { fHNameSuffix = suffix;}
48
49 // Histo getters
4d0aa70f 50 TH3D * GetHistoPtEtaVz(Histo_t id, Int_t particle = -1);
a23f7c97 51 TH1D * GetHistoPt (Histo_t id, Float_t minEta = -22222, Float_t maxEta = -22222, Float_t minVz = -22222, Float_t maxVz = -22222, Bool_t scaleWidth = kTRUE);
52 TH1D * GetHistoEta(Histo_t id, Float_t minPt = -22222, Float_t maxPt = -22222, Float_t minVz = -22222, Float_t maxVz = -22222, Bool_t scaleWidth = kTRUE);
53 TH1D * GetHistoVz (Histo_t id, Float_t minPt = -22222, Float_t maxPt = -22222, Float_t minEta = -22222, Float_t maxEta = -22222, Bool_t scaleWidth = kTRUE);
aa6151eb 54 TH2D * GetHistoPtVz (Histo_t id, Float_t minEta = -22222, Float_t maxEta = -22222, Bool_t scaleWidth = kFALSE);
a23f7c97 55
56 TH1I * GetHistoStats();
bcc49144 57 TH2D * GetHistoDCA(Histo_t id);
e0376287 58 TH1D * GetHistoMult(Histo_t id);
bcf2601a 59 TH2D * GetHistoV0vsNtracks(Histo_t id);
60
e0376287 61
62 TH1D * GetHistoSpecies(Histo_t id);
3b8cbf2d 63 TH1D * GetHistoProcess(Histo_t id);
4d0aa70f 64 TH1D * GetHistoVzEvent(Histo_t id);
abd808b9 65 TH1D * GetHistoPtEvent(Histo_t id);
66 TH1D * GetHistoMeanPt (Histo_t id);
4d0aa70f 67
5ad99723 68 TH2D * GetHistoElectronCutQA();
69
70 TMap * GetParticleSpecies(){return fParticleSpecies;}
a23f7c97 71
72 // Misch utils
73 void ScaleHistos (Double_t nev, Option_t * option="");
3b8cbf2d 74 Int_t GetLocalParticleID(AliMCParticle * part);
75 void FillParticleID(Histo_t id, AliMCParticle * part) { GetHistoSpecies(id)->Fill(GetLocalParticleID(part));}
5ad99723 76 void FillSpeciesMap(Int_t pdgCode);
77
a23f7c97 78
79 // Histo bookers
80 TH3D * BookHistoPtEtaVz(const char * name, const char * title);
bcc49144 81 TH2D * BookHistoDCA(const char * name, const char * title);
a23f7c97 82 TH1I * BookHistoStats();
e0376287 83 TH1D * BookHistoMult(const char * name, const char * title);
a23f7c97 84
85 //
86 TH1 * GetHisto(const char * name);
87
5ad99723 88 virtual void Print(Option_t* option = "") const {fList->Print(option);}
abd808b9 89
90
91 Long64_t Merge(TCollection* list); // need to override this because of the mean pts
92
a23f7c97 93private:
94
95 static const char * kStatStepNames[]; // names of the step hist
96 static const char * kHistoPtEtaVzNames[]; // names of the 3D histograms pt/eta/vz
97 static const char * kHistoDCANames[]; // names of the DCA histograms
e0376287 98 static const char * kHistoPrefix[]; // prefix for histo names // FIXME: remove the others and keep only this
3b8cbf2d 99 static const char * kSpeciesName[]; // Particle species
a23f7c97 100 TString fHNameSuffix; // Suffix added to all histo names. Useful if you have in the same session e.g. MC and data.
5ad99723 101
102 TMap * fParticleSpecies;// Map assiciating PDG code to number of particles in the physical primary sample.
a23f7c97 103
104 AliAnalysisMultPbTrackHistoManager& operator=(const AliAnalysisMultPbTrackHistoManager& task);
105
5ad99723 106 ClassDef(AliAnalysisMultPbTrackHistoManager, 4)
a23f7c97 107
108
109};
110
111#endif