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