Adding Correlation analysis for Leading V0 particle AliLeadingV0Correlation (Sandun...
[u/mrichter/AliRoot.git] / PWGCF / Correlations / macros / AddTaskLV0Correlation.C
CommitLineData
ff0805a7 1AliLeadingV0Correlation* AddTaskLV0Correlation(TString fListName = "LV0Correlation",
2 TString fCollisiontype = "PbPb",
3 Bool_t fAnalysisMC = 0,
4 Double_t aPVzCut = 10,
5 UInt_t aFilterBit = 128,
6 Double_t aCutV0Radius = 0.5,
7 Double_t aCutDCANegToPV = 0.06,
8 Double_t aCutDCAPosToPV = 0.06,
9 Double_t aCutDCAV0Daughters = 1.0,
10 Double_t aCutV0CosPA = 0.995,
11 Double_t aSpecialArmenterosCutK0s = 5
12 )
13{
14 // Get the current analysis manager.
15 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
16 if (!mgr) {Error("AddTaskLV0Correlation.C", "No Analysis Manager ");return 0;}
17
18 //PVz Binning for pool
19 Double_t pvzbinlimits[] = {-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10};
20 Int_t pvzbinnumb = sizeof(pvzbinlimits)/sizeof(Double_t) - 1;
21
22 //Cent(PbPb) or Mult(PP) Binning for pool
23 Double_t cent_mult_binlimits[] = {0,20,40,60,80,100};
24 Int_t cent_mult_bin_numb = sizeof(cent_mult_binlimits)/sizeof(Double_t) - 1;
25
26 //Correlation task
27 AliLeadingV0Correlation *myTask = new AliLeadingV0Correlation(fListName.Data());
28
29 myTask->SetCollidingSystem(fCollisiontype);
30 myTask->SetMCAnalysis(fAnalysisMC);
31 myTask->SetMaxNEventsInPool(2000);
32 myTask->SetMinNTracksInPool(1000);
33 myTask->SetPoolPVzBinLimits(pvzbinnumb,pvzbinlimits);
34 myTask->SetPoolCentBinLimits(cent_mult_bin_numb,cent_mult_binlimits);
35 myTask->SetPrimeryVertexCut(aPVzCut);
36 myTask->SetEatCut(0.9);
37 myTask->SetFilterBit(aFilterBit);
38 myTask->SetTrigPtBinLimits(6.0,12.0);
39 myTask->SetAssocPtBinLimits(0.15,6.0);
40 myTask->SetCutV0Radius(aCutV0Radius);
41 myTask->SetCutDCANToP(aCutDCANegToPV);
42 myTask->SetCutDCAPToP(aCutDCAPosToPV);
43 myTask->SetCutDCADaughters(aCutDCAV0Daughters);
44 myTask->SetCutCPA(aCutV0CosPA);
45 myTask->SetCutArmenterosK0s(aSpecialArmenterosCutK0s);
46
47 mgr->AddTask(myTask);
48
49 // Create containers for input/output
50 TString outputFileName = AliAnalysisManager::GetCommonFileName();
51 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
52 AliAnalysisDataContainer *coutput = mgr->CreateContainer(fListName.Data(), TList::Class(),AliAnalysisManager::kOutputContainer,outputFileName);
53
54 //____________________________________________//
55 mgr->ConnectInput(myTask,0,cinput);
56 mgr->ConnectOutput(myTask,1,coutput);
57
58return myTask;
59}
60
61