]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/Correlations/JCORRAN/AliJEfficiency.h
Merge branch 'master_patch'
[u/mrichter/AliRoot.git] / PWGCF / Correlations / JCORRAN / AliJEfficiency.h
1 #ifndef ALIJEFFICIENCY_H
2 #define ALIJEFFICIENCY_H
3 // Class to Load and Get efficiency inforamtion
4 // ..
5 // TODO
6
7 #include <TString.h>
8 #include <TFile.h>
9 #include "AliJTrackCut.h"
10 #include "AliJRunTable.h"
11 #include "AliJConst.h"
12 #include <TGraphErrors.h>
13 #include <TAxis.h>
14 #include <iostream>
15 using namespace std;
16
17 class AliJEfficiency{
18     public:
19         enum Mode { kNotUse, kPeriod, kRunNumber, kAuto };
20         enum Type { kRE, kMC, kMerge };
21         AliJEfficiency();
22         AliJEfficiency(const AliJEfficiency& obj);
23         AliJEfficiency& operator=(const AliJEfficiency& obj);
24
25         void SetMode( int i ){ fMode = i; }
26
27         void SetDataPath(TString s ){ fDataPath=s; }
28         void SetEffFile(TString s ){ fInputRootName=s; }
29         void SetName(TString s ){ fName=s; }
30         void SetPeriod(int period){ fPeriod = period; }
31         void SetPeriod(TString s){ fPeriodStr = s; }
32         void SetMCPeriod(TString s){ fMCPeriodStr = s; }
33         void SetRunNumber( Long64_t runnum ){ fRunNumber=runnum; }
34         void SetTag(TString s){ fTag=s; }
35
36         TString GetName() const { return fName; }
37         double GetCorrection( double pt, int icut, double cent ) const ;
38         TString GetEffName() ;
39         TString GetEffFullName() ;
40         bool   Load();
41         void   PrintOut() const {
42             cout<<fInputRootName<<endl;
43         }
44         void Write();
45
46     private:
47         int      fMode;             // Mode. see enum Mode
48         int      fPeriod;           // Data Period index
49         AliJTrackCut fTrackCut;     // Track Cut Object. TODO:why not pointer?
50         AliJRunTable fRunTable;     // run Table. TODO:why not pointer?
51
52         TString fDataPath;          // locaction of eff files
53         TString fName;              // name of efficiency. usually empty
54         TString fPeriodStr;         // DATA period
55         TString fMCPeriodStr;       // MC period
56         Long64_t fRunNumber;        // Runnumber
57         TString fTag;               // Tags to distinguish special eff file
58         TString fInputRootName;     // name of input
59
60         TFile * fInputRoot;         // input file  
61         TDirectory * fEffDir[3];    // root directory of efficiency. only second item of fEffDir with "Efficiency" is being used.
62         TGraphErrors * fCorrection[20][20][20]; // Storage of Correction factor 
63         TAxis * fCentBin;     // Bin of Centrality. replace with AliJBin?
64 };
65 #endif