AliPhysics  56f1704 (56f1704)
AddTaskFMDELoss.C
Go to the documentation of this file.
1 
35  Bool_t onlyMB=false,
36  Double_t lowCut=-1,
37  const Char_t* config="elossFitConfig.C",
38  const Char_t* corrs="",
39  const Char_t* extraDead="")
40 {
41  // --- Load libraries ----------------------------------------------
42  gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2");
43 
44  // --- Get analysis manager ----------------------------------------
45  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
46  if (!mgr) {
47  Error("AddTaskFMDELoss", "No analysis manager to connect to.");
48  return NULL;
49  }
50 
51  // --- Set alternative corrections path ----------------------------
53  if (corrs && corrs[0] != '\0') cm.SetPrefix(corrs);
54 
55  // --- Make the task and add it to the manager ---------------------
56  AliFMDEnergyFitterTask* task = new AliFMDEnergyFitterTask("ForwardELoss");
57  // --- Set parameters on the algorithms ----------------------------
58  task->Configure(config);
59 
60  // For MC input we explicitly disable the noise correction
61  if (mc) task->GetESDFixer().SetRecoNoiseFactor(4);
62 
63  // If we get extra dead map from outside, add it here
64  if (extraDead && extraDead[0] != '\0') task->GetESDFixer().AddDead(extraDead);
65  // If we got a low cut value, set it
66  if (lowCut > 0) task->GetEnergyFitter().SetLowCut(lowCut);
67 
68  // --- General -----------------------------------------------------
69  // If set, only collect statistics for MB. This is to prevent a
70  // bias when looping over data where the MB trigger is downscaled.
71  task->SetOnlyMB(onlyMB);
72 
73  // --- Make the output container and connect it --------------------
74  task->Connect(0,0);
75 
76  Printf("Returning task %p", task);
77  return task;
78 }
79 //
80 // EOF
81 //
double Double_t
Definition: External.C:58
virtual void SetPrefix(const TString &prefix)
void AddDead(UShort_t d, Char_t r, UShort_t s, UShort_t t)
AliAnalysisTask * AddTaskFMDELoss(Bool_t mc, Bool_t onlyMB=false, Double_t lowCut=-1, const Char_t *config="elossFitConfig.C", const Char_t *corrs="", const Char_t *extraDead="")
virtual Bool_t Connect(const char *sumFile=0, const char *resFile=0)
void SetLowCut(Double_t lowCut=0.3)
char Char_t
Definition: External.C:18
void SetOnlyMB(Bool_t onlyMB)
virtual Bool_t Configure(const char *macro="-default-")
void SetRecoNoiseFactor(Int_t f)
AliFMDESDFixer & GetESDFixer()
bool Bool_t
Definition: External.C:53
AliFMDEnergyFitter & GetEnergyFitter()
static AliForwardCorrectionManager & Instance()