1 AlidNdPtAnalysisPbPbAOD *AddTask_dNdPt_PbPbAOD( UInt_t uTriggerMask = AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral ,
2 Double_t dNCrossedRowsTPC = 120,
3 char *contName = "dNdPtPbPbAOD")
5 // Creates, configures and attaches to the train a cascades check task.
6 // Get the pointer to the existing analysis manager via the static access method.
7 //==============================================================================
8 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
10 ::Error("AddTask_dNdPt_PbPbAOD", "No analysis manager to connect to.");
14 // Check the analysis type using the event handlers connected to the analysis manager.
15 //==============================================================================
16 if (!mgr->GetInputEventHandler()) {
17 ::Error("AddTask_dNdPt_PbPbAOD", "This task requires an input event handler");
20 TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
22 // Create and configure the task
23 AlidNdPtAnalysisPbPbAOD *task = new AlidNdPtAnalysisPbPbAOD("dNdPtPbPbAOD");
24 // UInt_t triggerMask = AliVEvent::kMB;
25 // triggerMask |= AliVEvent::kCentral;
26 // triggerMask |= AliVEvent::kSemiCentral;
28 task->SelectCollisionCandidates(uTriggerMask);
30 task->SetCutMinNCrossedRowsTPC(dNCrossedRowsTPC);
32 ::Info("AddTask_dNdPt_PbPbAOD",Form("CrossedRowCut set to %.0f", task->GetCutMinNCrossedRowsTPC()));
36 AliAnalysisDataContainer *coutput = mgr->CreateContainer(Form("%s", contName), TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:dNdPtHistos", mgr->GetCommonFileName()));
38 mgr->ConnectInput( task, 0, mgr->GetCommonInputContainer());
39 mgr->ConnectOutput(task, 1, coutput);