]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/XtAnalysis/AliJXtHistos.h
Removed some classed (Same code in JCORRAN packet under PWG-CF) + polished remaining...
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / XtAnalysis / AliJXtHistos.h
1 /**************************************************************************
2  * AliJXtHistos.h
3  * This class encapsulated all histograms that the analysis provides
4  *
5  * contact: Sami Räsänen
6  *          University of Jyväskylä, Finland
7  *          sami.s.rasanen@jyu.fi
8  **************************************************************************/
9
10 #ifndef ALIJXTHISTOS_H
11 #define ALIJXTHISTOS_H
12
13 #include <iostream>
14 #include <fstream>
15 #include <stdlib.h>
16 #include <stdio.h>
17
18 #include <TH1.h>
19 #include <TH2.h>
20 #include <TProfile.h>
21 #include <TFile.h>
22 #include <TList.h>
23
24 #define kMaxNoCentrBin 10   // Maximum no of centrality bins defined in JCard.h
25
26 class AliJCard;
27
28 using namespace std;
29
30 class AliJXtHistos {
31
32     public:
33         AliJXtHistos(AliJCard* cardP); //constructor
34         virtual ~AliJXtHistos(){delete fhistoList;}    //destructor
35         AliJXtHistos(const AliJXtHistos& obj);
36         AliJXtHistos& operator=(const AliJXtHistos& obj);
37
38         // create histograms 
39         void CreateXtHistos();
40
41         TList *GetHistoList() { return fhistoList; } //return the list of histograms
42
43         bool UseDirectory() const { return fUseDirectory; } // Are there directories in the final root file, yes/no
44         void UseDirectory(bool b) { fUseDirectory=b; } // Decide weather to use directories
45
46         TDirectory * MakeDirectory(TString name); // Make new directory into final root file
47         TDirectory * JumpToDefaultDirectory(); // move into default directory at the final root file
48     
49         // Fill various histograms
50         void FillCentralityHistos(double fcent, int fCentBin){
51             // Fill centrality histograms
52             fhCentr->Fill(fcent);
53             fhiCentr->Fill(1.0*fCentBin);
54         }
55         void FillRawVertexHisto(double zVert){fhZVertRaw->Fill(zVert);} // fill raw z-vertex histogram
56         void FillAcceptedVertexHisto(double zVert, int centBin){fhZVert[centBin]->Fill(zVert);} // fill accepted z-vertex histograms
57         void FillInclusiveHistograms(double pT, double xT, double eta, double phi, double effCorr, int centBin); // Fill histograms
58         void FillIsolatedHistograms(double pT, double xT, double eta, double phi, double effCorr, int centBin);  // Fill histograms
59         void FillInclusiveConeActivities(double pT, double sumPt){fhConeActivity->Fill(pT,sumPt);} // Fill TProfile
60         void FillIsolatedConeActivities(double pT, double sumPt){fhConeActivityIsolated->Fill(pT,sumPt);}  // Fill TProfile
61     
62     protected:
63         bool   fUseDirectory; // to create sub-directories in the final results, used more in case of JCORRAN
64         TDirectory * fTopDirectory; // top directory, different analysis (JCORRAN) in sub-directories.
65         
66         AliJCard  *fCard; // parameters in card
67     
68         double fmaxEtaRange; // charged track eta acceptance
69     
70         TList *fhistoList; // list of histograms
71
72     private:
73         char  fhname[40], fhtit[40]; // dummy variables to create histogram names and titles
74
75         TH1D *fhChargedPt[kMaxNoCentrBin], *fhInvariantChargedPt[kMaxNoCentrBin], *fhChargedPtNoCorr[kMaxNoCentrBin]; // inclusive pT distribution - dN/dpT and 1/pT dN/dpT, last without efficiency correction
76         TH1D *fhIsolatedChargedPt[kMaxNoCentrBin], *fhInvariantIsolatedChargedPt[kMaxNoCentrBin]; // the same as above but for isolated pT
77         TH1D *fhChargedXt[kMaxNoCentrBin], *fhInvariantChargedXt[kMaxNoCentrBin], *fhChargedXtNoCorr[kMaxNoCentrBin]; // The same as inclusive, but for xT
78         TH1D *fhIsolatedChargedXt[kMaxNoCentrBin], *fhInvariantIsolatedChargedXt[kMaxNoCentrBin]; // the same, but for isolated xT
79         TH1D *fhChargedPhi[kMaxNoCentrBin], *fhChargedPhiNoCorr[kMaxNoCentrBin], *fhIsolatedChargedPhi[kMaxNoCentrBin]; // phi -distributions - inclusive, without efficiency correction and for isolated
80         TH1D *fhChargedEta[kMaxNoCentrBin], *fhChargedEtaNoCorr[kMaxNoCentrBin], *fhIsolatedChargedEta[kMaxNoCentrBin]; // the same as above but for eta
81
82         TProfile *fhConeActivity;          // pT sum in cone, to be compared to the ALICE UE results
83         TProfile *fhConeActivityIsolated;  // activity for isolated particles
84
85                 TH1D *fhZVertRaw; // raw z-vertex distribution
86                 TH1D *fhZVert[kMaxNoCentrBin]; // accepted z-vertex as a function of centrality
87                 TH1D *fhCentr; // centrality
88                 TH1D *fhiCentr; // centrality, accepted
89                 TH1D *fhEventPerRun; // number of events per run
90                 TH2D* fhVertexZTriggVtx; // z-vertex distribution of triggered events, needed somewhere?
91
92 };
93
94 #endif