AliPhysics  b555aef (b555aef)
AddTaskCentralMult.C
Go to the documentation of this file.
1 
30  ULong_t runNo=0,
31  UShort_t sys=0,
32  UShort_t sNN=0,
33  Short_t field=0,
34  const char* config="CentralAODConfig.C",
35  const char* corrs=0)
36 {
37  // --- Load libraries ----------------------------------------------
38  gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2");
39 
40  // --- Get analysis manager ----------------------------------------
41  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
42  if (!mgr) {
43  Error("AddTaskCentralMult", "No analysis manager to connect to.");
44  return NULL;
45  }
46 
47  // --- Make the task -----------------------------------------------
49  if (!mc) task = new AliCentralMultiplicityTask("Central");
50  else task = new AliCentralMCMultiplicityTask("Central");
51  task->Configure(config);
52 
53  // --- Set optional corrections path -------------------------------
56  if (corrs && corrs[0] != '\0') cm.SetPrefix(corrs);
57 
58  // --- Prime the corrections ---------------------------------------
59  if(sys>0 && sNN > 0) {
60  cm.Init(runNo, sys, sNN, field);
61  if (!cm.HasSecondaryCorrection())
62  Fatal("AddTaskCentralMult", "No secondary correction defined!");
63  if (!cm.HasAcceptanceCorrection())
64  Fatal("AddTaskCentralMult", "No acceptance correction defined!");
65  }
66 
67  // --- Make the output container and connect it --------------------
68  task->Connect(0,0);
69 
70  return task;
71 }
72 //
73 // EOF
74 //
virtual void SetPrefix(const TString &prefix)
virtual Bool_t Connect(const char *sumFile=0, const char *resFile=0)
Bool_t Init(ULong_t runNumber, UShort_t collisionSystem, UShort_t cmsNN, Short_t field, Bool_t mc=false, Bool_t satelliteCollisions=false, UInt_t what=kDefault, Bool_t force=false)
virtual Bool_t Configure(const char *macro="-default-")
unsigned long ULong_t
Definition: External.C:38
short Short_t
Definition: External.C:23
unsigned short UShort_t
Definition: External.C:28
bool Bool_t
Definition: External.C:53
AliAnalysisTask * AddTaskCentralMult(Bool_t mc=false, ULong_t runNo=0, UShort_t sys=0, UShort_t sNN=0, Short_t field=0, const char *config="CentralAODConfig.C", const char *corrs=0)
static AliCentralCorrectionManager & Instance()