]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/Nuclei/masses/AddTaskNuclei.C
Merge remote-tracking branch 'origin/master' into TPCdev
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / Nuclei / masses / AddTaskNuclei.C
1 AliAnalysisTaskSE *AddTaskNuclei(Bool_t kAOD=kTRUE, Double_t CentralityMin=0.0, Double_t CentralityMax=100.0, Int_t filterBit=16, Double_t AbsEtaMin=0.0, Double_t AbsEtaMax=0.8, Double_t DCAxyCut=0.1, Double_t DCAzCut=1000.0, Double_t fNsigmaTpcCut=2.0, Int_t NminTpcCluster=0, Int_t iTRDslices=0, Int_t kSignalCheck=1, Int_t iMtof=1, Int_t kPvtxCorr=1){
2
3   //get the current analysis manager
4   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
5   
6   if (!mgr) {
7     Error("No manager found in AddTaskVZERO. Why?");
8     return 0;
9   }
10   // currently don't accept AOD input
11   if (kAOD && !mgr->GetInputEventHandler()->InheritsFrom(AliAODInputHandler::Class())) { // check AOD
12     Error("AddTaskVZERO","This task works only with AOD input!");
13     return 0;
14   }
15   else if(1){ // check ESD
16
17   }
18
19   //========= Add tender to the ANALYSIS manager and set default storage =====
20   
21   char mytaskName[100];
22   snprintf(mytaskName,100,"AliAnalysisNucleiMass");
23
24   AliAnalysisNucleiMass *task = new AliAnalysisNucleiMass(mytaskName);
25   task->SetCentrality(CentralityMin,CentralityMax);
26   task->SetFilterBit(filterBit);
27   task->SetAbsEtaLimit(AbsEtaMin,AbsEtaMax);
28   task->SetDCACut(DCAxyCut,DCAzCut);
29   task->SetNsigmaTPCCut(fNsigmaTpcCut);
30   task->SetNminTPCcluster(NminTpcCluster);
31   task->SetTrdCut(iTRDslices);
32   task->SetisSignalCheck(kSignalCheck);
33   task->SetMtofMethod(iMtof);
34   task->SetPvtxNucleiCorrection(kPvtxCorr);
35
36   mgr->AddTask(task);
37
38   //Attach input to my tasks
39   char name[1000];
40
41   snprintf(name,1000,"cchain1%.0f_%.0f_FilterBit=%02i_EtaMin=%.1f_EtaMax=%.1f_DCAxyCUT=%.2f_DCAzCUT=%.1f_NsigTPCcut=%1.0f_NminTpcClusters=%03i_iTrdCut=%i_kSignCheck=%i_iMtof=%i_kPvtxCorr=%i",CentralityMin,CentralityMax,filterBit,AbsEtaMin,AbsEtaMax,DCAxyCut,DCAzCut,fNsigmaTpcCut,NminTpcCluster,iTRDslices,kSignalCheck,iMtof,kPvtxCorr);
42
43   AliAnalysisDataContainer *cinput = mgr->CreateContainer(name,TChain::Class(),AliAnalysisManager::kInputContainer);
44   mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
45
46   // Attach output to my tasks
47   
48   snprintf(name,1000,"ResultsBmm_CC%.0f_%.0f_FilterBit=%02i_EtaMin=%.1f_EtaMax=%.1f_DCAxyCUT=%.2f_DCAzCUT=%.1f_NsigTPCcut=%1.0f_NminTpcClusters=%03i_iTrdCut=%i_kSignCheck=%i_iMtof=%i_kPvtxCorr=%i",CentralityMin,CentralityMax,filterBit,AbsEtaMin,AbsEtaMax,DCAxyCut,DCAzCut,fNsigmaTpcCut,NminTpcCluster,iTRDslices,kSignalCheck,iMtof,kPvtxCorr);
49   AliAnalysisDataContainer *cOutputL= mgr->CreateContainer(name,TList::Class(), AliAnalysisManager::kOutputContainer, AliAnalysisManager::GetCommonFileName());
50   mgr->ConnectOutput(task, 1, cOutputL);
51
52   snprintf(name,1000,"ResultsBpp_CC%.0f_%.0f_FilterBit=%02i_EtaMin=%.1f_EtaMax=%.1f_DCAxyCUT=%.2f_DCAzCUT=%.1f_NsigTPCcut=%1.0f_NminTpcClusters=%03i_iTrdCut=%i_kSignCheck=%i_iMtof=%i_kPvtxCorr=%i",CentralityMin,CentralityMax,filterBit,AbsEtaMin,AbsEtaMax,DCAxyCut,DCAzCut,fNsigmaTpcCut,NminTpcCluster,iTRDslices,kSignalCheck,iMtof,kPvtxCorr);
53   AliAnalysisDataContainer *cOutputL2= mgr->CreateContainer(name,TList::Class(), AliAnalysisManager::kOutputContainer, AliAnalysisManager::GetCommonFileName());
54   mgr->ConnectOutput(task, 2, cOutputL2);
55
56   return task;
57 }