]>
Commit | Line | Data |
---|---|---|
0e5afded | 1 | AliPHOSCorrelations* 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"); |
45 | } | |
46 | if( TString(options).Contains("13") ) { | |
0e5afded | 47 | task->SetPeriod( AliPHOSCorrelations::kLHC13 ); |
d2c19ce3 | 48 | task->SetCentralityEstimator("V0A"); |
49 | } | |
50 | ||
67ef08bd | 51 | |
52 | // Binning | |
4ae540f6 | 53 | // TODO: Make other binning for 0-10% and 20-50% |
67ef08bd | 54 | //Central: |
6d1a092e | 55 | if( downCentLimit == 0 && upCentLimit == 10 ) |
67ef08bd | 56 | { |
6d1a092e | 57 | const int nbins = 5; |
58 | Double_t cbin[nbins+1] = {0., 2., 4., 6., 8., 10.}; | |
67ef08bd | 59 | TArrayD tbin(nbins+1, cbin); |
6d1a092e | 60 | Int_t nMixed[nbins] = {100, 100, 100, 100, 100}; |
67ef08bd | 61 | TArrayI tNMixed(nbins, nMixed); |
62 | task->SetCentralityBinning(tbin, tNMixed); | |
63 | } | |
64 | // SemiCentral: | |
6d1a092e | 65 | if( downCentLimit == 20 && upCentLimit == 50 ) |
67ef08bd | 66 | { |
6d1a092e | 67 | const int nbins = 6; |
68 | Double_t cbin[nbins+1] = {20., 25., 30., 35., 40., 45., 50.}; | |
67ef08bd | 69 | TArrayD tbin(nbins+1, cbin); |
6d1a092e | 70 | Int_t nMixed[nbins] = {100, 100, 100, 100, 100, 100}; |
67ef08bd | 71 | TArrayI tNMixed(nbins, nMixed); |
72 | task->SetCentralityBinning(tbin, tNMixed); | |
73 | } | |
74 | ||
6d1a092e | 75 | task->SetAnalysisAlgoritmForReal("ME"); |
76 | task->SetAnalysisAlgoritmForMix("ME"); | |
77 | task->EnableTOFCut(false, 100.e-9); | |
78 | task->SelectCollisionCandidates(AliVEvent::kAny); | |
67ef08bd | 79 | task->SetCentralityBorders(downCentLimit , upCentLimit) ; |
d2c19ce3 | 80 | task->SetSigmaWidth(sigmaWidth); |
67ef08bd | 81 | |
82 | mgr->AddTask(task); | |
83 | mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() ); | |
84 | ||
85 | TString cname(Form("%sCoutput1", sName.Data())); | |
86 | TString pname(Form("%s:%s", AliAnalysisManager::GetCommonFileName(), sName.Data())); | |
87 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(cname.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, pname.Data()); | |
88 | mgr->ConnectOutput(task, 1, coutput1); | |
89 | ||
90 | return task; | |
2ce2e2dd | 91 | } |
92 |