]>
Commit | Line | Data |
---|---|---|
37dde34e | 1 | #ifndef ALIJCORRANTASK_H |
2 | #define ALIJCORRANTASK_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | //______________________________________________________________________________ | |
7 | // Analysis task for high pt particle correlations | |
8 | // author: R.Diaz, J. Rak, D.J. Kim | |
9 | // ALICE Group University of Jyvaskyla | |
10 | // Finland | |
11 | // | |
12 | // Fill the analysis containers for ESD or AOD | |
13 | // Note: Adapted for AliAnalysisTaskSE | |
14 | ////////////////////////////////////////////////////////////////////////////// | |
15 | ||
16 | #include <iostream> | |
17 | #include <fstream> | |
18 | #include <stdlib.h> | |
19 | #include <stdio.h> | |
20 | #include <iomanip> | |
21 | ||
22 | //#include <TTree.h> | |
23 | //#include <TList.h> | |
24 | #include <TVectorT.h> | |
25 | #include "AliAnalysisTaskSE.h" | |
26 | //#include "AliAnalysisFilter.h" | |
27 | //#include "AliMCEvent.h" | |
28 | #include "AliJRunHeader.h" | |
29 | #include "AliESDVZERO.h" | |
30 | #include "AliESDTZERO.h" | |
31 | //#include "AliESDFMD.h" | |
32 | #include "AliESDZDC.h" | |
33 | #include "AliJConst.h" | |
34 | #include "AliESDpid.h" | |
35 | #include "AliEMCALGeometry.h" | |
36 | #include "AliPHOSGeoUtils.h" | |
37 | #include "AliPIDResponse.h" | |
38 | #include "AliPIDCombined.h" | |
39 | ||
40 | //============================================================== | |
41 | ||
42 | using namespace std; | |
43 | ||
44 | const int kMaxDimBuffer = 300;//max length of a line read to a buffe | |
45 | ||
46 | class TH1D; | |
47 | class TH2D; | |
48 | class TNtuple; | |
49 | class TList; | |
50 | class TTree; | |
51 | class TFormula; | |
52 | ||
53 | class AliMCEvent; | |
54 | class AliESDEvent; | |
55 | class AliAODEvent; | |
56 | class AliAODTrack; | |
57 | class AliESDtrackCuts; | |
58 | class AliESDVZERO; | |
59 | class AliESDCentrality; | |
60 | ||
61 | class AliJRunHeader; | |
62 | class AliMCEvent; | |
63 | class AliAnalysisFilter; | |
64 | class AliJTrack; | |
65 | class AliJEventHeader; | |
66 | ||
67 | ||
68 | ||
69 | class AliJCORRANTask : public AliAnalysisTaskSE { | |
70 | ||
71 | public: | |
72 | AliJCORRANTask(); | |
73 | AliJCORRANTask(const char *name, TString inputformat); | |
74 | AliJCORRANTask(const AliJCORRANTask& ap); | |
75 | AliJCORRANTask& operator = (const AliJCORRANTask& ap); | |
76 | virtual ~AliJCORRANTask(); | |
77 | ||
78 | // methods to fill from AliAnalysisTaskSE | |
79 | virtual void UserCreateOutputObjects(); | |
80 | virtual void Init(); | |
81 | virtual void LocalInit() { Init(); } | |
82 | virtual void UserExec(Option_t *option); | |
83 | virtual void Terminate(Option_t * opt = ""); | |
84 | ||
85 | TString GetRunType() const { return fRunType;} | |
86 | void SetRunType( const TString type ){ fRunType = type; } | |
87 | void SetESDtrackCuts(AliESDtrackCuts* esdTrackCuts){ fEsdTrackCuts = esdTrackCuts;} | |
88 | void SetESDFilter( AliAnalysisFilter * filter ){ fESDFilter = filter; } | |
89 | void SetRealOrMC(Bool_t realormc){fIsRealOrMC[0]=realormc;} //flags whether the input | |
90 | void SetStoreEventPlaneSource(bool dostore ){ fStoreEventPlaneSource = dostore; } | |
91 | bool GetStoreEventPlaneSource(){ return fStoreEventPlaneSource; }; | |
92 | void SetStoreTPCTrack(bool dostore ){ fStoreTPCTrack = dostore; } | |
93 | bool GetStoreTPCTrack(){ return fStoreTPCTrack; }; | |
94 | //are ESDs from real exp or MonteCarlo | |
95 | void SetOutputAODName(const char* aodname){ fAODName=aodname;} | |
96 | // AliEMCALGeoUtils* GetEMCALGeoUtils (bool doDelete=kFALSE); | |
97 | ||
98 | private: | |
99 | AliJEventHeader* ReadCommonHeader(AliVEvent *event); | |
100 | // methods to read data from ESD | |
101 | void ReadESDTracks(AliESDEvent* esd); | |
102 | void ReadESDCaloClusters(const AliESDEvent* esd); | |
103 | void ReadESDHeader(AliESDEvent* esd); | |
104 | void ReadESDPID(AliESDtrack* track, AliJTrack* ctrack); | |
105 | // methods to read data from AOD | |
106 | void ReadAODTracks(const AliAODEvent* aod); | |
107 | void ReadAODCaloClusters(const AliAODEvent* aod); | |
108 | void ReadAODHeader(AliAODEvent* aod); | |
109 | void ReadFilter(); | |
110 | void ReadMCTracks(AliMCEvent* fMC); | |
111 | Int_t GetSuperModuleNumber(bool isemcal, Int_t absId); | |
112 | ||
113 | UInt_t ConvertTriggerMask();//Converts alice trigger mask to JCorran trigger mask | |
114 | //functions used for event selction: | |
115 | bool AcceptAODTrack(AliAODTrack* aodTrack); | |
116 | void SetOADBPath(const char* path) {fOADBPath=path;} | |
117 | const char* GetOADBPath() const { return fOADBPath.Data(); } | |
118 | ||
119 | // method to fill jcorran | |
120 | bool SetAliceTriggerDef(AliJRunHeader *runHeader); | |
121 | bool SetAliceFilterMapDef(AliJRunHeader *runHeader); //TODO Check | |
122 | void PrintOut(); | |
123 | ||
124 | // UTILS | |
125 | void AddListAODBranch(const char* aname, const char* cname, TClonesArray **obj, int nlist); | |
126 | ||
127 | // d a t a m e m b e r s | |
128 | TString fRunType; // ex) LHC10h | |
129 | TString fInputFormat; // specify the input data format (ESD or AOD) | |
130 | AliESDtrackCuts* fEsdTrackCuts; //track selection cuts | |
131 | AliAnalysisFilter * fESDFilter; //filter set of track selection BS | |
132 | TVectorT<double> fIsRealOrMC; //flags if the input are real (0) ESDs or MonteCarlo ESDs (1) | |
133 | TString fAODName; //output delta AOD name | |
134 | TString fActiveTriggers[kRangeTriggerTableAlice];//alice table mapping trigger bit to trigger name | |
135 | TString fTriggerTableJCorran[kRangeTriggerTableJCorran];//JCorran trigger table TBit 0 =MinBias | |
136 | bool fStoreEventPlaneSource; | |
137 | bool fStoreTPCTrack; | |
138 | TString fOADBPath; | |
139 | ||
140 | // jcorran output objects | |
141 | ||
142 | TClonesArray * fTrackList; // list of charged track objects | |
143 | TClonesArray * fMCTrackList; // list of charged track objects | |
144 | TClonesArray * fPhotonList; // list of photons objects | |
145 | TClonesArray * fHeaderList; // event details | |
146 | TList * fRunInfoList; // run details | |
147 | ||
148 | AliESDpid *fPIDesd; | |
149 | AliPIDResponse *fPIDResponse; // PID response object | |
150 | AliPIDCombined *fPIDCombined; | |
151 | ||
152 | AliESDVZERO* fVZEROData; | |
153 | AliESDTZERO* fTZEROData; | |
154 | // AliESDFMD* fFMDData; | |
155 | AliESDZDC* fZDCData; | |
156 | ||
157 | AliJRunHeader* fAliRunHeader;// run details (mg field, trigger mask,etc...) | |
158 | AliEMCALGeometry * fEMCALGeoUtils; // no AliEMCALGeoUtils.h in trunk aliroot (111130) | |
159 | AliPHOSGeoUtils * fPHOSGeom; //phos geometry matrix | |
160 | ||
161 | ||
162 | // TPC | |
163 | Double32_t fTPCTrack[3]; | |
164 | ||
165 | ClassDef(AliJCORRANTask, 1); | |
166 | }; | |
167 | #endif // AliJCORRANTask_H |