]>
Commit | Line | Data |
---|---|---|
fdfae4b3 | 1 | // Configuration macro for analysis of photon-jet analysis |
a4fe23f8 | 2 | // Author: Adam Matyja |
3 | // based on AddTaskIsoPhoton by Gustavo Conesa & Marie Germain. | |
fdfae4b3 | 4 | |
5 | //new macro | |
e4299912 | 6 | TString kGammaJetCorrelationName = ""; |
a4fe23f8 | 7 | |
2e52dc29 | 8 | AliAnalysisTaskCaloTrackCorrelation *AddTaskGammaJetCorrelation(const Float_t isoCone = 0.4, |
9 | const Float_t isoPth = 0.5, | |
10 | const Double_t maxLambda0Cut = 0.5, | |
11 | const Int_t maxNLMcut = 2, | |
a4fe23f8 | 12 | const Bool_t timecut = kFALSE, |
13 | const TString calorimeter = "EMCAL", | |
14 | const Bool_t simulation = kFALSE, | |
15 | const Bool_t eventsel = kFALSE, | |
16 | const Bool_t exotic = kTRUE, | |
17 | const Bool_t nonlin = kFALSE, | |
18 | const TString collision = "pp", | |
19 | const TString trigger = "MB", | |
20 | const TString firedTrigger = "EG1", | |
21 | const TString clustersArray = "V1", | |
22 | const Bool_t mix = kTRUE, | |
23 | const Bool_t tm = kTRUE, | |
24 | const Int_t minCen = -1, | |
25 | const Int_t maxCen = -1, | |
26 | const TString jetBranchName = "clustersAOD_ANTIKT04_B0_Filter00272_Cut00150_Skip00", | |
27 | const TString jetBkgBranchName = "jeteventbackground_clustersAOD_KT04_B0_Filter00768_Cut00150_Skip00", | |
e47144a5 | 28 | const Float_t jetMinPt = 0, |
29 | const Float_t minDeltaPhi = 1.5, | |
9b2889f9 | 30 | const Float_t maxDeltaPhi = 4.5, |
31 | const Float_t minPtRatio = 0, | |
32 | const Float_t maxPtRatio = 5, | |
a4fe23f8 | 33 | const Int_t debug = -1, |
34 | const Bool_t printSettings = kFALSE, | |
35 | const Double_t scaleFactor = -1 | |
36 | ) | |
fdfae4b3 | 37 | { |
38 | // Creates a CaloTrackCorr task, configures it and adds it to the analysis manager. | |
fdfae4b3 | 39 | |
40 | // Get the pointer to the existing analysis manager via the static access method. | |
41 | ||
42 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
43 | if (!mgr) | |
44 | { | |
45 | ::Error("AddTask", "No analysis manager to connect to."); | |
46 | return NULL; | |
47 | } | |
48 | ||
49 | // Check the analysis type using the event handlers connected to the analysis manager. | |
50 | ||
51 | if (!mgr->GetInputEventHandler()) | |
52 | { | |
53 | ::Error("AddTask", "This task requires an input event handler"); | |
54 | return NULL; | |
55 | } | |
56 | ||
e47144a5 | 57 | // Make sure the B field is enabled for track selection, some cuts need it |
58 | ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE); | |
59 | ||
a4fe23f8 | 60 | // inputDataType = "AOD"; |
61 | // if(!kData.Contains("delta")) | |
62 | // inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
fdfae4b3 | 63 | |
a4fe23f8 | 64 | //input jets |
2e52dc29 | 65 | TString deltaAODJetName = "AliAOD.Jets.root"; //Jet input AOD name |
66 | if(deltaAODJetName.Length()!=0) | |
a4fe23f8 | 67 | { |
68 | // External file with Jets | |
2e52dc29 | 69 | // aodHandler->AddFriend(deltaAODJetName.Data()); |
70 | mgr->RegisterExtraFile(deltaAODJetName.Data()); | |
a4fe23f8 | 71 | cout<<"Jet file registered "<<endl; |
72 | cout<<"Extra files: "<<mgr->GetExtraFiles()<<endl; | |
73 | } | |
74 | ||
75 | ||
76 | ||
77 | Bool_t useKinematics = kFALSE; | |
78 | useKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE; | |
79 | ||
fdfae4b3 | 80 | // Name for containers |
81 | ||
a4fe23f8 | 82 | //kGammaJetCorrelationName = Form("%s_Trig%s_Cl%s_TM%d_R%1.1f_Pt%1.1f",calorimeter.Data(), trigger.Data(),clustersArray.Data(),tm,cone,pth); |
83 | // kGammaJetCorrelationName = Form("%s_Trig%s_Cl%s_TM%d",calorimeter.Data(), trigger.Data(),clustersArray.Data(),tm); | |
e153f7a2 | 84 | kGammaJetCorrelationName = Form("%s_Trig%s_Fired%s_Cl%s_TM%d_l02%1.2f",calorimeter.Data(), trigger.Data(),firedTrigger.Data(),clustersArray.Data(),tm,maxLambda0Cut);//<<<---changed here |
fdfae4b3 | 85 | |
86 | ||
a4fe23f8 | 87 | if(collision=="PbPb" && maxCen>=0) kGammaJetCorrelationName+=Form("Cen%d_%d",minCen,maxCen); |
fdfae4b3 | 88 | |
a4fe23f8 | 89 | printf("<<<< NAME: %s >>>>>\n",kGammaJetCorrelationName.Data()); |
fdfae4b3 | 90 | |
91 | // #### Configure analysis #### | |
92 | ||
93 | AliAnaCaloTrackCorrMaker * maker = new AliAnaCaloTrackCorrMaker(); | |
94 | printf("SCALE FACTOR %e\n",scaleFactor); | |
95 | maker->SetScaleFactor(scaleFactor); // for MC, negative (not scaled) by default | |
96 | ||
97 | // General frame setting and configuration | |
2e52dc29 | 98 | maker->SetReader (ConfigureReader(mgr->GetInputEventHandler()->GetDataType(),calorimeter,useKinematics,simulation,eventsel,nonlin,timecut,collision,trigger,firedTrigger,clustersArray,jetBranchName,jetBkgBranchName,mix,minCen,maxCen,debug,printSettings) ); |
a4fe23f8 | 99 | maker->SetCaloUtils(ConfigureCaloUtils(clustersArray,collision,nonlin,exotic,simulation,timecut,debug,printSettings)); |
fdfae4b3 | 100 | |
101 | // Analysis tasks setting and configuration | |
102 | Int_t n = 0;//Analysis number, order is important | |
103 | ||
104 | // Isolation settings | |
105 | Int_t partInCone = AliIsolationCut::kNeutralAndCharged; // kOnlyCharged; | |
106 | Int_t thresType = AliIsolationCut::kPtThresIC;// AliIsolationCut::kSumPtFracIC ; | |
a4fe23f8 | 107 | //Float_t isoCone = -1; |
108 | //Float_t isoPth = -1; | |
fdfae4b3 | 109 | |
2e52dc29 | 110 | maker->AddAnalysis(ConfigurePhotonAnalysis(calorimeter,tm,simulation,maxLambda0Cut,maxNLMcut,debug,printSettings), n++); // Photon cluster selection |
a4fe23f8 | 111 | maker->AddAnalysis(ConfigureIsolationAnalysis(calorimeter,collision,"Photon", partInCone,thresType, isoCone, isoPth,tm,kFALSE,simulation,debug,printSettings), n++); // Photon isolation |
9b2889f9 | 112 | maker->AddAnalysis(ConfigurePhotonJetAnalysis(calorimeter,isoCone,jetMinPt,minDeltaPhi,maxDeltaPhi,minPtRatio,maxPtRatio,simulation,debug,printSettings), n++);// photon-jet correlation analysis |
fdfae4b3 | 113 | |
114 | maker->SetAnaDebug(debug) ; | |
115 | maker->SwitchOnHistogramsMaker() ; | |
a4fe23f8 | 116 | //if(kData.Contains("delta")) maker->SwitchOffAODsMaker() ; |
117 | //else maker->SwitchOnAODsMaker() ; | |
fdfae4b3 | 118 | |
119 | if(printSettings) maker->Print(""); | |
120 | ||
121 | printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, calorimeter.Data()); | |
122 | // Create task | |
123 | ||
a4fe23f8 | 124 | AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("CaloTrackCorr%s",kGammaJetCorrelationName.Data())); |
fdfae4b3 | 125 | task->SetConfigFileName(""); //Don't configure the analysis via configuration file. |
126 | task->SetDebugLevel(debug); | |
127 | task->SetBranches("ESD:AliESDRun.,AliESDHeader"); | |
128 | task->SetAnalysisMaker(maker); | |
129 | mgr->AddTask(task); | |
130 | ||
131 | //Create containers | |
132 | ||
a4fe23f8 | 133 | //if(outputfile.Length()==0) outputfile = AliAnalysisManager::GetCommonFileName(); |
134 | TString outputfile = AliAnalysisManager::GetCommonFileName(); | |
fdfae4b3 | 135 | |
a4fe23f8 | 136 | AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(kGammaJetCorrelationName, TList::Class(), |
fdfae4b3 | 137 | AliAnalysisManager::kOutputContainer, |
138 | Form("%s",outputfile.Data())); | |
139 | ||
a4fe23f8 | 140 | AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",kGammaJetCorrelationName.Data()), TList::Class(), |
fdfae4b3 | 141 | AliAnalysisManager::kParamContainer, |
142 | "AnalysisParameters.root"); | |
143 | ||
144 | // Create ONLY the output containers for the data produced by the task. | |
145 | // Get and connect other common input/output containers via the manager as below | |
146 | //============================================================================== | |
147 | mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer()); | |
148 | // AOD output slot will be used in a different way in future | |
a4fe23f8 | 149 | //if(!kData.Contains("delta") && outputAOD) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer()); |
fdfae4b3 | 150 | mgr->ConnectOutput (task, 1, cout_pc); |
151 | mgr->ConnectOutput (task, 2, cout_cuts); | |
152 | ||
a4fe23f8 | 153 | if(!mix) |
fdfae4b3 | 154 | { |
a4fe23f8 | 155 | UInt_t mask = SetTriggerMaskFromName(trigger); |
fdfae4b3 | 156 | task->SelectCollisionCandidates(mask); |
157 | } | |
158 | ||
159 | return task; | |
160 | } | |
161 | ||
162 | //____________________________________ | |
e4299912 | 163 | AliCaloTrackReader * ConfigureReader(TString inputDataType = "AOD",TString calorimeter = "EMCAL",Bool_t useKinematics = kFALSE, |
164 | Bool_t simulation = kFALSE,Bool_t eventsel = kFALSE,Bool_t nonlin = kTRUE, Bool_t timecut = kFALSE, | |
a4fe23f8 | 165 | TString collision = "pp",TString trigger="MB",TString firedTrigger="EG1", |
2e52dc29 | 166 | TString clustersArray = "V1", TString jetBranchName = "jets", TString jetBkgBranchName = "jets", |
167 | Bool_t mix = kFALSE, | |
a4fe23f8 | 168 | Float_t minCen = -1, Float_t maxCen = -1, |
169 | Int_t debug = -1,Bool_t printSettings = kFALSE) | |
fdfae4b3 | 170 | { |
171 | ||
e4299912 | 172 | Bool_t useTender=kTRUE; |
173 | ||
2e52dc29 | 174 | if(simulation) |
a4fe23f8 | 175 | { |
176 | if (!useKinematics && inputDataType=="AOD") useKinematics = kTRUE; //AOD primary should be available ... | |
177 | } | |
178 | ||
179 | cout<<"********* ACCESS KINE? "<<useKinematics<< endl; | |
180 | ||
181 | ||
182 | ||
fdfae4b3 | 183 | AliCaloTrackReader * reader = 0; |
a4fe23f8 | 184 | if (inputDataType == "AOD") reader = new AliCaloTrackAODReader(); |
185 | else if(inputDataType == "ESD") reader = new AliCaloTrackESDReader(); | |
186 | else printf("AliCaloTrackReader::ConfigureReader() - Data not known InputData=%s\n",inputDataType.Data()); | |
fdfae4b3 | 187 | |
188 | reader->SetDebug(debug);//10 for lots of messages | |
e4299912 | 189 | |
190 | if(useTender){ | |
191 | reader->SwitchOffTriggerPatchMatching(); | |
192 | reader->SwitchOffBadTriggerEventsRemoval(); | |
193 | } | |
fdfae4b3 | 194 | |
a4fe23f8 | 195 | if(simulation) |
fdfae4b3 | 196 | { |
197 | // Event rejection cuts for jet-jet simulations, do not use in other | |
198 | reader->SetPtHardAndJetPtComparison(kTRUE); | |
199 | reader->SetPtHardAndJetPtFactor(4); | |
200 | ||
201 | reader->SetPtHardAndClusterPtComparison(kTRUE); | |
202 | reader->SetPtHardAndClusterPtFactor(1.5); | |
203 | } | |
204 | ||
205 | //Delta AOD? | |
206 | //reader->SetDeltaAODFileName(""); | |
a4fe23f8 | 207 | //if(kOutputAOD) reader->SwitchOnWriteDeltaAOD() ; |
fdfae4b3 | 208 | |
209 | // MC settings | |
a4fe23f8 | 210 | if(useKinematics){ |
211 | if(inputDataType == "ESD"){ | |
fdfae4b3 | 212 | reader->SwitchOnStack(); |
213 | reader->SwitchOffAODMCParticles(); | |
214 | } | |
a4fe23f8 | 215 | else if(inputDataType == "AOD"){ |
fdfae4b3 | 216 | reader->SwitchOffStack(); |
217 | reader->SwitchOnAODMCParticles(); | |
218 | } | |
219 | } | |
220 | ||
221 | //------------------------ | |
222 | // Detector input filling | |
223 | //------------------------ | |
224 | ||
225 | //Min cluster/track E | |
226 | reader->SetEMCALEMin(0.3); | |
227 | //reader->SetEMCALEMin(0.);// <<<----changed here | |
228 | reader->SetEMCALEMax(1000); | |
229 | reader->SetPHOSEMin(0.3); | |
230 | reader->SetPHOSEMax(1000); | |
231 | // reader->SetCTSPtMin(0.2); | |
232 | reader->SetCTSPtMin(0.15);// <<<----changed here | |
233 | reader->SetCTSPtMax(1000); | |
234 | ||
235 | //----------------------------------------------------------------- | |
236 | // Jet part | |
237 | //----------------------------------------------------------------- | |
238 | reader->SwitchOnNonStandardJets(); | |
239 | //reader->SetInputNonStandardJetBranchName("clustersAOD_ANTIKT04_B0_Filter00768_Cut00150_Skip00"); | |
240 | //reader->SetInputNonStandardJetBranchName("clustersAOD_ANTIKT04_B1_Filter00768_Cut00150_Skip00");//in PbPb | |
241 | //reader->SetInputNonStandardJetBranchName("clustersAOD_ANTIKT04_B0_Filter00272_Cut00150_Skip00");//in pp 2.76 LHC11a,7 LHC11c | |
242 | //reader->SetInputNonStandardJetBranchName("clustersAOD_ANTIKT04_B0_Filter00768_Cut00150_Skip02");//in pp 7 LHC13e4 MC | |
a4fe23f8 | 243 | //reader->SetInputNonStandardJetBranchName("clustersAOD_ANTIKT04_B0_Filter00272_Cut00150_Skip00");//in pp 7 LHC12a15f MC |
244 | reader->SetInputNonStandardJetBranchName(jetBranchName.Data()); | |
245 | if(jetBkgBranchName.Length()!=0) { | |
246 | reader->SwitchOnBackgroundJets(); | |
247 | reader->SetInputBackgroundJetBranchName(jetBkgBranchName.Data()); | |
248 | } else { | |
249 | reader->SwitchOffBackgroundJets(); | |
250 | } | |
fdfae4b3 | 251 | //reader->SetInputBackgroundJetBranchName("jeteventbackground_clustersAOD_KT04_B0_Filter00768_Cut00150_Skip00");//in pp 7 LHC13e4 MC |
252 | ||
253 | ||
254 | // Time cuts | |
a4fe23f8 | 255 | if(simulation) |
fdfae4b3 | 256 | { |
a4fe23f8 | 257 | reader->SwitchOffUseTrackTimeCut(); |
fdfae4b3 | 258 | reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut |
259 | reader->SwitchOffUseEMCALTimeCut() ; | |
260 | reader->SwitchOffUseParametrizedTimeCut(); | |
261 | } | |
262 | else | |
263 | { | |
a4fe23f8 | 264 | reader->SwitchOffUseParametrizedTimeCut(); |
265 | if(timecut) | |
266 | { | |
267 | printf("Set time cut \n"); | |
268 | reader->SwitchOnUseEMCALTimeCut(); | |
269 | //Absolute window | |
e4299912 | 270 | reader->SetEMCALTimeCut(-30.,30.); // default is -25ns-20ns |
fdfae4b3 | 271 | } |
a4fe23f8 | 272 | else |
fdfae4b3 | 273 | { |
a4fe23f8 | 274 | printf("Off time cuts time cut \n"); |
275 | reader->SwitchOffUseEMCALTimeCut(); | |
276 | //Absolute window | |
277 | reader->SetEMCALTimeCut(-1.e6,1.e6); | |
fdfae4b3 | 278 | } |
a4fe23f8 | 279 | |
280 | //if(kCalibT) | |
281 | //{ | |
282 | //printf("Set time cut parameters for run %d\n",kRunNumber); | |
283 | //reader->SetEMCALTimeCut(-20,20); | |
284 | //reader->SwitchOnUseParametrizedTimeCut(); | |
285 | //if (kRunNumber >= 151636 && kRunNumber <= 155384 ) | |
286 | //{ | |
287 | // printf("Set time parameters for LHC11c\n"); | |
288 | // reader->SetEMCALParametrizedMinTimeCut(0,-5 ); reader->SetEMCALParametrizedMinTimeCut(1,-1 ); reader->SetEMCALParametrizedMinTimeCut(2, 1.87); reader->SetEMCALParametrizedMinTimeCut(3, 0.4); | |
289 | // reader->SetEMCALParametrizedMaxTimeCut(0, 3.5); reader->SetEMCALParametrizedMaxTimeCut(1, 50); reader->SetEMCALParametrizedMaxTimeCut(2, 0.15); reader->SetEMCALParametrizedMaxTimeCut(3, 1.6); | |
290 | //} | |
291 | //else if(kRunNumber >= 156447 && kRunNumber <= 159635 ) | |
292 | //{ | |
293 | // printf("Set time parameters for LHC11d\n"); | |
294 | // reader->SetEMCALParametrizedMinTimeCut(0,-5); reader->SetEMCALParametrizedMinTimeCut(1,-1 ); reader->SetEMCALParametrizedMinTimeCut(2, 3.5 ); reader->SetEMCALParametrizedMinTimeCut(3, 1. ); | |
295 | // reader->SetEMCALParametrizedMaxTimeCut(0, 5); reader->SetEMCALParametrizedMaxTimeCut(1, 50); reader->SetEMCALParametrizedMaxTimeCut(2, 0.45); reader->SetEMCALParametrizedMaxTimeCut(3, 1.25); | |
296 | //} | |
297 | //else | |
298 | //{ | |
299 | // printf("*** Fixed time cut 20 ns *** \n"); | |
300 | // reader->SetEMCALTimeCut(-20,20); | |
301 | //} | |
302 | // | |
303 | // } | |
304 | // else | |
305 | // { | |
306 | // reader->SwitchOffUseEMCALTimeCut(); | |
307 | // reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut | |
308 | // reader->SwitchOffUseParametrizedTimeCut(); | |
309 | // } | |
310 | ||
fdfae4b3 | 311 | } |
312 | ||
313 | reader->SwitchOnFiducialCut(); | |
314 | //reader->SwitchOffFiducialCut();// <<<----changed here | |
315 | //reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ; | |
316 | reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.9, 0, 360) ;// <<<--- changed here | |
317 | ||
318 | // Tracks | |
319 | ||
320 | // reader->SwitchOffCTS();//here changed 0n->off | |
321 | reader->SwitchOnCTS();//here changed 0n->off | |
322 | ||
e4299912 | 323 | reader->SwitchOffRecalculateVertexBC(); |
324 | reader->SwitchOffVertexBCEventSelection(); | |
325 | ||
326 | reader->SwitchOffUseTrackTimeCut(); | |
327 | reader->SetTrackTimeCut(0,50); | |
328 | ||
a4fe23f8 | 329 | if(inputDataType=="ESD") |
fdfae4b3 | 330 | { |
e47144a5 | 331 | //Hybrids 2011 |
332 | AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008); | |
fdfae4b3 | 333 | reader->SetTrackCuts(esdTrackCuts); |
e47144a5 | 334 | AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008); |
335 | reader->SetTrackComplementaryCuts(esdTrackCuts2); | |
336 | ||
337 | //Hybrids 2010 | |
338 | //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001006); | |
339 | //reader->SetTrackCuts(esdTrackCuts); | |
340 | //AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10041006); | |
341 | //reader->SetTrackComplementaryCuts(esdTrackCuts2); | |
fdfae4b3 | 342 | } |
a4fe23f8 | 343 | else if(inputDataType=="AOD") |
fdfae4b3 | 344 | { |
345 | reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!! | |
346 | reader->SetTrackStatus(AliVTrack::kITSrefit); | |
347 | //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid | |
348 | } | |
349 | ||
350 | // Calorimeter | |
351 | ||
a4fe23f8 | 352 | reader->SetEMCALClusterListName(clustersArray); |
e4299912 | 353 | if(clustersArray == "" && !useTender) |
fdfae4b3 | 354 | { |
355 | printf("**************** Standard EMCAL clusters branch analysis **************** \n"); | |
356 | reader->SwitchOnClusterRecalculation(); | |
357 | // Check in ConfigureCaloUtils that the recalibration and bad map are ON | |
358 | } | |
359 | else | |
360 | { | |
a4fe23f8 | 361 | printf("**************** Input for analysis is Clusterizer %s **************** \n", clustersArray.Data()); |
fdfae4b3 | 362 | reader->SwitchOffClusterRecalculation(); |
363 | } | |
364 | ||
a4fe23f8 | 365 | if(!nonlin) reader->SwitchOffClusterELinearityCorrection(); |
366 | else reader->SwitchOnClusterELinearityCorrection(); | |
367 | ||
fdfae4b3 | 368 | if(calorimeter == "EMCAL") { |
369 | reader->SwitchOnEMCALCells(); | |
370 | reader->SwitchOnEMCAL(); | |
371 | } | |
372 | if(calorimeter == "PHOS") { | |
373 | reader->SwitchOnPHOSCells(); | |
374 | reader->SwitchOnPHOS(); | |
375 | } | |
376 | ||
377 | // for case data="deltaAOD", no need to fill the EMCAL/PHOS cluster lists | |
a4fe23f8 | 378 | //if(kData.Contains("delta")) |
379 | //{ | |
380 | // reader->SwitchOffEMCAL(); | |
381 | // reader->SwitchOffPHOS(); | |
382 | // reader->SwitchOffEMCALCells(); | |
383 | // reader->SwitchOffPHOSCells(); | |
384 | //} | |
fdfae4b3 | 385 | |
386 | //----------------- | |
387 | // Event selection | |
388 | //----------------- | |
389 | ||
a4fe23f8 | 390 | //if(!useKinematics) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma |
391 | if(!useKinematics) { | |
392 | if(collision =="pPb" && trigger=="EMCEGA") { | |
393 | reader->SetFiredTriggerClassName(firedTrigger); | |
fdfae4b3 | 394 | } |
395 | } | |
396 | ||
397 | // For mixing with AliAnaParticleHadronCorrelation switch it off | |
a4fe23f8 | 398 | if(mix) |
fdfae4b3 | 399 | { |
400 | reader->SwitchOffEventTriggerAtSE(); | |
a4fe23f8 | 401 | UInt_t mask = SetTriggerMaskFromName(trigger); |
fdfae4b3 | 402 | reader->SetEventTriggerMaks(mask); // Only for mixing and SwitchOffEventTriggerAtSE(); |
403 | //reader->SetMixEventTriggerMaks(AliVEvent::kMB); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT | |
404 | reader->SetMixEventTriggerMaks(AliVEvent::kAnyINT); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT | |
405 | ||
406 | printf("---Trigger selection done in AliCaloTrackReader!!!\n"); | |
407 | } | |
408 | else | |
409 | reader->SwitchOnEventTriggerAtSE(); | |
410 | ||
411 | reader->SetZvertexCut(10.); // Open cut | |
fdfae4b3 | 412 | reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex |
a4fe23f8 | 413 | reader->SwitchOnRejectNoTrackEvents();//<<<--- changed here, new added |
fdfae4b3 | 414 | |
a4fe23f8 | 415 | if(eventsel) |
fdfae4b3 | 416 | { |
417 | reader->SwitchOnPileUpEventRejection(); // remove pileup by default | |
fdfae4b3 | 418 | reader->SwitchOnV0ANDSelection() ; // and besides v0 AND |
419 | } | |
420 | else | |
421 | { | |
422 | reader->SwitchOffPileUpEventRejection(); // remove pileup by default | |
fdfae4b3 | 423 | reader->SwitchOffV0ANDSelection() ; // and besides v0 AND |
424 | } | |
425 | ||
a4fe23f8 | 426 | if(collision=="PbPb") |
fdfae4b3 | 427 | { |
428 | // Centrality | |
429 | reader->SetCentralityClass("V0M"); | |
430 | reader->SetCentralityOpt(10); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..) | |
a4fe23f8 | 431 | reader->SetCentralityBin(minCen,maxCen); // Accept all events, if not select range |
fdfae4b3 | 432 | |
433 | // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment) | |
434 | reader->SetEventPlaneMethod("V0"); | |
435 | } | |
436 | ||
437 | if(printSettings) reader->Print(""); | |
fdfae4b3 | 438 | |
439 | return reader; | |
440 | ||
441 | } | |
442 | ||
443 | //_______________________________________ | |
2e52dc29 | 444 | AliCalorimeterUtils* ConfigureCaloUtils( TString clustersArray = "V1",TString collision = "pp",Bool_t nonlin = kTRUE,Bool_t exotic = kTRUE ,Bool_t simulation = kFALSE,Bool_t timecut = kFALSE,Int_t debug = -1,Bool_t printSettings = kFALSE) |
fdfae4b3 | 445 | { |
446 | ||
e4299912 | 447 | Bool_t useTender=kTRUE; |
448 | ||
fdfae4b3 | 449 | AliCalorimeterUtils *cu = new AliCalorimeterUtils; |
450 | cu->SetDebug(debug); | |
451 | ||
452 | // Remove clusters close to borders, at least max energy cell is 1 cell away | |
453 | //cu->SetNumberOfCellsFromEMCALBorder(0);// <<<----changed here | |
454 | cu->SetNumberOfCellsFromEMCALBorder(1); | |
455 | cu->SetNumberOfCellsFromPHOSBorder(2); | |
456 | ||
457 | // Search of local maxima in cluster | |
a4fe23f8 | 458 | if(collision=="pp" || collision=="pPb") |
fdfae4b3 | 459 | { |
460 | cu->SetLocalMaximaCutE(0.1); | |
461 | cu->SetLocalMaximaCutEDiff(0.03); | |
462 | } | |
463 | else | |
464 | { | |
465 | cu->SetLocalMaximaCutE(0.2); | |
466 | cu->SetLocalMaximaCutEDiff(0.03); | |
467 | } | |
468 | ||
469 | cu->SwitchOffClusterPlot(); | |
470 | ||
a4fe23f8 | 471 | //if(kRecalTM) cu->SwitchOnRecalculateClusterTrackMatching(); // Done in clusterization |
472 | //else | |
473 | cu->SwitchOffRecalculateClusterTrackMatching(); | |
fdfae4b3 | 474 | |
e4299912 | 475 | if(useTender) |
476 | cu->SwitchOffBadChannelsRemoval() ; | |
477 | else | |
478 | cu->SwitchOnBadChannelsRemoval() ; | |
fdfae4b3 | 479 | |
e4299912 | 480 | //EMCAL settings |
a4fe23f8 | 481 | if(!simulation) |
fdfae4b3 | 482 | cu->SwitchOnLoadOwnEMCALGeometryMatrices(); |
fdfae4b3 | 483 | |
e4299912 | 484 | if(!useTender){ |
485 | AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils(); | |
486 | ||
487 | if(!simulation) | |
488 | { | |
489 | cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering | |
490 | //if(clustersArray == "" && !kTender) cu->SwitchOnRunDepCorrection(); | |
491 | if(clustersArray == "") cu->SwitchOnRunDepCorrection(); | |
492 | } | |
493 | ||
494 | cu->SwitchOnEMCALOADB();//FIX ME!!! | |
495 | ||
496 | gROOT->LoadMacro("$ALICE_ROOT/PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C"); | |
497 | ConfigureEMCALRecoUtils(recou, | |
498 | simulation, | |
499 | exotic, | |
500 | nonlin, | |
501 | kFALSE, // e calib | |
502 | kFALSE, // bad map | |
503 | kFALSE); // time calib | |
a4fe23f8 | 504 | //kCalibE, |
505 | //kBadMap, | |
506 | //kCalibT); | |
e4299912 | 507 | recou->SetExoticCellDiffTimeCut(1e10); |
508 | if(timecut) recou->SetExoticCellDiffTimeCut(50.); | |
509 | }//end tender | |
510 | ||
511 | ||
a4fe23f8 | 512 | if( nonlin ) |
fdfae4b3 | 513 | { |
514 | // printf("ConfigureCaloUtils() - Apply non linearity to EMCAL\n"); | |
515 | // //CAREFUL only for the latest simulation | |
516 | // recou->SetNonLinearityFunction(AliEMCALRecoUtils::kBeamTestCorrected); | |
517 | // recou->SetNonLinearityParam(0,9.81039e-01); | |
518 | // recou->SetNonLinearityParam(1,1.13508e-01); | |
519 | // recou->SetNonLinearityParam(2,1.00173e+00); | |
520 | // recou->SetNonLinearityParam(3,9.67998e-02); | |
521 | // recou->SetNonLinearityParam(4,2.19381e+02); | |
522 | // recou->SetNonLinearityParam(5,6.31604e+01); | |
523 | // recou->SetNonLinearityParam(6,1); | |
524 | printf("*** SET cluster non linearity correction ***\n"); | |
525 | cu->SwitchOnCorrectClusterLinearity(); | |
526 | } | |
527 | ||
caebd36f | 528 | if(!useTender){ |
529 | printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn()); | |
530 | printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn()); | |
531 | } | |
532 | ||
e4299912 | 533 | cu->SetNumberOfSuperModulesUsed(10); |
fdfae4b3 | 534 | // PHOS |
535 | cu->SwitchOffLoadOwnPHOSGeometryMatrices(); | |
536 | ||
537 | if(printSettings) cu->Print(""); | |
538 | ||
539 | return cu; | |
540 | ||
541 | } | |
542 | ||
543 | //_____________________________________ | |
2e52dc29 | 544 | AliAnaPhoton* ConfigurePhotonAnalysis(TString calorimeter = "EMCAL",Bool_t tm = kFALSE,Bool_t simulation = kFALSE,Double_t maxLambda0Cut=0.5,Int_t maxNLMcut=2,Int_t debug = -1,Bool_t printSettings = kFALSE) |
fdfae4b3 | 545 | { |
546 | ||
547 | AliAnaPhoton *ana = new AliAnaPhoton(); | |
548 | ana->SetDebug(debug); //10 for lots of messages | |
549 | ||
550 | // cluster selection cuts | |
551 | ||
552 | ana->SwitchOffFiducialCut(); | |
553 | ||
554 | ana->SetCalorimeter(calorimeter); | |
555 | ||
556 | if(calorimeter == "PHOS") | |
557 | { | |
558 | ana->SetNCellCut(2);// At least 3 cells | |
559 | ana->SetMinPt(0.3); | |
560 | ana->SetMinDistanceToBadChannel(2, 4, 5); | |
561 | ana->SetTimeCut(-1e10,1e10); // open cut | |
562 | } | |
563 | else | |
564 | {//EMCAL | |
565 | ana->SetNCellCut(1);// At least 2 cells | |
fdfae4b3 | 566 | ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV |
567 | ana->SetMaxEnergy(1000); | |
2e52dc29 | 568 | //ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off //<<<---modified here |
fdfae4b3 | 569 | // restrict to less than 100 ns when time calibration is on |
570 | ana->SetMinDistanceToBadChannel(2, 4, 6); | |
571 | // Not useful if M02 cut is already strong | |
2e52dc29 | 572 | ana->SetNLMCut(1, maxNLMcut) ;//[1,2] |
fdfae4b3 | 573 | //ana->SetNLMCut(1, 10) ;//<<<----changed here |
2e52dc29 | 574 | //ana->SetNLMCut(1, 1) ;//<<<----changed here |
fdfae4b3 | 575 | } |
576 | ||
a4fe23f8 | 577 | if(tm) |
fdfae4b3 | 578 | { |
579 | ana->SwitchOnTrackMatchRejection() ; | |
580 | ana->SwitchOffTMHistoFill() ; | |
581 | } | |
582 | else | |
583 | { | |
584 | ana->SwitchOffTrackMatchRejection() ; | |
585 | ana->SwitchOnTMHistoFill() ; | |
586 | } | |
587 | ||
588 | ||
589 | //PID cuts (shower shape) | |
fdfae4b3 | 590 | ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian |
591 | AliCaloPID* caloPID = ana->GetCaloPID(); | |
592 | //Not used in bayesian | |
593 | ||
594 | //EMCAL | |
2e52dc29 | 595 | caloPID->SetEMCALLambda0CutMax(maxLambda0Cut);//0.27 was before//0.50//<<<----changed here |
fdfae4b3 | 596 | caloPID->SetEMCALLambda0CutMin(0.10); |
597 | ||
598 | caloPID->SetEMCALDEtaCut(0.025); | |
599 | caloPID->SetEMCALDPhiCut(0.030); | |
600 | ||
601 | //PHOS | |
602 | caloPID->SetPHOSDispersionCut(2.5); | |
603 | caloPID->SetPHOSRCut(2.); | |
2e52dc29 | 604 | //if(kInputData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored |
fdfae4b3 | 605 | |
606 | ana->SwitchOnFillShowerShapeHistograms(); // Filled before photon shower shape selection <<<--- changed here | |
607 | //ana->SwitchOffFillShowerShapeHistograms(); // Filled before photon shower shape selection | |
608 | ana->SwitchOffFillPileUpHistograms(); | |
609 | ||
610 | // Input / output delta AOD settings | |
611 | ||
a4fe23f8 | 612 | //if(!kData.Contains("delta")) |
613 | //{ | |
2e52dc29 | 614 | ana->SetOutputAODName(Form("Photon%s",kGammaJetCorrelationName.Data())); |
615 | ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
a4fe23f8 | 616 | // //ana->SetOutputAODClassName("AliAODPWG4Particle"); // use if no correlation done |
617 | //} | |
618 | //else | |
619 | ana->SetInputAODName(Form("Photon%s",kGammaJetCorrelationName.Data())); | |
fdfae4b3 | 620 | |
621 | //Set Histograms name tag, bins and ranges | |
622 | ||
a4fe23f8 | 623 | ana->AddToHistogramsName(Form("AnaPhoton_TM%d_",tm)); |
fdfae4b3 | 624 | SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below |
625 | ||
626 | // Number of particle type MC histograms | |
627 | ana->FillNOriginHistograms(20); | |
628 | ana->FillNPrimaryHistograms(20); | |
629 | ||
a4fe23f8 | 630 | ConfigureMC(ana,simulation); |
fdfae4b3 | 631 | |
632 | if(printSettings) ana->Print(""); | |
633 | ||
634 | return ana; | |
635 | ||
636 | } | |
637 | ||
638 | //____________________________________________________________________________________________________ | |
639 | AliAnaParticleIsolation* ConfigureIsolationAnalysis(TString calorimeter = "EMCAL", | |
a4fe23f8 | 640 | TString collision = "pp", |
fdfae4b3 | 641 | TString particle="Photon", |
642 | Int_t partInCone = AliIsolationCut::kOnlyCharged, | |
643 | Int_t thresType = AliIsolationCut::kSumPtFracIC, | |
644 | Float_t cone = 0.3, | |
645 | Float_t pth = 0.3, | |
a4fe23f8 | 646 | Bool_t tm = kFALSE, |
647 | Bool_t multi = kFALSE,Bool_t simulation = kFALSE, | |
fdfae4b3 | 648 | Int_t debug = -1, |
649 | Bool_t printSettings = kFALSE) | |
650 | { | |
651 | ||
652 | AliAnaParticleIsolation *ana = new AliAnaParticleIsolation(); | |
fdfae4b3 | 653 | ana->SetDebug(debug); |
654 | ||
655 | ana->SwitchOnFiducialCut(); | |
656 | //Avoid borders of EMCal | |
657 | if(calorimeter=="EMCAL") | |
658 | ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ; | |
659 | ||
660 | // Same Eta as EMCal, cut in phi if EMCAL was triggering | |
661 | if(particle=="Hadron" || particle.Contains("CTS")) | |
662 | { | |
a4fe23f8 | 663 | //if(trigger.Contains("EMC")) |
fdfae4b3 | 664 | // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 260, 360) ; |
665 | //else | |
666 | ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ; | |
667 | } | |
668 | ||
2e52dc29 | 669 | ana->SetMinPt(10);//<<---changed here |
fdfae4b3 | 670 | |
671 | // Input / output delta AOD settings | |
672 | ||
a4fe23f8 | 673 | ana->SetInputAODName(Form("%s%s",particle.Data(),kGammaJetCorrelationName.Data())); |
674 | ana->SetAODObjArrayName(Form("IC%s_%s",particle.Data(),kGammaJetCorrelationName.Data())); | |
fdfae4b3 | 675 | |
676 | ana->SetCalorimeter(calorimeter); | |
677 | ||
a4fe23f8 | 678 | if(!tm) ana->SwitchOnTMHistoFill(); |
fdfae4b3 | 679 | else ana->SwitchOffTMHistoFill(); |
680 | ||
681 | //if(particle=="Photon")ana->SwitchOnSSHistoFill(); | |
682 | //else ana->SwitchOffSSHistoFill(); | |
683 | ||
684 | ana->SwitchOffSSHistoFill(); | |
685 | ana->SwitchOffFillPileUpHistograms(); | |
686 | ||
687 | //Do settings for main isolation cut class | |
688 | AliIsolationCut * ic = ana->GetIsolationCut(); | |
689 | ic->SetDebug(debug); | |
690 | ||
691 | if(cone >0 && pth > 0) | |
692 | { | |
693 | ic->SetPtThreshold(pth); | |
694 | ic->SetConeSize(cone); | |
695 | } | |
696 | else | |
697 | { | |
a4fe23f8 | 698 | if(collision=="pp") |
fdfae4b3 | 699 | { |
700 | ic->SetPtThreshold(1.);//<<---changed here was 0.5,1 | |
701 | ic->SetConeSize(0.3);//<<---changed here was 0.4 | |
702 | } | |
a4fe23f8 | 703 | if(collision=="pPb") |
fdfae4b3 | 704 | { |
705 | ic->SetPtThreshold(1.0); | |
706 | ic->SetConeSize(0.3); | |
707 | } | |
708 | ||
a4fe23f8 | 709 | if(collision=="PbPb") |
fdfae4b3 | 710 | { |
711 | ic->SetPtThreshold(3.); | |
712 | //ic->SetPtThreshold(1.); | |
713 | ic->SetConeSize(0.3); | |
714 | } | |
715 | } | |
716 | ||
717 | ic->SetPtFraction(0.1); | |
718 | ic->SetSumPtThreshold(1.0) ; | |
719 | ic->SetParticleTypeInCone(partInCone); | |
720 | ic->SetICMethod(thresType); | |
721 | ||
722 | //Do or not do isolation with previously produced AODs. | |
723 | //No effect if use of SwitchOnSeveralIsolation() | |
724 | ana->SwitchOffReIsolation(); | |
725 | ||
726 | //Multiple IC | |
727 | if(multi) | |
728 | { | |
729 | ic->SetConeSize(1.); // Take all for first iteration | |
730 | ic->SetPtThreshold(100);// Take all for first iteration | |
731 | ana->SwitchOnSeveralIsolation() ; | |
a4fe23f8 | 732 | ana->SetAODObjArrayName(Form("MultiIC%sTM%d",particle.Data(),tm)); |
fdfae4b3 | 733 | |
734 | ana->SetNCones(4); | |
735 | ana->SetNPtThresFrac(4); | |
736 | ana->SetConeSizes(0,0.3); ana->SetConeSizes(1,0.4); | |
737 | ana->SetConeSizes(2,0.5); ana->SetConeSizes(3,0.6); | |
738 | ana->SetPtThresholds(0, 0.5); ana->SetPtThresholds(1, 1); ana->SetPtThresholds(2, 2); | |
739 | ana->SetPtFractions (0, 0.05) ; ana->SetPtFractions (1, 0.1); ana->SetPtFractions (2, 0.2) ; ana->SetPtFractions (3, 0.3) ; | |
740 | ana->SetSumPtThresholds(0, 1) ; ana->SetSumPtThresholds(1, 3) ; ana->SetSumPtThresholds(2, 5); ana->SetSumPtThresholds(3, 7) ; | |
741 | ||
742 | ana->SwitchOffTMHistoFill(); | |
743 | ana->SwitchOffSSHistoFill(); | |
744 | } | |
745 | else | |
746 | ana->SwitchOffSeveralIsolation() ; | |
747 | ||
748 | AliCaloPID* caloPID = ana->GetCaloPID(); | |
749 | caloPID->SetEMCALDEtaCut(0.025); | |
750 | caloPID->SetEMCALDPhiCut(0.030); | |
751 | ||
752 | //Set Histograms name tag, bins and ranges | |
753 | ||
a4fe23f8 | 754 | if(!multi)ana->AddToHistogramsName(Form("AnaIsol%s_TM%d_",particle.Data(),tm)); |
755 | else ana->AddToHistogramsName(Form("AnaMultiIsol%s_TM%d_",particle.Data(),tm)); | |
fdfae4b3 | 756 | |
757 | SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below | |
758 | ||
fdfae4b3 | 759 | if(particle=="Hadron" || particle.Contains("CTS")) |
760 | { | |
761 | ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ; | |
762 | ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ; | |
763 | } | |
764 | ||
a4fe23f8 | 765 | ConfigureMC(ana,simulation); |
fdfae4b3 | 766 | |
767 | if(printSettings) ic ->Print(""); | |
768 | if(printSettings) ana->Print(""); | |
769 | ||
770 | return ana; | |
771 | ||
772 | } | |
773 | ||
774 | //________________________________________________________ | |
a4fe23f8 | 775 | void ConfigureMC(AliAnaCaloTrackCorrBaseClass* ana,Bool_t simulation = kFALSE) |
fdfae4b3 | 776 | { |
a4fe23f8 | 777 | if(simulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet. |
fdfae4b3 | 778 | else ana->SwitchOffDataMC() ; |
779 | ||
780 | //Set here generator name, default pythia | |
781 | //ana->GetMCAnalysisUtils()->SetMCGenerator(""); | |
782 | } | |
783 | ||
784 | //________________________________________________________ | |
785 | void SetHistoRangeAndNBins (AliHistogramRanges* histoRanges,TString calorimeter = "EMCAL") | |
786 | { | |
787 | // Set common bins for all analysis and MC histograms filling | |
788 | ||
789 | histoRanges->SetHistoPtRangeAndNBins(-0.25, 99.75, 200) ; // Energy and pt histograms | |
790 | ||
791 | if(calorimeter=="EMCAL") | |
792 | { | |
793 | histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ; | |
794 | histoRanges->SetHistoXRangeAndNBins(-600,90,200); // QA | |
795 | histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA | |
796 | ||
797 | histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ; | |
798 | } | |
799 | else | |
800 | { | |
801 | histoRanges->SetHistoPhiRangeAndNBins(260*TMath::DegToRad(), 320*TMath::DegToRad(), 60) ; | |
802 | histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ; | |
803 | } | |
804 | ||
805 | histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500); | |
806 | ||
807 | // Invariant mass histoRangeslysis | |
808 | histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ; | |
809 | histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ; | |
810 | ||
811 | // check if time calibration is on | |
812 | //histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000); | |
813 | histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400); | |
814 | histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800); | |
815 | ||
816 | // track-cluster residuals | |
817 | histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300); | |
818 | histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300); | |
819 | histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA | |
820 | ||
821 | // QA, electron, charged | |
822 | histoRanges->SetHistoPOverERangeAndNBins(0,10.,100); | |
823 | histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200); | |
824 | ||
825 | // QA | |
826 | histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId | |
827 | histoRanges->SetHistoRatioRangeAndNBins(0.,2.,100); | |
828 | histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500); | |
829 | histoRanges->SetHistoNClusterCellRangeAndNBins(0,500,500); | |
830 | histoRanges->SetHistoZRangeAndNBins(-400,400,200); | |
831 | histoRanges->SetHistoRRangeAndNBins(400,450,25); | |
832 | histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500); | |
833 | histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500); | |
834 | histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,5000,500); | |
835 | ||
98287a43 | 836 | // Isolation |
837 | histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250); | |
838 | histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250); | |
839 | ||
fdfae4b3 | 840 | } |
841 | ||
842 | //_________________ | |
a4fe23f8 | 843 | UInt_t SetTriggerMaskFromName(TString trigger) |
fdfae4b3 | 844 | { |
a4fe23f8 | 845 | if(trigger=="EMC7") |
fdfae4b3 | 846 | { |
847 | printf("CaloTrackCorr trigger EMC7\n"); | |
848 | return AliVEvent::kEMC7; | |
849 | } | |
a4fe23f8 | 850 | else if (trigger=="INT7") |
fdfae4b3 | 851 | { |
852 | printf("CaloTrackCorr trigger INT7\n"); | |
853 | return AliVEvent::kINT7; | |
854 | } | |
a4fe23f8 | 855 | else if(trigger=="EMC1") |
fdfae4b3 | 856 | { |
857 | printf("CaloTrackCorr trigger EMC1\n"); | |
858 | return AliVEvent::kEMC1; | |
859 | } | |
a4fe23f8 | 860 | else if(trigger=="MB") |
fdfae4b3 | 861 | { |
862 | printf("CaloTrackCorr trigger MB\n"); | |
863 | return AliVEvent::kMB; | |
864 | } | |
a4fe23f8 | 865 | else if(trigger=="PHOS") |
fdfae4b3 | 866 | { |
867 | printf("CaloTrackCorr trigger PHOS\n"); | |
868 | return AliVEvent::kPHI7; | |
869 | } | |
a4fe23f8 | 870 | else if(trigger=="PHOSPb") |
fdfae4b3 | 871 | { |
872 | printf("CaloTrackCorr trigger PHOSPb\n"); | |
873 | return AliVEvent::kPHOSPb; | |
874 | } | |
a4fe23f8 | 875 | else if(trigger=="AnyINT") |
fdfae4b3 | 876 | { |
877 | printf("CaloTrackCorr trigger AnyINT\n"); | |
878 | return AliVEvent::kAnyINT; | |
879 | } | |
a4fe23f8 | 880 | else if(trigger=="INT") |
fdfae4b3 | 881 | { |
882 | printf("CaloTrackCorr trigger AnyINT\n"); | |
883 | return AliVEvent::kAny; | |
884 | } | |
a4fe23f8 | 885 | else if(trigger=="EMCEGA") |
fdfae4b3 | 886 | { |
887 | printf("CaloTrackCorr trigger EMC Gamma\n"); | |
888 | return AliVEvent::kEMCEGA; | |
889 | } | |
a4fe23f8 | 890 | else if(trigger=="EMCEJE") |
fdfae4b3 | 891 | { |
892 | printf("CaloTrackCorr trigger EMC Jet\n"); | |
893 | return AliVEvent::kEMCEJE; | |
894 | } | |
a4fe23f8 | 895 | else if(trigger=="Central") |
fdfae4b3 | 896 | { |
897 | printf("CaloTrackCorr trigger Central\n"); | |
898 | return AliVEvent::kCentral; | |
899 | } | |
a4fe23f8 | 900 | else if(trigger=="CentralEGA") |
fdfae4b3 | 901 | { |
902 | printf("CaloTrackCorr trigger Central+EMCEGA\n"); | |
903 | return (AliVEvent::kCentral | AliVEvent::kEMCEGA); | |
904 | } | |
a4fe23f8 | 905 | else if(trigger=="SemiCentral") |
fdfae4b3 | 906 | { |
907 | printf("CaloTrackCorr trigger SemiCentral\n"); | |
908 | return AliVEvent::kSemiCentral; | |
909 | } | |
a4fe23f8 | 910 | else if(trigger=="SemiOrCentral") |
fdfae4b3 | 911 | { |
912 | printf("CaloTrackCorr trigger SemiCentral Or Central\n"); | |
913 | return (AliVEvent::kSemiCentral | AliVEvent::kCentral); | |
914 | } | |
a4fe23f8 | 915 | else if(trigger=="SemiOrCentralOrAnyINT") |
fdfae4b3 | 916 | { |
917 | printf("CaloTrackCorr trigger SemiCentral Or Central Or AnyINT\n"); | |
918 | return (AliVEvent::kSemiCentral | AliVEvent::kCentral | AliVEvent::kAnyINT); | |
919 | } | |
920 | ||
921 | } | |
922 | ||
9b2889f9 | 923 | AliAnaParticleJetFinderCorrelation* ConfigurePhotonJetAnalysis(TString calorimeter = "EMCAL",Float_t gammaConeSize = 0.3, Float_t jetMinPt = 0, |
924 | Float_t minDeltaPhi = 1.5,Float_t maxDeltaPhi = 4.5, | |
925 | Float_t minPtRatio = 0,Float_t maxPtRatio = 5, | |
926 | Bool_t simulation = kFALSE,Int_t debug = -1,Bool_t printSettings = kFALSE){ | |
fdfae4b3 | 927 | |
928 | AliAnaParticleJetFinderCorrelation *ana = new AliAnaParticleJetFinderCorrelation(); | |
929 | ana->SetDebug(debug); | |
930 | TString particle="Photon"; | |
a4fe23f8 | 931 | ana->SetInputAODName(Form("%s%s",particle.Data(),kGammaJetCorrelationName.Data())); |
fdfae4b3 | 932 | |
933 | ana->SwitchOffFiducialCut(); | |
934 | ||
935 | ana->SetConeSize(0.4); //was 1 - cone to calculate FF | |
936 | ana->SelectIsolated(kTRUE); // do correlation with isolated photons <<---changed here | |
937 | ana->SetMakeCorrelationInHistoMaker(kFALSE); | |
938 | ana->SetPtThresholdInCone(0.150);//<<---- change here | |
9b2889f9 | 939 | //ana->SetDeltaPhiCutRange(TMath::Pi()/2.,TMath::Pi()*3./2.);//Mostly Open Cuts |
940 | ana->SetDeltaPhiCutRange(minDeltaPhi,maxDeltaPhi); // Delta phi cut for correlation | |
fdfae4b3 | 941 | ana->SetJetConeSize(0.4);//jet cone size / check the reco jet name |
9b2889f9 | 942 | ana->SetJetMinPt(jetMinPt);//min jet pt |
fdfae4b3 | 943 | ana->SetJetAreaFraction(0.8);//min area fraction was 0.6 |
944 | ana->SetMinPt(0.3);//min cluster pt repeated from reader | |
2e52dc29 | 945 | ana->SetGammaConeSize(gammaConeSize);//isolation cone repeated from isolation ana |
9b2889f9 | 946 | //ana->SetRatioCutRange(0.01,5.); //Mostly Open Cuts //0.01-5//<<---- change here |
947 | ana->SetRatioCutRange(minPtRatio,maxPtRatio); // Delta pt cut for correlation | |
fdfae4b3 | 948 | |
fdfae4b3 | 949 | ana->UseJetRefTracks(kTRUE); //Working now |
950 | //Set Histograms bins and ranges | |
951 | SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below 0,100,200 | |
952 | //ana->SetHistoPtRangeAndNBins(0, 50, 200) ; | |
953 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
954 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
955 | ||
2e52dc29 | 956 | // ana->SwitchOnNonStandardJetFromReader(); |
fdfae4b3 | 957 | ana->SwitchOnBackgroundJetFromReader(); |
958 | //background subtraction for photons | |
a4fe23f8 | 959 | //ana->SwitchOnBackgroundSubtractionGamma(); |
960 | ana->SwitchOffBackgroundSubtractionGamma(); | |
fdfae4b3 | 961 | |
962 | ana->SwitchOnSaveGJTree(); | |
2e52dc29 | 963 | ana->SwitchOnMostOpposite(); |
964 | //ana->SwitchOnMostEnergetic(); | |
fdfae4b3 | 965 | |
966 | ||
a4fe23f8 | 967 | //if(useKinematics) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
968 | if(printSettings) | |
fdfae4b3 | 969 | ana->Print(""); |
970 | ||
971 | return ana; | |
972 | ||
fdfae4b3 | 973 | } |