]>
Commit | Line | Data |
---|---|---|
824ebf2f | 1 | void AddTask_dNdPtpPb(UInt_t uTriggerMask = AliVEvent::kINT7, Int_t iCutMode = 2014 ) |
c7fc70fc | 2 | { |
3 | /* | |
4 | CheckLoadLibrary("libPWG0base"); | |
5 | CheckLoadLibrary("libPWG0dep"); | |
6 | CheckLoadLibrary("libPWG0selectors"); | |
7 | */ | |
8 | ||
9 | //Get current Analysis Manager | |
10 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
11 | ||
12 | if (!mgr) { | |
13 | Error("AddTask_dNdPtAnalysis_TPCITS", "No analysis manager found."); | |
14 | return 0; | |
15 | } | |
16 | ||
17 | // Switch off all AliInfo (too much output!!!) | |
95a71a5c | 18 | // AliLog::SetGlobalLogLevel(AliLog::kError); |
19 | // mgr->SetDebugLevel(0); | |
c7fc70fc | 20 | |
21 | // | |
22 | // Create event cuts | |
23 | // | |
24 | Float_t zvWindow = 30. ; | |
25 | ||
26 | AlidNdPtEventCuts *evtCuts = new AlidNdPtEventCuts("AlidNdPtEventCuts","Event cuts"); | |
27 | evtCuts->SetZvRange(-zvWindow,zvWindow); | |
28 | evtCuts->SetMeanXYZv(0.0,0.0,0.0); | |
29 | evtCuts->SetSigmaMeanXYZv(1.0,1.0,10.0); | |
30 | evtCuts->SetTriggerRequired(kTRUE); | |
31 | //evtCuts->SetTriggerRequired(kFALSE); | |
32 | ||
33 | // | |
34 | // Create geom. acceptance cuts | |
35 | // | |
95a71a5c | 36 | //Float_t etaWindow = 1.0; |
37 | eta1 = -0.765409; eta2 = -0.165409; | |
c7fc70fc | 38 | Float_t ptMin = 0.1 ; |
39 | ||
40 | AlidNdPtAcceptanceCuts *accCuts = new AlidNdPtAcceptanceCuts("AlidNdPtAcceptanceCuts","Geom. acceptance cuts"); | |
95a71a5c | 41 | accCuts->SetEtaRange(eta1,eta2); |
c7fc70fc | 42 | accCuts->SetPtRange(ptMin,1.e10); |
43 | ||
44 | // | |
45 | // Create standard esd track cuts | |
46 | // | |
824ebf2f | 47 | Int_t cutMode = iCutMode; |
c7fc70fc | 48 | |
49 | gROOT->LoadMacro("$ALICE_ROOT/PWGLF/SPECTRA/ChargedHadrons/dNdPt/macros/CreatedNdPtTrackCuts.C"); | |
50 | //gROOT->LoadMacro("./CreatedNdPtTrackCuts.C"); | |
51 | AliESDtrackCuts* esdTrackCuts = CreatedNdPtTrackCuts(cutMode); | |
52 | if (!esdTrackCuts) { | |
53 | printf("ERROR: esdTrackCuts could not be created\n") | |
54 | return; | |
55 | } else { | |
56 | //esdTrackCuts->SetHistogramsOn(kTRUE); | |
57 | esdTrackCuts->SetHistogramsOn(kTRUE); | |
58 | } | |
59 | ||
60 | Bool_t hasMC=(AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler()!=0x0); | |
61 | ||
62 | // | |
63 | // Create task | |
64 | // | |
65 | AlidNdPtTask *task = new AlidNdPtTask("AlidNdPtTask_TPCITS"); | |
66 | task->SetUseMCInfo(hasMC); | |
67 | ||
68 | // trigger | |
824ebf2f | 69 | task->SelectCollisionCandidates(uTriggerMask); |
c7fc70fc | 70 | |
71 | // | |
72 | // set analysis options from the Helper here !!! | |
73 | // | |
74 | ||
75 | //AliTriggerAnalysis::Trigger trigger = AliTriggerAnalysis::kMB1; | |
76 | AlidNdPtHelper::AnalysisMode analysisMode = AlidNdPtHelper::kTPCITS; | |
77 | AlidNdPtHelper::ParticleMode particleMode = AlidNdPtHelper::kAllPart ; | |
78 | ||
79 | // | |
80 | // Create analysis object | |
81 | // | |
82 | ||
83 | AlidNdPtAnalysispPb *fdNdPtAnalysis = new AlidNdPtAnalysispPb("dNdPtAnalysis_TPCITS","dN/dPt Analysis with TPC-ITS tracking");//Now AnalysispPb before: Analzsiis | |
84 | fdNdPtAnalysis->SetEventCuts(evtCuts); | |
85 | fdNdPtAnalysis->SetAcceptanceCuts(accCuts); | |
86 | fdNdPtAnalysis->SetTrackCuts(esdTrackCuts); | |
87 | //fdNdPtAnalysis->SetBackgroundCuts(backCuts); | |
88 | fdNdPtAnalysis->SetAnalysisMode(analysisMode); | |
89 | fdNdPtAnalysis->SetParticleMode(particleMode); | |
90 | ||
91 | //j kCINT5 should work for 2012 data, kINT7 for 2013 | |
92 | ||
93 | //fdNdPtAnalysis->SetTrigger(trigger); | |
94 | // fdNdPtAnalysis->SetTriggerMask(AliVEvent::kCINT5); | |
824ebf2f | 95 | fdNdPtAnalysis->SetTriggerMask(uTriggerMask); |
c7fc70fc | 96 | //fdNdPtAnalysis->SetTriggerMask(AliVEvent::kEMC1); |
97 | if(hasMC) | |
98 | { | |
99 | //physTrigSel->SetAnalyzeMC(); | |
100 | //fdNdPtAnalysis->SetPhysicsTriggerSelection(physTrigSel); | |
101 | ||
102 | fdNdPtAnalysis->SetUseMCInfo(kTRUE); | |
103 | fdNdPtAnalysis->SetHistogramsOn(kTRUE); | |
104 | //fdNdPtAnalysis->SetHistogramsOn(kFALSE); | |
105 | } | |
106 | else { // online trigger | |
107 | // physTrigSel->SetUseBXNumbers(); | |
108 | // physTrigSel->SetComputeBG(); | |
109 | // fdNdPtAnalysis->SetPhysicsTriggerSelection(physTrigSel); | |
110 | } | |
111 | ||
112 | // change binning | |
113 | Int_t multNbins = 152; | |
114 | Double_t binsMult[153]; | |
115 | for (int i=0; i<=multNbins; i++) { binsMult[i] = -0.5 + i; } | |
116 | binsMult[152] = 1000.; | |
117 | // change binning | |
118 | const Int_t ptNbins = 81; | |
119 | Double_t bins[82] = {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, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 18.0, 20.0, 22.0, 24.0, 26.0, 28.0, 30.0, 32.0, 34.0, 36.0, 40.0, 45.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 110.0, 120.0, 130.0, 140.0, 150.0, 160.0, 180.0, 200.0}; | |
120 | Double_t* binsPt = new Double_t[82]; | |
121 | for (int i=0; i<82; i++) {binsPt[i] = bins[i];} | |
122 | fdNdPtAnalysis->SetBinsPt(ptNbins, binsPt); | |
123 | fdNdPtAnalysis->SetBinsPtCorr(ptNbins, binsPt); | |
124 | fdNdPtAnalysis->SetBinsMult(multNbins, binsMult); | |
125 | ||
126 | ||
127 | // y shift -0.465409 | |
128 | const Int_t EtaNbins = 30; | |
129 | Double_t binse[31] = {-1.465409,-1.365409,-1.265409,-1.165409,-1.065409,-0.965409,-0.865409,-0.765409,-0.665409,-0.565409,-0.465409,-0.365409,-0.265409,-0.165409,-0.065409,0.034591,0.134591,0.234591,0.334591,0.434591,0.534591,0.634591,0.734591,0.834591,0.934591,1.034591,1.134591,1.234591,1.334591,1.434591,1.534591}; | |
130 | Double_t* binsEta = new Double_t[31]; | |
131 | for (int i=0; i<31; i++) {binsEta[i] = binse[i];} | |
132 | fdNdPtAnalysis->SetBinsEta(EtaNbins,binsEta); | |
133 | ||
134 | ||
135 | // set centrality estimator | |
95a71a5c | 136 | // fdNdPtAnalysis->SetCentralityEstimators("NPA"); |
c7fc70fc | 137 | |
138 | ||
139 | // Add analysis object | |
140 | task->AddAnalysisObject( fdNdPtAnalysis ); | |
141 | ||
142 | // Add task | |
143 | mgr->AddTask(task); | |
144 | ||
145 | // Create containers for input | |
95a71a5c | 146 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); |
c7fc70fc | 147 | |
148 | TString outputFileName = AliAnalysisManager::GetCommonFileName(); | |
149 | ||
150 | // AliAnalysisDataContainer *coutput = mgr->CreateContainer("jgronef_dNdPtpPb_TPCITS", TList::Class(), AliAnalysisManager::kOutputContainer, "jgronef_dNdPtpPb_TPCITS.root"); // <-- Old Way works on Batch | |
151 | ||
152 | AliAnalysisDataContainer *coutput = mgr->CreateContainer("dNdPtpPb", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:dNdPtHistos", mgr->GetCommonFileName())); // <-- New Way changed to work on Grid | |
153 | ||
154 | ||
155 | mgr->ConnectInput(task, 0, cinput); | |
156 | mgr->ConnectOutput(task, 1, coutput); | |
157 | ||
158 | ||
159 | /* | |
160 | // Aus Phillips Macro kopiert: | |
161 | ||
162 | // Add task | |
163 | mgr->AddTask(task); | |
164 | ||
165 | // Create containers for input | |
166 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
167 | ||
168 | TString outputFileName = AliAnalysisManager::GetCommonFileName(); | |
169 | ||
170 | AliAnalysisDataContainer *coutput = mgr->CreateContainer("dNdPtPbPb", | |
171 | TList::Class(), | |
172 | AliAnalysisManager::kOutputContainer, | |
173 | Form("%s:dNdPtHistos", mgr->GetCommonFileName())); | |
174 | ||
175 | mgr->ConnectInput(task, 0, cinput); | |
176 | mgr->ConnectOutput(task, 1, coutput); | |
177 | ||
178 | */ | |
179 | ||
180 | ||
181 | ||
182 | ||
183 | } | |
184 |