AliPhysics  9b6b435 (9b6b435)
AliEmcalCorrectionClusterNonLinearityMCAfterburner.cxx
Go to the documentation of this file.
1 // AliEmcalCorrectionClusterNonLinearityMCAfterburner.cxx
2 //
3 
5 #include <TList.h>
6 #include "AliClusterContainer.h"
7 
11 
12 // Actually registers the class with the base class
14 
15 const std::map <std::string, AliEmcalCorrectionClusterNonLinearityMCAfterburner::EMCAfterburnerMethod_t> AliEmcalCorrectionClusterNonLinearityMCAfterburner::fgkMCNonlinearityAfterburnerMethodMap = {
21 };
22 
27  AliEmcalCorrectionComponent("AliEmcalCorrectionClusterNonLinearityMCAfterburner"),
28  fEnergyDistBefore(0),
29  fEnergyTimeHistBefore(0),
30  fEnergyDistAfter(0),
31  fEnergyTimeHistAfter(0),
32  fAfterburnerMethod(kNoCorrection),
33  fMCPeriod(""),
34  fSetForceClusterE(kFALSE)
35 {
36 }
37 
42 {
43 }
44 
49 {
50  // Initialization
52 
53  std::string nonLinMethodStr = "";
54  GetProperty("afterburnerVersion", nonLinMethodStr);
56  GetProperty("setMCPeriod", fMCPeriod);
57  GetProperty("setForceClusterE", fSetForceClusterE);
58 
59  //Load the right period string
61  //Load the right parameters for the MC afterburner correction
62  InitNonLinearityParam(period, fAfterburnerMethod);
63 
64  return kTRUE;
65 }
66 
71 {
73 
74  // Create my user objects.
75  if (fCreateHisto){
76  fEnergyDistBefore = new TH1F("hEnergyDistBefore","hEnergyDistBefore;E_{clus} (GeV)",1500,0,150);
78  fEnergyTimeHistBefore = new TH2F("hEnergyTimeDistBefore","hEnergyTimeDistBefore;E_{clus} (GeV);time (s)",1500,0,150,500,-1e-6,1e-6);
80  fEnergyDistAfter = new TH1F("hEnergyDistAfter","hEnergyDistAfter;E_{clus} (GeV)",1500,0,150);
82  fEnergyTimeHistAfter = new TH2F("hEnergyTimeDistAfter","hEnergyTimeDistAfter;E_{clus} (GeV);time (s)",1500,0,150,500,-1e-6,1e-6);
84 
85  // Take ownership of output list
86  fOutput->SetOwner(kTRUE);
87  }
88 }
89 
94 {
96 
97  // loop over clusters
98  AliVCluster *clus = 0;
99  AliTLorentzVector clusVec;
100  AliClusterContainer * clusCont = 0;
101  TIter nextClusCont(&fClusterCollArray);
102 
103  //Apply the nonlinearity afterburner correction for the MC.
104  //Parameters are set in InitNonLinearityParam() and copied from AliCaloPhotonCuts.cxx
105  //Apply the MC nonlinearity functions with the set parameters
107 
108  while ((clusCont = static_cast<AliClusterContainer*>(nextClusCont()))) {
109 
110  if (!clusCont) return kFALSE;
111  auto clusItCont = clusCont->all_momentum();
112 
113  for (AliClusterIterableMomentumContainer::iterator clusIterator = clusItCont.begin(); clusIterator != clusItCont.end(); ++clusIterator) {
114  clus = static_cast<AliVCluster *>(clusIterator->second);
115  clusVec = static_cast<AliTLorentzVector>(clusIterator->first);
116 
117  if (!clus->IsEMCAL()) continue;
118  //currently only for EMCal clusters. Skip DCal clusters
119  if (clusVec.Phi_0_2pi() > 4.) {continue;}
120 
121  Double_t oldEnergy = clus->GetNonLinCorrEnergy();
122  Double_t newEnergy = -1;
123 
124  if (fCreateHisto) {
125  fEnergyDistBefore->Fill(oldEnergy);
126  fEnergyTimeHistBefore->Fill(oldEnergy, clus->GetTOF());
127  }
128 
129  //This is function Iteration-1 FunctionNL_kSDM combined with Iteration-2 FunctionNL_kSDM from AliCaloPhotonCuts
131  newEnergy = oldEnergy;
132  newEnergy/= fNLAfterburnerPara[0] + exp( fNLAfterburnerPara[1] + (fNLAfterburnerPara[2] * newEnergy));
133  newEnergy/= fNLAfterburnerPara[3] + exp( fNLAfterburnerPara[4] + (fNLAfterburnerPara[5] * newEnergy));
134  AliDebugStream(2) << "Using non-lin afterburner function No.1" << std::endl;
135  AliDebugStream(2) << "old Energy: "<< oldEnergy<<", new Energy: "<<newEnergy<< std::endl;
136  }
137  //This is function FunctionNL_DPOW combined with FunctionNL_kSDM from AliCaloPhotonCuts
139  newEnergy = oldEnergy;
140  newEnergy/= (fNLAfterburnerPara[0] + fNLAfterburnerPara[1] * TMath::Power(oldEnergy, fNLAfterburnerPara[2]))/(fNLAfterburnerPara[3] + fNLAfterburnerPara[4] * TMath::Power(oldEnergy, fNLAfterburnerPara[5]));
141  newEnergy/= fNLAfterburnerPara[6] + exp( fNLAfterburnerPara[7] + (fNLAfterburnerPara[8] * newEnergy));
142  AliDebugStream(2) << "Using non-lin afterburner function No.2" << std::endl;
143  AliDebugStream(2) << "old Energy: "<< oldEnergy<<", new Energy: "<<newEnergy<< std::endl;
144  }
145  //This is function FunctionNL_DExp combined with FunctionNL_kSDM from AliCaloPhotonCuts
147  newEnergy = oldEnergy;
148  newEnergy/= ((fNLAfterburnerPara[0] - TMath::Exp(-fNLAfterburnerPara[1]*oldEnergy +fNLAfterburnerPara[2]))/(fNLAfterburnerPara[3] - TMath::Exp(-fNLAfterburnerPara[4]*oldEnergy +fNLAfterburnerPara[5])));
149  newEnergy/= fNLAfterburnerPara[6] + exp( fNLAfterburnerPara[7] + (fNLAfterburnerPara[8] * newEnergy));
150  AliDebugStream(2) << "Using non-lin afterburner function No.3" << std::endl;
151  AliDebugStream(2) << "old Energy: "<< oldEnergy<<", new Energy: "<<newEnergy<< std::endl;
152  }
153 
154  //correction only works in a specific momentum range
155  if (oldEnergy > 0.300) {
156  clus->SetNonLinCorrEnergy(newEnergy);
157  if (fSetForceClusterE) clus->SetE(newEnergy);
158  }
159  else {
160  AliWarning(Form("Cluster energy out of range for correction!, E = %f \n",oldEnergy));
161  clus->SetNonLinCorrEnergy(-100);
162  if (fSetForceClusterE) clus->SetE(-100);
163  }
164 
165  // Fill histograms only if cluster is not exotic, as in ClusterMaker (the clusters are flagged, not removed)
166  if (fCreateHisto && !clus->GetIsExotic()) {
167  Float_t energy = clus->GetNonLinCorrEnergy();
168  if (fSetForceClusterE) energy = clus->E();
169 
170  fEnergyDistAfter->Fill(energy);
171  fEnergyTimeHistAfter->Fill(energy, clus->GetTOF());
172  }
173  }
174  }
175  return kTRUE;
176  }
177  else {
178  //No correction has been determined for this data set yet - switch this component off for this period
179  AliWarning("No correction has been determined for this data set yet - switch this component off for this period");
180  return kFALSE;
181  }
182 }
183 
184 // returns the period enumerator for a given period string
185 // can be used to obtain the enum for GetCorrectedEnergy
186 //________________________________________________________________________
188 {
189  //...MC anchored to 2015 Data...
190  //
191  // pp 13 TeV
192  // - 2015 MB pass 2
193  if ( namePeriod.CompareTo("LHC15P2Pyt8") == 0 ||
194  namePeriod.CompareTo("LHC17i4") == 0 ||
195  namePeriod.CompareTo("LHC17i4_2") == 0 ||
196  namePeriod.CompareTo("LHC17g7") == 0 ) return "kPP13T15P2Pyt8";
197  else if ( namePeriod.CompareTo("LHC15P2EPos") == 0 ||
198  namePeriod.CompareTo("LHC16d3") == 0 ) return "kPP13T15P2EPOS";
199  // - 2015 HF prod
200  else if ( namePeriod.CompareTo("LHC15k5a") == 0 ||
201  namePeriod.CompareTo("LHC15k5b") == 0 ||
202  namePeriod.CompareTo("LHC15k5c") == 0 ||
203  namePeriod.CompareTo("LHC15k5a2") == 0 ||
204  namePeriod.CompareTo("LHC15k5b2") == 0 ||
205  namePeriod.CompareTo("LHC15k5c2") == 0 ) return "k15k5";
206  //
207  // pp 5 TeV
208  // - 2015 MB MC pass 4
209  else if ( namePeriod.CompareTo("LHC17e2") == 0 ) return "k17e2"; //Corr-1
210  else if ( namePeriod.CompareTo("LHC18j3") == 0 ) return "k18j3"; //Corr-1
211  // - 2015 JJ pass 3
212  else if ( namePeriod.CompareTo("LHC16h3") == 0 ) return "k16h3"; //Corr-1
213  //
214  // PbPb 5TeV
215  // - 2015 MB prods
216  else if ( namePeriod.CompareTo("LHC16g1") == 0 ||
217  namePeriod.CompareTo("LHC16g1a") == 0 ||
218  namePeriod.CompareTo("LHC16g1b") == 0 || namePeriod.CompareTo("LHC16g1b_extra") == 0 ||
219  namePeriod.CompareTo("LHC16g1c") == 0 || namePeriod.CompareTo("LHC16g1c_extra") == 0 ||
220  namePeriod.CompareTo("LHC16h4") == 0) return "kPbPb5T15HIJING";
221  else if ( namePeriod.CompareTo("LHC16k3b") == 0 || // special pileup prods
222  namePeriod.CompareTo("LHC16k3b2") == 0 ) return "k16k3b";
223  //...MC anchored to 2016 Data...
224  //
225  // pp 13 TeV
226  // - 2016 MB prod
227  else if ( namePeriod.CompareTo("LHC16P1Pyt8") == 0 ||
228  namePeriod.CompareTo("LHC17f6") == 0 ||
229  namePeriod.CompareTo("LHC17d17") == 0 ||
230  namePeriod.CompareTo("LHC17f5") == 0 ||
231  namePeriod.CompareTo("LHC17d3") == 0 ||
232  namePeriod.CompareTo("LHC17e5") == 0 ||
233  namePeriod.CompareTo("LHC17d20a1") == 0 ||
234  namePeriod.CompareTo("LHC17d20a1_extra") == 0 ||
235  namePeriod.CompareTo("LHC17d20a2") == 0 ||
236  namePeriod.CompareTo("LHC17d20a2_extra") == 0 ||
237  namePeriod.CompareTo("LHC17d16") == 0 ||
238  namePeriod.CompareTo("LHC17d18") == 0 ||
239  namePeriod.CompareTo("LHC17f9") == 0 ||
240  namePeriod.CompareTo("LHC17f9_test") == 0||
241  namePeriod.CompareTo("LHC18f1") == 0 ||
242  namePeriod.CompareTo("LHC18d8") == 0 ) return "kPP13T16P1Pyt8"; //Corr-3
243  else if ( namePeriod.CompareTo("LHC16P1Pyt8LowB") == 0 ||
244  namePeriod.CompareTo("LHC17d1") == 0 ) return "kPP13T16P1Pyt8LowB"; //Corr-3
245  else if ( namePeriod.CompareTo("LHC16P1EPOS") == 0 ||
246  namePeriod.CompareTo("LHC17d20b1") == 0 ||
247  namePeriod.CompareTo("LHC17d20b2") == 0 ) return "kPP13T16P1EPOS";
248  // - 2016 JJ prod
249  else if ( namePeriod.CompareTo("LHC16P1JJ") == 0 ||
250  namePeriod.CompareTo("LHC17f8a") == 0 ||
251  namePeriod.CompareTo("LHC17f8c") == 0 ||
252  namePeriod.CompareTo("LHC17f8d") == 0 ||
253  namePeriod.CompareTo("LHC17f8e") == 0 ||
254  namePeriod.CompareTo("LHC17f8f") == 0 ||
255  namePeriod.CompareTo("LHC17f8g") == 0 ||
256  namePeriod.CompareTo("LHC17f8h") == 0 ||
257  namePeriod.CompareTo("LHC17f8i") == 0 ||
258  namePeriod.CompareTo("LHC17f8j") == 0 ||
259  namePeriod.CompareTo("LHC17f8k") == 0 ) return "kPP13T16P1JJ"; //Corr-3
260  else if ( namePeriod.CompareTo("LHC16P1JJLowB") == 0 ||
261  namePeriod.CompareTo("LHC17f8b") == 0 ) return "kPP13T16P1JJLowB";
262  // - 2016 HF prods
263  else if ( namePeriod.CompareTo("LHC17h8a") == 0 ) return "k17h8a";
264  else if ( namePeriod.CompareTo("LHC17h8b") == 0 ) return "k17h8b";
265  else if ( namePeriod.CompareTo("LHC17h8c") == 0 ) return "k17h8c";
266  else if ( namePeriod.CompareTo("LHC17c3b1") == 0 ) return "k17c3b1";
267  else if ( namePeriod.CompareTo("LHC17c3a1") == 0 ) return "k17c3a1";
268  else if ( namePeriod.CompareTo("LHC17c3b2") == 0 ) return "k17c3b2";
269  else if ( namePeriod.CompareTo("LHC17c3a2") == 0 ) return "k17c3a2";
270  // - 2016 GJ prod
271  else if ( namePeriod.CompareTo("LHC17i3a1") == 0 ) return "k17i3a1";
272  //
273  // pPb 5 TeV
274  // - 2016 MB MC
275  else if ( namePeriod.CompareTo("LHC17f2a") == 0 ) return "kPPb5T16EPOS";
276  else if ( namePeriod.CompareTo("LHC17f2b") == 0 ||
277  namePeriod.CompareTo("LHC18f3") == 0 ) return "kPPb5T16DPMJet";
278  // - 2016 JJ MC
279  else if ( namePeriod.CompareTo("LHC17g8a") == 0 ) return "k17g8a";
280  // - 2016 HF prod
281  else if ( namePeriod.CompareTo("LHC17d2a") == 0 ) return "k17d2a";
282  else if ( namePeriod.CompareTo("LHC17d2b") == 0 ) return "k17d2b";
283  //
284  // pPb 8 TeV
285  // - 2016 MB MC
286  else if ( namePeriod.CompareTo("LHC17f3a") == 0 ) return "k17f3a";
287  else if ( namePeriod.CompareTo("LHC17f3b") == 0 ) return "k17f3b";
288  else if ( namePeriod.CompareTo("LHC17f4a") == 0 ) return "k17f4a";
289  else if ( namePeriod.CompareTo("LHC17f4b") == 0 ) return "k17f4b";
290  // - 2016 JJ MC
291  else if ( namePeriod.CompareTo("LHC17g8b") == 0 ) return "k17g8b";
292  else if ( namePeriod.CompareTo("LHC17g8c") == 0 ) return "k17g8c";
293  else if ( namePeriod.CompareTo("LHC18b9b") == 0 ) return "k18b9b";
294  else if ( namePeriod.CompareTo("LHC18b9c") == 0 ) return "k18b9c";
295  //...MC anchored to 2017 Data...
296  //
297  //pp 13 TeV LHC17
298  else if ( namePeriod.CompareTo("LHC17k1") ==0 ) return "k17k1"; // HF low B
299  else if ( namePeriod.CompareTo("LHC17P1Pyt8NomB") ==0 ||
300  namePeriod.CompareTo("LHC17k4") ==0 ||
301  namePeriod.CompareTo("LHC17h11") ==0 ||
302  namePeriod.CompareTo("LHC17h1") == 0 ||
303  namePeriod.CompareTo("LHC17l5") == 0 ||
304  namePeriod.CompareTo("LHC18c13") == 0 ||
305  namePeriod.CompareTo("LHC18a8") == 0 ||
306  namePeriod.CompareTo("LHC18a9") == 0 ||
307  namePeriod.CompareTo("LHC18a1") == 0 ||
308  namePeriod.CompareTo("LHC18c12") == 0 ) return "kPP13T17P1Pyt8"; //Corr-3
309  else if ( namePeriod.CompareTo("LHC17h7b") ==0 ) return "kPP13T17P1Pho";
310  else if ( namePeriod.CompareTo("LHC17h7a") ==0 ) return "kPP13T17P1Pyt6";
311  else if ( namePeriod.CompareTo("LHC17j5a") ==0 ||
312  namePeriod.CompareTo("LHC17j5b") ==0 ||
313  namePeriod.CompareTo("LHC17j5c") ==0 ||
314  namePeriod.CompareTo("LHC17j5d") ==0 ||
315  namePeriod.CompareTo("LHC17j5e") ==0 ) return "kPP13T17P1Pyt8Str";
316  else if ( namePeriod.CompareTo("LHC17P1Pyt8LowB") ==0 ||
317  namePeriod.CompareTo("LHC17h3") == 0 ) return "kPP13T17P1Pyt8LowB"; //Corr-3
318  else if ( namePeriod.CompareTo("LHC17P1JJ") == 0 ||
319  namePeriod.CompareTo("LHC18f5") == 0 ) return "kPP13T17P1JJ"; //Corr-3
320  // pp 5 TeV
321  // - 2017 MB MC pass 1
322  else if ( namePeriod.CompareTo("LHC17l4b") == 0 ||
323  namePeriod.CompareTo("LHC17l4b_fast") == 0 ||
324  namePeriod.CompareTo("LHC17l4b_cent") == 0 ||
325  namePeriod.CompareTo("LHC17l4b_cent_woSDD") == 0) return "k17l4b"; //Corr-2
326  else if ( namePeriod.CompareTo("LHC17l3b") == 0 ||
327  namePeriod.CompareTo("LHC17l3b_fast") == 0 ||
328  namePeriod.CompareTo("LHC17l3b_cent") == 0 ||
329  namePeriod.CompareTo("LHC17l3b_cent_woSDD") == 0) return "k17l3b"; //Corr-2
330  else if ( namePeriod.CompareTo("LHC18j2") == 0 ||
331  namePeriod.CompareTo("LHC18j2_fast") == 0 ||
332  namePeriod.CompareTo("LHC18j2_cent") == 0 ||
333  namePeriod.CompareTo("LHC18j2_cent_woSDD") == 0) return "k18j2"; //Corr-2
334  // - 2017 JJ pass 3
335  else if ( namePeriod.Contains("LHC18b8") ) return "k18b8"; //Corr-2
336  //
337  // XeXe 5.44 TeV 2017 MB MC
338  else if ( namePeriod.CompareTo("LHC17j7") == 0 ||
339  namePeriod.CompareTo("LHC18d2") == 0 ||
340  namePeriod.CompareTo("LHC18d2_1") == 0 ||
341  namePeriod.CompareTo("LHC18d2_2") == 0 ||
342  namePeriod.CompareTo("LHC18d2_3") == 0 ) return "kXeXe5T17HIJING";
343  //...MC anchored to 2018 Data...
344  //
345  //pp 13 TeV LHC18
346  else if ( namePeriod.CompareTo("LHC18P1Pyt8NomB") ==0 ||
347  namePeriod.CompareTo("LHC18g4") ==0 ||
348  namePeriod.CompareTo("LHC18g5") ==0 ||
349  namePeriod.CompareTo("LHC18g6") == 0 ) return "kPP13T18P1Pyt8"; //Corr-3
350  else if ( namePeriod.CompareTo("LHC18P1Pyt8LowB") ==0 ||
351  namePeriod.CompareTo("LHC18h1") ==0 ) return "kPP13T18P1Pyt8LowB";
352 
353  else return "kNoMC";
354 }
355 // This function sets the parameters for the MC nonlinearity afterburner function
356 // this depends on the period. Several periods share the same nonlinerarity MC correction parameters.
357 // Sometimes the correction was done in several iterations, in this case you will find the parameters
358 // for the differen iterations listed. The total correction should be a combination of both parameter sets
359 //
360 // As input you need to specify the namePeriod which summarizes several MC productions
361 // and you need to specify the version 0,1,2,3. 0 Is what should be used as default and 1,2,3 are
362 // variations for systematic uncertainty studies
363 //________________________________________________________________________
365 {
366  switch(method) {
367  //. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
368  //These are the standard parameters extracted from the PCM method (one hit in EMCal + one converted gamma)
369  case kPCM_EMCal:
370  // pp 5.02 TeV (2015) - LHC15n
371  if( namePeriod=="k16h3" || namePeriod=="k17e2" || namePeriod == "k18j3") {
373  //There are no extracted parameters yet
374  //Iteration-1 paramters
375  fNLAfterburnerPara[0] = 0;
376  fNLAfterburnerPara[1] = 0;
377  fNLAfterburnerPara[2] = 0;
378  //Iteration-2 parameters
379  fNLAfterburnerPara[3] = 0;
380  fNLAfterburnerPara[4] = 0;
381  fNLAfterburnerPara[5] = 0;
382  }
383  // pp 5.02 TeV (2017) - LHC17pq
384  else if(namePeriod=="k17l3b" || namePeriod=="k18j2" || namePeriod=="k17l4b" || namePeriod=="k18b8") {
386  //These are parameters extracted by Nicolas Schmidt in 25.Nov 2018 (to be used after kPi0MCv3 and kBeamTestCorrectedv4)
387  fNLAfterburnerPara[0] = -0.8802886739;
388  fNLAfterburnerPara[1] = 1.8764944987;
389  fNLAfterburnerPara[2] = -0.0020594487;
390  fNLAfterburnerPara[3] = 0.9891399006;
391  fNLAfterburnerPara[4] = 0.0139889085;
392  fNLAfterburnerPara[5] = -2.0388063034;
393  fNLAfterburnerPara[6] = 0;
394  fNLAfterburnerPara[7] = 0;
395  fNLAfterburnerPara[8] = 0;
396  }
397  //pp 13 TeV LHC16 || LHC17 || LHC18 (4)
398  else if ( namePeriod=="kPP13T16P1Pyt8" || namePeriod=="kPP13T17P1Pyt8" || namePeriod=="kPP13T18P1Pyt8" || namePeriod=="kPP13T17P1JJ" || namePeriod=="kPP13T16P1JJ" || namePeriod=="kPP13T16P1Pyt8LowB" || namePeriod=="kPP13T17P1Pyt8LowB") {
400  //There are no extracted parameters yet
401  //Iteration-1 paramters
402  fNLAfterburnerPara[0] = 0;
403  fNLAfterburnerPara[1] = 0;
404  fNLAfterburnerPara[2] = 0;
405  //No Second Iteration
406  fNLAfterburnerPara[3] = 0;
407  fNLAfterburnerPara[4] = 0;
408  fNLAfterburnerPara[5] = 0;
409  }
410  // All other periods
411  else {
412  //This is effectivley NO MC Nonlinearity afterburner correction
414  AliWarning(Form("There is no defined MC Nonlinearity Afterburner correction for this period (%s)! Nothing will be corrected",namePeriod.Data()));
415  }
416  break;
417  //. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
418  //These are variations of the standard parameters extracted from the EMCal method (both hits in the EMCal)
419  case kEMCal_EMCal:
420  // pp 5.02 TeV (2015) - LHC15n
421  if( namePeriod=="k16h3" || namePeriod=="k17e2" || namePeriod =="k18j3") {
423  //Iteration-1 paramters
424  fNLAfterburnerPara[0] = 0;
425  fNLAfterburnerPara[1] = 0;
426  fNLAfterburnerPara[2] = 0;
427  //No Second Iteration
428  fNLAfterburnerPara[3] = 0;
429  fNLAfterburnerPara[4] = 0;
430  fNLAfterburnerPara[5] = 0;
431  }
432  // pp 5.02 TeV (2017) - LHC17pq
433  else if(namePeriod=="k17l3b" || namePeriod=="k18j2" || namePeriod=="k17l4b" || namePeriod=="k18b8") {
435  //Iteration-1 paramters
436  fNLAfterburnerPara[0] = 0;
437  fNLAfterburnerPara[1] = 0;
438  fNLAfterburnerPara[2] = 0;
439  //Iteration-2 paramters
440  fNLAfterburnerPara[3] = 0;
441  fNLAfterburnerPara[4] = 0;
442  fNLAfterburnerPara[5] = 0;
443  }
444  //(4)
445  //pp 13 TeV LHC16 || LHC17 || LHC18
446  else if ( namePeriod=="kPP13T16P1Pyt8" || namePeriod=="kPP13T17P1Pyt8" || namePeriod=="kPP13T18P1Pyt8" || namePeriod=="kPP13T16P1Pyt8LowB" || namePeriod=="kPP13T17P1Pyt8LowB" || namePeriod=="kPP13T17P1JJ" || namePeriod=="kPP13T16P1JJ"){
448  //Iteration-1 paramters
449  fNLAfterburnerPara[0] = 0;
450  fNLAfterburnerPara[1] = 0;
451  fNLAfterburnerPara[2] = 0;
452  //Iteration-2 paramters
453  fNLAfterburnerPara[3] = 0;
454  fNLAfterburnerPara[4] = 0;
455  fNLAfterburnerPara[5] = 0;
456  }
457  // All other periods
458  else {
459  //This is effectivley NO MC Nonlinearity afterburner correction
461  AliWarning(Form("There is no defined MC Nonlinearity Afterburner correction for this period (%s)! Nothing will be corrected",namePeriod.Data()));
462  }
463  break;
464  //. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
465  //These are the standard parameters extracted from the PCM method (one hit in EMCal + one converted gamma)
466  //Instead of fitting the ratio of the data points in this version the masses are interpolated with a
467  //fit and then the fits are divided by each other to give the right function
469  // pp 5.02 TeV (2015) - LHC15n AND (2017) - LHC17pq
470  if( namePeriod=="k16h3" || namePeriod=="k17e2" || namePeriod == "k18j3" || namePeriod=="k17l3b" || namePeriod=="k18j2" || namePeriod=="k17l4b" || namePeriod=="k18b8") {
472  fNLAfterburnerPara[0] = 1;
473  fNLAfterburnerPara[1] = 0;
474  fNLAfterburnerPara[2] = 1;
475  fNLAfterburnerPara[3] = 1;
476  fNLAfterburnerPara[4] = 0;
477  fNLAfterburnerPara[5] = 1;
478  fNLAfterburnerPara[6] = 0;
479  fNLAfterburnerPara[7] = 0;
480  fNLAfterburnerPara[8] = 0;
481  }
482  //(4)
483  //pp 13 TeV LHC16 || LHC17 || LHC18
484  else if ( namePeriod=="kPP13T16P1Pyt8" || namePeriod=="kPP13T17P1Pyt8" || namePeriod=="kPP13T18P1Pyt8" || namePeriod=="kPP13T17P1JJ" || namePeriod=="kPP13T16P1JJ" || namePeriod=="kPP13T16P1Pyt8LowB" || namePeriod=="kPP13T17P1Pyt8LowB"){
486  fNLAfterburnerPara[0] = 1;
487  fNLAfterburnerPara[1] = 0;
488  fNLAfterburnerPara[2] = 1;
489  fNLAfterburnerPara[3] = 1;
490  fNLAfterburnerPara[4] = 0;
491  fNLAfterburnerPara[5] = 1;
492  fNLAfterburnerPara[6] = 0;
493  fNLAfterburnerPara[7] = 0;
494  fNLAfterburnerPara[8] = 0;
495  }
496  //(4-2)
497  //pp 13 TeV LHC16 || LHC17 || LHC18
498  /*if ( DCalEnergy ){
499  fNonLinearityAfterburnerFunction = 2;
500  fNLAfterburnerPara[0] = 1.0167588250;
501  fNLAfterburnerPara[1] = 0.0501002307;
502  fNLAfterburnerPara[2] = -0.8336787497;
503  fNLAfterburnerPara[3] = 0.9500009312;
504  fNLAfterburnerPara[4] = 0.0944118922;
505  fNLAfterburnerPara[5] = -0.1043983134;
506  fNLAfterburnerPara[6] = 0;
507  fNLAfterburnerPara[7] = 0;
508  fNLAfterburnerPara[8] = 0;
509  }*/
510  // All other periods
511  else {
512  //This is effectivley NO MC Nonlinearity afterburner correction
514  AliWarning(Form("There is no defined MC Nonlinearity Afterburner correction for this period (%s)! Nothing will be corrected",namePeriod.Data()));
515  }
516  break;
517  //. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
518  //These are variations of the standard parameters extracted from the EMCal method (both hits in the EMCal)
519  //Instead of fitting the ratio of the data points in this version the masses are interpolated with a
520  //fit and then the fits are divided by each other to give the right function
522  // pp 5.02 TeV (2015) - LHC15n AND (2017) - LHC17pq
523  if( namePeriod=="k16h3" || namePeriod=="k17e2" || namePeriod == "k18j3" || namePeriod=="k17l3b" || namePeriod=="k18j2" || namePeriod=="k17l4b" || namePeriod=="k18b8") {
525  fNLAfterburnerPara[0] = 2;
526  fNLAfterburnerPara[1] = 0;
527  fNLAfterburnerPara[2] = 0;
528  fNLAfterburnerPara[3] = 2;
529  fNLAfterburnerPara[4] = 0;
530  fNLAfterburnerPara[5] = 0;
531  fNLAfterburnerPara[6] = 0;
532  fNLAfterburnerPara[7] = 0;
533  fNLAfterburnerPara[8] = 0;
534  }
535  //pp 13 TeV LHC16 || LHC17 || LHC18
536  else if ( namePeriod=="kPP13T16P1Pyt8" || namePeriod=="kPP13T17P1Pyt8" || namePeriod=="kPP13T18P1Pyt8" || namePeriod=="kPP13T16P1Pyt8LowB" || namePeriod=="kPP13T17P1Pyt8LowB" || namePeriod=="kPP13T17P1JJ" || namePeriod=="kPP13T16P1JJ"){
538  fNLAfterburnerPara[0] = 1;
539  fNLAfterburnerPara[1] = 0;
540  fNLAfterburnerPara[2] = 1;
541  fNLAfterburnerPara[3] = 1;
542  fNLAfterburnerPara[4] = 0;
543  fNLAfterburnerPara[5] = 1;
544  fNLAfterburnerPara[6] = 0;
545  fNLAfterburnerPara[7] = 0;
546  fNLAfterburnerPara[8] = 0;
547  }
548  // All other periods
549  else {
550  //This is effectivley NO MC Nonlinearity afterburner correction
552  AliWarning(Form("There is no defined MC Nonlinearity Afterburner correction for this period (%s)! Nothing will be corrected",namePeriod.Data()));
553  }
554  break;
555  case kNoCorrection:
556  //This is effectivley NO MC Nonlinearity afterburner correction
558  AliWarning("You have to specify which method you want to use to get the parameters for the correction. Standard is kPCM_EMCal");
559  break;
560  }
561 }
Int_t fNonLinearityAfterburnerFunction
Type of function used for the non linearity afterburner correction.
double Double_t
Definition: External.C:58
Definition: External.C:236
bidirectional stl iterator over the EMCAL iterable container
energy
Definition: HFPtSpectrum.C:44
!This is determined by fitting the ratio of MC and Data pi0 mass position
Cluster energy non-linearity correction MC afterburner in the EMCal correction framework.
void InitNonLinearityParam(TString namePeriod, EMCAfterburnerMethod_t method)
TObjArray fClusterCollArray
Cluster collection array.
static const std::map< std::string, AliEmcalCorrectionClusterNonLinearityMCAfterburner::EMCAfterburnerMethod_t > fgkMCNonlinearityAfterburnerMethodMap
Relates string to the MC non-linearity afterburner method enumeration for YAML configuration.
float Float_t
Definition: External.C:68
!This is determined by fitting MC and Data pi0 mass position respectivley and dividing the fits ...
Double_t Phi_0_2pi() const
Int_t method
Base class for correction components in the EMCal correction framework.
EMCAfterburnerMethod_t fAfterburnerMethod
The version of the non-linearity afterburner correction (0-3, see enum NonlinearityMCAfterburnerMetho...
Float_t fNLAfterburnerPara[9]
Parameters for the non linearity function.
TList * fOutput
! List of output histograms
Bool_t fCreateHisto
Flag to make some basic histograms.
const AliClusterIterableMomentumContainer all_momentum() const
!This is determined by fitting the ratio of MC and Data pi0 mass position
!This is determined by fitting MC and Data pi0 mass position respectivley and dividing the fits ...
bool Bool_t
Definition: External.C:53
Bool_t fSetForceClusterE
Only for backwards compatibility, force cluster->E() to be set to the cluster non-linearity corrected...
Container structure for EMCAL clusters.
static RegisterCorrectionComponent< AliEmcalCorrectionClusterNonLinearityMCAfterburner > reg
bool GetProperty(std::string propertyName, T &property, bool requiredProperty=true, std::string correctionName="")
Retrieve property.