cosmetics trial for coverity warning
[u/mrichter/AliRoot.git] / PWGCF / Correlations / macros / AddTaskLV0Correlation.C
CommitLineData
da6ac661 1AliLeadingV0Correlation* AddTaskLV0Correlation(TString fListName = "LV0Correlation",
2 TString fCollisiontype = "PP",
bf855ed5 3 TString ftriggertype = "Alltrigs",
da6ac661 4 Bool_t fAnalysisMC = 0,
5 Int_t fCase = 2,
6 Bool_t fRemovePileUP = 0,
7 Bool_t fRemoveAutoCorr = 0,
8 Double_t fPVzCut = 10,
9 UInt_t fFilterBit = 128,
10 Double_t fRapidityCut = 0.75,
11 Double_t fEtaCut = 0.9,
12 Int_t fmaxEventsinPool = 2000,
13 Int_t fmaxTracksinPool = 1000,
14 Int_t fMinEventsToMix = 5,
15 Double_t fV0radius = 0.3,
16 Double_t fV0PostoPVz = 0.060,
17 Double_t fV0NegtoPVz = 0.060,
18 Double_t fDCAV0Daughters = 1.00,
19 Double_t fCPAK0 = 0.960,
20 Double_t fCPALam = 0.997,
21 Double_t fRejectLamK0 = 0.005,
22 Double_t fRejectK0Lam = 0.010,
23 Double_t fSigmaPID = 3.0,
24 Double_t fCutCTK0 = 20.0,
25 Double_t fCutCTLa = 30.0,
26 Double_t fMassCutK0 = 0.0105,
27 Double_t fMassCutLa = 0.0105)
ff0805a7 28{
29 // Get the current analysis manager.
30 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
31 if (!mgr) {Error("AddTaskLV0Correlation.C", "No Analysis Manager ");return 0;}
32
da6ac661 33 //PVz Binning for pool PP or PbPb
bf855ed5 34 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};
ff0805a7 35 Int_t pvzbinnumb = sizeof(pvzbinlimits)/sizeof(Double_t) - 1;
36
da6ac661 37 //Mult Binning for pool pp
38 Double_t cent_mult_binlimitsPP[] = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90,
39 100,110,120,130,140,150,160,170,180,190,
40 200,210,220,230,240,250,260,270,280,290,
41 300,310,320,330,340,350,360,370,380,390,
42 400,410,420,430,440,450,460,470,480,490,
43 500,520,540,560,580,600,620,640,660,680,
44 700,650,800,900,1000,1200,1400,1600,1800,
45 2000};
46
47 Int_t cent_mult_bin_numbPP = sizeof(cent_mult_binlimitsPP)/sizeof(Double_t) - 1;
48
49 //Cent Binning for pool PbPb
50 Double_t cent_mult_binlimitsPbPb[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,
51 14,15,16,17,18,19,20,21,22,23,24,25,26,27,
52 28,29,30,31,32,33,34,35,36,37,38,39,40,42,
53 44,46,48,50,52,54,56,58,60,65,70,75,80,90};
54
55 Int_t cent_mult_bin_numbPbPb = sizeof(cent_mult_binlimitsPbPb)/sizeof(Double_t) - 1;
ff0805a7 56 //Correlation task
57 AliLeadingV0Correlation *myTask = new AliLeadingV0Correlation(fListName.Data());
58
59 myTask->SetCollidingSystem(fCollisiontype);
bf855ed5 60 myTask->SetTriggerType(ftriggertype);
ff0805a7 61 myTask->SetMCAnalysis(fAnalysisMC);
da6ac661 62 myTask->SetCase(fCase);
63 myTask->SetRemovePileUp(fRemovePileUP);
64 myTask->SetRemoveAutoCorr(fRemoveAutoCorr);
9bcef488 65 myTask->SetMaxNEventsInPool(fmaxEventsinPool);
66 myTask->SetMinNTracksInPool(fmaxTracksinPool);
da6ac661 67 myTask->SetMinEventsToMix(fMinEventsToMix);
ff0805a7 68 myTask->SetPoolPVzBinLimits(pvzbinnumb,pvzbinlimits);
da6ac661 69 if(fCollisiontype=="PP")myTask->SetPoolCentBinLimits(cent_mult_bin_numbPP,cent_mult_binlimitsPP);
bf855ed5 70 if(fCollisiontype=="PbPb"||fCollisiontype=="PbPb")myTask->SetPoolCentBinLimits(cent_mult_bin_numbPbPb,cent_mult_binlimitsPbPb);
da6ac661 71 myTask->SetPrimeryVertexCut(fPVzCut);
72 myTask->SetEatCut(fEtaCut);
73 myTask->SetFilterBit(fFilterBit);
74 myTask->SetCutRap(fRapidityCut);
75 myTask->SetV0Radius(fV0radius);
76 myTask->SetV0PostoPVz(fV0PostoPVz);
77 myTask->SetV0NegtoPVz(fV0NegtoPVz);
78 myTask->SetDCAV0Daughters(fDCAV0Daughters);
79 myTask->SetCPAK0(fCPAK0);
80 myTask->SetCPALam(fCPALam);
81 myTask->SetRejectLamK0(fRejectLamK0);
82 myTask->SetRejectK0Lam(fRejectK0Lam);
83 myTask->SetSigmaPID(fSigmaPID);
84 myTask->SetCTK0(fCutCTK0);
85 myTask->SetCTLa(fCutCTLa);
86 myTask->SetMassCutK0(fMassCutK0);
87 myTask->SetMassCutLa(fMassCutLa);
ff0805a7 88
89 mgr->AddTask(myTask);
90
91 // Create containers for input/output
92 TString outputFileName = AliAnalysisManager::GetCommonFileName();
9bcef488 93 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
ff0805a7 94 AliAnalysisDataContainer *coutput = mgr->CreateContainer(fListName.Data(), TList::Class(),AliAnalysisManager::kOutputContainer,outputFileName);
95
96 //____________________________________________//
97 mgr->ConnectInput(myTask,0,cinput);
98 mgr->ConnectOutput(myTask,1,coutput);
99
100return myTask;
101}
102
103