AliPhysics  master (3d17d9d)
AliAnalysisTaskEmcalJetHUtils.cxx
Go to the documentation of this file.
1 //
2 // Utilities class for Jet-Hadron correlation analysis
3 //
4 
6 
7 // Require to use AliLog streams with some types
8 #include <iostream>
9 #include <cmath>
10 
11 #include <TObjArray.h>
12 #include <TObjString.h>
13 #include <TMath.h>
14 
15 #include <AliLog.h>
16 
17 #include "AliEmcalJet.h"
18 #include "AliEmcalContainerUtils.h"
19 #include "AliEmcalContainer.h"
20 #include "AliParticleContainer.h"
21 #include "AliTrackContainer.h"
22 #include "AliClusterContainer.h"
25 
26 // Flow vector corrections
27 #include "AliQnCorrectionsProfileCorrelationComponents.h"
28 #include "AliQnCorrectionsProfile3DCorrelations.h"
29 #include "AliQnCorrectionsEventClassVariablesSet.h"
30 #include "AliQnCorrectionsCutWithin.h"
31 #include "AliQnCorrectionsDataVector.h"
32 #include "AliQnCorrectionsQnVector.h"
33 #include "AliQnCorrectionsDetector.h"
34 #include "AliQnCorrectionsDetectorConfigurationTracks.h"
35 #include "AliQnCorrectionsDetectorConfigurationChannels.h"
36 #include "AliQnCorrectionsManager.h"
37 #include "AliQnCorrectionsInputGainEqualization.h"
38 #include "AliQnCorrectionsQnVectorRecentering.h"
39 #include "AliQnCorrectionsQnVectorAlignment.h"
40 #include "AliQnCorrectionsQnVectorTwistAndRescale.h"
41 #include "AliAnalysisTaskFlowVectorCorrections.h"
42 
43 namespace PWGJE {
44 namespace EMCALJetTasks {
45 
46 const std::map<std::string, AliAnalysisTaskEmcalJetHUtils::ELeadingHadronBiasType_t> AliAnalysisTaskEmcalJetHUtils::fgkLeadingHadronBiasMap = {
50 };
51 
52 const std::map<std::string, AliEmcalJet::JetAcceptanceType> AliAnalysisTaskEmcalJetHUtils::fgkJetAcceptanceMap = {
53  {"kTPC", AliEmcalJet::kTPC},
54  {"kTPCfid", AliEmcalJet::kTPCfid},
55  {"kEMCAL", AliEmcalJet::kEMCAL},
56  {"kEMCALfid", AliEmcalJet::kEMCALfid},
57  {"kDCAL", AliEmcalJet::kDCAL},
58  {"kDCALfid", AliEmcalJet::kDCALfid},
59  {"kDCALonly", AliEmcalJet::kDCALonly},
60  {"kDCALonlyfid", AliEmcalJet::kDCALonlyfid},
61  {"kPHOS", AliEmcalJet::kPHOS},
62  {"kPHOSfid", AliEmcalJet::kPHOSfid},
63  {"kUser", AliEmcalJet::kUser}
64 };
65 
66 const std::map<std::string, AliAnalysisTaskEmcalJetHUtils::EEfficiencyPeriodIdentifier_t> AliAnalysisTaskEmcalJetHUtils::fgkEfficiencyPeriodIdentifier = {
75 };
76 
77 // LHC11h efficiency parameters for good runs
78 // 0-10% centrality
80  0.971679, 0.0767571, 1.13355, -0.0274484, 0.856652, 0.00536795, 3.90795e-05, 1.06889, 0.011007,
81  0.447046, -0.146626, 0.919777, 0.192601, -0.268515, 1.00243, 0.00620849, 0.709477
82 };
83 // 10-30% centrality
85  0.97929, 0.0776039, 1.12213, -0.0300645, 0.844722, 0.0134788, -0.0012333, 1.07955, 0.0116835,
86  0.456608, -0.132743, 0.930964, 0.174175, -0.267154, 0.993118, 0.00574892, 0.765256
87 };
88 // 30-50% centrality
90  0.997696, 0.0816769, 1.14341, -0.0353734, 0.752151, 0.0744259, -0.0102926, 1.01561, 0.00713274,
91  0.57203, -0.0640248, 0.947747, 0.102007, -0.194698, 0.999164, 0.00568476, 0.7237
92 };
93 // 50-90% centrality
95  0.97041, 0.0813559, 1.12151, -0.0368797, 0.709327, 0.0701501, -0.00784043, 1.06276, 0.00676173,
96  0.53607, -0.0703117, 0.982534, 0.0947881, -0.18073, 1.03229, 0.00580109, 0.737801
97 };
98 
99 // For pt parameters, first 5 are low pt, next 5 are high pt
100 // For eta parameters, first 6 are eta =< -0.04 (eta left in Eliane's def), next 6 are => -0.04 (eta right
101 // in Eliane's def). The last parameter normalizes the eta values such that their maximum is 1. This was apparently
102 // part of their definition, but was implementing by normalizing a TF1 afterwards. My implementation approach here
103 // is more useful when not using a TF1.
104 // 0-10% centrality
105 const double AliAnalysisTaskEmcalJetHUtils::LHC15oParam_0_10_pt[10] = { 0.8350, 0.0621, 0.0986, 0.2000,
106  1.0124, 0.7568, 0.0277, -0.0034,
107  0.1506 * 0.001, -0.0023 * 0.001 };
108 const double AliAnalysisTaskEmcalJetHUtils::LHC15oParam_0_10_eta[13] = { 1.0086, 0.0074, 0.2404, -0.1230, -0.0107,
109  0.0427, 0.8579, 0.0088, 0.4697, 0.0772,
110  -0.0352, 0.0645, 0.7716 };
111 // 10-30% centrality
113  0.8213, 0.0527, 0.0867, 0.1970, 1.1518, 0.7469, 0.0300, -0.0038, 0.1704 * 0.001, -0.0026 * 0.001
114 };
115 const double AliAnalysisTaskEmcalJetHUtils::LHC15oParam_10_30_eta[13] = { 0.9726, 0.0066, 0.2543, -0.1167, -0.0113,
116  0.0400, 0.8729, 0.0122, 0.4537, 0.0965,
117  -0.0328, 0.0623, 0.7658 };
118 // 30-50% centrality
120  0.8381, 0.0648, 0.1052, 0.1478, 1.0320, 0.7628, 0.0263, -0.0032, 0.1443 * 0.001, -0.0023 * 0.001
121 };
122 const double AliAnalysisTaskEmcalJetHUtils::LHC15oParam_30_50_eta[13] = { 0.9076, 0.0065, 0.3216, -0.1130, -0.0107,
123  0.0456, 0.8521, 0.0073, 0.4764, 0.0668,
124  -0.0363, 0.0668, 0.7748 };
125 // 50-90% centrality
127  0.8437, 0.0668, 0.1083, 0.2000, 0.9741, 0.7677, 0.0255, -0.0030, 0.1260 * 0.001, -0.0019 * 0.001
128 };
129 const double AliAnalysisTaskEmcalJetHUtils::LHC15oParam_50_90_eta[13] = { 1.1259, 0.0105, 0.1961, -0.1330, -0.0103,
130  0.0440, 0.8421, 0.0066, 0.5061, 0.0580,
131  -0.0379, 0.0651, 0.7786 };
132 
146 {
147  double maxTrackPt = 0;
148  double maxClusterPt = 0;
149 
150  if (leadingHadronType == kCharged || leadingHadronType == kBoth) {
151  auto particle = jet->GetLeadingParticleConstituent();
152  if (particle) {
153  maxTrackPt = particle->Pt();
154  }
155  }
156  if (leadingHadronType == kNeutral || leadingHadronType == kBoth) {
157  // NOTE: We don't want to use jet->MaxNeutralPt() because this uses energy
158  // from the neutral particles at the particle level. While this is not
159  // strictly wrong, it can be rather misleading to have a leading neutral
160  // particle value when we are really interested in the cluster pt that is
161  // only meaningful at detector level.
162  auto cluster = jet->GetLeadingClusterConstituent();
163  if (cluster) {
164  // Uses the energy definition that was used when the constituent was created
165  // to calculate the Pt(). Usually, this would be the hadronic corrected energy
166  maxClusterPt = cluster->Pt();
167  }
168  }
169 
170  // The max value will be 0 unless it was filled. Thus, it will only be greater if
171  // it was requested.
172  return (maxTrackPt > maxClusterPt) ? maxTrackPt : maxClusterPt;
173 }
174 
184 double AliAnalysisTaskEmcalJetHUtils::RelativeEPAngle(double jetAngle, double epAngle)
185 {
186  double dphi = (epAngle - jetAngle);
187 
188  // ran into trouble with a few dEP<-Pi so trying this...
189  if( dphi<-1*TMath::Pi() ) {
190  dphi = dphi + 1*TMath::Pi();
191  } // this assumes we are doing full jets currently
192 
193  if( (dphi>0) && (dphi<1*TMath::Pi()/2) ) {
194  // Do nothing! we are in quadrant 1
195  } else if ( (dphi>1*TMath::Pi()/2) && (dphi<1*TMath::Pi()) ) {
196  dphi = 1*TMath::Pi() - dphi;
197  } else if ( (dphi<0) && (dphi>-1*TMath::Pi()/2) ) {
198  dphi = std::abs(dphi);
199  } else if ( (dphi<-1*TMath::Pi()/2) && (dphi>-1*TMath::Pi()) ) {
200  dphi = dphi + 1*TMath::Pi();
201  }
202 
203  // Warn if we are not in the proper range
204  if ( dphi < 0 || dphi > TMath::Pi()/2 ) {
205  AliWarningGeneralStream("AliAnalysisTaskEmcalJetHUtils") << ": dPHI not in range [0, 0.5*Pi]!\n";
206  }
207 
208  return dphi; // dphi in [0, Pi/2]
209 }
210 
220 void AliAnalysisTaskEmcalJetHUtils::ConfigureEventCuts(AliEventCuts & eventCuts, PWG::Tools::AliYAMLConfiguration & yamlConfig, const UInt_t offlineTriggerMask, const std::string & baseName, const std::string & taskName)
221 {
222  // The trigger can be set regardless of event cuts settings.
223  // Event cuts trigger selection.
224  bool useEventCutsAutomaticTriggerSelection = false;
225  bool res = yamlConfig.GetProperty(std::vector<std::string>({baseName, "useAutomaticTriggerSelection"}), useEventCutsAutomaticTriggerSelection, false);
226  if (res && useEventCutsAutomaticTriggerSelection) {
227  // Use the automatic selection. Nothing to be done.
228  AliInfoGeneralStream(taskName.c_str()) << "Using the automatic trigger selection from AliEventCuts.\n";
229  }
230  else {
231  // Use the cuts selected by SelectCollisionCandidates() (or via YAML)
232  AliInfoGeneralStream(taskName.c_str()) << "Using the trigger selection specified with SelectCollisionCandidates() or via YAML. Value: " << offlineTriggerMask << "\n";
233  eventCuts.OverrideAutomaticTriggerSelection(offlineTriggerMask, true);
234  }
235 
236  // Manual mode
237  bool manualMode = false;
238  yamlConfig.GetProperty({baseName, "manualMode"}, manualMode, false);
239  if (manualMode) {
240  AliInfoGeneralStream(taskName.c_str()) << "Configuring manual event cuts.\n";
241  eventCuts.SetManualMode();
242  // Configure manual mode via YAML
243  // Select the period
244  typedef void (AliEventCuts::*MFP)();
245  std::map<std::string, MFP> eventCutsPeriods = { std::make_pair("LHC11h", &AliEventCuts::SetupRun1PbPb),
246  std::make_pair("LHC15o", &AliEventCuts::SetupLHC15o),
247  std::make_pair("LHC18qr", &AliEventCuts::SetupPbPb2018) };
248  std::string manualCutsPeriod = "";
249  yamlConfig.GetProperty({ baseName, "cutsPeriod" }, manualCutsPeriod, true);
250  auto eventCutsPeriod = eventCutsPeriods.find(manualCutsPeriod);
251  if (eventCutsPeriod != eventCutsPeriods.end()) {
252  // Call event cuts period setup.
253  (eventCuts.*eventCutsPeriod->second)();
254  AliDebugGeneralStream(taskName.c_str(), 3) << "Configuring event cuts with period \"" << manualCutsPeriod << "\"\n";
255  } else {
256  AliFatalGeneralF(taskName.c_str(), "Period %s was not found in the event cuts period map.", manualCutsPeriod.c_str());
257  }
258 
259  // Additional settings must be after setting the period to ensure that the settings aren't overwritten.
260  // Centrality
261  std::pair<double, double> centRange;
262  res = yamlConfig.GetProperty({ baseName, "centralityRange" }, centRange, false);
263  if (res) {
264  AliDebugGeneralStream(taskName.c_str(), 3) << "Setting centrality range of (" << centRange.first << ", " << centRange.second << ").\n";
265  eventCuts.SetCentralityRange(centRange.first, centRange.second);
266  }
267 
268  // MC
269  bool mc = false;
270  yamlConfig.GetProperty({ baseName, "MC" }, mc, false);
271  eventCuts.fMC = mc;
272 
273  // Set the 15o pileup cuts. Defaults to on.
274  if (manualCutsPeriod == "LHC15o") {
275  bool enablePileupCuts = true;
276  yamlConfig.GetProperty({ baseName, "enablePileupCuts" }, enablePileupCuts, false);
277  AliDebugGeneralStream(taskName.c_str(), 3) << "Setting 15o pileup cuts to " << std::boolalpha << enablePileupCuts << ".\n";
278  eventCuts.fUseVariablesCorrelationCuts = enablePileupCuts;
279  }
280  }
281 }
282 
291 {
292  AliParticleContainer * partCont = nullptr;
294  AliTrackContainer * trackCont = new AliTrackContainer(collectionName.c_str());
295  partCont = trackCont;
296  }
297  else if (collectionName != "") {
298  partCont = new AliParticleContainer(collectionName.c_str());
299  }
300 
301  return partCont;
302 }
303 
314  std::string containerName,
315  AliEmcalContainer* cont,
317  std::string taskName)
318 {
319  // Initial setup
320  cont->SetName(containerName.c_str());
321 
322  // Set the properties
323  double tempDouble = -1.0;
324  bool tempBool = false;
325  std::vector<double> tempRange;
326  // Min Pt
327  bool result = yamlConfig.GetProperty(baseName, "minPt", tempDouble, false);
328  if (result) {
329  AliDebugGeneralStream(taskName.c_str(), 2) << cont->GetName() << ": Setting minPt of " << tempDouble << "\n";
330  cont->SetMinPt(tempDouble);
331  }
332  // Min E
333  result = yamlConfig.GetProperty(baseName, "minE", tempDouble, false);
334  if (result) {
335  AliDebugGeneralStream(taskName.c_str(), 2) << cont->GetName() << ": Setting minE of " << tempDouble << "\n";
336  cont->SetMinE(tempDouble);
337  }
338  // Eta min, max
339  result = yamlConfig.GetProperty(baseName, "etaLimits", tempRange, false);
340  if (result) {
341  if (tempRange.size() != 2) {
342  AliErrorGeneralStream(taskName.c_str()) << "Passed eta range with " << tempRange.size()
343  << " entries, but 2 values are required. Ignoring values.\n";
344  } else {
345  AliDebugGeneralStream(taskName.c_str(), 2)
346  << "Setting eta range to [" << tempRange.at(0) << ", " << tempRange.at(1) << "]\n";
347  cont->SetEtaLimits(tempRange.at(0), tempRange.at(1));
348  }
349  }
350  // Phi min, max
351  result = yamlConfig.GetProperty(baseName, "phiLimits", tempRange, false);
352  if (result) {
353  if (tempRange.size() != 2) {
354  AliErrorGeneralStream(taskName.c_str()) << "Passed phi range with " << tempRange.size()
355  << " entries, but 2 values are required. Ignoring values.\n";
356  } else {
357  AliDebugGeneralStream(taskName.c_str(), 2)
358  << "Setting phi range to [" << tempRange.at(0) << ", " << tempRange.at(1) << "]\n";
359  cont->SetPhiLimits(tempRange.at(0), tempRange.at(1));
360  }
361  }
362  // Embedded
363  result = yamlConfig.GetProperty(baseName, "embedding", tempBool, false);
364  if (result) {
365  AliDebugGeneralStream(taskName.c_str(), 2)
366  << cont->GetName() << ": Setting embedding to " << (tempBool ? "enabled" : "disabled") << "\n";
367  cont->SetIsEmbedding(tempBool);
368  }
369 }
370 
380  std::vector<std::string> baseNameWithContainer, AliTrackContainer* trackCont,
381  PWG::Tools::AliYAMLConfiguration& yamlConfig, std::string taskName)
382 {
383  // Initial setup
384  std::string tempString = "";
385 
386  // Track selection
387  // AOD Filter bits as a sequence
388  std::vector<UInt_t> filterBitsVector;
389  bool result = yamlConfig.GetProperty(baseNameWithContainer, "aodFilterBits", filterBitsVector, false);
390  if (result) {
391  UInt_t filterBits = 0;
392  for (int filterBit : filterBitsVector) {
393  filterBits += filterBit;
394  }
395  AliDebugGeneralStream(taskName.c_str(), 2)
396  << trackCont->GetName() << ": Setting filterBits of " << filterBits << "\n";
397  trackCont->SetAODFilterBits(filterBits);
398  }
399 
400  // SetTrackFilterType enum
401  result = yamlConfig.GetProperty(baseNameWithContainer, "trackFilterType", tempString, false);
402  if (result) {
403  // Need to get the enumeration
406  AliDebugGeneralStream(taskName.c_str(), 2)
407  << trackCont->GetName() << ": Setting trackFilterType of " << trackFilterType << " (" << tempString << ")\n";
408  trackCont->SetTrackFilterType(trackFilterType);
409  }
410 
411  // Track cuts period
412  result = yamlConfig.GetProperty(baseNameWithContainer, "trackCutsPeriod", tempString, false);
413  if (result) {
414  // Need to get the enumeration
415  AliDebugGeneralStream(taskName.c_str(), 2)
416  << trackCont->GetName() << ": Setting track cuts period to " << tempString << "\n";
417  trackCont->SetTrackCutsPeriod(tempString.c_str());
418  }
419 }
420 
430  std::vector<std::string> baseNameWithContainer, AliClusterContainer* clusterCont,
431  PWG::Tools::AliYAMLConfiguration& yamlConfig, std::string taskName)
432 {
433  // Initial setup
434  double tempDouble = 0;
435  std::string tempString = "";
436  bool tempBool = false;
437 
438  // Default energy
439  bool result = yamlConfig.GetProperty(baseNameWithContainer, "defaultClusterEnergy", tempString, false);
440  if (result) {
441  // Need to get the enumeration
442  AliVCluster::VCluUserDefEnergy_t clusterEnergyType =
444  AliDebugGeneralStream(taskName.c_str(), 2)
445  << clusterCont->GetName() << ": Setting cluster energy type to " << clusterEnergyType << "\n";
446  clusterCont->SetDefaultClusterEnergy(clusterEnergyType);
447  }
448 
449  // NonLinCorrEnergyCut
450  result = yamlConfig.GetProperty(baseNameWithContainer, "clusNonLinCorrEnergyCut", tempDouble, false);
451  if (result) {
452  AliDebugGeneralStream(taskName.c_str(), 2)
453  << clusterCont->GetName() << ": Setting clusNonLinCorrEnergyCut of " << tempDouble << "\n";
454  clusterCont->SetClusNonLinCorrEnergyCut(tempDouble);
455  }
456 
457  // HadCorrEnergyCut
458  result = yamlConfig.GetProperty(baseNameWithContainer, "clusHadCorrEnergyCut", tempDouble, false);
459  if (result) {
460  AliDebugGeneralStream(taskName.c_str(), 2)
461  << clusterCont->GetName() << ": Setting clusHadCorrEnergyCut of " << tempDouble << "\n";
462  clusterCont->SetClusHadCorrEnergyCut(tempDouble);
463  }
464 
465  // SetIncludePHOS
466  result = yamlConfig.GetProperty(baseNameWithContainer, "includePHOS", tempBool, false);
467  if (result) {
468  AliDebugGeneralStream(taskName.c_str(), 2) << clusterCont->GetName() << ": Setting Include PHOS to "
469  << (tempBool ? "enabled" : "disabled") << "\n";
470  clusterCont->SetIncludePHOS(tempBool);
471  }
472 }
473 
480 UInt_t AliAnalysisTaskEmcalJetHUtils::DetermineJetAcceptanceFromYAML(const std::vector<std::string> & selections)
481 {
482  UInt_t jetAcceptance = 0;
483  for (auto selection : selections) {
484  auto sel = fgkJetAcceptanceMap.find(selection);
485  AliDebugGeneralStream("AliAnalysisTaskEmcalJetHUtils", 3) << "Adding jet acceptance: " << selection << "\n";
486  if (sel != fgkJetAcceptanceMap.end()) {
487  jetAcceptance |= sel->second;
488  } else {
489  AliFatalGeneralF("AliAnalysisTaskEmcalJetHUtils", "Could not find jet acceptance with key \"%s\"",
490  selection.c_str());
491  }
492  }
493  return jetAcceptance;
494 }
495 
513  const std::string& configFilename)
514 {
515  AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager();
516  if (!mgr) {
517  Error("AddTaskFlowQnVectorCorrections", "No analysis manager found.");
518  return 0;
519  }
520 
521  // Create the correction task and manager
522  AliQnCorrectionsManager* QnManager = new AliQnCorrectionsManager();
523  AliAnalysisTaskFlowVectorCorrections* taskQnCorrections =
524  new AliAnalysisTaskFlowVectorCorrections("FlowQnVectorCorrections");
525 
526  // Determine the task configuration
528  yamlConfig.AddConfiguration(configFilename, "config");
529  std::string baseName = "";
530 
531  // General configuration
532  // Use VZERO centrality or multiplicity percentile for centrality determination
533  // Use centrality for 2010 (and 2011?), use multiplicity of 2015 (ie. run 2)
534  bool useMultiplicityPercentileForCentralityDetermination = true;
535  yamlConfig.GetProperty("useMultiplicityPercentileForCentralityDetermination",
536  useMultiplicityPercentileForCentralityDetermination, true);
537  AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity = AliQnCorrectionsVarManagerTask::kCentVZERO;
538  if (useMultiplicityPercentileForCentralityDetermination) {
539  varForEventMultiplicity = AliQnCorrectionsVarManagerTask::kVZEROMultPercentile;
540  }
541  // Select the Z vertex, centrality for when to calibrate (and correct?).
542  std::pair<double, double> zVertexRange;
543  yamlConfig.GetProperty("zVertex", zVertexRange, true);
544  std::pair<double, double> centRange;
545  yamlConfig.GetProperty("centrality", centRange, true);
546  // Select only events validated for centrality calibration
547  // Check information about your runs of interest in
548  // https://twiki.cern.ch/twiki/bin/viewauth/ALICE/AliMultSelectionCalibStatus.
549  // Learn more about its usage in https://twiki.cern.ch/twiki/bin/viewauth/ALICE/CentralityCodeSnippets
550  bool useOnlyCentralityCalibratedEvents = false;
551  yamlConfig.GetProperty("useOnlyCentralityCalibratedEvents", useOnlyCentralityCalibratedEvents, true);
552  // Select runs to use when gather calibration data.
553  std::vector<std::string> listOfRuns;
554  yamlConfig.GetProperty("runsToUseDuringCalibration", listOfRuns, false);
555  // Physics selection. Defaults to kAnyINT
556  std::vector<std::string> physicsSelection;
557  bool res = yamlConfig.GetProperty("physicsSelection", physicsSelection, false);
558  if (res) {
559  taskQnCorrections->SelectCollisionCandidates(
561  } else {
562  // Defaults to using kAnyINT
563  taskQnCorrections->SelectCollisionCandidates(AliVEvent::kAnyINT);
564  }
565 
566  // Location of correction histograms
567  baseName = "correctionHistograms";
568  std::string correctionsSource = "";
569  yamlConfig.GetProperty({ baseName, "source" }, correctionsSource, true);
570  std::string correctionsFilePath = "";
571  yamlConfig.GetProperty({ baseName, "path" }, correctionsFilePath, true);
572  std::string correctionsFileName = "";
573  yamlConfig.GetProperty({ baseName, "filename" }, correctionsFileName, true);
574 
575  // Detector configuration (optional - all are off by default)
576  baseName = "detectors";
577  bool useTPC = false;
578  yamlConfig.GetProperty({ baseName, "TPC" }, useTPC, false);
579  bool useSPD = false;
580  yamlConfig.GetProperty({ baseName, "SPD" }, useSPD, false);
581  bool useVZERO = false;
582  yamlConfig.GetProperty({ baseName, "VZERO" }, useVZERO, false);
583  bool useTZERO = false;
584  yamlConfig.GetProperty({ baseName, "TZERO" }, useTZERO, false);
585  bool useFMD = false;
586  yamlConfig.GetProperty({ baseName, "FMD" }, useFMD, false);
587  bool useRawFMD = false;
588  yamlConfig.GetProperty({ baseName, "RawFMD" }, useRawFMD, false);
589  bool useZDC = false;
590  yamlConfig.GetProperty({ baseName, "ZDC" }, useZDC, false);
591 
592  // Outputs configuration
593  baseName = "outputs";
594  bool fillQVectorTree = false;
595  yamlConfig.GetProperty({ baseName, "QVectorTree" }, fillQVectorTree, false);
596  bool fillQAHistograms = true;
597  yamlConfig.GetProperty({ baseName, "QAHistograms" }, fillQAHistograms, false);
598  bool fillNveQAHistograms = true;
599  yamlConfig.GetProperty({ baseName, "NveQAHistograms" }, fillNveQAHistograms, false);
600  bool fillOutputHistograms = true;
601  yamlConfig.GetProperty({ baseName, "OutputHistograms" }, fillOutputHistograms, false);
602  bool fillExchangeContainerWithQvectors = true;
603  yamlConfig.GetProperty({ baseName, "ExchangeContainerWithQvectors" }, fillExchangeContainerWithQvectors, false);
604  bool fillEventQA = true;
605  yamlConfig.GetProperty({ baseName, "EventQA" }, fillEventQA, false);
606 
607  // Create a string to describe the configuration.
608  // It allows the user to verify that the configuration was accessed successfully and that the
609  // values were extracted into the proper variables.
610  std::stringstream tempSS;
611  tempSS << std::boolalpha;
612  tempSS << "Flow Qn vector corrections configuration:\n";
613  tempSS << "Use multiplicity percentile for centrality determination: "
614  << useMultiplicityPercentileForCentralityDetermination << "\n";
615  tempSS << "Z vertex: [" << zVertexRange.first << ", " << zVertexRange.second << "]\n";
616  tempSS << "Centrality: [" << centRange.first << ", " << centRange.second << "]\n";
617  tempSS << "Use only centrality calibrated events: " << useOnlyCentralityCalibratedEvents << "\n";
618  tempSS << "Runs to use during calibration:\n";
619  bool atLeastOneRun = false;
620  for (const auto& run : listOfRuns) {
621  atLeastOneRun = true;
622  tempSS << "\t" << run << "\n";
623  }
624  if (!atLeastOneRun) {
625  tempSS << "\tNone\n";
626  }
627  tempSS << "Physics selection: " << taskQnCorrections->GetCollisionCandidates() << "\n";
628 
629  tempSS << "Correction histograms:\n";
630  tempSS << "\tSource: " << correctionsSource << "\n";
631  tempSS << "\tPath: " << correctionsFilePath << "\n";
632  tempSS << "\tName: " << correctionsFileName << "\n";
633 
634  tempSS << "Detectors:\n";
635  tempSS << "\tTPC: " << useTPC << "\n";
636  tempSS << "\tSPD: " << useSPD << "\n";
637  tempSS << "\tVZERO: " << useVZERO << "\n";
638  tempSS << "\tTZERO: " << useTZERO << "\n";
639  tempSS << "\tFMD: " << useFMD << "\n";
640  tempSS << "\tRaw FMD: " << useRawFMD << "\n";
641  tempSS << "\tZDC: " << useZDC << "\n";
642 
643  tempSS << "Outputs:\n";
644  tempSS << "\tQ vector tree: " << fillQVectorTree << "\n";
645  tempSS << "\tQA histograms: " << fillQAHistograms << "\n";
646  tempSS << "\tNve QA histograms: " << fillNveQAHistograms << "\n";
647  tempSS << "\tOutput histograms: " << fillOutputHistograms << "\n";
648  tempSS << "\tExchange containers with Q vectors: " << fillExchangeContainerWithQvectors << "\n";
649  tempSS << "\tEvent QA: " << fillEventQA << "\n";
650 
651  // Print the task configuration
652  // Print outside of the ALICE Log system to ensure that it is always available!
653  std::cout << tempSS.str();
654 
655  // Convert list of runs from vector to TObjArray so they can be passed to the task.
656  // Allocate using new so we can pass it into the class. Otherwise, it will segfault because the task attempts
657  // to access the object after it's gone out of scope (instead of copying the TObjArray).
658  TObjArray* listOfRunsTOBJ = new TObjArray();
659  listOfRunsTOBJ->SetOwner(kTRUE);
660  for (const auto& run : listOfRuns) {
661  listOfRunsTOBJ->Add(new TObjString(run.c_str()));
662  }
663 
664  /* let's establish the event cuts for event selection */
665  AliQnCorrectionsCutsSet* eventCuts = new AliQnCorrectionsCutsSet();
666  eventCuts->Add(
667  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kVtxZ, zVertexRange.first, zVertexRange.second));
668  eventCuts->Add(new AliQnCorrectionsCutWithin(varForEventMultiplicity, centRange.first, centRange.second));
669  taskQnCorrections->SetEventCuts(eventCuts);
670  taskQnCorrections->SetUseOnlyCentCalibEvents(useOnlyCentralityCalibratedEvents);
671 
672  TString histClass = "";
673  histClass += "Event_NoCuts;";
674  histClass += "Event_Analysis;";
675  histClass += "TrackQA_NoCuts;";
676 
677  /* add the selected detectors */
678  if (useTPC) {
679  FlowVectorCorrections::AddTPC(taskQnCorrections, QnManager, varForEventMultiplicity);
680  histClass += "TrackQA_TPC;";
681  }
682  if (useSPD) {
683  FlowVectorCorrections::AddSPD(taskQnCorrections, QnManager, varForEventMultiplicity);
684  histClass += "TrackletQA_SPD;";
685  }
686  if (useVZERO) {
687  FlowVectorCorrections::AddVZERO(taskQnCorrections, QnManager, varForEventMultiplicity);
688  }
689  if (useTZERO) {
690  FlowVectorCorrections::AddTZERO(taskQnCorrections, QnManager, varForEventMultiplicity);
691  }
692  if (useFMD) {
693  FlowVectorCorrections::AddFMD(taskQnCorrections, QnManager, varForEventMultiplicity);
694  }
695  if (useRawFMD) {
696  FlowVectorCorrections::AddRawFMD(taskQnCorrections, QnManager, varForEventMultiplicity);
697  }
698  if (useZDC) {
699  FlowVectorCorrections::AddZDC(taskQnCorrections, QnManager, varForEventMultiplicity);
700  }
701 
702  QnManager->SetShouldFillQnVectorTree(fillQVectorTree);
703  QnManager->SetShouldFillQAHistograms(fillQAHistograms);
704  QnManager->SetShouldFillNveQAHistograms(fillNveQAHistograms);
705  QnManager->SetShouldFillOutputHistograms(fillOutputHistograms);
706 
707  taskQnCorrections->SetFillExchangeContainerWithQvectors(fillExchangeContainerWithQvectors);
708  taskQnCorrections->SetFillEventQA(fillEventQA);
709 
710  taskQnCorrections->SetAliQnCorrectionsManager(QnManager);
711  taskQnCorrections->DefineInOutput();
712  taskQnCorrections->SetRunsLabels(listOfRunsTOBJ);
713 
714  /* let's handle the calibration file */
715  AliInfoGeneralStream("PWGJE::EMCALJetTasks::AddTaskFlowQnVectorCorrections")
716  << "=================== CALIBRATION FILE =============================================\n";
717  std::string inputCalibrationFilename = correctionsFilePath + "/" + correctionsFileName;
718  if (correctionsSource == "local") {
719  AliInfoGeneralStream("PWGJE::EMCALJetTasks::AddTaskFlowQnVectorCorrections")
720  << "\t File " << inputCalibrationFilename << "\n\t being taken locally when building the task object.\n";
721  taskQnCorrections->SetCalibrationHistogramsFile(AliAnalysisTaskFlowVectorCorrections::CALIBSRC_local,
722  inputCalibrationFilename.c_str());
723  } else if (correctionsSource == "aliensingle") {
724  AliInfoGeneralStream("PWGJE::EMCALJetTasks::AddTaskFlowQnVectorCorrections")
725  << "\t File " << inputCalibrationFilename << " being taken from alien in the execution nodes\n";
726  taskQnCorrections->SetCalibrationHistogramsFile(AliAnalysisTaskFlowVectorCorrections::CALIBSRC_aliensingle,
727  inputCalibrationFilename.c_str());
728  } else if (correctionsSource == "alienmultiple") {
729  AliInfoGeneralStream("PWGJE::EMCALJetTasks::AddTaskFlowQnVectorCorrections")
730  << "\t File " << inputCalibrationFilename
731  << " being taken from alien in the execution nodes on a per run basis\n";
732  taskQnCorrections->SetCalibrationHistogramsFile(AliAnalysisTaskFlowVectorCorrections::CALIBSRC_alienmultiple,
733  inputCalibrationFilename.c_str());
734  } else if (correctionsSource == "OADBsingle") {
735  AliInfoGeneralStream("PWGJE::EMCALJetTasks::AddTaskFlowQnVectorCorrections")
736  << "\t File " << inputCalibrationFilename << " being taken from OADB in the execution nodes\n";
737  taskQnCorrections->SetCalibrationHistogramsFile(AliAnalysisTaskFlowVectorCorrections::CALIBSRC_OADBsingle,
738  inputCalibrationFilename.c_str());
739  } else if (correctionsSource == "OADBmultiple") {
740  AliInfoGeneralStream("PWGJE::EMCALJetTasks::AddTaskFlowQnVectorCorrections")
741  << "\t File " << inputCalibrationFilename
742  << " being taken from OADB in the execution nodes on a per run basis\n";
743  taskQnCorrections->SetCalibrationHistogramsFile(AliAnalysisTaskFlowVectorCorrections::CALIBSRC_OADBmultiple,
744  inputCalibrationFilename.c_str());
745  } else {
746  AliErrorGeneralStream("AddTaskFlowQnVectorCorrections")
747  << "\t CALIBRATION FILE SOURCE NOT SUPPORTED. ABORTING!!!";
748  return NULL;
749  }
750  AliInfoGeneralStream("PWGJE::EMCALJetTasks::AddTaskFlowQnVectorCorrections")
751  << "==================================================================================\n";
752 
753  AliQnCorrectionsHistos* hists = taskQnCorrections->GetEventHistograms();
754  FlowVectorCorrections::DefineHistograms(QnManager, hists, histClass);
755 
756  mgr->AddTask(taskQnCorrections);
757  mgr->ConnectInput(taskQnCorrections, 0, mgr->GetCommonInputContainer());
758 
759  // create output containers
760  if (QnManager->GetShouldFillOutputHistograms()) {
761  AliAnalysisDataContainer* cOutputHist =
762  mgr->CreateContainer(QnManager->GetCalibrationHistogramsContainerName(), TList::Class(),
763  AliAnalysisManager::kOutputContainer, "CalibrationHistograms.root");
764  mgr->ConnectOutput(taskQnCorrections, taskQnCorrections->OutputSlotHistQn(), cOutputHist);
765  }
766 
767  if (QnManager->GetShouldFillQnVectorTree()) {
768  AliAnalysisDataContainer* cOutputQvec = mgr->CreateContainer(
769  "CalibratedQvector", TTree::Class(), AliAnalysisManager::kOutputContainer, "QvectorsTree.root");
770  mgr->ConnectOutput(taskQnCorrections, taskQnCorrections->OutputSlotTree(), cOutputQvec);
771  }
772 
773  if (QnManager->GetShouldFillQAHistograms()) {
774  AliAnalysisDataContainer* cOutputHistQA =
775  mgr->CreateContainer(QnManager->GetCalibrationQAHistogramsContainerName(), TList::Class(),
776  AliAnalysisManager::kOutputContainer, "CalibrationQA.root");
777  mgr->ConnectOutput(taskQnCorrections, taskQnCorrections->OutputSlotHistQA(), cOutputHistQA);
778  }
779 
780  if (QnManager->GetShouldFillNveQAHistograms()) {
781  AliAnalysisDataContainer* cOutputHistNveQA =
782  mgr->CreateContainer(QnManager->GetCalibrationNveQAHistogramsContainerName(), TList::Class(),
783  AliAnalysisManager::kOutputContainer, "CalibrationQA.root");
784  mgr->ConnectOutput(taskQnCorrections, taskQnCorrections->OutputSlotHistNveQA(), cOutputHistNveQA);
785  }
786 
787  if (taskQnCorrections->GetFillEventQA()) {
788  AliAnalysisDataContainer* cOutputQnEventQA =
789  mgr->CreateContainer("QnEventQA", TList::Class(), AliAnalysisManager::kOutputContainer, "QnEventQA.root");
790  mgr->ConnectOutput(taskQnCorrections, taskQnCorrections->OutputSlotEventQA(), cOutputQnEventQA);
791  }
792 
793  AliAnalysisDataContainer* cOutputQvecList = mgr->CreateContainer(
794  "CalibratedQvectorList", TList::Class(), AliAnalysisManager::kExchangeContainer, "QvectorsList.root");
795 
796  if (taskQnCorrections->GetFillExchangeContainerWithQvectors())
797  mgr->ConnectOutput(taskQnCorrections, taskQnCorrections->OutputSlotGetListQnVectors(), cOutputQvecList);
798 
799  return taskQnCorrections;
800 }
801 
809 double AliAnalysisTaskEmcalJetHUtils::GetJetPt(const AliEmcalJet* jet, const double rho)
810 {
811  double pT = jet->Pt() - rho * jet->Area();
812  return pT;
813 }
814 
824 double AliAnalysisTaskEmcalJetHUtils::LHC11hTrackingEfficiency(const double trackPt, const double trackEta, const int centralityBin, const std::string & taskName)
825 {
826  // Setup
827  double etaAxis = 0;
828  double ptAxis = 0;
829  double efficiency = 1;
830 
831  // Assumes that the centrality bins follow (as defined in AliAnalysisTaskEmcal)
832  // 0 = 0-10%
833  // 1 = 10-30%
834  // 2 = 30-50%
835  // 3 = 50-90%
836  switch (centralityBin) {
837  case 0 :
838  // Parameter values for GOOD TPC (LHC11h) runs (0-10%):
839  ptAxis =
840  (trackPt < 2.9) * (LHC11hParam_0_10[0] * exp(-pow(LHC11hParam_0_10[1] / trackPt, LHC11hParam_0_10[2])) +
841  LHC11hParam_0_10[3] * trackPt) +
842  (trackPt >= 2.9) *
843  (LHC11hParam_0_10[4] + LHC11hParam_0_10[5] * trackPt + LHC11hParam_0_10[6] * trackPt * trackPt);
844  etaAxis =
845  (trackEta < 0.0) *
846  (LHC11hParam_0_10[7] * exp(-pow(LHC11hParam_0_10[8] / std::abs(trackEta + 0.91), LHC11hParam_0_10[9])) +
847  LHC11hParam_0_10[10] * trackEta) +
848  (trackEta >= 0.0 && trackEta <= 0.4) *
849  (LHC11hParam_0_10[11] + LHC11hParam_0_10[12] * trackEta + LHC11hParam_0_10[13] * trackEta * trackEta) +
850  (trackEta > 0.4) * (LHC11hParam_0_10[14] *
851  exp(-pow(LHC11hParam_0_10[15] / std::abs(-trackEta + 0.91), LHC11hParam_0_10[16])));
852  efficiency = ptAxis * etaAxis;
853  break;
854 
855  case 1:
856  // Parameter values for GOOD TPC (LHC11h) runs (10-30%):
857  ptAxis = (trackPt < 2.9) *
858  (LHC11hParam_10_30[0] * exp(-pow(LHC11hParam_10_30[1] / trackPt, LHC11hParam_10_30[2])) +
859  LHC11hParam_10_30[3] * trackPt) +
860  (trackPt >= 2.9) * (LHC11hParam_10_30[4] + LHC11hParam_10_30[5] * trackPt +
861  LHC11hParam_10_30[6] * trackPt * trackPt);
862  etaAxis =
863  (trackEta < 0.0) * (LHC11hParam_10_30[7] *
864  exp(-pow(LHC11hParam_10_30[8] / std::abs(trackEta + 0.91), LHC11hParam_10_30[9])) +
865  LHC11hParam_10_30[10] * trackEta) +
866  (trackEta >= 0.0 && trackEta <= 0.4) * (LHC11hParam_10_30[11] + LHC11hParam_10_30[12] * trackEta +
867  LHC11hParam_10_30[13] * trackEta * trackEta) +
868  (trackEta > 0.4) * (LHC11hParam_10_30[14] *
869  exp(-pow(LHC11hParam_10_30[15] / std::abs(-trackEta + 0.91), LHC11hParam_10_30[16])));
870  efficiency = ptAxis * etaAxis;
871  break;
872 
873  case 2:
874  // Parameter values for GOOD TPC (LHC11h) runs (30-50%):
875  ptAxis = (trackPt < 2.9) *
876  (LHC11hParam_30_50[0] * exp(-pow(LHC11hParam_30_50[1] / trackPt, LHC11hParam_30_50[2])) +
877  LHC11hParam_30_50[3] * trackPt) +
878  (trackPt >= 2.9) * (LHC11hParam_30_50[4] + LHC11hParam_30_50[5] * trackPt +
879  LHC11hParam_30_50[6] * trackPt * trackPt);
880  etaAxis =
881  (trackEta < 0.0) * (LHC11hParam_30_50[7] *
882  exp(-pow(LHC11hParam_30_50[8] / std::abs(trackEta + 0.91), LHC11hParam_30_50[9])) +
883  LHC11hParam_30_50[10] * trackEta) +
884  (trackEta >= 0.0 && trackEta <= 0.4) * (LHC11hParam_30_50[11] + LHC11hParam_30_50[12] * trackEta +
885  LHC11hParam_30_50[13] * trackEta * trackEta) +
886  (trackEta > 0.4) * (LHC11hParam_30_50[14] *
887  exp(-pow(LHC11hParam_30_50[15] / std::abs(-trackEta + 0.91), LHC11hParam_30_50[16])));
888  efficiency = ptAxis * etaAxis;
889  break;
890 
891  case 3:
892  // Parameter values for GOOD TPC (LHC11h) runs (50-90%):
893  ptAxis = (trackPt < 2.9) *
894  (LHC11hParam_50_90[0] * exp(-pow(LHC11hParam_50_90[1] / trackPt, LHC11hParam_50_90[2])) +
895  LHC11hParam_50_90[3] * trackPt) +
896  (trackPt >= 2.9) * (LHC11hParam_50_90[4] + LHC11hParam_50_90[5] * trackPt +
897  LHC11hParam_50_90[6] * trackPt * trackPt);
898  etaAxis =
899  (trackEta < 0.0) * (LHC11hParam_50_90[7] *
900  exp(-pow(LHC11hParam_50_90[8] / std::abs(trackEta + 0.91), LHC11hParam_50_90[9])) +
901  LHC11hParam_50_90[10] * trackEta) +
902  (trackEta >= 0.0 && trackEta <= 0.4) * (LHC11hParam_50_90[11] + LHC11hParam_50_90[12] * trackEta +
903  LHC11hParam_50_90[13] * trackEta * trackEta) +
904  (trackEta > 0.4) * (LHC11hParam_50_90[14] *
905  exp(-pow(LHC11hParam_50_90[15] / std::abs(-trackEta + 0.91), LHC11hParam_50_90[16])));
906  efficiency = ptAxis * etaAxis;
907  break;
908 
909  default:
910  AliErrorGeneralStream(taskName.c_str()) << "Invalid centrality for determine tracking efficiency.\n";
911  efficiency = 0;
912  }
913 
914  return efficiency;
915 }
916 
925 double AliAnalysisTaskEmcalJetHUtils::LHC15oPtEfficiency(const double trackPt, const double params[10])
926 {
927  return ((trackPt <= 3.5) * LHC15oLowPtEfficiencyImpl(trackPt, params, 0) +
928  (trackPt > 3.5) * LHC15oHighPtEfficiencyImpl(trackPt, params, 5));
929 }
930 
939 double AliAnalysisTaskEmcalJetHUtils::LHC15oLowPtEfficiencyImpl(const double trackPt, const double params[10], const int index)
940 {
941  return (params[index + 0] + -1.0 * params[index + 1] / trackPt) +
942  params[index + 2] * TMath::Gaus(trackPt, params[index + 3], params[index + 4]);
943 }
944 
953 double AliAnalysisTaskEmcalJetHUtils::LHC15oHighPtEfficiencyImpl(const double trackPt, const double params[10], const int index)
954 {
955  return params[index + 0] + params[index + 1] * trackPt + params[index + 2] * std::pow(trackPt, 2) +
956  params[index + 3] * std::pow(trackPt, 3) + params[index + 4] * std::pow(trackPt, 4);
957 }
958 
966 double AliAnalysisTaskEmcalJetHUtils::LHC15oEtaEfficiency(const double trackEta, const double params[13])
967 {
968  // Just modify the arguments - the function is the same.
969  return ((trackEta <= -0.04) * LHC15oEtaEfficiencyImpl(trackEta, params, 0) +
970  (trackEta > -0.04) * LHC15oEtaEfficiencyImpl(trackEta, params, 6));
971 }
972 
981 double AliAnalysisTaskEmcalJetHUtils::LHC15oEtaEfficiencyImpl(const double trackEta, const double params[13],
982  const int index)
983 {
984  // We need to multiply the track eta by -1 if we are looking at eta > 0 (which corresponds to
985  // the second set of parameters, such that the index is greater than 0).
986  int sign = index > 0 ? -1 : 1;
987  return (params[index + 0] *
988  std::exp(-1.0 * std::pow(params[index + 1] / std::abs(sign * trackEta + 0.91), params[index + 2])) +
989  params[index + 3] * trackEta + params[index + 4] * TMath::Gaus(trackEta, -0.04, params[index + 5])) /
990  params[12];
991 }
992 
1002 double AliAnalysisTaskEmcalJetHUtils::LHC15oTrackingEfficiency(const double trackPt, const double trackEta, const int centralityBin, const std::string & taskName)
1003 {
1004  // We use the switch to determine the parameters needed to call the functions.
1005  // Assumes that the centrality bins follow (as defined in AliAnalysisTaskEmcal)
1006  // 0 = 0-10%
1007  // 1 = 10-30%
1008  // 2 = 30-50%
1009  // 3 = 50-90%
1010  const double* ptParams = nullptr;
1011  const double* etaParams = nullptr;
1012  switch (centralityBin) {
1013  case 0:
1014  ptParams = LHC15oParam_0_10_pt;
1015  etaParams = LHC15oParam_0_10_eta;
1016  break;
1017  case 1:
1018  ptParams = LHC15oParam_10_30_pt;
1019  etaParams = LHC15oParam_10_30_eta;
1020  break;
1021  case 2:
1022  ptParams = LHC15oParam_30_50_pt;
1023  etaParams = LHC15oParam_30_50_eta;
1024  break;
1025  case 3:
1026  ptParams = LHC15oParam_50_90_pt;
1027  etaParams = LHC15oParam_50_90_eta;
1028  break;
1029  default:
1030  AliFatalGeneral(taskName.c_str(), "Invalid centrality for determine tracking efficiency.\n");
1031  }
1032 
1033  // Calculate the efficiency using the parameters.
1034  double ptAxis = LHC15oPtEfficiency(trackPt, ptParams);
1035  double etaAxis = LHC15oEtaEfficiency(trackEta, etaParams);
1036  double efficiency = ptAxis * etaAxis;
1037 
1038  return efficiency;
1039 }
1040 
1051 double AliAnalysisTaskEmcalJetHUtils::LHC11aTrackingEfficiency(const double trackPt, const double trackEta, const int centralityBin, const std::string & taskName)
1052 {
1053  // Pt axis
1054  // If the trackPt > 6 GeV, then all we need is this coefficient
1055  Double_t coefficient = 0.898052; // p6
1056  if (trackPt < 6) {
1057  coefficient = (1 + -0.442232 * trackPt // p0
1058  + 0.501831 * std::pow(trackPt, 2) // p1
1059  + -0.252024 * std::pow(trackPt, 3) // p2
1060  + 0.062964 * std::pow(trackPt, 4) // p3
1061  + -0.007681 * std::pow(trackPt, 5) // p4
1062  + 0.000365 * std::pow(trackPt, 6)); // p5
1063  }
1064 
1065  // Eta axis
1066  double efficiency = coefficient * (1 + 0.402825 * std::abs(trackEta) // p7
1067  + -2.213152 * std::pow(trackEta, 2) // p8
1068  + 4.311098 * std::abs(std::pow(trackEta, 3)) // p9
1069  + -2.778200 * std::pow(trackEta, 4)); // p10
1070 
1071  return efficiency;
1072 }
1073 
1086  const double trackPt, const double trackEta, const int centralityBin,
1087  const EEfficiencyPeriodIdentifier_t efficiencyPeriodIdentifier, const std::string& taskName)
1088 {
1089  // Efficiency is determined entirely based on the given efficiency period.
1090  double efficiency = 1;
1091  switch (efficiencyPeriodIdentifier) {
1093  efficiency = 1;
1094  break;
1096  efficiency = LHC11hTrackingEfficiency(trackPt, trackEta, centralityBin, taskName);
1097  break;
1099  efficiency = LHC15oTrackingEfficiency(trackPt, trackEta, centralityBin, taskName);
1100  break;
1102  efficiency = LHC11aTrackingEfficiency(trackPt, trackEta, centralityBin, taskName);
1103  break;
1107  // Intetionally fall through for LHC18, kpA
1108  AliFatalGeneral(taskName.c_str(),
1109  TString::Format("Tracking efficiency for period identifier %d is not yet implemented.",
1110  efficiencyPeriodIdentifier));
1111  break;
1112  default:
1113  // No efficiency period option selected. Notify the user.
1114  // ie. The efficiency correction is disabled.
1115  AliErrorGeneralStream(taskName.c_str())
1116  << "No single track efficiency setting selected! Please select one.\n";
1117  efficiency = 0.;
1118  }
1119 
1120  return efficiency;
1121 }
1122 
1126 void FlowVectorCorrections::AddVZERO(AliAnalysisTaskFlowVectorCorrections* task, AliQnCorrectionsManager* QnManager,
1127  AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
1128 {
1129  Bool_t VZEROchannels[4][64];
1130  for (Int_t iv0 = 0; iv0 < 4; iv0++)
1131  for (Int_t ich = 0; ich < 64; ich++)
1132  VZEROchannels[iv0][ich] = kFALSE;
1133 
1134  for (Int_t ich = 32; ich < 64; ich++)
1135  VZEROchannels[0][ich] = kTRUE; // channel list: kTRUE if channel should be used
1136  for (Int_t ich = 0; ich < 32; ich++)
1137  VZEROchannels[1][ich] = kTRUE;
1138  for (Int_t ich = 0; ich < 64; ich++)
1139  VZEROchannels[2][ich] = kTRUE;
1140 
1141  Int_t channelGroups[64];
1142  for (Int_t ich = 0; ich < 64; ich++)
1143  channelGroups[ich] = Int_t(ich / 8);
1144 
1145  //-----------------------------------------------------------
1146  // Our event classes for V0
1147  //
1148  const Int_t nVZEROdim = 2;
1149  AliQnCorrectionsEventClassVariablesSet* CorrEventClasses = new AliQnCorrectionsEventClassVariablesSet(nVZEROdim);
1150  Double_t VtxZbinning[][2] = { { -10.0, 4 }, { -7.0, 1 }, { 7.0, 8 }, { 10.0, 1 } };
1151  Double_t Ctbinning[][2] = { { 0.0, 2 }, { 100.0, 100 } };
1152  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
1153  AliQnCorrectionsVarManagerTask::kVtxZ, task->VarName(AliQnCorrectionsVarManagerTask::kVtxZ), VtxZbinning));
1154  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
1155  varForEventMultiplicity, Form("Centrality (%s)", task->VarName(varForEventMultiplicity)), Ctbinning));
1157 
1158  /* the VZERO detector */
1159  AliQnCorrectionsDetector* VZERO = new AliQnCorrectionsDetector("VZERO", AliQnCorrectionsVarManagerTask::kVZERO);
1160 
1161  /* the VZEROA detector configuration */
1162  AliQnCorrectionsDetectorConfigurationChannels* VZEROAconf =
1163  new AliQnCorrectionsDetectorConfigurationChannels("VZEROAQoverM", CorrEventClasses, 64, /* number of channels */
1164  4); /* number of harmonics: 1, 2, 3 and 4 */
1165  VZEROAconf->SetChannelsScheme(VZEROchannels[0], channelGroups);
1166  /* let's configure the Q vector calibration */
1167  VZEROAconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
1168  /* lets configure the equalization of input data */
1169  AliQnCorrectionsInputGainEqualization* eqA = new AliQnCorrectionsInputGainEqualization();
1170  eqA->SetEqualizationMethod(AliQnCorrectionsInputGainEqualization::GEQUAL_averageEqualization);
1171  eqA->SetShift(1.0);
1172  eqA->SetScale(0.1);
1173  eqA->SetUseChannelGroupsWeights(kTRUE);
1174  VZEROAconf->AddCorrectionOnInputData(eqA);
1175  /* let's add the Q vector recentering correction step */
1176  /* we don't configure it, so we create it anonymous */
1177  VZEROAconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1178  /* let's add the Q vector alignment correction step */
1179  AliQnCorrectionsQnVectorAlignment* alignA = new AliQnCorrectionsQnVectorAlignment();
1180  alignA->SetHarmonicNumberForAlignment(2);
1181  alignA->SetReferenceConfigurationForAlignment("TPCQoverM");
1182  VZEROAconf->AddCorrectionOnQnVector(alignA);
1183  /* lets configrure the QA histograms */
1184  VZEROAconf->SetQACentralityVar(varForEventMultiplicity);
1185  VZEROAconf->SetQAMultiplicityAxis(100, 0.0, 500.0);
1186  /* let's configure the twist and rescale correction step */
1187  AliQnCorrectionsQnVectorTwistAndRescale* twScaleA = new AliQnCorrectionsQnVectorTwistAndRescale();
1188  twScaleA->SetApplyTwist(kTRUE);
1189  twScaleA->SetApplyRescale(kTRUE);
1190  twScaleA->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_correlations);
1191  twScaleA->SetReferenceConfigurationsForTwistAndRescale("TPCQoverM", "VZEROCQoverM");
1192  /* now we add it to the detector configuration */
1193  VZEROAconf->AddCorrectionOnQnVector(twScaleA);
1194 
1195  /* add the configuration to the detector */
1196  VZERO->AddDetectorConfiguration(VZEROAconf);
1197 
1198  /* the VZEROC detector configuration */
1199  AliQnCorrectionsDetectorConfigurationChannels* VZEROCconf =
1200  new AliQnCorrectionsDetectorConfigurationChannels("VZEROCQoverM", CorrEventClasses, 64, /* number of channels */
1201  4); /* number of harmonics: 1, 2, 3 and 4 */
1202  VZEROCconf->SetChannelsScheme(VZEROchannels[1], channelGroups);
1203  /* let's configure the Q vector calibration */
1204  VZEROCconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
1205  /* lets configure the equalization of input data */
1206  AliQnCorrectionsInputGainEqualization* eqC = new AliQnCorrectionsInputGainEqualization();
1207  eqC->SetEqualizationMethod(AliQnCorrectionsInputGainEqualization::GEQUAL_averageEqualization);
1208  eqC->SetShift(1.0);
1209  eqC->SetScale(0.1);
1210  eqC->SetUseChannelGroupsWeights(kTRUE);
1211  VZEROCconf->AddCorrectionOnInputData(eqC);
1212  /* let's add the Q vector recentering correction step */
1213  /* we don't configure it, so we create it anonymous */
1214  VZEROCconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1215  /* let's add the Q vector alignment correction step */
1216  AliQnCorrectionsQnVectorAlignment* alignC = new AliQnCorrectionsQnVectorAlignment();
1217  alignC->SetHarmonicNumberForAlignment(2);
1218  alignC->SetReferenceConfigurationForAlignment("TPCQoverM");
1219  VZEROCconf->AddCorrectionOnQnVector(alignC);
1220  /* lets configrure the QA histograms */
1221  VZEROCconf->SetQACentralityVar(varForEventMultiplicity);
1222  VZEROCconf->SetQAMultiplicityAxis(100, 0.0, 500.0);
1223  /* let's configure the twist and rescale correction step */
1224  AliQnCorrectionsQnVectorTwistAndRescale* twScaleC = new AliQnCorrectionsQnVectorTwistAndRescale();
1225  twScaleC->SetApplyTwist(kTRUE);
1226  twScaleC->SetApplyRescale(kTRUE);
1227  twScaleC->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_correlations);
1228  twScaleC->SetReferenceConfigurationsForTwistAndRescale("TPCQoverM", "VZEROAQoverM");
1229  /* now we add it to the detector configuration */
1230  VZEROCconf->AddCorrectionOnQnVector(twScaleC);
1231 
1232  /* add the configuration to the detector */
1233  VZERO->AddDetectorConfiguration(VZEROCconf);
1234 
1235  /* the full VZERO detector configuration */
1236  AliQnCorrectionsDetectorConfigurationChannels* VZEROconf =
1237  new AliQnCorrectionsDetectorConfigurationChannels("VZEROQoverM", CorrEventClasses, 64, /* number of channels */
1238  4); /* number of harmonics: 1, 2, 3 and 4 */
1239  VZEROconf->SetChannelsScheme(VZEROchannels[2], channelGroups);
1240  /* let's configure the Q vector calibration */
1241  VZEROconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
1242  /* lets configure the equalization of input data */
1243  AliQnCorrectionsInputGainEqualization* eq = new AliQnCorrectionsInputGainEqualization();
1244  eq->SetEqualizationMethod(AliQnCorrectionsInputGainEqualization::GEQUAL_averageEqualization);
1245  eq->SetShift(1.0);
1246  eq->SetScale(0.1);
1247  eq->SetUseChannelGroupsWeights(kTRUE);
1248  VZEROconf->AddCorrectionOnInputData(eq);
1249  /* let's add the Q vector recentering correction step */
1250  /* we don't configure it, so we create it anonymous */
1251  VZEROconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1252  /* let's add the Q vector alignment correction step */
1253  AliQnCorrectionsQnVectorAlignment* align = new AliQnCorrectionsQnVectorAlignment();
1254  align->SetHarmonicNumberForAlignment(2);
1255  align->SetReferenceConfigurationForAlignment("TPCQoverM");
1256  VZEROconf->AddCorrectionOnQnVector(align);
1257  /* lets configrure the QA histograms */
1258  VZEROconf->SetQACentralityVar(varForEventMultiplicity);
1259  VZEROconf->SetQAMultiplicityAxis(100, 0.0, 500.0);
1260  /* let's configure the twist and rescale correction step */
1261  AliQnCorrectionsQnVectorTwistAndRescale* twScale = new AliQnCorrectionsQnVectorTwistAndRescale();
1262  twScale->SetApplyTwist(kTRUE);
1263  twScale->SetApplyRescale(kTRUE);
1264  twScale->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_correlations);
1265  twScale->SetReferenceConfigurationsForTwistAndRescale("TPCQoverM", "VZEROCQoverM");
1266  /* now we add it to the detector configuration */
1267  VZEROconf->AddCorrectionOnQnVector(twScale);
1268 
1269  /* add the configuration to the detector */
1270  VZERO->AddDetectorConfiguration(VZEROconf);
1271 
1272  /* the VZEROA detector configuration */
1273  AliQnCorrectionsDetectorConfigurationChannels* VZEROAconfQoverQlength =
1274  new AliQnCorrectionsDetectorConfigurationChannels("VZEROAQoverQlength", CorrEventClasses,
1275  64, /* number of channels */
1276  4); /* number of harmonics: 1, 2, 3 and 4 */
1277  VZEROAconfQoverQlength->SetChannelsScheme(VZEROchannels[0], channelGroups);
1278  /* let's configure the Q vector calibration */
1279  VZEROAconfQoverQlength->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverQlength);
1280  /* lets configure the equalization of input data */
1281  AliQnCorrectionsInputGainEqualization* eqAQoverQlength = new AliQnCorrectionsInputGainEqualization();
1282  eqAQoverQlength->SetEqualizationMethod(AliQnCorrectionsInputGainEqualization::GEQUAL_averageEqualization);
1283  eqAQoverQlength->SetShift(1.0);
1284  eqAQoverQlength->SetScale(0.1);
1285  eqAQoverQlength->SetUseChannelGroupsWeights(kTRUE);
1286  VZEROAconfQoverQlength->AddCorrectionOnInputData(eqAQoverQlength);
1287  /* let's add the Q vector recentering correction step */
1288  /* we don't configure it, so we create it anonymous */
1289  VZEROAconfQoverQlength->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1290  /* let's add the Q vector alignment correction step */
1291  AliQnCorrectionsQnVectorAlignment* alignAQoverQlength = new AliQnCorrectionsQnVectorAlignment();
1292  alignAQoverQlength->SetHarmonicNumberForAlignment(2);
1293  alignAQoverQlength->SetReferenceConfigurationForAlignment("TPCQoverQlength");
1294  VZEROAconfQoverQlength->AddCorrectionOnQnVector(alignAQoverQlength);
1295  /* lets configrure the QA histograms */
1296  VZEROAconfQoverQlength->SetQACentralityVar(varForEventMultiplicity);
1297  VZEROAconfQoverQlength->SetQAMultiplicityAxis(100, 0.0, 500.0);
1298  /* let's configure the twist and rescale correction step */
1299  AliQnCorrectionsQnVectorTwistAndRescale* twScaleAQoverQlength = new AliQnCorrectionsQnVectorTwistAndRescale();
1300  twScaleAQoverQlength->SetApplyTwist(kTRUE);
1301  twScaleAQoverQlength->SetApplyRescale(kTRUE);
1302  twScaleAQoverQlength->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_correlations);
1303  twScaleAQoverQlength->SetReferenceConfigurationsForTwistAndRescale("TPCQoverQlength", "VZEROCQoverQlength");
1304  /* now we add it to the detector configuration */
1305  VZEROAconfQoverQlength->AddCorrectionOnQnVector(twScaleAQoverQlength);
1306 
1307  /* add the configuration to the detector */
1308  VZERO->AddDetectorConfiguration(VZEROAconfQoverQlength);
1309 
1310  /* the VZEROC detector configuration */
1311  AliQnCorrectionsDetectorConfigurationChannels* VZEROCconfQoverQlength =
1312  new AliQnCorrectionsDetectorConfigurationChannels("VZEROCQoverQlength", CorrEventClasses,
1313  64, /* number of channels */
1314  4); /* number of harmonics: 1, 2, 3 and 4 */
1315  VZEROCconfQoverQlength->SetChannelsScheme(VZEROchannels[1], channelGroups);
1316  /* let's configure the Q vector calibration */
1317  VZEROCconfQoverQlength->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverQlength);
1318  /* lets configure the equalization of input data */
1319  eqAQoverQlength = new AliQnCorrectionsInputGainEqualization();
1320  eqAQoverQlength->SetEqualizationMethod(AliQnCorrectionsInputGainEqualization::GEQUAL_averageEqualization);
1321  eqAQoverQlength->SetShift(1.0);
1322  eqAQoverQlength->SetScale(0.1);
1323  eqAQoverQlength->SetUseChannelGroupsWeights(kTRUE);
1324  VZEROCconfQoverQlength->AddCorrectionOnInputData(eqAQoverQlength);
1325  /* let's add the Q vector recentering correction step */
1326  /* we don't configure it, so we create it anonymous */
1327  VZEROCconfQoverQlength->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1328  /* let's add the Q vector alignment correction step */
1329  alignAQoverQlength = new AliQnCorrectionsQnVectorAlignment();
1330  alignAQoverQlength->SetHarmonicNumberForAlignment(2);
1331  alignAQoverQlength->SetReferenceConfigurationForAlignment("TPCQoverQlength");
1332  VZEROCconfQoverQlength->AddCorrectionOnQnVector(alignAQoverQlength);
1333  /* lets configrure the QA histograms */
1334  VZEROCconfQoverQlength->SetQACentralityVar(varForEventMultiplicity);
1335  VZEROCconfQoverQlength->SetQAMultiplicityAxis(100, 0.0, 500.0);
1336  /* let's configure the twist and rescale correction step */
1337  twScaleAQoverQlength = new AliQnCorrectionsQnVectorTwistAndRescale();
1338  twScaleAQoverQlength->SetApplyTwist(kTRUE);
1339  twScaleAQoverQlength->SetApplyRescale(kTRUE);
1340  twScaleAQoverQlength->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_correlations);
1341  twScaleAQoverQlength->SetReferenceConfigurationsForTwistAndRescale("TPCQoverQlength", "VZEROAQoverQlength");
1342  /* now we add it to the detector configuration */
1343  VZEROCconfQoverQlength->AddCorrectionOnQnVector(twScaleAQoverQlength);
1344 
1345  /* add the configuration to the detector */
1346  VZERO->AddDetectorConfiguration(VZEROCconfQoverQlength);
1347 
1348  /* the full VZERO detector configuration */
1349  AliQnCorrectionsDetectorConfigurationChannels* VZEROconfQoverQlength =
1350  new AliQnCorrectionsDetectorConfigurationChannels("VZEROQoverQlength", CorrEventClasses,
1351  64, /* number of channels */
1352  4); /* number of harmonics: 1, 2, 3 and 4 */
1353  VZEROconfQoverQlength->SetChannelsScheme(VZEROchannels[2], channelGroups);
1354  /* let's configure the Q vector calibration */
1355  VZEROconfQoverQlength->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverQlength);
1356  /* lets configure the equalization of input data */
1357  AliQnCorrectionsInputGainEqualization* eqQoverQlength = new AliQnCorrectionsInputGainEqualization();
1358  eqQoverQlength->SetEqualizationMethod(AliQnCorrectionsInputGainEqualization::GEQUAL_averageEqualization);
1359  eqQoverQlength->SetShift(1.0);
1360  eqQoverQlength->SetScale(0.1);
1361  eqQoverQlength->SetUseChannelGroupsWeights(kTRUE);
1362  VZEROconfQoverQlength->AddCorrectionOnInputData(eqQoverQlength);
1363  /* let's add the Q vector recentering correction step */
1364  /* we don't configure it, so we create it anonymous */
1365  VZEROconfQoverQlength->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1366  /* let's add the Q vector alignment correction step */
1367  AliQnCorrectionsQnVectorAlignment* alignQoverQlength = new AliQnCorrectionsQnVectorAlignment();
1368  alignQoverQlength->SetHarmonicNumberForAlignment(2);
1369  alignQoverQlength->SetReferenceConfigurationForAlignment("TPCQoverQlength");
1370  VZEROconfQoverQlength->AddCorrectionOnQnVector(alignQoverQlength);
1371  /* lets configrure the QA histograms */
1372  VZEROconfQoverQlength->SetQACentralityVar(varForEventMultiplicity);
1373  VZEROconfQoverQlength->SetQAMultiplicityAxis(100, 0.0, 500.0);
1374  /* let's configure the twist and rescale correction step */
1375  AliQnCorrectionsQnVectorTwistAndRescale* twScaleQoverQlength = new AliQnCorrectionsQnVectorTwistAndRescale();
1376  twScaleQoverQlength->SetApplyTwist(kTRUE);
1377  twScaleQoverQlength->SetApplyRescale(kTRUE);
1378  twScaleQoverQlength->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_correlations);
1379  twScaleQoverQlength->SetReferenceConfigurationsForTwistAndRescale("TPCQoverQlength", "VZEROCQoverQlength");
1380  /* now we add it to the detector configuration */
1381  VZEROconfQoverQlength->AddCorrectionOnQnVector(twScaleQoverQlength);
1382 
1383  /* add the configuration to the detector */
1384  VZERO->AddDetectorConfiguration(VZEROconfQoverQlength);
1385 
1386  /* the VZEROA detector configuration */
1387  AliQnCorrectionsDetectorConfigurationChannels* VZEROAconfQoverSqrtM =
1388  new AliQnCorrectionsDetectorConfigurationChannels("VZEROAQoverSqrtM", CorrEventClasses,
1389  64, /* number of channels */
1390  4); /* number of harmonics: 1, 2, 3 and 4 */
1391  VZEROAconfQoverSqrtM->SetChannelsScheme(VZEROchannels[0], channelGroups);
1392  /* let's configure the Q vector calibration */
1393  VZEROAconfQoverSqrtM->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverSqrtM);
1394  /* lets configure the equalization of input data */
1395  AliQnCorrectionsInputGainEqualization* eqAQoverSqrtM = new AliQnCorrectionsInputGainEqualization();
1396  eqAQoverSqrtM->SetEqualizationMethod(AliQnCorrectionsInputGainEqualization::GEQUAL_averageEqualization);
1397  eqAQoverSqrtM->SetShift(1.0);
1398  eqAQoverSqrtM->SetScale(0.1);
1399  eqAQoverSqrtM->SetUseChannelGroupsWeights(kTRUE);
1400  VZEROAconfQoverSqrtM->AddCorrectionOnInputData(eqAQoverSqrtM);
1401  /* let's add the Q vector recentering correction step */
1402  /* we don't configure it, so we create it anonymous */
1403  VZEROAconfQoverSqrtM->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1404  /* let's add the Q vector alignment correction step */
1405  AliQnCorrectionsQnVectorAlignment* alignAQoverSqrtM = new AliQnCorrectionsQnVectorAlignment();
1406  alignAQoverSqrtM->SetHarmonicNumberForAlignment(2);
1407  alignAQoverSqrtM->SetReferenceConfigurationForAlignment("TPCQoverSqrtM");
1408  VZEROAconfQoverSqrtM->AddCorrectionOnQnVector(alignAQoverSqrtM);
1409  /* lets configrure the QA histograms */
1410  VZEROAconfQoverSqrtM->SetQACentralityVar(varForEventMultiplicity);
1411  VZEROAconfQoverSqrtM->SetQAMultiplicityAxis(100, 0.0, 500.0);
1412  /* let's configure the twist and rescale correction step */
1413  AliQnCorrectionsQnVectorTwistAndRescale* twScaleAQoverSqrtM = new AliQnCorrectionsQnVectorTwistAndRescale();
1414  twScaleAQoverSqrtM->SetApplyTwist(kTRUE);
1415  twScaleAQoverSqrtM->SetApplyRescale(kTRUE);
1416  twScaleAQoverSqrtM->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_correlations);
1417  twScaleAQoverSqrtM->SetReferenceConfigurationsForTwistAndRescale("TPCQoverSqrtM", "VZEROCQoverSqrtM");
1418  /* now we add it to the detector configuration */
1419  VZEROAconfQoverSqrtM->AddCorrectionOnQnVector(twScaleAQoverSqrtM);
1420 
1421  /* add the configuration to the detector */
1422  VZERO->AddDetectorConfiguration(VZEROAconfQoverSqrtM);
1423 
1424  /* the VZEROC detector configuration */
1425  AliQnCorrectionsDetectorConfigurationChannels* VZEROCconfQoverSqrtM =
1426  new AliQnCorrectionsDetectorConfigurationChannels("VZEROCQoverSqrtM", CorrEventClasses,
1427  64, /* number of channels */
1428  4); /* number of harmonics: 1, 2, 3 and 4 */
1429  VZEROCconfQoverSqrtM->SetChannelsScheme(VZEROchannels[1], channelGroups);
1430  /* let's configure the Q vector calibration */
1431  VZEROCconfQoverSqrtM->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverSqrtM);
1432  /* lets configure the equalization of input data */
1433  eqAQoverSqrtM = new AliQnCorrectionsInputGainEqualization();
1434  eqAQoverSqrtM->SetEqualizationMethod(AliQnCorrectionsInputGainEqualization::GEQUAL_averageEqualization);
1435  eqAQoverSqrtM->SetShift(1.0);
1436  eqAQoverSqrtM->SetScale(0.1);
1437  eqAQoverSqrtM->SetUseChannelGroupsWeights(kTRUE);
1438  VZEROCconfQoverSqrtM->AddCorrectionOnInputData(eqAQoverSqrtM);
1439  /* let's add the Q vector recentering correction step */
1440  /* we don't configure it, so we create it anonymous */
1441  VZEROCconfQoverSqrtM->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1442  /* let's add the Q vector alignment correction step */
1443  alignAQoverSqrtM = new AliQnCorrectionsQnVectorAlignment();
1444  alignAQoverSqrtM->SetHarmonicNumberForAlignment(2);
1445  alignAQoverSqrtM->SetReferenceConfigurationForAlignment("TPCQoverSqrtM");
1446  VZEROCconfQoverSqrtM->AddCorrectionOnQnVector(alignAQoverSqrtM);
1447  /* lets configrure the QA histograms */
1448  VZEROCconfQoverSqrtM->SetQACentralityVar(varForEventMultiplicity);
1449  VZEROCconfQoverSqrtM->SetQAMultiplicityAxis(100, 0.0, 500.0);
1450  /* let's configure the twist and rescale correction step */
1451  twScaleAQoverSqrtM = new AliQnCorrectionsQnVectorTwistAndRescale();
1452  twScaleAQoverSqrtM->SetApplyTwist(kTRUE);
1453  twScaleAQoverSqrtM->SetApplyRescale(kTRUE);
1454  twScaleAQoverSqrtM->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_correlations);
1455  twScaleAQoverSqrtM->SetReferenceConfigurationsForTwistAndRescale("TPCQoverSqrtM", "VZEROAQoverSqrtM");
1456  /* now we add it to the detector configuration */
1457  VZEROCconfQoverSqrtM->AddCorrectionOnQnVector(twScaleAQoverSqrtM);
1458 
1459  /* add the configuration to the detector */
1460  VZERO->AddDetectorConfiguration(VZEROCconfQoverSqrtM);
1461 
1462  /* the full VZERO detector configuration */
1463  AliQnCorrectionsDetectorConfigurationChannels* VZEROconfQoverSqrtM =
1464  new AliQnCorrectionsDetectorConfigurationChannels("VZEROQoverSqrtM", CorrEventClasses,
1465  64, /* number of channels */
1466  4); /* number of harmonics: 1, 2, 3 and 4 */
1467  VZEROconfQoverSqrtM->SetChannelsScheme(VZEROchannels[2], channelGroups);
1468  /* let's configure the Q vector calibration */
1469  VZEROconfQoverSqrtM->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverSqrtM);
1470  /* lets configure the equalization of input data */
1471  AliQnCorrectionsInputGainEqualization* eqQoverSqrtM = new AliQnCorrectionsInputGainEqualization();
1472  eqQoverSqrtM->SetEqualizationMethod(AliQnCorrectionsInputGainEqualization::GEQUAL_averageEqualization);
1473  eqQoverSqrtM->SetShift(1.0);
1474  eqQoverSqrtM->SetScale(0.1);
1475  eqQoverSqrtM->SetUseChannelGroupsWeights(kTRUE);
1476  VZEROconfQoverSqrtM->AddCorrectionOnInputData(eqQoverSqrtM);
1477  /* let's add the Q vector recentering correction step */
1478  /* we don't configure it, so we create it anonymous */
1479  VZEROconfQoverSqrtM->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1480  /* let's add the Q vector alignment correction step */
1481  AliQnCorrectionsQnVectorAlignment* alignQoverQoverSqrtM = new AliQnCorrectionsQnVectorAlignment();
1482  alignQoverQoverSqrtM->SetHarmonicNumberForAlignment(2);
1483  alignQoverQoverSqrtM->SetReferenceConfigurationForAlignment("TPCQoverSqrtM");
1484  VZEROconfQoverSqrtM->AddCorrectionOnQnVector(alignQoverQoverSqrtM);
1485  /* lets configrure the QA histograms */
1486  VZEROconfQoverSqrtM->SetQACentralityVar(varForEventMultiplicity);
1487  VZEROconfQoverSqrtM->SetQAMultiplicityAxis(100, 0.0, 500.0);
1488  /* let's configure the twist and rescale correction step */
1489  AliQnCorrectionsQnVectorTwistAndRescale* twScaleQoverSqrtM = new AliQnCorrectionsQnVectorTwistAndRescale();
1490  twScaleQoverSqrtM->SetApplyTwist(kTRUE);
1491  twScaleQoverSqrtM->SetApplyRescale(kTRUE);
1492  twScaleQoverSqrtM->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_correlations);
1493  twScaleQoverSqrtM->SetReferenceConfigurationsForTwistAndRescale("TPCQoverSqrtM", "VZEROCQoverM");
1494  /* now we add it to the detector configuration */
1495  VZEROconfQoverSqrtM->AddCorrectionOnQnVector(twScaleQoverSqrtM);
1496 
1497  /* add the configuration to the detector */
1498  VZERO->AddDetectorConfiguration(VZEROconfQoverSqrtM);
1499 
1500  /* finally add the detector to the framework manager */
1501  QnManager->AddDetector(VZERO);
1502 }
1503 
1507 void FlowVectorCorrections::AddTPC(AliAnalysisTaskFlowVectorCorrections* task, AliQnCorrectionsManager* QnManager,
1508  AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
1509 {
1511 
1512  //-----------------------------------------------------------
1513  // Our event classes for TPC
1514  //
1515  const Int_t nTPCdim = 2;
1516  AliQnCorrectionsEventClassVariablesSet* CorrEventClasses = new AliQnCorrectionsEventClassVariablesSet(nTPCdim);
1517  Double_t VtxZbinning[][2] = { { -10.0, 4 }, { -7.0, 1 }, { 7.0, 8 }, { 10.0, 1 } };
1518  Double_t Ctbinning[][2] = { { 0.0, 2 }, { 100.0, 100 } };
1519  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
1520  AliQnCorrectionsVarManagerTask::kVtxZ, task->VarName(AliQnCorrectionsVarManagerTask::kVtxZ), VtxZbinning));
1521  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
1522  varForEventMultiplicity, Form("Centrality (%s)", task->VarName(varForEventMultiplicity)), Ctbinning));
1524 
1525  /* the TPC detector */
1526  AliQnCorrectionsDetector* TPC = new AliQnCorrectionsDetector("TPC", AliQnCorrectionsVarManagerTask::kTPC);
1527 
1528  /* the TPC detector configuration */
1529  AliQnCorrectionsDetectorConfigurationTracks* TPCconf = new AliQnCorrectionsDetectorConfigurationTracks(
1530  "TPCQoverM", CorrEventClasses, 4); /* number of harmonics: 1, 2, 3 and 4 */
1531  /* let's configure the Q vector calibration */
1532  TPCconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
1533  /* let's add the Q vector recentering correction step */
1534  /* we don't configure it, so we create it anonymous */
1535  TPCconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1536  /* let's add the Q vector twist correction step */
1537  AliQnCorrectionsQnVectorTwistAndRescale* twScale = new AliQnCorrectionsQnVectorTwistAndRescale();
1538  twScale->SetApplyTwist(kTRUE);
1539  twScale->SetApplyRescale(kFALSE);
1540  twScale->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_doubleHarmonic);
1541  TPCconf->AddCorrectionOnQnVector(twScale);
1542 
1543  /* define the cuts to apply */
1544  AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager();
1545  Bool_t isESD = mgr->GetInputEventHandler()->IsA() == AliESDInputHandler::Class();
1546  AliQnCorrectionsCutsSet* cutsTPC = new AliQnCorrectionsCutsSet();
1547  if (!isESD) {
1548  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kFilterBitMask768, 0.5, 1.5));
1549  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.8));
1550  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1551  } else {
1552  Bool_t UseTPConlyTracks = kFALSE; // Use of TPC standalone tracks or Global tracks (only for ESD analysis)
1553  task->SetUseTPCStandaloneTracks(UseTPConlyTracks);
1554  if (UseTPConlyTracks) {
1555  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -3.0, 3.0));
1556  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -3.0, 3.0));
1557  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.8));
1558  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1559  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCnclsIter1, 70.0, 161.0));
1560  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2Iter1, 0.2, 4.0));
1561  } else {
1562  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -0.3, 0.3));
1563  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -0.3, 0.3));
1564  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.8));
1565  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1566  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCncls, 70.0, 161.0));
1567  cutsTPC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2, 0.2, 4.0));
1568  }
1569  }
1570  TPCconf->SetCuts(cutsTPC);
1571 
1572  /* add the configuration to the detector */
1573  TPC->AddDetectorConfiguration(TPCconf);
1574 
1575  /* the TPC -- negative eta -- detector configuration */
1576  AliQnCorrectionsDetectorConfigurationTracks* TPCNegEtaconf = new AliQnCorrectionsDetectorConfigurationTracks(
1577  "TPCNegEtaQoverM", CorrEventClasses, 4); /* number of harmonics: 1, 2, 3 and 4 */
1578  /* let's configure the Q vector calibration */
1579  TPCNegEtaconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
1580  /* let's add the Q vector recentering correction step */
1581  /* we don't configure it, so we create it anonymous */
1582  TPCNegEtaconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1583  /* let's add the Q vector twist correction step */
1584  AliQnCorrectionsQnVectorTwistAndRescale* twScaleNegEta = new AliQnCorrectionsQnVectorTwistAndRescale();
1585  twScaleNegEta->SetApplyTwist(kTRUE);
1586  twScaleNegEta->SetApplyRescale(kFALSE);
1587  twScaleNegEta->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_doubleHarmonic);
1588  TPCNegEtaconf->AddCorrectionOnQnVector(twScaleNegEta);
1589 
1590  /* define the cuts to apply */
1591  isESD = mgr->GetInputEventHandler()->IsA() == AliESDInputHandler::Class();
1592  AliQnCorrectionsCutsSet* cutsTPCNegEta = new AliQnCorrectionsCutsSet();
1593  if (!isESD) {
1594  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kFilterBitMask768, 0.5, 1.5));
1595  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.));
1596  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1597  } else {
1598  Bool_t UseTPConlyTracks = kFALSE; // Use of TPC standalone tracks or Global tracks (only for ESD analysis)
1599  task->SetUseTPCStandaloneTracks(UseTPConlyTracks);
1600  if (UseTPConlyTracks) {
1601  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -3.0, 3.0));
1602  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -3.0, 3.0));
1603  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.));
1604  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1605  cutsTPCNegEta->Add(
1606  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCnclsIter1, 70.0, 161.0));
1607  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2Iter1, 0.2, 4.0));
1608  } else {
1609  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -0.3, 0.3));
1610  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -0.3, 0.3));
1611  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.));
1612  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1613  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCncls, 70.0, 161.0));
1614  cutsTPCNegEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2, 0.2, 4.0));
1615  }
1616  }
1617  TPCNegEtaconf->SetCuts(cutsTPCNegEta);
1618 
1619  /* add the configuration to the detector */
1620  TPC->AddDetectorConfiguration(TPCNegEtaconf);
1621 
1622  /* the TPC -- negative eta -- detector configuration */
1623  AliQnCorrectionsDetectorConfigurationTracks* TPCPosEtaconf = new AliQnCorrectionsDetectorConfigurationTracks(
1624  "TPCPosEtaQoverM", CorrEventClasses, 4); /* number of harmonics: 1, 2, 3 and 4 */
1625  /* let's configure the Q vector calibration */
1626  TPCPosEtaconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
1627  /* let's add the Q vector recentering correction step */
1628  /* we don't configure it, so we create it anonymous */
1629  TPCPosEtaconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1630  /* let's add the Q vector twist correction step */
1631  AliQnCorrectionsQnVectorTwistAndRescale* twScalePosEta = new AliQnCorrectionsQnVectorTwistAndRescale();
1632  twScalePosEta->SetApplyTwist(kTRUE);
1633  twScalePosEta->SetApplyRescale(kFALSE);
1634  twScalePosEta->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_doubleHarmonic);
1635  TPCPosEtaconf->AddCorrectionOnQnVector(twScalePosEta);
1636 
1637  /* define the cuts to apply */
1638  isESD = mgr->GetInputEventHandler()->IsA() == AliESDInputHandler::Class();
1639  AliQnCorrectionsCutsSet* cutsTPCPosEta = new AliQnCorrectionsCutsSet();
1640  if (!isESD) {
1641  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kFilterBitMask768, 0.5, 1.5));
1642  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, 0., 0.8));
1643  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1644  } else {
1645  Bool_t UseTPConlyTracks = kFALSE; // Use of TPC standalone tracks or Global tracks (only for ESD analysis)
1646  task->SetUseTPCStandaloneTracks(UseTPConlyTracks);
1647  if (UseTPConlyTracks) {
1648  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -3.0, 3.0));
1649  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -3.0, 3.0));
1650  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, 0., 0.8));
1651  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1652  cutsTPCPosEta->Add(
1653  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCnclsIter1, 70.0, 161.0));
1654  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2Iter1, 0.2, 4.0));
1655  } else {
1656  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -0.3, 0.3));
1657  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -0.3, 0.3));
1658  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, 0., 0.8));
1659  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1660  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCncls, 70.0, 161.0));
1661  cutsTPCPosEta->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2, 0.2, 4.0));
1662  }
1663  }
1664  TPCPosEtaconf->SetCuts(cutsTPCPosEta);
1665 
1666  /* add the configuration to the detector */
1667  TPC->AddDetectorConfiguration(TPCPosEtaconf);
1668 
1669  /* the TPC detector configuration */
1670  AliQnCorrectionsDetectorConfigurationTracks* TPCconfQoverQlength = new AliQnCorrectionsDetectorConfigurationTracks(
1671  "TPCQoverQlength", CorrEventClasses, 4); /* number of harmonics: 1, 2, 3 and 4 */
1672  /* let's configure the Q vector calibration */
1673  TPCconfQoverQlength->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverQlength);
1674  /* let's add the Q vector recentering correction step */
1675  /* we don't configure it, so we create it anonymous */
1676  TPCconfQoverQlength->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1677  /* let's add the Q vector twist correction step */
1678  AliQnCorrectionsQnVectorTwistAndRescale* twScaleQoverQlength = new AliQnCorrectionsQnVectorTwistAndRescale();
1679  twScaleQoverQlength->SetApplyTwist(kTRUE);
1680  twScaleQoverQlength->SetApplyRescale(kFALSE);
1681  twScaleQoverQlength->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_doubleHarmonic);
1682  TPCconfQoverQlength->AddCorrectionOnQnVector(twScaleQoverQlength);
1683 
1684  /* define the cuts to apply */
1685  isESD = mgr->GetInputEventHandler()->IsA() == AliESDInputHandler::Class();
1686  AliQnCorrectionsCutsSet* cutsTPCQoverQlength = new AliQnCorrectionsCutsSet();
1687  if (!isESD) {
1688  cutsTPCQoverQlength->Add(
1689  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kFilterBitMask768, 0.5, 1.5));
1690  cutsTPCQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.8));
1691  cutsTPCQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1692  } else {
1693  Bool_t UseTPConlyTracks = kFALSE; // Use of TPC standalone tracks or Global tracks (only for ESD analysis)
1694  task->SetUseTPCStandaloneTracks(UseTPConlyTracks);
1695  if (UseTPConlyTracks) {
1696  cutsTPCQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -3.0, 3.0));
1697  cutsTPCQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -3.0, 3.0));
1698  cutsTPCQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.8));
1699  cutsTPCQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1700  cutsTPCQoverQlength->Add(
1701  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCnclsIter1, 70.0, 161.0));
1702  cutsTPCQoverQlength->Add(
1703  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2Iter1, 0.2, 4.0));
1704  } else {
1705  cutsTPCQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -0.3, 0.3));
1706  cutsTPCQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -0.3, 0.3));
1707  cutsTPCQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.8));
1708  cutsTPCQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1709  cutsTPCQoverQlength->Add(
1710  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCncls, 70.0, 161.0));
1711  cutsTPCQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2, 0.2, 4.0));
1712  }
1713  }
1714  TPCconfQoverQlength->SetCuts(cutsTPCQoverQlength);
1715 
1716  /* add the configuration to the detector */
1717  TPC->AddDetectorConfiguration(TPCconfQoverQlength);
1718 
1719  /* the TPC eta < 0 detector configuration */
1720  AliQnCorrectionsDetectorConfigurationTracks* TPCNegEtaconfQoverQlength =
1721  new AliQnCorrectionsDetectorConfigurationTracks("TPCNegEtaQoverQlength", CorrEventClasses,
1722  4); /* number of harmonics: 1, 2, 3 and 4 */
1723  /* let's configure the Q vector calibration */
1724  TPCNegEtaconfQoverQlength->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverQlength);
1725  /* let's add the Q vector recentering correction step */
1726  /* we don't configure it, so we create it anonymous */
1727  TPCNegEtaconfQoverQlength->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1728  /* let's add the Q vector twist correction step */
1729  AliQnCorrectionsQnVectorTwistAndRescale* twScaleNegEtaQoverQlength = new AliQnCorrectionsQnVectorTwistAndRescale();
1730  twScaleNegEtaQoverQlength->SetApplyTwist(kTRUE);
1731  twScaleNegEtaQoverQlength->SetApplyRescale(kFALSE);
1732  twScaleNegEtaQoverQlength->SetTwistAndRescaleMethod(
1733  AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_doubleHarmonic);
1734  TPCNegEtaconfQoverQlength->AddCorrectionOnQnVector(twScaleNegEtaQoverQlength);
1735 
1736  /* define the cuts to apply */
1737  isESD = mgr->GetInputEventHandler()->IsA() == AliESDInputHandler::Class();
1738  AliQnCorrectionsCutsSet* cutsTPCNegEtaQoverQlength = new AliQnCorrectionsCutsSet();
1739  if (!isESD) {
1740  cutsTPCNegEtaQoverQlength->Add(
1741  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kFilterBitMask768, 0.5, 1.5));
1742  cutsTPCNegEtaQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.));
1743  cutsTPCNegEtaQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1744  } else {
1745  Bool_t UseTPConlyTracks = kFALSE; // Use of TPC standalone tracks or Global tracks (only for ESD analysis)
1746  task->SetUseTPCStandaloneTracks(UseTPConlyTracks);
1747  if (UseTPConlyTracks) {
1748  cutsTPCNegEtaQoverQlength->Add(
1749  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -3.0, 3.0));
1750  cutsTPCNegEtaQoverQlength->Add(
1751  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -3.0, 3.0));
1752  cutsTPCNegEtaQoverQlength->Add(
1753  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.));
1754  cutsTPCNegEtaQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1755  cutsTPCNegEtaQoverQlength->Add(
1756  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCnclsIter1, 70.0, 161.0));
1757  cutsTPCNegEtaQoverQlength->Add(
1758  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2Iter1, 0.2, 4.0));
1759  } else {
1760  cutsTPCNegEtaQoverQlength->Add(
1761  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -0.3, 0.3));
1762  cutsTPCNegEtaQoverQlength->Add(
1763  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -0.3, 0.3));
1764  cutsTPCNegEtaQoverQlength->Add(
1765  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.));
1766  cutsTPCNegEtaQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1767  cutsTPCNegEtaQoverQlength->Add(
1768  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCncls, 70.0, 161.0));
1769  cutsTPCNegEtaQoverQlength->Add(
1770  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2, 0.2, 4.0));
1771  }
1772  }
1773  TPCNegEtaconfQoverQlength->SetCuts(cutsTPCNegEtaQoverQlength);
1774  TPC->AddDetectorConfiguration(TPCNegEtaconfQoverQlength);
1775 
1776  /* the TPC eta > 0 detector configuration */
1777  AliQnCorrectionsDetectorConfigurationTracks* TPCPosEtaconfQoverQlength =
1778  new AliQnCorrectionsDetectorConfigurationTracks("TPCPosEtaQoverQlength", CorrEventClasses,
1779  4); /* number of harmonics: 1, 2, 3 and 4 */
1780  /* let's configure the Q vector calibration */
1781  TPCPosEtaconfQoverQlength->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverQlength);
1782  /* let's add the Q vector recentering correction step */
1783  /* we don't configure it, so we create it anonymous */
1784  TPCPosEtaconfQoverQlength->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1785  /* let's add the Q vector twist correction step */
1786  AliQnCorrectionsQnVectorTwistAndRescale* twScalePosEtaQoverQlength = new AliQnCorrectionsQnVectorTwistAndRescale();
1787  twScalePosEtaQoverQlength->SetApplyTwist(kTRUE);
1788  twScalePosEtaQoverQlength->SetApplyRescale(kFALSE);
1789  twScalePosEtaQoverQlength->SetTwistAndRescaleMethod(
1790  AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_doubleHarmonic);
1791  TPCPosEtaconfQoverQlength->AddCorrectionOnQnVector(twScalePosEtaQoverQlength);
1792 
1793  /* define the cuts to apply */
1794  isESD = mgr->GetInputEventHandler()->IsA() == AliESDInputHandler::Class();
1795  AliQnCorrectionsCutsSet* cutsTPCPosEtaQoverQlength = new AliQnCorrectionsCutsSet();
1796  if (!isESD) {
1797  cutsTPCPosEtaQoverQlength->Add(
1798  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kFilterBitMask768, 0.5, 1.5));
1799  cutsTPCPosEtaQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, 0., 0.8));
1800  cutsTPCPosEtaQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1801  } else {
1802  Bool_t UseTPConlyTracks = kFALSE; // Use of TPC standalone tracks or Global tracks (only for ESD analysis)
1803  task->SetUseTPCStandaloneTracks(UseTPConlyTracks);
1804  if (UseTPConlyTracks) {
1805  cutsTPCPosEtaQoverQlength->Add(
1806  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -3.0, 3.0));
1807  cutsTPCPosEtaQoverQlength->Add(
1808  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -3.0, 3.0));
1809  cutsTPCPosEtaQoverQlength->Add(
1810  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, 0., 0.8));
1811  cutsTPCPosEtaQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1812  cutsTPCPosEtaQoverQlength->Add(
1813  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCnclsIter1, 70.0, 161.0));
1814  cutsTPCPosEtaQoverQlength->Add(
1815  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2Iter1, 0.2, 4.0));
1816  } else {
1817  cutsTPCPosEtaQoverQlength->Add(
1818  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -0.3, 0.3));
1819  cutsTPCPosEtaQoverQlength->Add(
1820  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -0.3, 0.3));
1821  cutsTPCPosEtaQoverQlength->Add(
1822  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, 0., 0.8));
1823  cutsTPCPosEtaQoverQlength->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1824  cutsTPCPosEtaQoverQlength->Add(
1825  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCncls, 70.0, 161.0));
1826  cutsTPCPosEtaQoverQlength->Add(
1827  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2, 0.2, 4.0));
1828  }
1829  }
1830  TPCPosEtaconfQoverQlength->SetCuts(cutsTPCPosEtaQoverQlength);
1831 
1832  /* add the configuration to the detector */
1833  TPC->AddDetectorConfiguration(TPCPosEtaconfQoverQlength);
1834 
1835  /* the TPC detector configuration */
1836  AliQnCorrectionsDetectorConfigurationTracks* TPCconfQoverSqrtM = new AliQnCorrectionsDetectorConfigurationTracks(
1837  "TPCQoverSqrtM", CorrEventClasses, 4); /* number of harmonics: 1, 2, 3 and 4 */
1838  /* let's configure the Q vector calibration */
1839  TPCconfQoverSqrtM->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverSqrtM);
1840  /* let's add the Q vector recentering correction step */
1841  /* we don't configure it, so we create it anonymous */
1842  TPCconfQoverSqrtM->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1843  /* let's add the Q vector twist correction step */
1844  AliQnCorrectionsQnVectorTwistAndRescale* twScaleQoverSqrtM = new AliQnCorrectionsQnVectorTwistAndRescale();
1845  twScaleQoverSqrtM->SetApplyTwist(kTRUE);
1846  twScaleQoverSqrtM->SetApplyRescale(kFALSE);
1847  twScaleQoverSqrtM->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_doubleHarmonic);
1848  TPCconfQoverSqrtM->AddCorrectionOnQnVector(twScaleQoverSqrtM);
1849 
1850  /* define the cuts to apply */
1851  isESD = mgr->GetInputEventHandler()->IsA() == AliESDInputHandler::Class();
1852  AliQnCorrectionsCutsSet* cutsTPCQoverSqrtM = new AliQnCorrectionsCutsSet();
1853  if (!isESD) {
1854  cutsTPCQoverSqrtM->Add(
1855  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kFilterBitMask768, 0.5, 1.5));
1856  cutsTPCQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.8));
1857  cutsTPCQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1858  } else {
1859  Bool_t UseTPConlyTracks = kFALSE; // Use of TPC standalone tracks or Global tracks (only for ESD analysis)
1860  task->SetUseTPCStandaloneTracks(UseTPConlyTracks);
1861  if (UseTPConlyTracks) {
1862  cutsTPCQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -3.0, 3.0));
1863  cutsTPCQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -3.0, 3.0));
1864  cutsTPCQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.8));
1865  cutsTPCQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1866  cutsTPCQoverSqrtM->Add(
1867  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCnclsIter1, 70.0, 161.0));
1868  cutsTPCQoverSqrtM->Add(
1869  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2Iter1, 0.2, 4.0));
1870  } else {
1871  cutsTPCQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -0.3, 0.3));
1872  cutsTPCQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -0.3, 0.3));
1873  cutsTPCQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.8));
1874  cutsTPCQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1875  cutsTPCQoverSqrtM->Add(
1876  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCncls, 70.0, 161.0));
1877  cutsTPCQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2, 0.2, 4.0));
1878  }
1879  }
1880  TPCconfQoverSqrtM->SetCuts(cutsTPCQoverSqrtM);
1881 
1882  /* add the configuration to the detector */
1883  TPC->AddDetectorConfiguration(TPCconfQoverSqrtM);
1884 
1885  /* the TPC detector configuration */
1886  AliQnCorrectionsDetectorConfigurationTracks* TPCNegEtaconfQoverSqrtM =
1887  new AliQnCorrectionsDetectorConfigurationTracks("TPCNegEtaQoverSqrtM", CorrEventClasses,
1888  4); /* number of harmonics: 1, 2, 3 and 4 */
1889  /* let's configure the Q vector calibration */
1890  TPCNegEtaconfQoverSqrtM->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverSqrtM);
1891  /* let's add the Q vector recentering correction step */
1892  /* we don't configure it, so we create it anonymous */
1893  TPCNegEtaconfQoverSqrtM->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1894  /* let's add the Q vector twist correction step */
1895  AliQnCorrectionsQnVectorTwistAndRescale* twScaleNegEtaQoverSqrtM = new AliQnCorrectionsQnVectorTwistAndRescale();
1896  twScaleNegEtaQoverSqrtM->SetApplyTwist(kTRUE);
1897  twScaleNegEtaQoverSqrtM->SetApplyRescale(kFALSE);
1898  twScaleNegEtaQoverSqrtM->SetTwistAndRescaleMethod(
1899  AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_doubleHarmonic);
1900  TPCNegEtaconfQoverSqrtM->AddCorrectionOnQnVector(twScaleNegEtaQoverSqrtM);
1901 
1902  /* define the cuts to apply */
1903  isESD = mgr->GetInputEventHandler()->IsA() == AliESDInputHandler::Class();
1904  AliQnCorrectionsCutsSet* cutsTPCNegEtaQoverSqrtM = new AliQnCorrectionsCutsSet();
1905  if (!isESD) {
1906  cutsTPCNegEtaQoverSqrtM->Add(
1907  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kFilterBitMask768, 0.5, 1.5));
1908  cutsTPCNegEtaQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.));
1909  cutsTPCNegEtaQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1910  } else {
1911  Bool_t UseTPConlyTracks = kFALSE; // Use of TPC standalone tracks or Global tracks (only for ESD analysis)
1912  task->SetUseTPCStandaloneTracks(UseTPConlyTracks);
1913  if (UseTPConlyTracks) {
1914  cutsTPCNegEtaQoverSqrtM->Add(
1915  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -3.0, 3.0));
1916  cutsTPCNegEtaQoverSqrtM->Add(
1917  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -3.0, 3.0));
1918  cutsTPCNegEtaQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.));
1919  cutsTPCNegEtaQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1920  cutsTPCNegEtaQoverSqrtM->Add(
1921  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCnclsIter1, 70.0, 161.0));
1922  cutsTPCNegEtaQoverSqrtM->Add(
1923  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2Iter1, 0.2, 4.0));
1924  } else {
1925  cutsTPCNegEtaQoverSqrtM->Add(
1926  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -0.3, 0.3));
1927  cutsTPCNegEtaQoverSqrtM->Add(
1928  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -0.3, 0.3));
1929  cutsTPCNegEtaQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, -0.8, 0.));
1930  cutsTPCNegEtaQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1931  cutsTPCNegEtaQoverSqrtM->Add(
1932  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCncls, 70.0, 161.0));
1933  cutsTPCNegEtaQoverSqrtM->Add(
1934  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2, 0.2, 4.0));
1935  }
1936  }
1937  TPCNegEtaconfQoverSqrtM->SetCuts(cutsTPCNegEtaQoverSqrtM);
1938 
1939  /* add the configuration to the detector */
1940  TPC->AddDetectorConfiguration(TPCNegEtaconfQoverSqrtM);
1941 
1942  /* the TPC detector configuration */
1943  AliQnCorrectionsDetectorConfigurationTracks* TPCPosEtaconfQoverSqrtM =
1944  new AliQnCorrectionsDetectorConfigurationTracks("TPCPosEtaQoverSqrtM", CorrEventClasses,
1945  4); /* number of harmonics: 1, 2, 3 and 4 */
1946  /* let's configure the Q vector calibration */
1947  TPCPosEtaconfQoverSqrtM->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverSqrtM);
1948  /* let's add the Q vector recentering correction step */
1949  /* we don't configure it, so we create it anonymous */
1950  TPCPosEtaconfQoverSqrtM->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
1951  /* let's add the Q vector twist correction step */
1952  AliQnCorrectionsQnVectorTwistAndRescale* twScalePosEtaQoverSqrtM = new AliQnCorrectionsQnVectorTwistAndRescale();
1953  twScalePosEtaQoverSqrtM->SetApplyTwist(kTRUE);
1954  twScalePosEtaQoverSqrtM->SetApplyRescale(kFALSE);
1955  twScalePosEtaQoverSqrtM->SetTwistAndRescaleMethod(
1956  AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_doubleHarmonic);
1957  TPCPosEtaconfQoverSqrtM->AddCorrectionOnQnVector(twScalePosEtaQoverSqrtM);
1958 
1959  /* define the cuts to apply */
1960  isESD = mgr->GetInputEventHandler()->IsA() == AliESDInputHandler::Class();
1961  AliQnCorrectionsCutsSet* cutsTPCPosEtaQoverSqrtM = new AliQnCorrectionsCutsSet();
1962  if (!isESD) {
1963  cutsTPCPosEtaQoverSqrtM->Add(
1964  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kFilterBitMask768, 0.5, 1.5));
1965  cutsTPCPosEtaQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, 0., 0.8));
1966  cutsTPCPosEtaQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1967  } else {
1968  Bool_t UseTPConlyTracks = kFALSE; // Use of TPC standalone tracks or Global tracks (only for ESD analysis)
1969  task->SetUseTPCStandaloneTracks(UseTPConlyTracks);
1970  if (UseTPConlyTracks) {
1971  cutsTPCPosEtaQoverSqrtM->Add(
1972  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -3.0, 3.0));
1973  cutsTPCPosEtaQoverSqrtM->Add(
1974  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -3.0, 3.0));
1975  cutsTPCPosEtaQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, 0., 0.8));
1976  cutsTPCPosEtaQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1977  cutsTPCPosEtaQoverSqrtM->Add(
1978  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCnclsIter1, 70.0, 161.0));
1979  cutsTPCPosEtaQoverSqrtM->Add(
1980  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2Iter1, 0.2, 4.0));
1981  } else {
1982  cutsTPCPosEtaQoverSqrtM->Add(
1983  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaXY, -0.3, 0.3));
1984  cutsTPCPosEtaQoverSqrtM->Add(
1985  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kDcaZ, -0.3, 0.3));
1986  cutsTPCPosEtaQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kEta, 0., 0.8));
1987  cutsTPCPosEtaQoverSqrtM->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kPt, 0.2, 5.));
1988  cutsTPCPosEtaQoverSqrtM->Add(
1989  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCncls, 70.0, 161.0));
1990  cutsTPCPosEtaQoverSqrtM->Add(
1991  new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kTPCchi2, 0.2, 4.0));
1992  }
1993  }
1994  TPCPosEtaconfQoverSqrtM->SetCuts(cutsTPCPosEtaQoverSqrtM);
1995 
1996  /* add the configuration to the detector */
1997  TPC->AddDetectorConfiguration(TPCPosEtaconfQoverSqrtM);
1998 
1999  /* finally add the detector to the framework manager */
2000  QnManager->AddDetector(TPC);
2001 }
2002 
2006 void FlowVectorCorrections::AddSPD(AliAnalysisTaskFlowVectorCorrections* task, AliQnCorrectionsManager* QnManager,
2007  AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
2008 {
2010 
2011  //-----------------------------------------------------------
2012  // Our event classes for SPD
2013  //
2014  const Int_t nSPDdim = 2;
2015  AliQnCorrectionsEventClassVariablesSet* CorrEventClasses = new AliQnCorrectionsEventClassVariablesSet(nSPDdim);
2016  Double_t VtxZbinning[][2] = { { -10.0, 4 }, { -7.0, 1 }, { 7.0, 8 }, { 10.0, 1 } };
2017  Double_t Ctbinning[][2] = { { 0.0, 2 }, { 100.0, 100 } };
2018  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
2019  AliQnCorrectionsVarManagerTask::kVtxZ, task->VarName(AliQnCorrectionsVarManagerTask::kVtxZ), VtxZbinning));
2020  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
2021  varForEventMultiplicity, Form("Centrality (%s)", task->VarName(varForEventMultiplicity)), Ctbinning));
2023 
2024  /* the SPD detector */
2025  AliQnCorrectionsDetector* SPD = new AliQnCorrectionsDetector("SPD", AliQnCorrectionsVarManagerTask::kSPD);
2026 
2027  /* the SPD detector configuration */
2028  AliQnCorrectionsDetectorConfigurationTracks* SPDconf = new AliQnCorrectionsDetectorConfigurationTracks(
2029  "SPD", CorrEventClasses, 4); /* number of harmonics: 1, 2, 3 and 4 */
2030  /* let's configure the Q vector calibration */
2031  SPDconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
2032  /* let's add the Q vector recentering correction step */
2033  /* we don't configure it, so we create it anonymous */
2034  SPDconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
2035  /* let's add the Q vector twist correction step */
2036  AliQnCorrectionsQnVectorTwistAndRescale* twScale = new AliQnCorrectionsQnVectorTwistAndRescale();
2037  twScale->SetApplyTwist(kTRUE);
2038  twScale->SetApplyRescale(kFALSE);
2039  twScale->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_doubleHarmonic);
2040  SPDconf->AddCorrectionOnQnVector(twScale);
2041 
2042  /* add the configuration to the detector */
2043  SPD->AddDetectorConfiguration(SPDconf);
2044 
2045  /* finally add the detector to the framework manager */
2046  QnManager->AddDetector(SPD);
2047 }
2048 
2052 void FlowVectorCorrections::AddTZERO(AliAnalysisTaskFlowVectorCorrections* task, AliQnCorrectionsManager* QnManager,
2053  AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
2054 {
2056 
2057  Bool_t TZEROchannels[2][24];
2058  for (Int_t iv0 = 0; iv0 < 2; iv0++)
2059  for (Int_t ich = 0; ich < 24; ich++)
2060  TZEROchannels[iv0][ich] = kFALSE;
2061 
2062  for (Int_t ich = 12; ich < 24; ich++)
2063  TZEROchannels[0][ich] = kTRUE; // channel list: value 1 if channel should be used
2064  for (Int_t ich = 0; ich < 12; ich++)
2065  TZEROchannels[1][ich] = kTRUE;
2066 
2067  Int_t channelGroups[24];
2068  for (Int_t ich = 0; ich < 24; ich++)
2069  channelGroups[ich] = Int_t(ich / 12);
2070 
2071  //-----------------------------------------------------------
2072  // Our event classes for TZERO
2073  //
2074  const Int_t nTZEROdim = 2;
2075  AliQnCorrectionsEventClassVariablesSet* CorrEventClasses = new AliQnCorrectionsEventClassVariablesSet(nTZEROdim);
2076  Double_t VtxZbinning[][2] = { { -10.0, 4 }, { -7.0, 1 }, { 7.0, 8 }, { 10.0, 1 } };
2077  Double_t Ctbinning[][2] = { { 0.0, 2 }, { 100.0, 100 } };
2078  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
2079  AliQnCorrectionsVarManagerTask::kVtxZ, task->VarName(AliQnCorrectionsVarManagerTask::kVtxZ), VtxZbinning));
2080  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
2081  varForEventMultiplicity, Form("Centrality (%s)", task->VarName(varForEventMultiplicity)), Ctbinning));
2083 
2084  /* the TZERO detector */
2085  AliQnCorrectionsDetector* TZERO = new AliQnCorrectionsDetector("TZERO", AliQnCorrectionsVarManagerTask::kTZERO);
2086 
2087  /* the TZEROA detector configuration */
2088  AliQnCorrectionsDetectorConfigurationChannels* TZEROAconf =
2089  new AliQnCorrectionsDetectorConfigurationChannels("TZEROA", CorrEventClasses, 24, /* number of channels */
2090  4); /* number of harmonics: 1, 2, 3 and 4 */
2091  TZEROAconf->SetChannelsScheme(TZEROchannels[0], channelGroups);
2092  /* let's configure the Q vector calibration */
2093  TZEROAconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
2094  /* lets configure the equalization of input data */
2095  AliQnCorrectionsInputGainEqualization* eqA = new AliQnCorrectionsInputGainEqualization();
2096  eqA->SetEqualizationMethod(AliQnCorrectionsInputGainEqualization::GEQUAL_averageEqualization);
2097  eqA->SetShift(1.0);
2098  eqA->SetScale(0.1);
2099  eqA->SetUseChannelGroupsWeights(kFALSE);
2100  TZEROAconf->AddCorrectionOnInputData(eqA);
2101  /* let's add the Q vector recentering correction step */
2102  /* we don't configure it, so we create it anonymous */
2103  TZEROAconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
2104  /* let's add the Q vector alignment correction step */
2105  AliQnCorrectionsQnVectorAlignment* alignA = new AliQnCorrectionsQnVectorAlignment();
2106  alignA->SetHarmonicNumberForAlignment(2);
2107  alignA->SetReferenceConfigurationForAlignment("TPC");
2108  TZEROAconf->AddCorrectionOnQnVector(alignA);
2109  /* let's configure the QA histograms */
2110  TZEROAconf->SetQACentralityVar(varForEventMultiplicity);
2111  TZEROAconf->SetQAMultiplicityAxis(100, 0.0, 150.0);
2112  /* let's configure the twist and rescale correction step */
2113  AliQnCorrectionsQnVectorTwistAndRescale* twScaleA = new AliQnCorrectionsQnVectorTwistAndRescale();
2114  twScaleA->SetApplyTwist(kTRUE);
2115  twScaleA->SetApplyRescale(kTRUE);
2116  twScaleA->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_correlations);
2117  twScaleA->SetReferenceConfigurationsForTwistAndRescale("TPC", "TZEROC");
2118  /* now we add it to the detector configuration */
2119  TZEROAconf->AddCorrectionOnQnVector(twScaleA);
2120 
2121  /* add the configuration to the detector */
2122  TZERO->AddDetectorConfiguration(TZEROAconf);
2123 
2124  /* the TZEROC detector configuration */
2125  AliQnCorrectionsDetectorConfigurationChannels* TZEROCconf =
2126  new AliQnCorrectionsDetectorConfigurationChannels("TZEROC", CorrEventClasses, 24, /* number of channels */
2127  4); /* number of harmonics: 1, 2, 3 and 4 */
2128  TZEROCconf->SetChannelsScheme(TZEROchannels[1], channelGroups);
2129  /* let's configure the Q vector calibration */
2130  TZEROCconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
2131  /* lets configure the equalization of input data */
2132  AliQnCorrectionsInputGainEqualization* eqC = new AliQnCorrectionsInputGainEqualization();
2133  eqC->SetEqualizationMethod(AliQnCorrectionsInputGainEqualization::GEQUAL_averageEqualization);
2134  eqC->SetShift(1.0);
2135  eqC->SetScale(0.1);
2136  eqC->SetUseChannelGroupsWeights(kFALSE);
2137  TZEROCconf->AddCorrectionOnInputData(eqC);
2138  /* let's add the Q vector recentering correction step */
2139  /* we don't configure it, so we create it anonymous */
2140  TZEROCconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
2141  /* let's add the Q vector alignment correction step */
2142  AliQnCorrectionsQnVectorAlignment* alignC = new AliQnCorrectionsQnVectorAlignment();
2143  alignC->SetHarmonicNumberForAlignment(2);
2144  alignC->SetReferenceConfigurationForAlignment("TPC");
2145  TZEROCconf->AddCorrectionOnQnVector(alignC);
2146  /* let's configure the QA histograms */
2147  TZEROCconf->SetQACentralityVar(varForEventMultiplicity);
2148  TZEROCconf->SetQAMultiplicityAxis(100, 0.0, 150.0);
2149  /* let's configure the twist and rescale correction step */
2150  AliQnCorrectionsQnVectorTwistAndRescale* twScaleC = new AliQnCorrectionsQnVectorTwistAndRescale();
2151  twScaleC->SetApplyTwist(kTRUE);
2152  twScaleC->SetApplyRescale(kTRUE);
2153  twScaleC->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_correlations);
2154  twScaleC->SetReferenceConfigurationsForTwistAndRescale("TPC", "TZEROA");
2155  /* now we add it to the detector configuration */
2156  TZEROCconf->AddCorrectionOnQnVector(twScaleC);
2157 
2158  /* add the configuration to the detector */
2159  TZERO->AddDetectorConfiguration(TZEROCconf);
2160 
2161  /* finally add the detector to the framework manager */
2162  QnManager->AddDetector(TZERO);
2163 }
2164 
2168 void FlowVectorCorrections::AddZDC(AliAnalysisTaskFlowVectorCorrections* task, AliQnCorrectionsManager* QnManager,
2169  AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
2170 {
2172 
2173  Bool_t ZDCchannels[2][10];
2174  for (Int_t iv0 = 0; iv0 < 2; iv0++)
2175  for (Int_t ich = 0; ich < 10; ich++)
2176  ZDCchannels[iv0][ich] = kFALSE;
2177 
2178  for (Int_t ich = 6; ich < 10; ich++)
2179  ZDCchannels[0][ich] = kTRUE;
2180  for (Int_t ich = 1; ich < 5; ich++)
2181  ZDCchannels[1][ich] = kTRUE;
2182 
2183  //-----------------------------------------------------------
2184  // Our event classes for ZDC
2185  //
2186  const Int_t nZDCdim = 3;
2187  AliQnCorrectionsEventClassVariablesSet* CorrEventClasses = new AliQnCorrectionsEventClassVariablesSet(nZDCdim);
2188  Double_t VtxXbinning[][2] = { { -0.3, 2 }, { 0.3, 10 } };
2189  Double_t VtxYbinning[][2] = { { -0.3, 2 }, { 0.3, 10 } };
2190  Double_t Ctbinning[][2] = { { 0.0, 2 }, { 100.0, 100 } };
2191  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
2192  AliQnCorrectionsVarManagerTask::kVtxX, task->VarName(AliQnCorrectionsVarManagerTask::kVtxX), VtxXbinning));
2193  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
2194  AliQnCorrectionsVarManagerTask::kVtxY, task->VarName(AliQnCorrectionsVarManagerTask::kVtxY), VtxYbinning));
2195  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
2196  varForEventMultiplicity, Form("Centrality (%s)", task->VarName(varForEventMultiplicity)), Ctbinning));
2198 
2199  /* the ZDC detector */
2200  AliQnCorrectionsDetector* ZDC = new AliQnCorrectionsDetector("ZDC", AliQnCorrectionsVarManagerTask::kZDC);
2201 
2202  /* the ZDCA detector configuration */
2203  AliQnCorrectionsDetectorConfigurationChannels* ZDCAconf =
2204  new AliQnCorrectionsDetectorConfigurationChannels("ZDCA", CorrEventClasses, 10, /* number of channels */
2205  3); /* number of harmonics: 1, 2 and 3 */
2206  ZDCAconf->SetChannelsScheme(ZDCchannels[0], NULL /* no groups */);
2207  /* let's configure the Q vector calibration */
2208  ZDCAconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
2209  /* let's add the Q vector recentering correction step */
2210  /* we don't configure it, so we create it anonymous */
2211  ZDCAconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
2212 
2213  /* add the configuration to the detector */
2214  ZDC->AddDetectorConfiguration(ZDCAconf);
2215 
2216  /* the ZDCC detector configuration */
2217  AliQnCorrectionsDetectorConfigurationChannels* ZDCCconf =
2218  new AliQnCorrectionsDetectorConfigurationChannels("ZDCC", CorrEventClasses, 10, /* number of channels */
2219  3); /* number of harmonics: 1, 2 and 3 */
2220  ZDCCconf->SetChannelsScheme(ZDCchannels[1], NULL /* no groups */);
2221  /* let's configure the Q vector calibration */
2222  ZDCCconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
2223  /* let's add the Q vector recentering correction step */
2224  /* we don't configure it, so we create it anonymous */
2225  ZDCCconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
2226 
2227  /* add the configuration to the detector */
2228  ZDC->AddDetectorConfiguration(ZDCCconf);
2229 
2230  /* finally add the detector to the framework manager */
2231  QnManager->AddDetector(ZDC);
2232 }
2233 
2237 void FlowVectorCorrections::AddFMD(AliAnalysisTaskFlowVectorCorrections* task, AliQnCorrectionsManager* QnManager,
2238  AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
2239 {
2240  AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager();
2241  Bool_t isESD = mgr->GetInputEventHandler()->IsA() == AliESDInputHandler::Class();
2242  if (isESD) {
2243  AliFatalGeneral("PWGJE::EMCALJetTasks::FlowVectorCorrections::AddFMD",
2244  "ESD analysis is not supported for the FMD.");
2245  }
2246 
2247  Bool_t FMDchannels[2][4000];
2248  for (Int_t iv0 = 0; iv0 < 2; iv0++)
2249  for (Int_t ich = 0; ich < 4000; ich++)
2250  FMDchannels[iv0][ich] = kFALSE;
2251 
2252  for (Int_t ich = 2000; ich < 4000; ich++)
2253  FMDchannels[0][ich] = kTRUE; // channel list: value 1 if channel should be used
2254  for (Int_t ich = 0; ich < 2000; ich++)
2255  FMDchannels[1][ich] = kTRUE;
2256 
2257  //-----------------------------------------------------------
2258  // Our event classes for FMD
2259  //
2260  const Int_t nFMDdim = 2;
2261  AliQnCorrectionsEventClassVariablesSet* CorrEventClasses = new AliQnCorrectionsEventClassVariablesSet(nFMDdim);
2262  Double_t VtxZbinning[][2] = { { -10.0, 4 }, { -7.0, 1 }, { 7.0, 8 }, { 10.0, 1 } };
2263  Double_t Ctbinning[][2] = { { 0.0, 2 }, { 100.0, 100 } };
2264  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
2265  AliQnCorrectionsVarManagerTask::kVtxZ, task->VarName(AliQnCorrectionsVarManagerTask::kVtxZ), VtxZbinning));
2266  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
2267  varForEventMultiplicity, Form("Centrality (%s)", task->VarName(varForEventMultiplicity)), Ctbinning));
2269 
2270  /* the FMD detector */
2271  AliQnCorrectionsDetector* FMD = new AliQnCorrectionsDetector("FMD", AliQnCorrectionsVarManagerTask::kFMD);
2272 
2273  /* the FMDA detector configuration */
2274  AliQnCorrectionsDetectorConfigurationChannels* FMDAconf =
2275  new AliQnCorrectionsDetectorConfigurationChannels("FMDA", CorrEventClasses, 4000, /* number of channels */
2276  4); /* number of harmonics: 1, 2 and 3 */
2277  FMDAconf->SetChannelsScheme(FMDchannels[0], NULL /* no groups */);
2278  /* let's configure the Q vector calibration */
2279  FMDAconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
2280  /* let's add the Q vector recentering correction step */
2281  /* we don't configure it, so we create it anonymous */
2282  FMDAconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
2283  /* let's add the Q vector alignment correction step */
2284  AliQnCorrectionsQnVectorAlignment* alignA = new AliQnCorrectionsQnVectorAlignment();
2285  alignA->SetHarmonicNumberForAlignment(2);
2286  alignA->SetReferenceConfigurationForAlignment("TPC");
2287  FMDAconf->AddCorrectionOnQnVector(alignA);
2288  /* let's configure the twist and rescale correction step */
2289  AliQnCorrectionsQnVectorTwistAndRescale* twScaleA = new AliQnCorrectionsQnVectorTwistAndRescale();
2290  twScaleA->SetApplyTwist(kTRUE);
2291  twScaleA->SetApplyRescale(kTRUE);
2292  twScaleA->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_correlations);
2293  twScaleA->SetReferenceConfigurationsForTwistAndRescale("TPC", "FMDC");
2294  /* now we add it to the detector configuration */
2295  FMDAconf->AddCorrectionOnQnVector(twScaleA);
2296 
2297  /* add the configuration to the detector */
2298  FMD->AddDetectorConfiguration(FMDAconf);
2299 
2300  /* the FMDC detector configuration */
2301  AliQnCorrectionsDetectorConfigurationChannels* FMDCconf =
2302  new AliQnCorrectionsDetectorConfigurationChannels("FMDC", CorrEventClasses, 4000, /* number of channels */
2303  4); /* number of harmonics: 1, 2, 3 and 4 */
2304  FMDCconf->SetChannelsScheme(FMDchannels[1], NULL /* no groups */);
2305  /* let's configure the Q vector calibration */
2306  FMDCconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
2307  /* let's add the Q vector recentering correction step */
2308  /* we don't configure it, so we create it anonymous */
2309  FMDCconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
2310  /* let's add the Q vector alignment correction step */
2311  AliQnCorrectionsQnVectorAlignment* alignC = new AliQnCorrectionsQnVectorAlignment();
2312  alignC->SetHarmonicNumberForAlignment(2);
2313  alignC->SetReferenceConfigurationForAlignment("TPC");
2314  FMDCconf->AddCorrectionOnQnVector(alignC);
2315  /* let's configure the twist and rescale correction step */
2316  AliQnCorrectionsQnVectorTwistAndRescale* twScaleC = new AliQnCorrectionsQnVectorTwistAndRescale();
2317  twScaleC->SetApplyTwist(kTRUE);
2318  twScaleC->SetApplyRescale(kTRUE);
2319  twScaleC->SetTwistAndRescaleMethod(AliQnCorrectionsQnVectorTwistAndRescale::TWRESCALE_correlations);
2320  twScaleC->SetReferenceConfigurationsForTwistAndRescale("TPC", "FMDA");
2321  /* now we add it to the detector configuration */
2322  FMDCconf->AddCorrectionOnQnVector(twScaleC);
2323 
2324  /* add the configuration to the detector */
2325  FMD->AddDetectorConfiguration(FMDCconf);
2326 
2327  /* finally add the detector to the framework manager */
2328  QnManager->AddDetector(FMD);
2329 }
2330 
2334 void FlowVectorCorrections::AddRawFMD(AliAnalysisTaskFlowVectorCorrections* task, AliQnCorrectionsManager* QnManager,
2335  AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
2336 {
2338  /* FMD1 and FMD2 make FMDA and FMD3 make FMDC */
2339 
2340  const Int_t nNoOfDetectors = 3;
2341  const Int_t detectorNumber[] = { 1, 2, 3 };
2342  const Int_t nNoOfRings[] = { 1, 2, 2 };
2343  const Int_t ringNoOfSectors[] = { 20, 40 };
2344  const Int_t nTotalNoOfChannels =
2345  ringNoOfSectors[0] * 3 + ringNoOfSectors[1] * 2;
2346  // const Int_t nTotalNoOfGroups = nNoOfRings[0] + nNoOfRings[1] + nNoOfRings[2]; ///< each ring one channel
2347  // group
2348  const Int_t FMDCdetectorNumber = 3;
2349  Int_t nSectorId = 0;
2350  Int_t nRingId = 0;
2351 
2352  Bool_t FMDchannels[2][nTotalNoOfChannels];
2353  Int_t FMDchannelGroups[nTotalNoOfChannels];
2354  for (Int_t i = 0; i < 2; i++)
2355  for (Int_t c = 0; c < nTotalNoOfChannels; c++)
2356  FMDchannels[i][c] = kFALSE;
2357 
2358  for (Int_t detector = 0; detector < nNoOfDetectors; detector++) {
2359  for (Int_t ring = 0; ring < nNoOfRings[detector]; ring++) {
2360  for (Int_t sector = 0; sector < ringNoOfSectors[ring]; sector++) {
2361  FMDchannels[0][nSectorId] = ((detectorNumber[detector] != FMDCdetectorNumber) ? kTRUE : kFALSE);
2362  FMDchannels[1][nSectorId] = ((detectorNumber[detector] != FMDCdetectorNumber) ? kFALSE : kTRUE);
2363  FMDchannelGroups[nSectorId] = nRingId;
2364  nSectorId++;
2365  }
2366  nRingId++;
2367  }
2368  }
2369 
2370  //-----------------------------------------------------------
2371  // Our event classes for FMD
2372  //
2373  const Int_t nFMDdim = 2;
2374  AliQnCorrectionsEventClassVariablesSet* CorrEventClasses = new AliQnCorrectionsEventClassVariablesSet(nFMDdim);
2375  Double_t VtxZbinning[][2] = { { -10.0, 4 }, { -7.0, 1 }, { 7.0, 8 }, { 10.0, 1 } };
2376  Double_t Ctbinning[][2] = { { 0.0, 2 }, { 100.0, 100 } };
2377  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
2378  AliQnCorrectionsVarManagerTask::kVtxZ, task->VarName(AliQnCorrectionsVarManagerTask::kVtxZ), VtxZbinning));
2379  CorrEventClasses->Add(new AliQnCorrectionsEventClassVariable(
2380  varForEventMultiplicity, Form("Centrality (%s)", task->VarName(varForEventMultiplicity)), Ctbinning));
2382 
2383  AliQnCorrectionsCutsSet* cutFMDA = new AliQnCorrectionsCutsSet();
2384  cutFMDA->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kFMDEta, 0.0, 6.0));
2385 
2386  AliQnCorrectionsCutsSet* cutFMDC = new AliQnCorrectionsCutsSet();
2387  cutFMDC->Add(new AliQnCorrectionsCutWithin(AliQnCorrectionsVarManagerTask::kFMDEta, -6.0, 0.0));
2388 
2389  /* the FMD detector */
2390  AliQnCorrectionsDetector* FMDraw = new AliQnCorrectionsDetector("FMDraw", AliQnCorrectionsVarManagerTask::kFMDraw);
2391 
2392  /* the FMDAraw detector configuration */
2393  AliQnCorrectionsDetectorConfigurationChannels* FMDArawconf = new AliQnCorrectionsDetectorConfigurationChannels(
2394  "FMDAraw", CorrEventClasses, nTotalNoOfChannels, 4); /* number of harmonics: 1, 2, 3 and 4 */
2395  FMDArawconf->SetChannelsScheme(FMDchannels[0], FMDchannelGroups);
2396  /* let's configure the Q vector calibration */
2397  FMDArawconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
2398  /* lets configure the equalization of input data */
2399  AliQnCorrectionsInputGainEqualization* eqA = new AliQnCorrectionsInputGainEqualization();
2400  eqA->SetEqualizationMethod(AliQnCorrectionsInputGainEqualization::GEQUAL_averageEqualization);
2401  eqA->SetShift(1.0);
2402  eqA->SetScale(0.1);
2403  eqA->SetUseChannelGroupsWeights(kTRUE);
2404  FMDArawconf->AddCorrectionOnInputData(eqA);
2405  /* let's add the Q vector recentering correction step */
2406  /* we don't configure it, so we create it anonymous */
2407  FMDArawconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
2408  /* let's add the Q vector alignment correction step */
2409  AliQnCorrectionsQnVectorAlignment* alignA = new AliQnCorrectionsQnVectorAlignment();
2410  alignA->SetHarmonicNumberForAlignment(2);
2411  alignA->SetReferenceConfigurationForAlignment("TPC");
2412  FMDArawconf->AddCorrectionOnQnVector(alignA);
2413  /* and add the cuts */
2414  FMDArawconf->SetCuts(cutFMDA);
2415 
2416  /* add the configuration to the detector */
2417  FMDraw->AddDetectorConfiguration(FMDArawconf);
2418 
2419  /* the FMDCraw detector configuration */
2420  AliQnCorrectionsDetectorConfigurationChannels* FMDCrawconf = new AliQnCorrectionsDetectorConfigurationChannels(
2421  "FMDCraw", CorrEventClasses, nTotalNoOfChannels, 4); /* number of harmonics: 1, 2, 3 and 4 */
2422  FMDCrawconf->SetChannelsScheme(FMDchannels[1], FMDchannelGroups);
2423  /* let's configure the Q vector calibration */
2424  FMDCrawconf->SetQVectorNormalizationMethod(AliQnCorrectionsQnVector::QVNORM_QoverM);
2425  /* lets configure the equalization of input data */
2426  AliQnCorrectionsInputGainEqualization* eqC = new AliQnCorrectionsInputGainEqualization();
2427  eqC->SetEqualizationMethod(AliQnCorrectionsInputGainEqualization::GEQUAL_averageEqualization);
2428  eqC->SetShift(1.0);
2429  eqC->SetScale(0.1);
2430  eqC->SetUseChannelGroupsWeights(kTRUE);
2431  FMDCrawconf->AddCorrectionOnInputData(eqC);
2432  /* let's add the Q vector recentering correction step */
2433  /* we don't configure it, so we create it anonymous */
2434  FMDCrawconf->AddCorrectionOnQnVector(new AliQnCorrectionsQnVectorRecentering());
2435  /* let's add the Q vector alignment correction step */
2436  AliQnCorrectionsQnVectorAlignment* alignC = new AliQnCorrectionsQnVectorAlignment();
2437  alignC->SetHarmonicNumberForAlignment(2);
2438  alignC->SetReferenceConfigurationForAlignment("TPC");
2439  FMDCrawconf->AddCorrectionOnQnVector(alignC);
2440  /* and add the cuts */
2441  FMDCrawconf->SetCuts(cutFMDC);
2442 
2443  /* add the configuration to the detector */
2444  FMDraw->AddDetectorConfiguration(FMDCrawconf);
2445 
2446  /* finally add the detector to the framework manager */
2447  QnManager->AddDetector(FMDraw);
2448 }
2449 
2453 void FlowVectorCorrections::DefineHistograms(AliQnCorrectionsManager* QnManager, AliQnCorrectionsHistos* histos,
2454  TString histClass)
2455 {
2456  //
2457  // define the histograms
2458  //
2459  const Char_t* histClasses = histClass.Data();
2460 
2461  AliInfoGeneralStream("PWGJE::EMCALJetTasks::FlowVectorCorrections::DefineHistograms")
2462  << "Defining histograms ...\n";
2463  AliInfoGeneralStream("PWGJE::EMCALJetTasks::FlowVectorCorrections::DefineHistograms")
2464  << "histogram classes: " << histClass << "\n";
2465 
2466  // fHistosFile=new TFile(output,"RECREATE");
2467 
2468  TString classesStr(histClasses);
2469  TObjArray* arr = classesStr.Tokenize(";");
2470 
2471  const Int_t kNRunBins = 3000;
2472  Double_t runHistRange[2] = { 137000., 140000. };
2473 
2474  for (Int_t iclass = 0; iclass < arr->GetEntries(); ++iclass) {
2475  TString classStr = arr->At(iclass)->GetName();
2476  AliInfoGeneralStream("PWGJE::EMCALJetTasks::FlowVectorCorrections::DefineHistograms")
2477  << "hist class: " << classStr.Data() << "\n";
2478 
2479  // Event wise histograms
2480  if (classStr.Contains("Event")) {
2481  histos->AddHistClass(classStr.Data());
2482  histos->AddHistogram(classStr.Data(), "RunNo", "Run numbers;Run", kFALSE, kNRunBins, runHistRange[0],
2483  runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo);
2484  histos->AddHistogram(classStr.Data(), "BC", "Bunch crossing;BC", kFALSE, 3000, 0., 3000.,
2485  AliQnCorrectionsVarManagerTask::kBC);
2486  histos->AddHistogram(classStr.Data(), "IsPhysicsSelection", "Physics selection flag;;", kFALSE, 2, -0.5,
2487  1.5, AliQnCorrectionsVarManagerTask::kIsPhysicsSelection, 0, 0.0, 0.0,
2488  AliQnCorrectionsVarManagerTask::kNothing, 0, 0.0, 0.0,
2489  AliQnCorrectionsVarManagerTask::kNothing, "off;on");
2490 
2491  histos->AddHistogram(classStr.Data(), "VtxZ", "Vtx Z;vtx Z (cm)", kFALSE, 300, -30.0, 30.0,
2492  AliQnCorrectionsVarManagerTask::kVtxZ);
2493  // histos->AddHistogram(classStr.Data(),"VtxZ","Vtx Z;vtx Z (cm)",
2494  // kFALSE,300,-15.,15.,AliQnCorrectionsVarManagerTask::kVtxZ);
2495  histos->AddHistogram(classStr.Data(), "VtxX", "Vtx X;vtx X (cm)", kFALSE, 300, -1., 1.,
2496  AliQnCorrectionsVarManagerTask::kVtxX);
2497  histos->AddHistogram(classStr.Data(), "VtxY", "Vtx Y;vtx Y (cm)", kFALSE, 300, -1., 1.,
2498  AliQnCorrectionsVarManagerTask::kVtxY);
2499 
2500  histos->AddHistogram(
2501  classStr.Data(), "CentVZEROvsMultPVZERO",
2502  "Multiplicity percentile (VZERO);multiplicity VZERO (percents);centrality VZERO (percents)", kFALSE, 100,
2503  0.0, 100.0, AliQnCorrectionsVarManagerTask::kVZEROMultPercentile, 100, 0.0, 100.0,
2504  AliQnCorrectionsVarManagerTask::kCentVZERO);
2505  histos->AddHistogram(classStr.Data(), "CentVZEROvsCentSPD",
2506  "Centrality(VZERO);centrality VZERO (percents);centrality SPD (percents)", kFALSE, 100,
2507  0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentVZERO, 100, 0.0, 100.0,
2508  AliQnCorrectionsVarManagerTask::kCentSPD);
2509  histos->AddHistogram(classStr.Data(), "CentTPCvsCentSPD",
2510  "Centrality(TPC);centrality TPC (percents);centrality SPD (percents)", kFALSE, 100,
2511  0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentTPC, 100, 0.0, 100.0,
2512  AliQnCorrectionsVarManagerTask::kCentSPD);
2513  histos->AddHistogram(classStr.Data(), "CentTPCvsCentVZERO",
2514  "Centrality(TPC);centrality TPC (percents);centrality VZERO (percents)", kFALSE, 100,
2515  0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentTPC, 100, 0.0, 100.0,
2516  AliQnCorrectionsVarManagerTask::kCentVZERO);
2517  histos->AddHistogram(classStr.Data(), "CentTPCvsCentZDC",
2518  "Centrality(TPC);centrality TPC (percents);centrality ZDC (percents)", kFALSE, 100,
2519  0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentTPC, 100, 0.0, 100.0,
2520  AliQnCorrectionsVarManagerTask::kCentZDC);
2521  histos->AddHistogram(classStr.Data(), "CentZDCvsCentVZERO",
2522  "Centrality(ZDC);centrality ZDC (percents);centrality VZERO (percents)", kFALSE, 100,
2523  0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentZDC, 100, 0.0, 100.0,
2524  AliQnCorrectionsVarManagerTask::kCentVZERO);
2525  histos->AddHistogram(classStr.Data(), "CentZDCvsCentSPD",
2526  "Centrality(ZDC);centrality ZDC (percents);centrality SPD (percents)", kFALSE, 100,
2527  0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentZDC, 100, 0.0, 100.0,
2528  AliQnCorrectionsVarManagerTask::kCentSPD);
2529 
2530  histos->AddHistogram(classStr.Data(), "MultVZEROvsCentVZERO",
2531  "Multiplicity;multiplicity VZERO;VZERO centrality", kFALSE, 100, 0.0, 32000.0,
2532  AliQnCorrectionsVarManagerTask::kVZEROTotalMult, 100, 0., 100.,
2533  AliQnCorrectionsVarManagerTask::kCentVZERO);
2534  histos->AddHistogram(classStr.Data(), "MultSPDvsCentPSD", "Multiplicity;SPD tracklets;SPD centrality",
2535  kFALSE, 100, 0.0, 3000.0, AliQnCorrectionsVarManagerTask::kSPDntracklets, 100, 0.,
2536  100., AliQnCorrectionsVarManagerTask::kCentSPD);
2537  histos->AddHistogram(classStr.Data(), "MultTPCvsCentSPD", "Multiplicity;TPC selected tracks;TPC centrality",
2538  kFALSE, 100, 0.0, 3500.0, AliQnCorrectionsVarManagerTask::kNtracksSelected, 100, 0.,
2539  100., AliQnCorrectionsVarManagerTask::kCentTPC);
2540  histos->AddHistogram(classStr.Data(), "MultZDCvsCentZDC", "Multiplicity;multiplicity ZDC;ZDC centrality",
2541  kFALSE, 100, 0.0, 300000.0, AliQnCorrectionsVarManagerTask::kZDCTotalEnergy, 100, 0.,
2542  100., AliQnCorrectionsVarManagerTask::kCentZDC);
2543 
2544  histos->AddHistogram(classStr.Data(), "MultTPCvsMultVZERO", "Multiplicity;tracks TPC;multiplicity VZERO",
2545  kFALSE, 100, 0.0, 3500.0, AliQnCorrectionsVarManagerTask::kNtracksSelected, 100, 0.0,
2546  32000.0, AliQnCorrectionsVarManagerTask::kVZEROTotalMult);
2547  histos->AddHistogram(classStr.Data(), "MultTPCvsMultSPD", "Multiplicity;tracklets SPD;tracks TPC", kFALSE,
2548  100, 0.0, 3500.0, AliQnCorrectionsVarManagerTask::kNtracksSelected, 100, 0.0, 3000.0,
2549  AliQnCorrectionsVarManagerTask::kSPDntracklets);
2550  histos->AddHistogram(classStr.Data(), "MultSPDvsMultVZERO", "Multiplicity;tracklets SPD;multiplicity VZERO",
2551  kFALSE, 100, 0.0, 32000.0, AliQnCorrectionsVarManagerTask::kVZEROTotalMult, 100, 0.0,
2552  3000.0, AliQnCorrectionsVarManagerTask::kSPDntracklets);
2553  histos->AddHistogram(classStr.Data(), "MultTPCvsMultZDC", "Multiplicity;tracks TPC;energy ZDC", kFALSE, 100,
2554  0.0, 3500.0, AliQnCorrectionsVarManagerTask::kNtracksSelected, 100, 0.0, 300000.0,
2555  AliQnCorrectionsVarManagerTask::kZDCTotalEnergy);
2556  histos->AddHistogram(classStr.Data(), "MultVZEROvsMultZDC", "Multiplicity;multiplicity VZERO;energy ZDC",
2557  kFALSE, 100, 0.0, 32000.0, AliQnCorrectionsVarManagerTask::kVZEROTotalMult, 100, 0.0,
2558  300000.0, AliQnCorrectionsVarManagerTask::kZDCTotalEnergy);
2559  histos->AddHistogram(classStr.Data(), "MultSPDvsMultZDC", "Multiplicity;tracklets SPD;energy ZDC", kFALSE,
2560  100, 0.0, 3000.0, AliQnCorrectionsVarManagerTask::kSPDntracklets, 100, 0.0, 300000.0,
2561  AliQnCorrectionsVarManagerTask::kZDCTotalEnergy);
2562 
2563  histos->AddHistogram(classStr.Data(), "MultVZERO", "Multiplicity;multiplicity VZERO", kFALSE, 320, 0.0,
2564  25000.0, AliQnCorrectionsVarManagerTask::kVZEROTotalMult);
2565  histos->AddHistogram(classStr.Data(), "MultVZEROA", "Multiplicity;multiplicity VZEROA", kFALSE, 250, 0.0,
2566  9500.0, AliQnCorrectionsVarManagerTask::kVZEROATotalMult); // 10000.0
2567  histos->AddHistogram(classStr.Data(), "MultVZEROC", "Multiplicity;multiplicity VZEROC", kFALSE, 250, 0.0,
2568  16000.0, AliQnCorrectionsVarManagerTask::kVZEROCTotalMult); // 15000.0
2569  histos->AddHistogram(classStr.Data(), "MultZDC", "Multiplicity;multiplicity ZDC", kFALSE, 200, 0.0,
2570  300000.0, AliQnCorrectionsVarManagerTask::kZDCTotalEnergy);
2571  histos->AddHistogram(classStr.Data(), "MultZDCA", "Multiplicity;multiplicity ZDCA", kFALSE, 200, 0.0,
2572  150000.0, AliQnCorrectionsVarManagerTask::kZDCATotalEnergy);
2573  histos->AddHistogram(classStr.Data(), "MultZDCC", "Multiplicity;multiplicity ZDCC", kFALSE, 200, 0.0,
2574  150000.0, AliQnCorrectionsVarManagerTask::kZDCCTotalEnergy);
2575  histos->AddHistogram(classStr.Data(), "MultFMD1", "Multiplicity;multiplicity FMD1", kFALSE, 300, 0.0,
2576  10000.0, AliQnCorrectionsVarManagerTask::kFMD1TotalMult);
2577  histos->AddHistogram(classStr.Data(), "MultFMD2I", "Multiplicity;multiplicity FMD2I", kFALSE, 300, 0.0,
2578  10000.0, AliQnCorrectionsVarManagerTask::kFMD2ITotalMult);
2579  histos->AddHistogram(classStr.Data(), "MultFMD2O", "Multiplicity;multiplicity FMD2O", kFALSE, 300, 0.0,
2580  10000.0, AliQnCorrectionsVarManagerTask::kFMD2OTotalMult);
2581  histos->AddHistogram(classStr.Data(), "MultFMD3I", "Multiplicity;multiplicity FMD3I", kFALSE, 300, 0.0,
2582  10000.0, AliQnCorrectionsVarManagerTask::kFMD3ITotalMult);
2583  histos->AddHistogram(classStr.Data(), "MultFMD3O", "Multiplicity;multiplicity FMD3O", kFALSE, 300, 0.0,
2584  10000.0, AliQnCorrectionsVarManagerTask::kFMD3OTotalMult);
2585  histos->AddHistogram(classStr.Data(), "MultTZEROA", "Multiplicity;multiplicity TZEROA", kFALSE, 300, 0.0,
2586  3000.0, AliQnCorrectionsVarManagerTask::kTZEROATotalMult);
2587  histos->AddHistogram(classStr.Data(), "MultTZEROC", "Multiplicity;multiplicity TZEROC", kFALSE, 300, 0.0,
2588  3000.0, AliQnCorrectionsVarManagerTask::kTZEROCTotalMult);
2589 
2590  histos->AddHistogram(classStr.Data(), "MultPercentVZERO",
2591  "Multiplicity percentile (VZERO);multiplicity VZERO (percents)", kFALSE, 100, 0.0,
2592  100.0, AliQnCorrectionsVarManagerTask::kVZEROMultPercentile);
2593  histos->AddHistogram(classStr.Data(), "CentVZERO", "Centrality(VZERO);centrality VZERO (percents)", kFALSE,
2594  100, 0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentVZERO);
2595  histos->AddHistogram(classStr.Data(), "CentSPD", "Centrality(SPD);centrality SPD (percents)", kFALSE, 100,
2596  0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentSPD);
2597  histos->AddHistogram(classStr.Data(), "CentTPC", "Centrality(TPC);centrality TPC (percents)", kFALSE, 100,
2598  0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentTPC);
2599  histos->AddHistogram(classStr.Data(), "CentZDC", "Centrality(ZDC);centrality ZDC (percents)", kFALSE, 100,
2600  0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentZDC);
2601 
2602  histos->AddHistogram(classStr.Data(), "CentQuality", "Centrality quality;centrality quality", kFALSE, 100,
2603  -50.5, 49.5, AliQnCorrectionsVarManagerTask::kCentQuality);
2604  histos->AddHistogram(classStr.Data(), "CentVZERO_Run_prof",
2605  "<Centrality(VZERO)> vs run;Run; centrality VZERO (%)", kTRUE, kNRunBins,
2606  runHistRange[0], runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo, 100, 0.0,
2607  100.0, AliQnCorrectionsVarManagerTask::kCentVZERO);
2608  histos->AddHistogram(classStr.Data(), "CentSPD_Run_prof",
2609  "<Centrality(SPD)> vs run;Run; centrality SPD (%)", kTRUE, kNRunBins, runHistRange[0],
2610  runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo, 100, 0.0, 100.0,
2611  AliQnCorrectionsVarManagerTask::kCentSPD);
2612  histos->AddHistogram(classStr.Data(), "CentTPC_Run_prof",
2613  "<Centrality(TPC)> vs run;Run; centrality TPC (%)", kTRUE, kNRunBins, runHistRange[0],
2614  runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo, 100, 0.0, 100.0,
2615  AliQnCorrectionsVarManagerTask::kCentTPC);
2616  histos->AddHistogram(classStr.Data(), "CentZDC_Run_prof",
2617  "<Centrality(ZDC)> vs run;Run; centrality ZDC (%)", kTRUE, kNRunBins, runHistRange[0],
2618  runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo, 100, 0.0, 100.0,
2619  AliQnCorrectionsVarManagerTask::kCentZDC);
2620 
2621  histos->AddHistogram(classStr.Data(), "NV0sTotal", "Number of V0 candidates per event;# pairs", kFALSE,
2622  1000, 0., 30000., AliQnCorrectionsVarManagerTask::kNV0total);
2623  histos->AddHistogram(classStr.Data(), "NV0sSelected", "Number of selected V0 candidates per event;# pairs",
2624  kFALSE, 1000, 0., 10000., AliQnCorrectionsVarManagerTask::kNV0selected);
2625  histos->AddHistogram(classStr.Data(), "NPairs", "Number of candidates per event;# pairs", kFALSE, 5000, 0.,
2626  5000., AliQnCorrectionsVarManagerTask::kNdielectrons);
2627  histos->AddHistogram(classStr.Data(), "NPairsSelected", "Number of selected pairs per event; #pairs",
2628  kFALSE, 5000, 0., 5000., AliQnCorrectionsVarManagerTask::kNpairsSelected);
2629  histos->AddHistogram(classStr.Data(), "NTracksTotal", "Number of total tracks per event;# tracks", kFALSE,
2630  1000, 0., 30000., AliQnCorrectionsVarManagerTask::kNtracksTotal);
2631  histos->AddHistogram(classStr.Data(), "NTracksSelected", "Number of selected tracks per event;# tracks",
2632  kFALSE, 1000, 0., 30000., AliQnCorrectionsVarManagerTask::kNtracksSelected);
2633  histos->AddHistogram(classStr.Data(), "SPDntracklets", "SPD #tracklets; tracklets", kFALSE, 3000, -0.5,
2634  2999.5, AliQnCorrectionsVarManagerTask::kSPDntracklets);
2635  histos->AddHistogram(classStr.Data(), "SPDnSingleClusters", "SPD #single clusters; tracklets", kFALSE, 3000,
2636  -0.5, 2999.5, AliQnCorrectionsVarManagerTask::kSPDnSingleClusters);
2637 
2638  histos->AddHistogram(classStr.Data(), "NV0total_Run_prof", "<Number of total V0s> per run; Run; #tracks",
2639  kTRUE, kNRunBins, runHistRange[0], runHistRange[1],
2640  AliQnCorrectionsVarManagerTask::kRunNo, 100, 0., 10000.,
2641  AliQnCorrectionsVarManagerTask::kNV0total);
2642  histos->AddHistogram(classStr.Data(), "NV0selected_Run_prof",
2643  "<Number of selected V0s> per run; Run; #tracks", kTRUE, kNRunBins, runHistRange[0],
2644  runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo, 100, 0., 10000.,
2645  AliQnCorrectionsVarManagerTask::kNV0selected);
2646  histos->AddHistogram(classStr.Data(), "Ndielectrons_Run_prof",
2647  "<Number of dielectrons> per run; Run; #tracks", kTRUE, kNRunBins, runHistRange[0],
2648  runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo, 100, 0., 10000.,
2649  AliQnCorrectionsVarManagerTask::kNdielectrons);
2650  histos->AddHistogram(classStr.Data(), "NpairsSelected_Run_prof",
2651  "<Number of selected pairs> per run; Run; #tracks", kTRUE, kNRunBins, runHistRange[0],
2652  runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo, 100, 0., 10000.,
2653  AliQnCorrectionsVarManagerTask::kNpairsSelected);
2654  histos->AddHistogram(classStr.Data(), "NTracksTotal_Run_prof", "<Number of tracks> per run; Run; #tracks",
2655  kTRUE, kNRunBins, runHistRange[0], runHistRange[1],
2656  AliQnCorrectionsVarManagerTask::kRunNo, 100, 0., 10000.,
2657  AliQnCorrectionsVarManagerTask::kNtracksTotal);
2658  histos->AddHistogram(classStr.Data(), "NTracksSelected_Run_prof",
2659  "<Number of selected tracks> per run; Run; #tracks", kTRUE, kNRunBins, runHistRange[0],
2660  runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo, 100, 0., 10000.,
2661  AliQnCorrectionsVarManagerTask::kNtracksSelected);
2662  histos->AddHistogram(classStr.Data(), "SPDntracklets_Run_prof", "<SPD ntracklets> per run; Run; #tracks",
2663  kTRUE, kNRunBins, runHistRange[0], runHistRange[1],
2664  AliQnCorrectionsVarManagerTask::kRunNo, 100, 0., 10000.,
2665  AliQnCorrectionsVarManagerTask::kSPDntracklets);
2666 
2667  histos->AddHistogram(classStr.Data(), "VtxZ_CentVZERO",
2668  "Centrality(VZERO) vs vtx. Z;vtx Z (cm); centrality VZERO (%)", kFALSE, 300, -15., 15.,
2669  AliQnCorrectionsVarManagerTask::kVtxZ, 100, 0.0, 100.0,
2670  AliQnCorrectionsVarManagerTask::kCentVZERO);
2671  histos->AddHistogram(classStr.Data(), "VtxZ_CentSPD",
2672  "Centrality(SPD) vs vtx. Z;vtx Z (cm); centrality SPD (%)", kFALSE, 300, -15., 15.,
2673  AliQnCorrectionsVarManagerTask::kVtxZ, 100, 0.0, 100.0,
2674  AliQnCorrectionsVarManagerTask::kCentSPD);
2675  histos->AddHistogram(classStr.Data(), "VtxZ_CentTPC",
2676  "Centrality(TPC) vs vtx. Z;vtx Z (cm); centrality TPC (%)", kFALSE, 300, -15., 15.,
2677  AliQnCorrectionsVarManagerTask::kVtxZ, 100, 0.0, 100.0,
2678  AliQnCorrectionsVarManagerTask::kCentTPC);
2679  continue;
2680  } // end if className contains "Event"
2681 
2682  // Offline trigger histograms
2683  if (classStr.Contains("OfflineTriggers")) {
2684  histos->AddHistClass(classStr.Data());
2685 
2686  TString triggerNames = "";
2687  for (Int_t i = 0; i < 64; ++i) {
2688  triggerNames += Form("%s", AliQnCorrectionsVarManagerTask::fOfflineTriggerNames[i]);
2689  triggerNames += ";";
2690  }
2691 
2692  histos->AddHistogram(classStr.Data(), "Triggers", "Offline triggers fired; ; ;", kFALSE, 64, -0.5, 63.5,
2693  AliQnCorrectionsVarManagerTask::kOfflineTrigger, 2, -0.5, 1.5,
2694  AliQnCorrectionsVarManagerTask::kOfflineTriggerFired, 0, 0.0, 0.0,
2695  AliQnCorrectionsVarManagerTask::kNothing, triggerNames.Data(), "off;on");
2696  histos->AddHistogram(classStr.Data(), "Triggers2", "Offline triggers fired; ; ;", kFALSE, 64, -0.5, 63.5,
2697  AliQnCorrectionsVarManagerTask::kOfflineTriggerFired2, 0, 0.0, 0.0,
2698  AliQnCorrectionsVarManagerTask::kNothing, 0, 0.0, 0.0,
2699  AliQnCorrectionsVarManagerTask::kNothing, triggerNames.Data());
2700  histos->AddHistogram(classStr.Data(), "CentVZERO_Triggers2",
2701  "Offline triggers fired vs centrality VZERO; ; centrality VZERO;", kFALSE, 64, -0.5,
2702  63.5, AliQnCorrectionsVarManagerTask::kOfflineTriggerFired2, 20, 0.0, 100.0,
2703  AliQnCorrectionsVarManagerTask::kCentVZERO, 0, 0.0, 0.0,
2704  AliQnCorrectionsVarManagerTask::kNothing, triggerNames.Data());
2705  histos->AddHistogram(classStr.Data(), "CentTPC_Triggers2",
2706  "Offline triggers fired vs centrality TPC; ; centrality TPC;", kFALSE, 64, -0.5, 63.5,
2707  AliQnCorrectionsVarManagerTask::kOfflineTriggerFired2, 20, 0.0, 100.0,
2708  AliQnCorrectionsVarManagerTask::kCentTPC, 0, 0.0, 0.0,
2709  AliQnCorrectionsVarManagerTask::kNothing, triggerNames.Data());
2710  histos->AddHistogram(classStr.Data(), "CentSPD_Triggers2",
2711  "Offline triggers fired vs centrality SPD; ; centrality SPD;", kFALSE, 64, -0.5, 63.5,
2712  AliQnCorrectionsVarManagerTask::kOfflineTriggerFired2, 20, 0.0, 100.0,
2713  AliQnCorrectionsVarManagerTask::kCentSPD, 0, 0.0, 0.0,
2714  AliQnCorrectionsVarManagerTask::kNothing, triggerNames.Data());
2715  histos->AddHistogram(classStr.Data(), "CentZDC_Triggers2",
2716  "Offline triggers fired vs centrality ZDC; ; centrality ZDC;", kFALSE, 64, -0.5, 63.5,
2717  AliQnCorrectionsVarManagerTask::kOfflineTriggerFired2, 20, 0.0, 100.0,
2718  AliQnCorrectionsVarManagerTask::kCentZDC, 0, 0.0, 0.0,
2719  AliQnCorrectionsVarManagerTask::kNothing, triggerNames.Data());
2720  histos->AddHistogram(classStr.Data(), "VtxZ_Triggers2", "Offline triggers fired vs vtxZ; ; vtx Z (cm.);",
2721  kFALSE, 64, -0.5, 63.5, AliQnCorrectionsVarManagerTask::kOfflineTriggerFired2, 200,
2722  -20.0, 20.0, AliQnCorrectionsVarManagerTask::kVtxZ, 0, 0.0, 0.0,
2723  AliQnCorrectionsVarManagerTask::kNothing, triggerNames.Data());
2724  continue;
2725  }
2726 
2727  // Track histograms
2728  if (classStr.Contains("Tracks")) {
2729  histos->AddHistClass(classStr.Data());
2730  for (Int_t ih = 0; ih < 6; ++ih) {
2731  histos->AddHistogram(
2732  classStr.Data(), Form("Cos%dPhi_CentVZERO", ih + 1),
2733  Form("<cos%d #varphi> vs (CentVZERO); centrality VZERO; <cos%d #varphi>", ih + 1, ih + 1), kTRUE, 20,
2734  0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentVZERO, 500, -1., 1.,
2735  AliQnCorrectionsVarManagerTask::kCosNPhi + ih);
2736  histos->AddHistogram(
2737  classStr.Data(), Form("Sin%dPhi_CentVZERO", ih + 1),
2738  Form("<sin%d #varphi> vs (CentVZERO); centrality VZERO; <sin%d #varphi>", ih + 1, ih + 1), kTRUE, 20,
2739  0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentVZERO, 500, -1.0, 1.0,
2740  AliQnCorrectionsVarManagerTask::kSinNPhi + ih);
2741  }
2742  }
2743 
2744  // Track histograms
2745  if (classStr.Contains("TrackQA")) {
2746  histos->AddHistClass(classStr.Data());
2747 
2748  histos->AddHistogram(classStr.Data(), "Pt", "p_{T} distribution; p_{T} (GeV/c^{2});", kFALSE, 1000, 0.0,
2750  histos->AddHistogram(classStr.Data(), "Eta", "#eta illumination; #eta;", kFALSE, 1000, -1.5, 1.5,
2751  AliQnCorrectionsVarManagerTask::kEta);
2752  histos->AddHistogram(classStr.Data(), "Phi", "#varphi illumination; #varphi;", kFALSE, 1000, 0.0, 6.3,
2753  AliQnCorrectionsVarManagerTask::kPhi);
2754  histos->AddHistogram(classStr.Data(), "DCAxy", "DCAxy; DCAxy (cm.)", kFALSE, 1000, -10.0, 10.0,
2755  AliQnCorrectionsVarManagerTask::kDcaXY);
2756  histos->AddHistogram(classStr.Data(), "DCAz", "DCAz; DCAz (cm.)", kFALSE, 1000, -10.0, 10.0,
2757  AliQnCorrectionsVarManagerTask::kDcaZ);
2758  histos->AddHistogram(classStr.Data(), "TPCncls", "TPCncls; TPCncls", kFALSE, 160, 0.0, 160.0,
2759  AliQnCorrectionsVarManagerTask::kTPCncls);
2760  histos->AddHistogram(classStr.Data(), "TPCsa_TPCncls", "TPC standalone TPCncls; TPCncls", kFALSE, 160, 0.0,
2761  160.0, AliQnCorrectionsVarManagerTask::kTPCnclsIter1);
2762 
2763  // run dependence
2764  histos->AddHistogram(classStr.Data(), "Pt_Run", "<p_{T}> vs run; run;", kTRUE, kNRunBins, runHistRange[0],
2765  runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo, 1000, 0.0, 50.0,
2767  histos->AddHistogram(classStr.Data(), "Eta_Run", "<#eta> vs run; run;", kTRUE, kNRunBins, runHistRange[0],
2768  runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo, 1000, -1.5, 1.5,
2769  AliQnCorrectionsVarManagerTask::kEta);
2770  histos->AddHistogram(classStr.Data(), "Phi_Run", "<#varphi> vs run; run;", kTRUE, kNRunBins,
2771  runHistRange[0], runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo, 1000, 0.0,
2772  6.3, AliQnCorrectionsVarManagerTask::kPhi);
2773  histos->AddHistogram(classStr.Data(), "DCAxy_Run", "<DCAxy> vs run; run;", kTRUE, kNRunBins,
2774  runHistRange[0], runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo, 1000, -10.0,
2775  10.0, AliQnCorrectionsVarManagerTask::kDcaXY);
2776  histos->AddHistogram(classStr.Data(), "DCAz_Run", "<DCAz> vs run; run;", kTRUE, kNRunBins, runHistRange[0],
2777  runHistRange[1], AliQnCorrectionsVarManagerTask::kRunNo, 1000, -10.0, 10.0,
2778  AliQnCorrectionsVarManagerTask::kDcaZ);
2779 
2780  // correlations between parameters
2781  histos->AddHistogram(classStr.Data(), "Eta_Pt_prof", "<p_{T}> vs #eta; #eta; p_{T} (GeV/c);", kTRUE, 300,
2782  -1.5, +1.5, AliQnCorrectionsVarManagerTask::kEta, 100, 0.0, 10.0,
2784  histos->AddHistogram(classStr.Data(), "Phi_Pt", "p_{T} vs #varphi; #varphi (rad.); p_{T} (GeV/c)", kFALSE,
2785  300, -0.01, 6.3, AliQnCorrectionsVarManagerTask::kPhi, 100, 0.0, 2.2,
2787  histos->AddHistogram(classStr.Data(), "Phi_Pt_prof", "<p_{T}> vs #varphi; #varphi (rad.); p_{T} (GeV/c)",
2788  kTRUE, 300, 0.0, 6.3, AliQnCorrectionsVarManagerTask::kPhi, 100, 0.0, 10.0,
2790  histos->AddHistogram(classStr.Data(), "Eta_Phi", "#varphi vs #eta; #eta; #varphi (rad.);", kFALSE, 200,
2791  -1.0, +1.0, AliQnCorrectionsVarManagerTask::kEta, 100, 0.0, 6.3,
2792  AliQnCorrectionsVarManagerTask::kPhi);
2793  histos->AddHistogram(
2794  classStr.Data(), "TPCncls_Eta_Phi_prof", "<TPC ncls> vs #varphi vs #eta; #eta; #varphi (rad.);TPC ncls",
2795  kTRUE, 200, -1.0, +1.0, AliQnCorrectionsVarManagerTask::kEta, 100, 0.0, 6.3,
2796  AliQnCorrectionsVarManagerTask::kPhi, 10, 0.0, 200., AliQnCorrectionsVarManagerTask::kTPCncls);
2797  histos->AddHistogram(
2798  classStr.Data(), "DCAxy_Eta_Phi_prof", "<DCAxy> vs #varphi vs #eta; #eta; #varphi (rad.);DCAxy (cm)",
2799  kTRUE, 200, -1.0, +1.0, AliQnCorrectionsVarManagerTask::kEta, 100, 0.0, 6.3,
2800  AliQnCorrectionsVarManagerTask::kPhi, 10, 0.0, 200., AliQnCorrectionsVarManagerTask::kDcaXY);
2801  histos->AddHistogram(
2802  classStr.Data(), "DCAz_Eta_Phi_prof", "<DCAz> vs #varphi vs #eta; #eta; #varphi (rad.);DCAz (cm)", kTRUE,
2803  200, -1.0, +1.0, AliQnCorrectionsVarManagerTask::kEta, 100, 0.0, 6.3,
2804  AliQnCorrectionsVarManagerTask::kPhi, 10, 0.0, 200., AliQnCorrectionsVarManagerTask::kDcaZ);
2805  histos->AddHistogram(classStr.Data(), "Pt_DCAxy", "DCAxy vs p_{T}; p_{T} (GeV/c); DCA_{xy} (cm)", kFALSE,
2806  100, 0.0, 10.0, AliQnCorrectionsVarManagerTask::kPt, 500, -2.0, 2.0,
2807  AliQnCorrectionsVarManagerTask::kDcaXY);
2808  histos->AddHistogram(classStr.Data(), "Pt_DCAz", "DCAz vs p_{T}; p_{T} (GeV/c); DCA_{z} (cm)", kFALSE, 100,
2809  0.0, 10.0, AliQnCorrectionsVarManagerTask::kPt, 500, -2.0, 2.0,
2810  AliQnCorrectionsVarManagerTask::kDcaZ);
2811  histos->AddHistogram(classStr.Data(), "Eta_DCAxy", "DCAxy vs #eta; #eta; DCA_{xy} (cm)", kFALSE, 100, -1.0,
2812  1.0, AliQnCorrectionsVarManagerTask::kEta, 500, -2.0, 2.0,
2813  AliQnCorrectionsVarManagerTask::kDcaXY);
2814  histos->AddHistogram(classStr.Data(), "Eta_DCAz", "DCAz vs #eta; #eta; DCA_{z} (cm)", kFALSE, 100, -1.0,
2815  1.0, AliQnCorrectionsVarManagerTask::kEta, 500, -2.0, 2.0,
2816  AliQnCorrectionsVarManagerTask::kDcaZ);
2817 
2818  for (Int_t ih = 0; ih < 6; ++ih) {
2819  // histos->AddHistogram(classStr.Data(), Form("Cos%dPhi_CentVZERO",ih+1), Form("<cos%d #varphi> vs
2820  // (CentVZERO); centrality VZERO; <cos%d #varphi>", ih+1, ih+1), kTRUE,
2821  // 20, 0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentVZERO, 500, -1., 1.,
2822  // AliQnCorrectionsVarManagerTask::kCosNPhi+ih);
2823  // histos->AddHistogram(classStr.Data(), Form("Sin%dPhi_CentVZERO",ih+1), Form("<sin%d #varphi> vs
2824  // (CentVZERO); centrality VZERO; <sin%d #varphi>", ih+1, ih+1), kTRUE,
2825  // 20, 0.0, 100.0, AliQnCorrectionsVarManagerTask::kCentVZERO, 500, -1.0, 1.0,
2826  // AliQnCorrectionsVarManagerTask::kSinNPhi+ih);
2827  histos->AddHistogram(
2828  classStr.Data(), Form("Cos%dPhi_Pt_Eta", ih + 1),
2829  Form("<cos%d #varphi> vs (#eta,p_{T}); #eta; p_{T} (GeV/c); <cos%d #varphi>", ih + 1, ih + 1), kTRUE,
2830  20, -1.0, 1.0, AliQnCorrectionsVarManagerTask::kEta, 30, 0.0, 3.0,
2831  AliQnCorrectionsVarManagerTask::kPt, 500, -1.0, 1.0, AliQnCorrectionsVarManagerTask::kCosNPhi + ih);
2832  histos->AddHistogram(
2833  classStr.Data(), Form("Sin%dPhi_Pt_Eta", ih + 1),
2834  Form("<sin%d #varphi> vs (#eta,p_{T}); #eta; p_{T} (GeV/c); <sin%d #varphi>", ih + 1, ih + 1), kTRUE,
2835  20, -1.0, 1.0, AliQnCorrectionsVarManagerTask::kEta, 30, 0.0, 3.0,
2836  AliQnCorrectionsVarManagerTask::kPt, 500, -1.0, 1.0, AliQnCorrectionsVarManagerTask::kSinNPhi + ih);
2837  histos->AddHistogram(
2838  classStr.Data(), Form("Cos%dPhi_CentVZERO_VtxZ", ih + 1),
2839  Form("<cos%d #varphi> vs (CentVZERO,VtxZ); Z (cm.); centrality VZERO; <cos%d #varphi>", ih + 1,
2840  ih + 1),
2841  kTRUE, 30, -15.0, 15.0, AliQnCorrectionsVarManagerTask::kVtxZ, 20, 0.0, 100.0,
2842  AliQnCorrectionsVarManagerTask::kCentVZERO, 500, -1., 1.,
2843  AliQnCorrectionsVarManagerTask::kCosNPhi + ih);
2844  histos->AddHistogram(
2845  classStr.Data(), Form("Sin%dPhi_CentVZERO_VtxZ", ih + 1),
2846  Form("<sin%d #varphi> vs (CentVZERO,VtxZ); Z (cm.); centrality VZERO; <sin%d #varphi>", ih + 1,
2847  ih + 1),
2848  kTRUE, 30, -15.0, 15.0, AliQnCorrectionsVarManagerTask::kVtxZ, 20, 0.0, 100.0,
2849  AliQnCorrectionsVarManagerTask::kCentVZERO, 500, -1.0, 1.0,
2850  AliQnCorrectionsVarManagerTask::kSinNPhi + ih);
2851  }
2852  }
2853 
2854  // Tracklet histograms
2855  if (classStr.Contains("TrackletQA")) {
2856  histos->AddHistClass(classStr.Data());
2857 
2858  histos->AddHistogram(classStr.Data(), "Eta", "#eta illumination; #eta;", kFALSE, 1000, -3.0, 3.0,
2859  AliQnCorrectionsVarManagerTask::kSPDtrackletEta);
2860  histos->AddHistogram(classStr.Data(), "Phi", "#varphi illumination; #varphi;", kFALSE, 300, -0.01, 6.3,
2861  AliQnCorrectionsVarManagerTask::kSPDtrackletPhi);
2862  histos->AddHistogram(classStr.Data(), "Eta_Phi", "#varphi vs #eta; #eta; #varphi (rad.);", kFALSE, 200,
2863  -3.0, +3.0, AliQnCorrectionsVarManagerTask::kSPDtrackletEta, 100, 0.0, 6.3,
2864  AliQnCorrectionsVarManagerTask::kSPDtrackletPhi);
2865  }
2866  }
2867 
2868  AliInfoGeneralStream("PWGJE::EMCALJetTasks::FlowVectorCorrections::DefineHistograms") << " done\n";
2869 }
2870 
2871 } /* namespace EMCALJetTasks */
2872 } /* namespace PWGJE */
static void DefineHistograms(AliQnCorrectionsManager *QnManager, AliQnCorrectionsHistos *histos, TString histClass)
static double LHC15oTrackingEfficiency(const double trackPt, const double trackEta, const int centralityBin, const std::string &taskName)
static void ConfigureTrackContainersFromYAMLConfig(std::vector< std::string > baseNameWithContainer, AliTrackContainer *trackCont, PWG::Tools::AliYAMLConfiguration &yamlConfig, std::string taskName)
static void AddVZERO(AliAnalysisTaskFlowVectorCorrections *task, AliQnCorrectionsManager *QnManager, AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
static const std::map< std::string, AliEmcalJet::JetAcceptanceType > fgkJetAcceptanceMap
void SetTrackCutsPeriod(const char *period)
Double_t Area() const
Definition: AliEmcalJet.h:130
double Double_t
Definition: External.C:58
static double DetermineTrackingEfficiency(const double trackPt, const double trackEta, const int centralityBin, const EEfficiencyPeriodIdentifier_t efficiencyPeriodIdentifier, const std::string &taskName)
void SetName(const char *n)
Set the name of the class of the objets inside the underlying array.
PHOS acceptance.
Definition: AliEmcalJet.h:75
DCal acceptance – spans entire rectangular region in eta-phi (including most of PHOS) ...
Definition: AliEmcalJet.h:71
void SetMinE(Double_t min)
static const double LHC15oParam_50_90_eta[13]
! 50-90% eta parameters
Container with name, TClonesArray and cuts for particles.
static void AddRawFMD(AliAnalysisTaskFlowVectorCorrections *task, AliQnCorrectionsManager *QnManager, AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
static double LHC11hTrackingEfficiency(const double trackPt, const double trackEta, const int centralityBin, const std::string &taskName)
char Char_t
Definition: External.C:18
static double LHC15oEtaEfficiencyImpl(const double trackEta, const double params[13], const int index)
static const double LHC11hParam_10_30[17]
! 10-30% good runs
static double LHC15oHighPtEfficiencyImpl(const double trackPt, const double params[10], const int index)
void SetMinPt(Double_t min)
static const double LHC11hParam_50_90[17]
! 50-90% good runs
Full acceptance, i.e. no acceptance cut applied – left to user.
Definition: AliEmcalJet.h:77
TCanvas * c
Definition: TestFitELoss.C:172
static const double LHC15oParam_0_10_pt[10]
! 0-10% pt parameters
bool GetProperty(std::vector< std::string > propertyPath, const std::string &propertyName, T &property, const bool requiredProperty) const
const PWG::JETFW::AliEmcalParticleJetConstituent * GetLeadingParticleConstituent() const
Get the leading particle constituent.
void SetEtaLimits(Double_t min, Double_t max)
Container for particles within the EMCAL framework.
void SetIsEmbedding(Bool_t b)
Set embedding status.
TPC fiducial acceptance (each eta edge narrowed by jet R)
Definition: AliEmcalJet.h:68
static const double LHC15oParam_10_30_eta[13]
! 10-30% eta parameters
static void ConfigureEventCuts(AliEventCuts &eventCuts, PWG::Tools::AliYAMLConfiguration &yamlConfig, const UInt_t offlineTriggerMask, const std::string &baseName, const std::string &taskName)
void SetAODFilterBits(UInt_t bits)
static UInt_t DeterminePhysicsSelectionFromYAML(const std::vector< std::string > &selections)
int Int_t
Definition: External.C:63
static void AddZDC(AliAnalysisTaskFlowVectorCorrections *task, AliQnCorrectionsManager *QnManager, AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
TPC acceptance.
Definition: AliEmcalJet.h:67
unsigned int UInt_t
Definition: External.C:33
ELeadingHadronBiasType_t
Determine the jet leading hadron bias type.
void SetClusNonLinCorrEnergyCut(Double_t cut)
static double LHC15oLowPtEfficiencyImpl(const double trackPt, const double params[10], const int index)
PHOS fiducial acceptance (each eta, phi edge narrowed by jet R)
Definition: AliEmcalJet.h:76
EMCal acceptance.
Definition: AliEmcalJet.h:69
static void AddTPC(AliAnalysisTaskFlowVectorCorrections *task, AliQnCorrectionsManager *QnManager, AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
static void ConfigureClusterContainersFromYAMLConfig(std::vector< std::string > baseNameWithContainer, AliClusterContainer *clusterCont, PWG::Tools::AliYAMLConfiguration &yamlConfig, std::string taskName)
Base class for container structures within the EMCAL framework.
static const double LHC15oParam_10_30_pt[10]
! 10-30% pt parameters
static double GetJetPt(const AliEmcalJet *jet, const double rho)
void SetIncludePHOS(Bool_t b)
static const double LHC11hParam_30_50[17]
! 30-50% good runs
static double LHC15oEtaEfficiency(const double trackEta, const double params[13])
static AliParticleContainer * CreateParticleOrTrackContainer(const std::string &collectionName)
static const std::map< std::string, AliEmcalTrackSelection::ETrackFilterType_t > fgkTrackFilterTypeMap
Relates string to the track filter enumeration for YAML configuration.
static const std::map< std::string, EEfficiencyPeriodIdentifier_t > fgkEfficiencyPeriodIdentifier
! Map from name to efficiency period identifier for use with the YAML config
static void ConfigureEMCalContainersFromYAMLConfig(std::vector< std::string > baseName, std::string containerName, AliEmcalContainer *cont, PWG::Tools::AliYAMLConfiguration &yamlConfig, std::string taskName)
static const double LHC11hParam_0_10[17]
! 0-10% good runs
static double RelativeEPAngle(double jetAngle, double epAngle)
static double GetLeadingHadronPt(AliEmcalJet *jet, ELeadingHadronBiasType_t leadingHadronType)
Double_t Pt() const
Definition: AliEmcalJet.h:109
const char * GetName() const
static double LHC11aTrackingEfficiency(const double trackPt, const double trackEta, const int centralityBin, const std::string &taskName)
static UInt_t DetermineJetAcceptanceFromYAML(const std::vector< std::string > &selections)
const PWG::JETFW::AliEmcalClusterJetConstituent * GetLeadingClusterConstituent() const
Get the leading cluster constituent.
virtual double Pt() const
Access to transverse momentum.
static AliAnalysisTaskFlowVectorCorrections * AddTaskFlowQnVectorCorrections(const std::string &configFilename)
static const double LHC15oParam_50_90_pt[10]
! 50-90% pt parameters
static const double LHC15oParam_30_50_pt[10]
! 30-50% pt parameters
ETrackFilterType_t
Pre-defined track filters.
static double LHC15oPtEfficiency(const double trackPt, const double params[10])
YAML configuration class for AliPhysics.
static const double LHC15oParam_0_10_eta[13]
! 0-10% eta parameters
virtual double Pt() const
Access to transverse momentum.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
static void AddFMD(AliAnalysisTaskFlowVectorCorrections *task, AliQnCorrectionsManager *QnManager, AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
static std::string DetermineUseDefaultName(InputObject_t objType)
int AddConfiguration(std::string configurationFilename, std::string configurationName="")
void SetTrackFilterType(ETrackFilterType_t f)
void SetPhiLimits(Double_t min, Double_t max)
DCal fiducial acceptance (each eta, phi edge narrowed by jet R)
Definition: AliEmcalJet.h:72
bool Bool_t
Definition: External.C:53
DCal acceptance – spans ONLY DCal (no PHOS or gap)
Definition: AliEmcalJet.h:73
void SetDefaultClusterEnergy(Int_t d)
EEfficiencyPeriodIdentifier_t
Identify the beam type and period that is being analyzed.
Container structure for EMCAL clusters.
static const std::map< std::string, VCluUserDefEnergy_t > fgkClusterEnergyTypeMap
Relates string to the cluster energy enumeration for YAML configuration.
DCal fiducial acceptance (each eta, phi edge narrowed by jet R)
Definition: AliEmcalJet.h:74
EMCal fiducial acceptance (each eta, phi edge narrowed by jet R)
Definition: AliEmcalJet.h:70
static void AddTZERO(AliAnalysisTaskFlowVectorCorrections *task, AliQnCorrectionsManager *QnManager, AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
static const double LHC15oParam_30_50_eta[13]
! 30-50% eta parameters
static void AddSPD(AliAnalysisTaskFlowVectorCorrections *task, AliQnCorrectionsManager *QnManager, AliQnCorrectionsVarManagerTask::Variables varForEventMultiplicity)
static const std::map< std::string, ELeadingHadronBiasType_t > fgkLeadingHadronBiasMap
! Map from name to leading hadron bias used with the YAML config
void SetClusHadCorrEnergyCut(Double_t cut)