AliPhysics  ced2227 (ced2227)
AddTaskFMDEventPlane.C
Go to the documentation of this file.
1 
18 void AddTaskFMDEventPlane(Bool_t mc = kFALSE)
19 {
20  // --- Get the analysis manager ------------------------------------
21  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
22  if (!mgr) Fatal("","No analysis manager to connect to.");
23 
24  // --- Check that we have an AOD input handler ---------------------
25  UShort_t aodInput = 0;
26  if (!(aodInput = AliForwardUtil::CheckForAOD()))
27  Fatal("","Cannot proceed without and AOD handler");
28  if (aodInput == 2 &&
29  !AliForwardUtil::CheckForTask("AliForwardMultiplicityBase"))
30  Fatal("","The relevant task wasn't added to the train");
31 
32 
33  // --- Make the event plane task -----------------------------------
34  AliFMDEventPlaneTask* task = new AliFMDEventPlaneTask("FMDEventPlane");
36  if (mc) task->SetMCInput(true);
37  mgr->AddTask(task);
38 
39  // --- Create containers for output --------------------------------
40  AliAnalysisDataContainer* sums =
41  mgr->CreateContainer("FMDEventPlaneSums", TList::Class(),
42  AliAnalysisManager::kOutputContainer,
43  AliAnalysisManager::GetCommonFileName());
44  AliAnalysisDataContainer* output =
45  mgr->CreateContainer("FMDEventPlaneResults", TList::Class(),
46  AliAnalysisManager::kParamContainer,
47  AliAnalysisManager::GetCommonFileName());
48  mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
49  mgr->ConnectOutput(task, 1, sums);
50  mgr->ConnectOutput(task, 2, output);
51 
52  return;
53 }
54 /*
55  * EOF
56  */
void AddTaskFMDEventPlane(Bool_t mc=kFALSE)
static UShort_t CheckForAOD()
void SetUsePhiWeights(Bool_t use=kTRUE)
unsigned short UShort_t
Definition: External.C:28
bool Bool_t
Definition: External.C:53
static Bool_t CheckForTask(const char *clsOrName, Bool_t cls=true)
AliFMDEventPlaneFinder & GetEventPlaneFinder()