K0s code update (Matt Steinpreis)
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / macros / AddTaskK0Femto.C
CommitLineData
41dfc4d3 1AliFemtoK0Analysis *AddTaskK0Femto(bool SignDep = kFALSE, bool FieldPositive = kTRUE, bool OnlineCase = kTRUE, bool MeritCase = kTRUE, bool Case3D = kFALSE, float MinDL = 0.0, int MeritCutChoice = 4, float MinSep = 5.0, bool FlatCent = kFALSE, bool PsiBinning = kFALSE, TString nameSpec = "NoSpec"){
3e7fa20c 2
3 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
4 if (!mgr) {
6529fa3e 5 ::Error("AddTaskBF", "No analysis manager to connect to.");
3e7fa20c 6 return NULL;
7 }
8
41dfc4d3 9 AliFemtoK0Analysis *K0Task = new AliFemtoK0Analysis("K0Task", SignDep, FieldPositive, OnlineCase, MeritCase, Case3D, MinDL, MeritCutChoice, MinSep, FlatCent, PsiBinning);
6529fa3e 10 if(!K0Task) exit(-1);
3e7fa20c 11 mgr->AddTask(K0Task);
12
13 TString outputFileName = AliAnalysisManager::GetCommonFileName();
b8768baf 14 outputFileName += ":PWGCF.outputK0Analysis_";
15 outputFileName += nameSpec;
c338a025 16 if(SignDep){
17 if(FieldPositive) outputFileName += "_FieldPos.root";
18 else outputFileName += "_FieldNeg.root";
19 }
3e7fa20c 20 AliAnalysisDataContainer *coutputK0 = mgr->CreateContainer("MyList", TList::Class(), AliAnalysisManager::kOutputContainer, outputFileName.Data());
21
22 mgr->ConnectInput(K0Task, 0, mgr->GetCommonInputContainer());
23 mgr->ConnectOutput(K0Task, 1, coutputK0);
24
25 return K0Task;
26}
27
28
29