]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/PHOSTasks/PHOS_Correlation/AddTaskPi0Correlations.C
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGGA / PHOSTasks / PHOS_Correlation / AddTaskPi0Correlations.C
CommitLineData
0e5afded 1AliPHOSCorrelations* AddTaskPi0Correlations ( const char* name = "Pi0Corr",
9aed5fcd 2 const char* options = "11h",
9aed5fcd 3 Double_t sigmaWidth = 3.,
4 Int_t downCentLimit = 0,
5 Int_t upCentLimit = 90 )
67ef08bd 6{
9aed5fcd 7 //Author: Ponomarenko Daniil (Daniil.Ponomarenko@cern.ch)
67ef08bd 8 /* $Id$ */
9
10 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
11 if (!mgr)
12 {
6d1a092e 13 ::Error("AddTaskPi0Correlations", "No analysis manager to connect to");
67ef08bd 14 return NULL;
15 }
16
17 if (!mgr->GetInputEventHandler())
18 {
6d1a092e 19 ::Error("AddTaskPi0Correlations", "This task requires an input event handler");
67ef08bd 20 return NULL;
21 }
22
d2c19ce3 23
67ef08bd 24 stringstream ss;
25 ss << downCentLimit;
26 string strDownCentLimit = ss.str();
27 char text[255];
28 sprintf(text,"%2i",upCentLimit);
29 string strUpCentLimit = text;
30 TString centralityBorder = TString ("CB") + strDownCentLimit.c_str() + TString ("t") + strUpCentLimit.c_str() + TString ("Cnt");
d2c19ce3 31 TString sigmaBorder = Form("%2iSigma", int(sigmaWidth*10.));
32 if (sigmaWidth == 0) sigmaBorder = "00Sigma";
33 TString sName = TString (name) + sigmaBorder + centralityBorder ;
67ef08bd 34
35
6d1a092e 36 AliPHOSCorrelations* task = new AliPHOSCorrelations( Form("%sTask", sName.Data()) );
67ef08bd 37
d2c19ce3 38 if( TString(options).Contains("10h") ) {
0e5afded 39 task->SetPeriod( AliPHOSCorrelations::kLHC10h );
d2c19ce3 40 task->SetCentralityEstimator("V0M");
41 }
42 if( TString(options).Contains("11h") ) {
0e5afded 43 task->SetPeriod( AliPHOSCorrelations::kLHC11h );
d2c19ce3 44 task->SetCentralityEstimator("V0M");
83aecbbd 45 if( downCentLimit == 0 && upCentLimit == 10 )
46 {
47 task->SetMassMeanParametrs(-4.03237e-05, 0.138352);
48 task->SetMassSigmaParametrs(0.00722915, 1.24329e-08, 0.00553326, 0.00128347);
49 }
50
51 if( downCentLimit == 20 && upCentLimit == 50 )
52 {
53 task->SetMassMeanParametrs(1.00796e-05, 0.136096);
54 task->SetMassSigmaParametrs(0.00100059, 1.10485, 0.00570446, 0.00100001);
55 }
56
d2c19ce3 57 }
58 if( TString(options).Contains("13") ) {
0e5afded 59 task->SetPeriod( AliPHOSCorrelations::kLHC13 );
d2c19ce3 60 task->SetCentralityEstimator("V0A");
83aecbbd 61 if( downCentLimit == 0 && upCentLimit == 10 )
62 {
63 task->SetMassMeanParametrs(-1.15288e-05, 0.134496);
64 task->SetMassSigmaParametrs(0.00541561, 1.55431e-15, 0.00661674, 0.00899229);
65 }
66
67 if( downCentLimit == 20 && upCentLimit == 50 )
68 {
69 task->SetMassMeanParametrs(-8.28487e-06, 0.134528);
70 task->SetMassSigmaParametrs(0.0070921, 2.05058e-12, 0.00660061, 0.00750263);
71
72 }
d2c19ce3 73 }
74
67ef08bd 75
76 // Binning
4ae540f6 77 // TODO: Make other binning for 0-10% and 20-50%
67ef08bd 78 //Central:
6d1a092e 79 if( downCentLimit == 0 && upCentLimit == 10 )
67ef08bd 80 {
6d1a092e 81 const int nbins = 5;
82 Double_t cbin[nbins+1] = {0., 2., 4., 6., 8., 10.};
67ef08bd 83 TArrayD tbin(nbins+1, cbin);
6d1a092e 84 Int_t nMixed[nbins] = {100, 100, 100, 100, 100};
67ef08bd 85 TArrayI tNMixed(nbins, nMixed);
86 task->SetCentralityBinning(tbin, tNMixed);
87 }
88 // SemiCentral:
6d1a092e 89 if( downCentLimit == 20 && upCentLimit == 50 )
67ef08bd 90 {
6d1a092e 91 const int nbins = 6;
92 Double_t cbin[nbins+1] = {20., 25., 30., 35., 40., 45., 50.};
67ef08bd 93 TArrayD tbin(nbins+1, cbin);
6d1a092e 94 Int_t nMixed[nbins] = {100, 100, 100, 100, 100, 100};
67ef08bd 95 TArrayI tNMixed(nbins, nMixed);
96 task->SetCentralityBinning(tbin, tNMixed);
97 }
98
6d1a092e 99 task->SetAnalysisAlgoritmForReal("ME");
100 task->SetAnalysisAlgoritmForMix("ME");
101 task->EnableTOFCut(false, 100.e-9);
102 task->SelectCollisionCandidates(AliVEvent::kAny);
67ef08bd 103 task->SetCentralityBorders(downCentLimit , upCentLimit) ;
d2c19ce3 104 task->SetSigmaWidth(sigmaWidth);
83aecbbd 105 task->SetUseEfficiency(true);
67ef08bd 106
107 mgr->AddTask(task);
108 mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() );
109
110 TString cname(Form("%sCoutput1", sName.Data()));
111 TString pname(Form("%s:%s", AliAnalysisManager::GetCommonFileName(), sName.Data()));
112 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(cname.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, pname.Data());
113 mgr->ConnectOutput(task, 1, coutput1);
114
115 return task;
2ce2e2dd 116}
117