TENDER becomes Tender
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / ChargedHadrons / dNdPt / macros / AddTask_jacek_dNdPtTrackDumpTaskPbPb_TPCITS.C
CommitLineData
db09aaaf 1void AddTask_jacek_dNdPtTrackDumpTaskPbPb_TPCITS()
2{
db09aaaf 3 gSystem->Load("libANALYSIS");
4 gSystem->Load("libANALYSISalice");
af472fff 5 gSystem->Load("libTender");
db09aaaf 6 gSystem->Load("libCORRFW");
7 gSystem->Load("libPWGUDbase");
8 gSystem->Load("libTPCcalib");
9 gSystem->Load("libPWGPP");
10 gSystem->Load("libPWGLFspectra");
11
7b8a4d9b 12
13 gRandom->SetSeed(0);
14
db09aaaf 15 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
16
17 if (!mgr) {
18 Error("AddTask_dNdPtTrackDumpTaskPbPb_TPCITS", "No analysis manager found.");
19 return 0;
20 }
21
22 // Switch off all AliInfo (too much output!!!)
23 AliLog::SetGlobalLogLevel(AliLog::kError);
24 mgr->SetDebugLevel(0);
25
7b8a4d9b 26
27
db09aaaf 28 //
29 // Create physics trigger selection class
30 //
31 AliPhysicsSelection *physTrigSel = new AliPhysicsSelection();
32
33 //
34 // Create event cuts
35 //
36 Float_t zvWindow = 30. ;
37
38 AlidNdPtEventCuts *evtCuts = new AlidNdPtEventCuts("AlidNdPtEventCuts","Event cuts");
39 evtCuts->SetZvRange(-zvWindow,zvWindow);
40 evtCuts->SetMeanXYZv(0.0,0.0,0.0);
41 evtCuts->SetSigmaMeanXYZv(1.0,1.0,10.0);
42 evtCuts->SetTriggerRequired(kFALSE);
43 //evtCuts->SetTriggerRequired(kTRUE);
44
45 //
46 // Create geom. acceptance cuts
47 //
48 Float_t etaWindow = 1.0 ;
49 Float_t ptMin = 0.15 ;
50
51 AlidNdPtAcceptanceCuts *accCuts = new AlidNdPtAcceptanceCuts("AlidNdPtAcceptanceCuts","Geom. acceptance cuts");
52 accCuts->SetEtaRange(-etaWindow,etaWindow);
53 accCuts->SetPtRange(ptMin,1.e10);
54 accCuts->SetMaxDCAr(3.0);
55 accCuts->SetMaxDCAz(30.0);
56
57 //
58 // Create standard esd track cuts
59 //
60 Int_t cutMode = 154;
7dc5eb81 61 //Int_t cutMode = 156;
db09aaaf 62 //Int_t cutMode = 200;
63
4c788520 64 gROOT->LoadMacro("$ALICE_ROOT/PWGLF/SPECTRA/ChargedHadrons/dNdPt/macros/CreatedNdPtTrackCuts.C");
db09aaaf 65 AliESDtrackCuts* esdTrackCuts = CreatedNdPtTrackCuts(cutMode);
66 if (!esdTrackCuts) {
67 printf("ERROR: esdTrackCuts could not be created\n");
68 return;
69 } else {
70 esdTrackCuts->SetHistogramsOn(kTRUE);
7dc5eb81 71 esdTrackCuts->SetRequireITSRefit(kFALSE); // no ITS refit
db09aaaf 72 }
73
db09aaaf 74 Bool_t hasMC=(AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler()!=0x0);
75
76 //
77 // Create task
78 //
79 AlidNdPtTrackDumpTask *task = new AlidNdPtTrackDumpTask("AlidNdPtTrackDumpTask");
80 task->SetUseMCInfo(hasMC);
7dc5eb81 81 //task->SetLowPtTrackDownscaligF(1.e4);
82 //task->SetLowPtV0DownscaligF(1.e2);
7b8a4d9b 83 task->SetLowPtTrackDownscaligF(1.e7);
84 task->SetLowPtV0DownscaligF(1.e4);
4c788520 85 task->SetProcessAll(kTRUE);
86 task->SetProcessCosmics(kTRUE);
87 //task->SetProcessAll(kFALSE);
db09aaaf 88
89 // trigger
90 //task->SelectCollisionCandidates(AliVEvent::kMB);
91
92 //
93 // set analysis options from the Helper here !!!
94 //
95 // AlidNdPtHelper::OutputObject outputObject = AlidNdPtHelper::kCutAnalysisPbPb;
96 // AlidNdPtHelper::ParticleMode particleMode = AlidNdPtHelper::kAllPart ;
97
98 AlidNdPtHelper::AnalysisMode analysisMode = AlidNdPtHelper::kTPCITS;
99
100 task->SetUseMCInfo(hasMC);
101 task->SetEventCuts(evtCuts);
102 task->SetAcceptanceCuts(accCuts);
103 task->SetTrackCuts(esdTrackCuts);
104 task->SetAnalysisMode(analysisMode);
105 task->SetCentralityEstimator("V0M");
106
107 // Add task
108 mgr->AddTask(task);
109
110 // Create containers for input
111 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
112 mgr->ConnectInput(task, 0, cinput);
113
9d9cf232 114 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("filtered1", TTree::Class(), AliAnalysisManager::kOutputContainer, "FilterEvents_Trees.root");
298fa346 115 mgr->ConnectOutput(task, 1, coutput1);
9d9cf232 116 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("filtered2", TTree::Class(), AliAnalysisManager::kOutputContainer, "FilterEvents_Trees.root");
117 mgr->ConnectOutput(task, 2, coutput2);
118 AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("filtered3", TTree::Class(), AliAnalysisManager::kOutputContainer, "FilterEvents_Trees.root");
119 mgr->ConnectOutput(task, 3, coutput3);
120 AliAnalysisDataContainer *coutput4 = mgr->CreateContainer("filtered4", TTree::Class(), AliAnalysisManager::kOutputContainer, "FilterEvents_Trees.root");
121 mgr->ConnectOutput(task, 4, coutput4);
122 AliAnalysisDataContainer *coutput5 = mgr->CreateContainer("filtered5", TTree::Class(), AliAnalysisManager::kOutputContainer, "FilterEvents_Trees.root");
123 mgr->ConnectOutput(task, 5, coutput5);
124 AliAnalysisDataContainer *coutput6 = mgr->CreateContainer("filtered6", TTree::Class(), AliAnalysisManager::kOutputContainer, "FilterEvents_Trees.root");
125 mgr->ConnectOutput(task, 6, coutput6);
db09aaaf 126}
127