]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/SPECTRA/ChargedHadrons/dNdPt/macros/AddTask_dNdPt_PbPbAOD.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / ChargedHadrons / dNdPt / macros / AddTask_dNdPt_PbPbAOD.C
CommitLineData
9db7eb94 1AlidNdPtAnalysisPbPbAOD *AddTask_dNdPt_PbPbAOD( UInt_t uTriggerMask = AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral ,
bc80e684 2 Double_t dNCrossedRowsTPC = 100,
a0036e80 3 Int_t iFilterBit = AliAODTrack::kTrkGlobal,
bc80e684 4 char *contName = "dNdPtPbPbAOD",
5 Double_t dNClustersTPC = 0,
ba9a71a2 6 Bool_t bDoCutTPCLength = kTRUE,
7 Double_t dPrefactorLengthInTPC = 0.85
bc80e684 8 )
2c99eb3b 9{
f856053f 10 // Creates, configures and attaches to the train a cascades check task.
11 // Get the pointer to the existing analysis manager via the static access method.
12 //==============================================================================
13 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
14 if (!mgr) {
15 ::Error("AddTask_dNdPt_PbPbAOD", "No analysis manager to connect to.");
16 return NULL;
17 }
2c99eb3b 18
f856053f 19 // Check the analysis type using the event handlers connected to the analysis manager.
20 //==============================================================================
21 if (!mgr->GetInputEventHandler()) {
22 ::Error("AddTask_dNdPt_PbPbAOD", "This task requires an input event handler");
23 return NULL;
24 }
25 TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
26
27 // Create and configure the task
28 AlidNdPtAnalysisPbPbAOD *task = new AlidNdPtAnalysisPbPbAOD("dNdPtPbPbAOD");
9db7eb94 29 // UInt_t triggerMask = AliVEvent::kMB;
30 // triggerMask |= AliVEvent::kCentral;
31 // triggerMask |= AliVEvent::kSemiCentral;
f856053f 32
33 task->SelectCollisionCandidates(uTriggerMask);
34
0d3e3f7e 35 task->SetEventplaneSelector("Q");
36
f856053f 37 task->SetCutMinNCrossedRowsTPC(dNCrossedRowsTPC);
bc80e684 38 task->SetCutMinNClustersTPC(dNClustersTPC);
39 task->SetCutLengthInTPCPtDependent(bDoCutTPCLength);
ba9a71a2 40 task->SetPrefactorLengthInTPCPtDependent(dPrefactorLengthInTPC);
ea3cfeda 41 //task->SetCutLengthInTPCPtDependent();
ba9a71a2 42 //
ea3cfeda
PL
43// task->EnableRelativeCuts();
44// task->SetCutPercMinNClustersTPC(1.0);
45// task->SetCutPercMinNCrossedRowsTPC(1.0);
46
47 Double_t binsPtCheck[] = {0., 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.2, 2.4, 2.6, 3.0, 4.0, 5.0, 10.0, 13.0, 15.0, 20.0, 25.0, 30.0, 40.0, 50.0, 70.0, 100.0, 150.0, 200.0};
48 Int_t nBinPtCheck = sizeof(binsPtCheck)/sizeof(Double_t);
49 task->SetBinsPtCheck(nBinPtCheck, binsPtCheck);
bc2a9da9 50
05ab8725 51 Double_t binsPtCorr[] = {0.0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 200.0};
52 Int_t nBinPtCorr = sizeof(binsPtCorr)/sizeof(Double_t);
53 task->SetBinsPtCorr(nBinPtCorr, binsPtCorr);
54
1444967d 55// Double_t binsPhi[] = {0 ,0.10472 ,0.20944 ,0.314159 ,0.418879 ,0.523599 ,0.628319 ,0.733038 ,0.837758 ,0.942478 ,1.0472 ,1.15192 ,1.25664 ,1.36136 ,1.46608 ,1.5708 ,1.67552 ,1.78024 ,1.88496 ,1.98968 ,2.0944 ,2.19911 ,2.30383 ,2.40855 ,2.51327 ,2.61799 ,2.72271 ,2.82743 ,2.93215 ,3.03687 ,3.14159 ,3.24631 ,3.35103 ,3.45575 ,3.56047 ,3.66519 ,3.76991 ,3.87463 ,3.97935 ,4.08407 ,4.18879 ,4.29351 ,4.39823 ,4.50295 ,4.60767 ,4.71239 ,4.81711 ,4.92183 ,5.02655 ,5.13127 ,5.23599 ,5.34071 ,5.44543 ,5.55015 ,5.65487 ,5.75959 ,5.86431 ,5.96903 ,6.07375 ,6.17847 ,6.28319};
56
d14caaf4 57// Double_t binsPhi[] = {-1.*TMath::Pi(), -2.97625, -2.8109, -2.64555, -2.4802, -2.31486, -2.14951, -1.98416, -1.81882, -1.65347, -1.48812, -1.32278, -1.15743, -0.992082, -0.826735, -0.661388, -0.496041, -0.330694, -0.165347, 0, 0.165347, 0.330694, 0.496041, 0.661388, 0.826735, 0.992082, 1.15743, 1.32278, 1.48812, 1.65347, 1.81882, 1.98416, 2.14951, 2.31486, 2.4802, 2.64555, 2.8109, 2.97625, TMath::Pi()};
58
fe9918c1 59// Double_t binsPhi[] = {-1.*TMath::Pi(), -0.75*TMath::Pi(), -0.5*TMath::Pi(), -0.25*TMath::Pi(), 0, 0.25*TMath::Pi(), 0.5*TMath::Pi(), 0.75*TMath::Pi(), TMath::Pi()};
227a6341 60// Double_t binsPhi[] = {
61// -2.*TMath::Pi(), -15./8.*TMath::Pi(), -14./8.*TMath::Pi(), -13./8.*TMath::Pi(), -12./8.*TMath::Pi(), -11./8.*TMath::Pi(), -10./8.*TMath::Pi(), -9./8.*TMath::Pi(),
62// -1.*TMath::Pi(), -7./8.*TMath::Pi(), -6./8.*TMath::Pi(), -5./8.*TMath::Pi(), -4./8.*TMath::Pi(), -3./8.*TMath::Pi(), -2./8.*TMath::Pi(), -1./8.*TMath::Pi(), 0,
63// 1./8.*TMath::Pi(), 2./8.*TMath::Pi(), 3./8.*TMath::Pi(), 4./8.*TMath::Pi(), 5./8.*TMath::Pi(), 6./8.*TMath::Pi(), 7./8.*TMath::Pi(), 1.*TMath::Pi(),
64// 10./8.*TMath::Pi(), 11./8.*TMath::Pi(), 12./8.*TMath::Pi(), 13./8.*TMath::Pi(), 14./8.*TMath::Pi(), 15./8.*TMath::Pi(), 2.*TMath::Pi()
65// };
66
4b6bf723 67// Double_t binsPhi[] = {
68// -2.*TMath::Pi(), -1.75*TMath::Pi(), -1.5*TMath::Pi(), -1.25*TMath::Pi(),
69// -1.*TMath::Pi(), -0.75*TMath::Pi(), -0.5*TMath::Pi(), -0.25*TMath::Pi(),
70// 0, 0.25*TMath::Pi(), 0.5*TMath::Pi(), 0.75*TMath::Pi(), TMath::Pi(),
71// 1.25*TMath::Pi(), 1.5*TMath::Pi(), 1.75*TMath::Pi(), 2.*TMath::Pi()
72// };
4ffd6c6e 73// Double_t binsPhi[] = {
74// 0, 0.25*TMath::Pi(), 0.5*TMath::Pi(), 0.75*TMath::Pi(), TMath::Pi()
75// };
4b6bf723 76Double_t binsPhi[] = {
4ffd6c6e 77 0, 1./16.*TMath::Pi(), 2./16.*TMath::Pi(), 3./16.*TMath::Pi(), 4./16.*TMath::Pi(), 5./16.*TMath::Pi(), 6./16.*TMath::Pi(), 7./16.*TMath::Pi(), 8./16.*TMath::Pi()
4b6bf723 78};
79
4ffd6c6e 80// Double_t binsPhi[] = {
81// 0, 1./8.*TMath::Pi(), 2./8.*TMath::Pi(), 3./8.*TMath::Pi(), 4./8.*TMath::Pi()
82// };
83
bc2a9da9 84 Int_t nBinPhi = sizeof(binsPhi)/sizeof(Double_t);
4ffd6c6e 85 task->SetBinsDeltaphi(nBinPhi, binsPhi);
a0036e80 86
87 task->SetFilterBit(iFilterBit);
bc2a9da9 88
f856053f 89 ::Info("AddTask_dNdPt_PbPbAOD",Form("CrossedRowCut set to %.0f", task->GetCutMinNCrossedRowsTPC()));
a0036e80 90 ::Info("AddTask_dNdPt_PbPbAOD",Form("FilterBit set to %d", task->GetFilterBit()));
f856053f 91
92 mgr->AddTask(task);
93
9db7eb94 94 AliAnalysisDataContainer *coutput = mgr->CreateContainer(Form("%s", contName), TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:dNdPtHistos", mgr->GetCommonFileName()));
95
96 mgr->ConnectInput( task, 0, mgr->GetCommonInputContainer());
97 mgr->ConnectOutput(task, 1, coutput);
98
99 return task;
2c99eb3b 100}