AliPhysics  8d00e07 (8d00e07)
AddTaskForwardMCCorr.C
Go to the documentation of this file.
1 
20 AddTaskForwardMCCorr(Bool_t satellite=false,
21  UShort_t rflags=0,
22  UShort_t maxStrips=2)
23 {
24  // --- Load libraries ----------------------------------------------
25  gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2");
26 
27  // --- Creating the manager and handlers ---------------------------
28  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
29  if (!mgr->GetMCtruthEventHandler()) {
30  Error("AddTaskCentralMCCorr",
31  "No MC input handler defined - cannot continue");
32  return 0;
33  }
34 
35  // --- Add our task ------------------------------------------------
37  new AliForwardMCCorrectionsTask("ForwardCorr");
38  task->GetTrackDensity().SetDebug(false);
39  task->SetSatellite(satellite);
41  static_cast<AliFMDMCTrackDensity&>(task->GetTrackDensity());
42  dn.SetMaxConsequtiveStrips(maxStrips); // was 3
43  // task->SetVertexAxis(40, -20., 20.);
44  if (rflags != 0) {
46  if (rflags & 0x4) {
47  // Realistic weights
48  // Based on measurements in Pb-Pb @ 2.76
49  //
50  // Ratio to pi+- Reference Value [%]
51  // -------------+---------------+----------
52  // p/pbar | PRC88,044910 | 4.57
53  // K+- | PRC88,044910 | 14.88
54  // K^0_S | PRL111,222301 | 7.51
55  // Lambda | PRL111,222301 | 1.77
56  // Xi^0 | - | -
57  //
58  // WA98 Xi-/Lambda ~ 0.15 ->
59  // Xi- / pi = Xi-/Lambda Lambda / pi = 0.14 * 1.77 = 0.25%
60  // WA98 Omega-/Xi- ~ 0.25
61  // Omega- / pi- = Omega-/Xi- Xi-/pi = 0.25 * 0.25 = 0.06%
62  w->AddPDGCode(321, 2.0,true); // kaons
63  w->AddPDGCode(310, 1.5,true); // K0s
64  w->AddPDGCode(3122,1.5,true); // Lambda
65  w->AddPDGCode(3212,1.5,true); // Sigma0
66  w->AddPDGCode(3322,6.0,true); // Xi0
67  }
68  else {
69  // Roberto's analysis of Pb-Pb @ 5.02TeV
70  //
71  // pi^+/-2 [ 211]: 0.9412
72  // K^+/- [ 321]: 1.4118
73  // p/pbar [2212]: 0.9412
74  // K^0_S [ 310]: 1.5223
75  // Lambda [3122]: 2.7500
76  // Sigma^0 [3212]: 2.7500
77  // Xi^0 [3322]: 3.2411
78  w->AddPDGCode(211, 0.9583*0.9822,true); // pions
79  w->AddPDGCode(321, 1.4374*0.9822,true); // kaons
80  w->AddPDGCode(2212,0.9583*0.9822,true); // protons
81  w->AddPDGCode(310, 1.0000*1.5223,true); // K0s
82  w->AddPDGCode(3122,1.0000*2.7500,true); // Lambda
83  w->AddPDGCode(3212,1.0000*2.7500,true); // Sigma0
84  w->AddPDGCode(3322,1.0000*3.2411,true); // Xi0
85  }
86  if (rflags & 0x1) task->GetTrackDensity().SetWeights(w);
87  if (rflags & 0x2) task->GetTrackDensity().SetTruthWeights(w);
88  }
89 
90 
91  // --- connect input/output ----------------------------------------
92  task->Connect(0, 0);
93 
94  return task;
95 }
96 //
97 // EOF
98 //
void SetTruthWeights(AliBaseMCWeights *weights)
virtual Bool_t Connect(const char *sumFile=0, const char *resFile=0)
void SetWeights(AliBaseMCWeights *weights)
void SetDebug(Bool_t debug=true)
AliBaseMCTrackDensity & GetTrackDensity()
void SetMaxConsequtiveStrips(UShort_t n)
unsigned short UShort_t
Definition: External.C:28
AliAnalysisTask * AddTaskForwardMCCorr(Bool_t satellite=false, UShort_t rflags=0, UShort_t maxStrips=2)
bool Bool_t
Definition: External.C:53
virtual void AddPDGCode(Int_t pdg, Double_t weight, Bool_t anti=false)