Update from Sandun
[u/mrichter/AliRoot.git] / PWGCF / Correlations / macros / AddTaskLV0Correlation.C
... / ...
CommitLineData
1AliLeadingV0Correlation* AddTaskLV0Correlation(TString fListName = "LV0Correlation",
2 TString fCollisiontype = "PP",
3 Bool_t fAnalysisMC = 1,
4 Int_t fCase = 2,
5 Bool_t fRemoveAutoCorr = 0,
6 Double_t fPVzCut = 10,
7 Int_t fFilterBit = 256,
8 Double_t fRapidityCut = 0.75,
9 Int_t fmaxEventsinPool = 2000,
10 Int_t fminTracksinPool = 100,
11 Int_t fMinEventsToMix = 5,
12 Double_t fV0radius = 0.3,
13 Double_t fV0PostoPVz = 0.060,
14 Double_t fV0NegtoPVz = 0.060,
15 Double_t fDCAV0Daughters = 1.00,
16 Double_t fCPAK0 = 0.960,
17 Double_t fCPALam = 0.997,
18 Double_t fRejectLamK0 = 0.005,
19 Double_t fRejectK0Lam = 0.010,
20 Double_t fSigmaPID = 3.0,
21 Double_t fCutCTK0 = 20.0,
22 Double_t fCutCTLa = 30.0,
23 Double_t fMassCutK0 = 0.0105,
24 Double_t fMassCutLa = 0.0105,
25 Double_t fTriglow = 6.0,
26 Double_t fTrighigh = 12.0,
27 Double_t fTPCClusters = 70,
28 Double_t fTPCfindratio = 0.8)
29{
30
31 // Get the current analysis manager.
32 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
33 if (!mgr) {Error("AddTaskLV0Correlation.C", "No Analysis Manager ");return 0;}
34
35 //PVz Binning for pool PP or PbPb
36 Double_t pvzbinlimits[] = {-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12};
37 Int_t pvzbinnumb = sizeof(pvzbinlimits)/sizeof(Double_t) - 1;
38
39 //Mult Binning for pool pp
40 Double_t cent_mult_binlimitsPP[] = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90,
41 100,110,120,130,140,150,160,170,180,190,
42 200,210,220,230,240,250,260,270,280,290,
43 300,500,1000,2000};
44
45 Int_t cent_mult_bin_numbPP = sizeof(cent_mult_binlimitsPP)/sizeof(Double_t) - 1;
46
47 //Cent Binning for pool PbPb
48 Double_t cent_mult_binlimitsPbPb[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,
49 14,15,16,17,18,19,20,21,22,23,24,25,26,27,
50 28,29,30,31,32,33,34,35,36,37,38,39,40,42,
51 44,46,48,50,52,54,56,58,60,65,70,75,80,90};
52
53 Int_t cent_mult_bin_numbPbPb = sizeof(cent_mult_binlimitsPbPb)/sizeof(Double_t) - 1;
54 //Correlation task
55 AliLeadingV0Correlation *myTask = new AliLeadingV0Correlation(fListName.Data());
56
57 myTask->SetCollidingSystem(fCollisiontype);
58 myTask->SetMCAnalysis(fAnalysisMC);
59 myTask->SetCase(fCase);
60 myTask->SetRemoveAutoCorr(fRemoveAutoCorr);
61 myTask->SetMaxNEventsInPool(fmaxEventsinPool);
62 myTask->SetMinNTracksInPool(fminTracksinPool);
63 myTask->SetMinEventsToMix(fMinEventsToMix);
64 myTask->SetPoolPVzBinLimits(pvzbinnumb,pvzbinlimits);
65 if(fCollisiontype=="PP")myTask->SetPoolCentBinLimits(cent_mult_bin_numbPP,cent_mult_binlimitsPP);
66 if(fCollisiontype=="PbPb")myTask->SetPoolCentBinLimits(cent_mult_bin_numbPbPb,cent_mult_binlimitsPbPb);
67 myTask->SetPrimeryVertexCut(fPVzCut);
68 myTask->SetFilterBit(fFilterBit);
69 myTask->SetCutRap(fRapidityCut);
70 myTask->SetV0Radius(fV0radius);
71 myTask->SetV0PostoPVz(fV0PostoPVz);
72 myTask->SetV0NegtoPVz(fV0NegtoPVz);
73 myTask->SetDCAV0Daughters(fDCAV0Daughters);
74 myTask->SetCPAK0(fCPAK0);
75 myTask->SetCPALam(fCPALam);
76 myTask->SetRejectLamK0(fRejectLamK0);
77 myTask->SetRejectK0Lam(fRejectK0Lam);
78 myTask->SetSigmaPID(fSigmaPID);
79 myTask->SetCTK0(fCutCTK0);
80 myTask->SetCTLa(fCutCTLa);
81 myTask->SetMassCutK0(fMassCutK0);
82 myTask->SetMassCutLa(fMassCutLa);
83 myTask->SetTrigLow(fTriglow);
84 myTask->SetTrigHigh(fTrighigh);
85 myTask->SetTPCClusters(fTPCClusters);
86 myTask->SetTPCFinables(fTPCfindratio);
87
88 mgr->AddTask(myTask);
89
90 // Create containers for input/output
91 TString outputFileName = AliAnalysisManager::GetCommonFileName();
92 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
93 AliAnalysisDataContainer *coutput = mgr->CreateContainer(fListName.Data(), TList::Class(),AliAnalysisManager::kOutputContainer,outputFileName);
94
95 //____________________________________________//
96 mgr->ConnectInput(myTask,0,cinput);
97 mgr->ConnectOutput(myTask,1,coutput);
98
99return myTask;
100}
101
102
103