]>
Commit | Line | Data |
---|---|---|
fdceab34 | 1 | //DEFINITION OF A FEW CONSTANTS |
de88b926 | 2 | #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) |
3 | ||
67ebd013 | 4 | const Float_t phimin = 0.; |
5 | const Float_t phimax = 2.*TMath::Pi(); | |
6 | const Float_t etamin = -0.9; | |
7 | const Float_t etamax = 0.9; | |
67ebd013 | 8 | |
dae7dd67 | 9 | const Int_t mintrackrefsTPC = 0; |
10 | const Int_t mintrackrefsITS = 0; | |
fdceab34 | 11 | |
9477b466 | 12 | void AddTaskPWG4HighPtSpectra(TString year = "2011", char *prodType = "LHC11h",Bool_t isPbPb=kTRUE, Int_t iAODanalysis = 0, UInt_t triggerMask = AliVEvent::kMB,Bool_t bSelectHijingParticles = kFALSE,Bool_t usePythiaxsec = kFALSE) |
fdceab34 | 13 | { |
7b90d977 | 14 | int cent = 10; |
15 | ||
03372fd1 | 16 | if(year.Contains("2011")) { |
9477b466 | 17 | AddTaskPWG4HighPtSpectra2011(prodType,isPbPb,iAODanalysis,bSelectHijingParticles,usePythiaxsec); |
03372fd1 | 18 | } |
19 | else { | |
20 | ||
9477b466 | 21 | AliPWG4HighPtSpectra *taskSpectra00cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,0,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); |
22 | AliPWG4HighPtSpectra *taskSpectra01cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,1,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
23 | // AliPWG4HighPtSpectra *taskSpectra02cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,2,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
24 | // AliPWG4HighPtSpectra *taskSpectra10cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,1,0,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
25 | // AliPWG4HighPtSpectra *taskSpectra20cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,2,0,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
26 | AliPWG4HighPtSpectra *taskSpectra70cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,0,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
27 | AliPWG4HighPtSpectra *taskSpectra71cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,1,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
28 | AliPWG4HighPtSpectra *taskSpectra72cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,2,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
03372fd1 | 29 | |
30 | if(isPbPb) { | |
31 | for(cent=0; cent<4; cent++) { | |
9477b466 | 32 | AliPWG4HighPtSpectra *taskSpectra00 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,0,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); |
33 | AliPWG4HighPtSpectra *taskSpectra01 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,1,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
34 | // AliPWG4HighPtSpectra *taskSpectra02 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,2,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
35 | // AliPWG4HighPtSpectra *taskSpectra10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,1,0,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
36 | // AliPWG4HighPtSpectra *taskSpectra20 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,2,0,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
37 | AliPWG4HighPtSpectra *taskSpectra70 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,0,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
38 | AliPWG4HighPtSpectra *taskSpectra71 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,1,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
39 | AliPWG4HighPtSpectra *taskSpectra72 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,2,triggerMask,bSelectHijingParticles,iAODanalysis,usePythiaxsec); | |
03372fd1 | 40 | } |
41 | } | |
42 | } | |
9477b466 | 43 | } |
03372fd1 | 44 | |
9477b466 | 45 | void AddTaskPWG4HighPtSpectraQA_AOD(char *prodType = "LHC11h",Bool_t isPbPb=kTRUE, UInt_t triggerMask = AliVEvent::kMB,Bool_t bSelectHijingParticles = kFALSE,Bool_t usePythiaxsec = kFALSE) |
46 | { | |
47 | Int_t filterMask1; //standard global tracks | |
48 | Int_t filterMask2; //complementary tracks | |
49 | Int_t filterMask; //the sum: hybrid tracks | |
50 | ||
51 | Bool_t bIncludeNoITS = kFALSE; | |
52 | ||
53 | TString strRunPeriod = TString(prodType); | |
54 | strRunPeriod.ToLower(); | |
55 | ||
56 | if (strRunPeriod == "lhc10h" || strRunPeriod == "lhc11h" || | |
57 | strRunPeriod == "lhc12a" || strRunPeriod == "lhc12b" || strRunPeriod == "lhc12c" || strRunPeriod == "lhc12d" || | |
58 | strRunPeriod == "lhc12e" || strRunPeriod == "lhc12f" || strRunPeriod == "lhc12g" || strRunPeriod == "lhc12g" || | |
59 | strRunPeriod == "lhc12h" || strRunPeriod == "lhc12i" || | |
60 | strRunPeriod == "lhc13b" || strRunPeriod == "lhc13c" || strRunPeriod == "lhc13d" || strRunPeriod == "lhc13e" || | |
61 | strRunPeriod == "lhc13f" || strRunPeriod == "lhc13g" || | |
62 | strRunPeriod == "lhc12a15e" || strRunPeriod == "lhc13b4" || strRunPeriod == "lhc13b4_fix" || | |
63 | strRunPeriod == "lhc13b4_plus" || strRunPeriod == "lhc12a15f" || strRunPeriod.Contains("lhc12a17") || strRunPeriod.Contains("lhc14a1")) { | |
64 | filterMask = 768; | |
65 | filterMask1 = 256; | |
66 | filterMask2 = 512; | |
67 | bIncludeNoITS = kFALSE; | |
68 | if(strRunPeriod == "lhc10h") bIncludeNoITS = kTRUE; | |
69 | } | |
70 | else if (strRunPeriod == "lhc11a" || strRunPeriod == "lhc10hold" || strRunPeriod == "lhc12a15a" || strRunPeriod.Contains("lhc11a2")) { | |
71 | filterMask = 272; | |
72 | filterMask1 = 16; | |
73 | filterMask2 = 256; | |
74 | bIncludeNoITS = kTRUE; | |
75 | } | |
ba02ea81 | 76 | else { |
77 | ::Error("AddTaskPWG4HighPtSpectra","Period string not of predefined type. Add it to the list in this macro."); | |
78 | return NULL; | |
79 | } | |
9477b466 | 80 | |
81 | AliPWG4HighPtSpectra *taskSpectraSUM = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,10,0,0,triggerMask,bSelectHijingParticles,kTRUE,usePythiaxsec,filterMask ); //Sum: the hybrid tracks. | |
82 | AliPWG4HighPtSpectra *taskSpectraRESTR = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,10,0,5,triggerMask,bSelectHijingParticles,kTRUE,usePythiaxsec,filterMask1); //With SPD and ITS refit. | |
83 | AliPWG4HighPtSpectra *taskSpectraNOSPD = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,10,7,5,triggerMask,bSelectHijingParticles,kTRUE,usePythiaxsec,filterMask2); //Only ITS refit, not SPD. | |
84 | if(isPbPb) { //also vary the centrality | |
85 | AliPWG4HighPtSpectra *taskSpectraCent0 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,0 ,0,0,triggerMask,bSelectHijingParticles,kTRUE,usePythiaxsec,filterMask ); | |
86 | AliPWG4HighPtSpectra *taskSpectraCent1 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,1 ,0,0,triggerMask,bSelectHijingParticles,kTRUE,usePythiaxsec,filterMask ); | |
87 | AliPWG4HighPtSpectra *taskSpectraCent2 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,2 ,0,0,triggerMask,bSelectHijingParticles,kTRUE,usePythiaxsec,filterMask ); | |
88 | AliPWG4HighPtSpectra *taskSpectraCent3 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,3 ,0,0,triggerMask,bSelectHijingParticles,kTRUE,usePythiaxsec,filterMask ); | |
89 | } | |
03372fd1 | 90 | } |
91 | ||
9477b466 | 92 | void AddTaskPWG4HighPtSpectra2011(char *prodType = "LHC10h", Bool_t isPbPb=kTRUE, Int_t iAODanalysis = 0, Bool_t bSelHijingParticles = kFALSE, Bool_t usePythiaxsec = kFALSE) |
03372fd1 | 93 | { |
94 | ||
95 | int cent = 10; | |
96 | ||
97 | UInt_t iPhysicsSelectionFlag = AliVEvent::kMB|AliVEvent::kCentral|AliVEvent::kSemiCentral; | |
98 | UInt_t iPhysicsSelectionFlagEMCEJE = AliVEvent::kEMCEJE; | |
99 | ||
9477b466 | 100 | AliPWG4HighPtSpectra *taskSpectra00cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,0,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); |
101 | AliPWG4HighPtSpectra *taskSpectra01cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,1,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
102 | AliPWG4HighPtSpectra *taskSpectra70cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,0,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
103 | AliPWG4HighPtSpectra *taskSpectra71cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,1,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
104 | AliPWG4HighPtSpectra *taskSpectra72cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,2,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
105 | AliPWG4HighPtSpectra *taskSpectra05cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,5,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
106 | AliPWG4HighPtSpectra *taskSpectra74cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,4,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
107 | AliPWG4HighPtSpectra *taskSpectra75cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,5,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
108 | AliPWG4HighPtSpectra *taskSpectra40cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,4,0,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
109 | ||
110 | AliPWG4HighPtSpectra *taskSpectraEMCJE00cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,0,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
111 | AliPWG4HighPtSpectra *taskSpectraEMCJE01cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,1,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
112 | AliPWG4HighPtSpectra *taskSpectraEMCJE70cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,0,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
113 | AliPWG4HighPtSpectra *taskSpectraEMCJE71cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,1,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
114 | AliPWG4HighPtSpectra *taskSpectraEMCJE72cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,2,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
115 | AliPWG4HighPtSpectra *taskSpectraEMCJE05cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,5,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
116 | AliPWG4HighPtSpectra *taskSpectraEMCJE74cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,4,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
117 | AliPWG4HighPtSpectra *taskSpectraEMCJE75cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,5,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
118 | AliPWG4HighPtSpectra *taskSpectraEMCJE40cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,4,0,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
03372fd1 | 119 | |
7b90d977 | 120 | |
121 | if(isPbPb) { | |
122 | for(cent=0; cent<4; cent++) { | |
03372fd1 | 123 | |
9477b466 | 124 | AliPWG4HighPtSpectra *taskSpectra00 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,0,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); |
125 | AliPWG4HighPtSpectra *taskSpectra01 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,1,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
126 | AliPWG4HighPtSpectra *taskSpectra70 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,0,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
127 | AliPWG4HighPtSpectra *taskSpectra71 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,1,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
128 | AliPWG4HighPtSpectra *taskSpectra72 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,2,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
129 | AliPWG4HighPtSpectra *taskSpectra05 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,5,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
130 | AliPWG4HighPtSpectra *taskSpectra74 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,4,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
131 | AliPWG4HighPtSpectra *taskSpectra75 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,5,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
132 | AliPWG4HighPtSpectra *taskSpectra40 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,4,0,iPhysicsSelectionFlag,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
133 | ||
134 | AliPWG4HighPtSpectra *taskSpectraEMCJE00 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,0,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
135 | AliPWG4HighPtSpectra *taskSpectraEMCJE01 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,1,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
136 | AliPWG4HighPtSpectra *taskSpectraEMCJE70 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,0,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
137 | AliPWG4HighPtSpectra *taskSpectraEMCJE71 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,1,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
138 | AliPWG4HighPtSpectra *taskSpectraEMCJE72 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,2,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
139 | AliPWG4HighPtSpectra *taskSpectraEMCJE05 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,0,5,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
140 | AliPWG4HighPtSpectra *taskSpectraEMCJE74 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,4,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
141 | AliPWG4HighPtSpectra *taskSpectraEMCJE75 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,7,5,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
142 | AliPWG4HighPtSpectra *taskSpectraEMCJE40 = ConfigureTaskPWG4HighPtSpectra(prodType,isPbPb,cent,4,0,iPhysicsSelectionFlagEMCEJE,bSelHijingParticles,iAODanalysis,usePythiaxsec); | |
03372fd1 | 143 | |
7b90d977 | 144 | } |
03372fd1 | 145 | |
7b90d977 | 146 | } |
147 | ||
148 | } | |
149 | ||
150 | ||
5d87a047 | 151 | AliPWG4HighPtSpectra* ConfigureTaskPWG4HighPtSpectra(char *prodType = "LHC10e14", Bool_t isPbPb=kTRUE,Int_t centClass = 0, |
03372fd1 | 152 | Int_t trackType = 0, Int_t cuts = 0, UInt_t triggerMask = AliVEvent::kMB, |
9477b466 | 153 | Bool_t bSelectHijingParticles = kFALSE, Int_t iAODanalysis = 0, |
154 | Bool_t usePythiaxsec = kTRUE, Int_t filterMask = 0) | |
7b90d977 | 155 | { |
156 | ||
157 | /* | |
9477b466 | 158 | trackType: 0 = global |
7b90d977 | 159 | 1 = TPC stand alone |
160 | 2 = TPC stand alone constrained to SPD vertex | |
9477b466 | 161 | 4 = TPC stand alone constrained to SPD vertex with QA track selection on global tracks |
162 | 5 = Hybrid tracks: constrained TPConly for which no tight ITS is available | |
163 | 6 = Hybrid tracks: constrained loose global for which no tight ITS is available | |
5a0bd31f | 164 | cuts: 0 (global) = standard ITSTPC2010 a la RAA analysis |
165 | 1 (global) = ITSrefit, no SPD requirements -> standard for jet analysis | |
166 | 2 (global) = ITSrefit + no hits in SPD | |
9477b466 | 167 | 3 (global) = standard ITS tight cuts with nCrossed rows cut for hybrid tracks |
7b90d977 | 168 | 0 (TPC) = standard TPC + NClusters>70 |
169 | 1 (TPC) = standard TPC + NClusters>0 --> to study new TPC QA recommendations | |
9477b466 | 170 | 0 (hybrid 5) = constrained TPConly for which no tight ITS is available |
171 | 0 (hybrid 6) = constrained loose global for which no tight ITS is available | |
7b90d977 | 172 | */ |
173 | ||
67ebd013 | 174 | // Creates HighPtSpectra analysis task and adds it to the analysis manager. |
fdceab34 | 175 | |
380cff49 | 176 | //Load common track cut class |
5c4489e2 | 177 | gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C"); |
380cff49 | 178 | |
fdceab34 | 179 | // A. Get the pointer to the existing analysis manager via the static access method. |
180 | //============================================================================== | |
181 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
182 | if (!mgr) { | |
183 | Error("AddTaskPWG4HighPtSpectra", "No analysis manager to connect to."); | |
184 | return NULL; | |
185 | } | |
186 | ||
187 | // B. Check the analysis type using the event handlers connected to the analysis | |
188 | // manager. The availability of MC handler can also be checked here. | |
189 | //============================================================================== | |
190 | if (!mgr->GetInputEventHandler()) { | |
67ebd013 | 191 | ::Error("AddTaskPWG4HighPtSpectra", "This task requires an input event handler"); |
fdceab34 | 192 | return NULL; |
193 | } | |
194 | TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
195 | const char *analysisType = "ESD";//"TPC" | |
196 | ||
ba02ea81 | 197 | if( (type=="AOD" && iAODanalysis==0) || (type=="ESD" && iAODanalysis==1) ) { //check if iAODanalysis is configured correctly. TODO: this can be simplified by removing the iAODanalysis variable. |
198 | ::Error("AddTaskPWG4HighPtSpectra", Form("Ordering to perform the analysis on wrong datatype. This is an %s!", type)); | |
199 | return NULL; | |
200 | } | |
9477b466 | 201 | |
fdceab34 | 202 | // C. Create the task, add it to manager. |
203 | //=========================================================================== | |
67ebd013 | 204 | //CONTAINER DEFINITION |
fdceab34 | 205 | Info("AliPWG4HighPtSpectra","SETUP CONTAINER"); |
206 | //the sensitive variables, their indices | |
67ebd013 | 207 | UInt_t ipt = 0; |
208 | UInt_t iphi = 1; | |
209 | UInt_t ieta = 2; | |
dae7dd67 | 210 | UInt_t incls = 3; |
67ebd013 | 211 | |
fdceab34 | 212 | //Setting up the container grid... |
de88b926 | 213 | UInt_t nstep = 4; //Steps/Modes for containers |
7b90d977 | 214 | Int_t kStepReconstructed = 0; |
215 | Int_t kStepSecondaries = 1; | |
216 | Int_t kStepReconstructedMC = 2; | |
217 | Int_t kStepMCAcceptance = 3; | |
b1cd0099 | 218 | |
219 | //redefine pt ranges in case of Jet-Jet production | |
de88b926 | 220 | Float_t ptBinEdges[4][4]; |
221 | Float_t ptmin = 0.0 ; | |
222 | Float_t ptmax = 100.0 ; | |
223 | ||
224 | ptBinEdges[0][0] = 2.; | |
225 | ptBinEdges[0][1] = 0.2; | |
226 | ptBinEdges[1][0] = 6.; | |
227 | ptBinEdges[1][1] = 0.5; | |
228 | ptBinEdges[2][0] = 20.; | |
229 | ptBinEdges[2][1] = 2.; | |
230 | ptBinEdges[3][0] = 100.; | |
231 | ptBinEdges[3][1] = 5.; | |
232 | ||
dae7dd67 | 233 | const Int_t nvar = 4; //number of variables on the grid: pt:phi:eta:NClsIter1 |
de88b926 | 234 | |
235 | const Int_t nbin11 = round((ptBinEdges[0][0]-ptmin)/ptBinEdges[0][1]); | |
236 | const Int_t nbin12 = round((ptBinEdges[1][0]-ptBinEdges[0][0])/ptBinEdges[1][1])+nbin11; | |
237 | const Int_t nbin13 = round((ptBinEdges[2][0]-ptBinEdges[1][0])/ptBinEdges[2][1])+nbin12; | |
238 | const Int_t nbin14 = round((ptBinEdges[3][0]-ptBinEdges[2][0])/ptBinEdges[3][1])+nbin13; | |
239 | ||
240 | const Int_t nbin1 = nbin14; //bins in pt | |
03372fd1 | 241 | const Int_t nbin2 = 36; //bins in phi |
242 | const Int_t nbin3 = 10; //bins in eta | |
243 | const Int_t nbin4 = 1;//6; //bins in NClsIter1: 0 70 80 90 100 120 | |
dae7dd67 | 244 | |
fdceab34 | 245 | |
fdceab34 | 246 | //arrays for the number of bins in each dimension |
247 | Int_t iBin[nvar]; | |
248 | iBin[0]=nbin1; | |
67ebd013 | 249 | iBin[1]=nbin2; |
250 | iBin[2]=nbin3; | |
dae7dd67 | 251 | iBin[3]=nbin4; |
ec555a3c | 252 | |
fdceab34 | 253 | //arrays for lower bounds : |
254 | Double_t *binLim1=new Double_t[nbin1+1]; | |
67ebd013 | 255 | Double_t *binLim2=new Double_t[nbin2+1]; |
256 | Double_t *binLim3=new Double_t[nbin3+1]; | |
dae7dd67 | 257 | Double_t *binLim4=new Double_t[nbin4+1]; |
ec555a3c | 258 | |
67ebd013 | 259 | //values for bin lower bounds |
260 | for(Int_t i=0; i<=nbin1; i++) { | |
b1cd0099 | 261 | if(i<=nbin11) binLim1[i]=(Double_t)ptmin + (ptBinEdges[0][0]-ptmin)/nbin11*(Double_t)i ; |
de88b926 | 262 | if(i<=nbin12 && i>nbin11) binLim1[i]=(Double_t)ptBinEdges[0][0] + (ptBinEdges[1][0]-ptBinEdges[0][0])/(nbin12-nbin11)*((Double_t)i-(Double_t)nbin11) ; |
263 | if(i<=nbin13 && i>nbin12) binLim1[i]=(Double_t)ptBinEdges[1][0] + (ptBinEdges[2][0]-ptBinEdges[1][0])/(nbin13-nbin12)*((Double_t)i-(Double_t)nbin12) ; | |
264 | if(i<=nbin14 && i>nbin13) binLim1[i]=(Double_t)ptBinEdges[2][0] + (ptBinEdges[3][0]-ptBinEdges[2][0])/(nbin14-nbin13)*((Double_t)i-(Double_t)nbin13) ; | |
67ebd013 | 265 | } |
67ebd013 | 266 | for(Int_t i=0; i<=nbin2; i++) binLim2[i]=(Double_t)phimin + (phimax-phimin)/nbin2*(Double_t)i ; |
267 | for(Int_t i=0; i<=nbin3; i++) binLim3[i]=(Double_t)etamin + (etamax-etamin)/nbin3*(Double_t)i ; | |
03372fd1 | 268 | binLim4[0] = 70.;//0.; |
269 | binLim4[1] = 160.;//70.; | |
270 | // binLim4[2] = 80.; | |
271 | // binLim4[3] = 90.; | |
272 | // binLim4[4] = 100.; | |
273 | // binLim4[5] = 120.; | |
274 | // binLim4[6] = 160.; | |
dae7dd67 | 275 | |
67ebd013 | 276 | |
277 | AliCFContainer* containerPos = new AliCFContainer("containerPos","container for positive tracks",nstep,nvar,iBin); | |
278 | //setting the bin limits | |
279 | containerPos -> SetBinLimits(ipt,binLim1); | |
280 | containerPos -> SetBinLimits(iphi,binLim2); | |
281 | containerPos -> SetBinLimits(ieta,binLim3); | |
dae7dd67 | 282 | containerPos -> SetBinLimits(incls,binLim4); |
fdceab34 | 283 | |
67ebd013 | 284 | AliCFContainer* containerNeg = new AliCFContainer("containerNeg","container for negative tracks",nstep,nvar,iBin); |
fdceab34 | 285 | //setting the bin limits |
67ebd013 | 286 | containerNeg -> SetBinLimits(ipt,binLim1); |
287 | containerNeg -> SetBinLimits(iphi,binLim2); | |
288 | containerNeg -> SetBinLimits(ieta,binLim3); | |
dae7dd67 | 289 | containerNeg -> SetBinLimits(incls,binLim4); |
67ebd013 | 290 | |
fdceab34 | 291 | //CREATE THE CUTS ----------------------------------------------- |
9477b466 | 292 | //Use AliESDtrackCuts, only for ESD analysis |
327d12da | 293 | AliESDtrackCuts *trackCuts = new AliESDtrackCuts("AliESDtrackCuts","Standard Cuts"); |
294 | AliESDtrackCuts *trackCutsReject = 0x0; | |
380cff49 | 295 | |
9477b466 | 296 | if(!iAODanalysis) { |
297 | //Standard Cuts | |
298 | //Set track cuts for global tracks | |
299 | if(trackType==0 && cuts==0) { | |
300 | // tight global tracks - RAA analysis | |
301 | trackCuts = CreateTrackCutsPWGJE(1000); | |
302 | } | |
303 | if(trackType==0 && cuts==1) { | |
304 | //Cuts global tracks with ITSrefit requirement and SPDrequirement for jet analysis | |
305 | trackCuts = CreateTrackCutsPWGJE(10001006); | |
306 | } | |
307 | if(trackType==0 && cuts==5) { | |
308 | //Cuts global tracks with ITSrefit requirement and SPDrequirement for jet analysis + NCrossedRowsCut>120 recommended in 2011 | |
309 | trackCuts = CreateTrackCutsPWGJE(10001008); | |
310 | } | |
311 | ||
312 | if(trackType==0 && cuts==2) { | |
313 | //Cuts global tracks with ITSrefit requirement but without SPD | |
314 | if (!strcmp(prodType,"LHC12a15e")) | |
315 | trackCuts = CreateTrackCutsPWGJE(10011008); | |
316 | else | |
317 | trackCuts = CreateTrackCutsPWGJE(10011006); | |
318 | } | |
319 | if(trackType==7 && cuts==0) { | |
320 | // no requirements on SPD and ITSrefit failed | |
321 | trackCuts = CreateTrackCutsPWGJE(10041006); //no ITSrefit requirement | |
322 | trackCutsReject = CreateTrackCutsPWGJE(1006); //ITSrefit requirement | |
323 | trackCutsReject->SetEtaRange(etamin,etamax); | |
324 | trackCutsReject->SetPtRange(0.15, 1e10); | |
325 | } | |
326 | if(trackType==7 && cuts==4) { | |
327 | // tight global tracks + NCrossedRowsCut>120 recommended in 2011 | |
328 | trackCuts = CreateTrackCutsPWGJE(10041008); | |
329 | trackCutsReject = CreateTrackCutsPWGJE(1008); | |
330 | trackCutsReject->SetEtaRange(-0.9,0.9); | |
331 | trackCutsReject->SetPtRange(0.15, 1e10); | |
332 | } | |
333 | if(trackType==7 && cuts==1) { | |
334 | //Cuts global tracks with ITSrefit requirement but without SPD | |
335 | trackCuts = CreateTrackCutsPWGJE(10011006); | |
336 | } | |
337 | if(trackType==7 && cuts==5) { | |
338 | // tight global tracks + NCrossedRowsCut>120 recommended in 2011 | |
339 | trackCuts = CreateTrackCutsPWGJE(10011008); | |
340 | } | |
341 | ||
342 | if(trackType==7 && cuts==2) { | |
343 | // no requirements on SPD and ITSrefit failed | |
344 | trackCuts = CreateTrackCutsPWGJE(10041006); //no ITSrefit requirement filter 256 | |
345 | trackCutsReject = CreateTrackCutsPWGJE(10001006); //ITSrefit requirement filter 16 | |
346 | trackCutsReject->SetEtaRange(etamin,etamax); | |
347 | trackCutsReject->SetPtRange(0.15, 1e10); | |
348 | } | |
349 | if(trackType==7 && cuts==6) { | |
350 | // no requirements on SPD and ITSrefit failed | |
351 | trackCuts = CreateTrackCutsPWGJE(10041008); //no ITSrefit requirement filter 256 | |
352 | trackCutsReject = CreateTrackCutsPWGJE(10001008); //ITSrefit requirement filter 16 | |
353 | trackCutsReject->SetEtaRange(-0.9,0.9); | |
354 | trackCutsReject->SetPtRange(0.15, 1e10); | |
355 | } | |
356 | ||
357 | ||
358 | ||
359 | if(trackType==1 && cuts==0) { | |
360 | //Set track cuts for TPConly tracks | |
361 | trackCuts = CreateTrackCutsPWGJE(2001); | |
362 | } | |
363 | if(trackType==2 && cuts==0) { | |
364 | // Set track cuts for TPConly constrained tracks | |
365 | trackCuts = CreateTrackCutsPWGJE(2001); | |
366 | } | |
367 | trackCuts->SetEtaRange(etamin,etamax); | |
368 | trackCuts->SetPtRange(0.15, 1e10); | |
7b90d977 | 369 | } |
43032097 | 370 | |
ec555a3c | 371 | // Gen-Level kinematic cuts |
fdceab34 | 372 | AliCFTrackKineCuts *mcKineCuts = new AliCFTrackKineCuts("mcKineCuts","MC-level kinematic cuts"); |
67ebd013 | 373 | mcKineCuts->SetPtRange(0.15,1e10); |
dae7dd67 | 374 | mcKineCuts->SetEtaRange(etamin,etamax);//-0.5,0.5); |
fdceab34 | 375 | mcKineCuts->SetRequireIsCharged(kTRUE); |
376 | ||
377 | //Acceptance Cuts | |
dae7dd67 | 378 | //AliCFAcceptanceCuts *mcAccCuts = new AliCFAcceptanceCuts("mcAccCuts","MC acceptance cuts"); |
fdceab34 | 379 | // mcAccCuts->SetMinNHitITS(mintrackrefsITS); |
dae7dd67 | 380 | //mcAccCuts->SetMinNHitTPC(mintrackrefsTPC); |
fdceab34 | 381 | |
382 | TObjArray* recList = new TObjArray(0); | |
fdceab34 | 383 | TObjArray* secList = new TObjArray(0) ; |
384 | ||
385 | printf("CREATE MC KINE CUTS\n"); | |
6e349fdb | 386 | TObjArray* recMCList = new TObjArray(0); |
fdceab34 | 387 | TObjArray* mcList = new TObjArray(0) ; |
388 | mcList->AddLast(mcKineCuts); | |
6e349fdb | 389 | recMCList->AddLast(mcKineCuts); |
dae7dd67 | 390 | //mcList->AddLast(mcAccCuts); |
fdceab34 | 391 | |
392 | //CREATE THE INTERFACE TO CORRECTION FRAMEWORK USED IN THE TASK | |
393 | printf("CREATE INTERFACE AND CUTS\n"); | |
67ebd013 | 394 | AliCFManager* manPos = new AliCFManager("manPos","Manager for Positive tracks") ; |
395 | manPos->SetParticleContainer(containerPos); | |
9b58297c | 396 | manPos->SetParticleCutsList(kStepReconstructed,recList); |
9b58297c | 397 | manPos->SetParticleCutsList(kStepSecondaries,secList); |
398 | manPos->SetParticleCutsList(kStepReconstructedMC,recMCList); | |
399 | manPos->SetParticleCutsList(kStepMCAcceptance,mcList); | |
67ebd013 | 400 | |
401 | AliCFManager* manNeg = new AliCFManager("manNeg","Manager for Negative tracks") ; | |
402 | manNeg->SetParticleContainer(containerNeg); | |
9b58297c | 403 | manNeg->SetParticleCutsList(kStepReconstructed,recList); |
9b58297c | 404 | manNeg->SetParticleCutsList(kStepSecondaries,secList); |
405 | manNeg->SetParticleCutsList(kStepReconstructedMC,recMCList); | |
406 | manNeg->SetParticleCutsList(kStepMCAcceptance,mcList); | |
67ebd013 | 407 | |
0714a353 | 408 | TString trigName = ""; |
409 | if (triggerMask == AliVEvent::kAnyINT) | |
410 | trigName += "kAnyINT"; | |
411 | else if (triggerMask == AliVEvent::kAny) | |
412 | trigName += "kAny"; | |
413 | else if(triggerMask == AliVEvent::kINT7) | |
414 | trigName += "kINT7"; | |
415 | else if(triggerMask == AliVEvent::kMB) | |
416 | trigName += "kMB"; | |
417 | else if(triggerMask == AliVEvent::kEMC7) | |
418 | trigName += "kEMC7"; | |
419 | else if(triggerMask == AliVEvent::kEMCEJE) | |
420 | trigName += "kEMCEJE"; | |
421 | else if(triggerMask == AliVEvent::kEMCEGA) | |
422 | trigName += "kEMCEGA"; | |
423 | ||
67ebd013 | 424 | |
0714a353 | 425 | AliPWG4HighPtSpectra *taskPWG4HighPtSpectra = new AliPWG4HighPtSpectra(Form("AliPWG4HighPtSpectraCent%dTrackType%dCuts%dPSF%s",centClass,trackType,cuts,trigName.Data())); |
34fc6450 | 426 | taskPWG4HighPtSpectra->SetTrackType(trackType); |
9477b466 | 427 | if(iAODanalysis) |
428 | taskPWG4HighPtSpectra->SetFilterMask(filterMask); | |
429 | else { | |
430 | taskPWG4HighPtSpectra->SetCuts(trackCuts); | |
431 | taskPWG4HighPtSpectra->SetCutsReject(trackCutsReject); | |
432 | } | |
43032097 | 433 | taskPWG4HighPtSpectra->SetCFManagerPos(manPos); //here is set the CF manager + |
434 | taskPWG4HighPtSpectra->SetCFManagerNeg(manNeg); //here is set the CF manager - | |
5d87a047 | 435 | taskPWG4HighPtSpectra->SetTriggerMask(triggerMask); |
03372fd1 | 436 | taskPWG4HighPtSpectra->SelectHIJINGOnly(bSelectHijingParticles); |
9477b466 | 437 | taskPWG4HighPtSpectra->SetReadAODData(iAODanalysis==0? kFALSE : kTRUE); |
438 | if(!usePythiaxsec) | |
439 | taskPWG4HighPtSpectra->SetNoPythiaInfo(); | |
67ebd013 | 440 | |
7b90d977 | 441 | if(isPbPb) { |
442 | taskPWG4HighPtSpectra->SetIsPbPb(kTRUE); | |
443 | taskPWG4HighPtSpectra->SetCentralityClass(centClass); | |
444 | } | |
dae7dd67 | 445 | // taskPWG4HighPtSpectra->SetSigmaConstrainedMax(5.); |
7b90d977 | 446 | |
e50809ff | 447 | |
fdceab34 | 448 | // E. Create ONLY the output containers for the data produced by the task. |
449 | // Get and connect other common input/output containers via the manager as below | |
450 | //============================================================================== | |
451 | ||
43032097 | 452 | //------ output containers ------ |
fdceab34 | 453 | TString outputfile = AliAnalysisManager::GetCommonFileName(); |
0714a353 | 454 | outputfile += Form(":PWG4_HighPtSpectraCent%dTrackType%dCuts%d%s",centClass,trackType,cuts,trigName.Data()); |
03372fd1 | 455 | |
456 | AliAnalysisDataContainer *coutput0 = 0x0; | |
457 | AliAnalysisDataContainer *coutput1 = 0x0; | |
458 | AliAnalysisDataContainer *coutput2 = 0x0; | |
459 | AliAnalysisDataContainer *cout_cuts0 = 0x0; | |
460 | ||
0714a353 | 461 | coutput0 = mgr->CreateContainer(Form("chist0HighPtSpectraCent%dTrackType%dCuts%d%s",centClass,trackType,cuts,trigName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputfile); |
462 | coutput1 = mgr->CreateContainer(Form("ccontainer0HighPtSpectraCent%dTrackType%dCuts%d%s",centClass,trackType,cuts,trigName.Data()), AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile); | |
463 | coutput2 = mgr->CreateContainer(Form("ccontainer1HighPtSpectraCent%dTrackType%dCuts%d%s",centClass,trackType,cuts,trigName.Data()), AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile); | |
464 | cout_cuts0 = mgr->CreateContainer(Form("qa_SpectraTrackCutsCent%dTrackType%dCuts%d%s",centClass,trackType,cuts,trigName.Data()), AliESDtrackCuts::Class(), AliAnalysisManager::kParamContainer,outputfile); | |
465 | ||
fdceab34 | 466 | mgr->AddTask(taskPWG4HighPtSpectra); |
467 | ||
468 | mgr->ConnectInput(taskPWG4HighPtSpectra,0,mgr->GetCommonInputContainer()); | |
469 | mgr->ConnectOutput(taskPWG4HighPtSpectra,0,coutput0); | |
470 | mgr->ConnectOutput(taskPWG4HighPtSpectra,1,coutput1); | |
67ebd013 | 471 | mgr->ConnectOutput(taskPWG4HighPtSpectra,2,coutput2); |
e5abcde9 | 472 | mgr->ConnectOutput(taskPWG4HighPtSpectra,3,cout_cuts0); |
fdceab34 | 473 | |
474 | // Return task pointer at the end | |
475 | return taskPWG4HighPtSpectra; | |
476 | } |