]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/Correlations/JCORRAN/AliJEbECORRTask.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / Correlations / JCORRAN / AliJEbECORRTask.h
1 #ifndef AliJEBECORR_cxx
2 #define AliJEBECORR_cxx
3
4 #include <TVector.h>
5 #include <TRandom.h>
6 #include <TString.h>
7 #include <TPRegexp.h>
8 #include "AliAnalysisTaskSE.h"
9 #include "AliGenEventHeader.h"
10 #include "AliAnalysisUtils.h"
11 #include "AliJEfficiency.h"
12
13 //#include <fstream>
14
15 class AliESDEvent;
16 class AliESDtrackCuts;
17 class AliESDVertex;
18 class TClonesArray;
19 class AliJCard;
20 class AliJBaseTrack;
21 class AliJHistos;
22 class AliJEbeHistos;
23 class AliJCorrelations;
24 class AliJEbePercentile;
25 class AliJEfficiency;
26 class AliJEventPool;
27 class AliJRunTable;
28
29 class AliJEbECORRTask : public AliAnalysisTaskSE {
30
31         public:
32                 AliJEbECORRTask();
33                 AliJEbECORRTask(const char *name);
34                 AliJEbECORRTask(const AliJEbECORRTask& a); // not implemented
35                 AliJEbECORRTask& operator=(const AliJEbECORRTask& ap); // not implemented
36
37                 virtual ~AliJEbECORRTask(); 
38
39                 virtual void   UserCreateOutputObjects();
40                 virtual void   UserExec(Option_t *option);
41                 virtual void   Terminate(Option_t *);
42                 virtual Bool_t UserNotify();
43
44                 bool IsGoodEvent(AliVEvent *event);
45                 double RunEbEFlowAnalysis(AliVEvent *event, TClonesArray* inputlist);
46                 void PlayCorrelation(TClonesArray *triggList, TClonesArray *assocList);
47                 void SetDebugMode( int debug) { fDebugMode = debug; };
48                 void ScaleNotEquidistantHisto(TH1D *hid, const double sc);
49                 AliJCard *GetCard() { return fCard; }
50                 void SetCard( AliJCard *c ) { fCard = c; }
51                 void SetEbePercentileInputFileName(TString name) { ebePercentileInputFileName = name; };
52 /*
53                 TString MemoryStatus(){
54                         int pid = getpid();
55                         TString key;
56                         TString v1;
57                         ifstream ins(Form("/proc/%d/status",pid ));
58                         double VmSwap= 0.;
59                         double VmSize= 0.;
60                         double VmPeak= 0.;
61                         double nom = TMath::Power( 2, 20 );
62                         TPMERegexp split("\\s+");
63                         TString line;
64                         while( ins.good() ){
65                                 line.ReadLine(ins);
66                                 split.Split(line);
67                                 if( split.NMatches() < 2 ) continue;
68                                 key = split[0];
69                                 v1 = split[1];
70                                 if( key == "VmSwap:" ) VmSwap = v1.Atof()/nom;
71                                 if( key == "VmSize:" ) VmSize = v1.Atof()/nom;
72                                 if( key.BeginsWith("VmPeak") ) VmPeak = v1.Atof()/nom;
73                         }
74                         TString res = Form("VmPeak:%10.2f VmSize:%10.2f VmSwap:%10.2f", VmPeak, VmSize, VmSwap);
75                         ins.close();
76                         return res;
77                 };
78 */
79
80         private:
81                 TDirectory           *fOutput;     // Output
82
83                 AliAnalysisUtils *fAnaUtils;
84
85                 AliJCard * fCard;
86
87                 AliJHistos * fHistos;                           //!
88                 AliJEbeHistos * fEbeHistos;                     //!
89                 AliJEfficiency *fEfficiency;
90                 int fHadronSelectionCut;
91
92                 TClonesArray * fInputList;
93                 TClonesArray * ftriggList;
94                 TClonesArray * fassocList;
95
96                 AliJCorrelations *fcorrelations;        //!
97                 AliJEventPool *fassocPool;                      //!
98                 AliJEbePercentile *fEbePercentile;      //!
99
100                 Bool_t fFirstEvent; //
101                 int cBin;
102                 int ebeBin;
103                 int zBin;
104                 double zVert;
105                 Int_t fevt; // event number
106                 int fDebugMode;
107                 Int_t trkfilterBit;
108                 TVector *fEbECentBinBorders;
109                 TString ebePercentileInputFileName;
110                 AliJRunTable *fRunTable; // 
111
112                 TRandom *fRandom;
113
114                 ClassDef(AliJEbECORRTask, 1); // example of analysis
115 };
116
117 #endif