]>
Commit | Line | Data |
---|---|---|
1c5acb87 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | /* $Id: $ */ | |
16 | ||
17 | //_________________________________________________________________________ | |
18 | // Base class for analysis algorithms | |
19 | //-- Author: Gustavo Conesa (LNF-INFN) | |
20 | //_________________________________________________________________________ | |
21 | ||
22 | ||
23 | // --- ROOT system --- | |
24 | #include <TClonesArray.h> | |
477d6cee | 25 | //#include <Riostream.h> |
1c5acb87 | 26 | |
27 | //---- AliRoot system ---- | |
1c5acb87 | 28 | #include "AliAnaPartCorrBaseClass.h" |
29 | #include "AliCaloTrackReader.h" | |
765d44e7 | 30 | #include "AliCalorimeterUtils.h" |
1c5acb87 | 31 | #include "AliCaloPID.h" |
ff45398a | 32 | #include "AliFiducialCut.h" |
1c5acb87 | 33 | #include "AliIsolationCut.h" |
6639984f | 34 | #include "AliMCAnalysisUtils.h" |
1c5acb87 | 35 | #include "AliNeutralMesonSelection.h" |
477d6cee | 36 | #include "AliAODCaloCells.h" |
37 | #include "AliAODEvent.h" | |
42dc8e7d | 38 | #include "AliAODHandler.h" |
39 | #include "AliAnalysisManager.h" | |
1c5acb87 | 40 | |
41 | ClassImp(AliAnaPartCorrBaseClass) | |
42 | ||
43 | ||
44 | //_______________________________________________ | |
45 | AliAnaPartCorrBaseClass::AliAnaPartCorrBaseClass() : | |
46 | TObject(), fDataMC(0), fDebug(0), fCheckFidCut(0), | |
7cd4e982 | 47 | fCheckCaloPID(0), fRecalculateCaloPID(0), fMinPt(0), fMaxPt(0), |
3c769bf6 | 48 | fReader(0x0), fInputAODBranch(0x0), fInputAODName(""), |
49 | fOutputAODBranch(0x0), fNewAOD(kFALSE), | |
50 | fOutputAODName(""), fOutputAODClassName(""), | |
591cc579 | 51 | fAODObjArrayName(""), fAddToHistogramsName(""), |
477d6cee | 52 | fAODCaloCells(0x0),//fAODCaloClusters(0x0), |
3c769bf6 | 53 | fCaloPID(0x0), fFidCut(0x0), fIC(0x0),fMCUtils(0x0), fNMS(0x0), |
78219bac | 54 | fCaloUtils(0x0), |
55 | //fAnaOutContainer(0x0), | |
5a2dbc3c | 56 | fHistoPtBins(0), fHistoPtMax(0.), fHistoPtMin(0.), |
57 | fHistoPhiBins(0), fHistoPhiMax(0.), fHistoPhiMin(0.), | |
58 | fHistoEtaBins(0), fHistoEtaMax(0.), fHistoEtaMin(0.), | |
59 | fHistoMassBins(0), fHistoMassMax(0.), fHistoMassMin(0.), | |
78219bac | 60 | fHistoAsymBins(0), fHistoAsymMax(0.), fHistoAsymMin(0.) |
1c5acb87 | 61 | { |
62 | //Default Ctor | |
4a745797 | 63 | |
1c5acb87 | 64 | //Initialize parameters |
65 | InitParameters(); | |
66 | } | |
78219bac | 67 | /* |
1c5acb87 | 68 | //___________________________________________________________ |
69 | AliAnaPartCorrBaseClass::AliAnaPartCorrBaseClass(const AliAnaPartCorrBaseClass & abc) : | |
70 | TObject(), fDataMC(abc.fDataMC), fDebug(abc.fDebug), | |
71 | fCheckFidCut(abc.fCheckFidCut), fCheckCaloPID(abc. fCheckCaloPID), | |
72 | fRecalculateCaloPID(abc.fRecalculateCaloPID), | |
765d44e7 | 73 | fMinPt(abc.fMinPt), fMaxPt(abc.fMaxPt), fReader(new AliCaloTrackReader(*abc.fReader)), |
1c5acb87 | 74 | fInputAODBranch(new TClonesArray(*abc.fInputAODBranch)), fInputAODName(abc.fInputAODName), |
75 | fOutputAODBranch(new TClonesArray(*abc.fOutputAODBranch)),fNewAOD(abc.fNewAOD), | |
76 | fOutputAODName(abc.fOutputAODName), fOutputAODClassName(abc.fOutputAODClassName), | |
591cc579 | 77 | fAODObjArrayName(abc.fAODObjArrayName), |
a3aebfff | 78 | fAddToHistogramsName(abc.fAddToHistogramsName), |
477d6cee | 79 | //fAODCaloClusters(new TClonesArray(*abc.fAODCaloClusters)), |
1c5acb87 | 80 | fAODCaloCells(new AliAODCaloCells(*abc.fAODCaloCells)), |
fb9841b8 | 81 | fCaloPID(new AliCaloPID(*abc.fCaloPID)), fFidCut(new AliFiducialCut(*abc.fFidCut)), fIC(new AliIsolationCut(*abc.fIC)), |
82 | fMCUtils(new AliMCAnalysisUtils(*abc.fMCUtils)), fNMS(new AliNeutralMesonSelection(*abc.fNMS)), | |
765d44e7 | 83 | fCaloUtils(new AliCalorimeterUtils(*abc.fCaloUtils)), |
4a745797 | 84 | //fAnaOutContainer(abc.fAnaOutContainer), |
5a2dbc3c | 85 | fHistoPtBins(abc.fHistoPtBins), fHistoPtMax(abc.fHistoPtMax), fHistoPtMin(abc.fHistoPtMin), |
86 | fHistoPhiBins(abc.fHistoPhiBins), fHistoPhiMax(abc.fHistoPhiMax), fHistoPhiMin(abc.fHistoPhiMin), | |
87 | fHistoEtaBins(abc.fHistoEtaBins), fHistoEtaMax(abc.fHistoEtaMax), fHistoEtaMin(abc.fHistoEtaMin), | |
88 | fHistoMassBins(abc.fHistoMassBins), fHistoMassMax(abc.fHistoMassMax), fHistoMassMin(abc.fHistoMassMin), | |
89 | fHistoAsymBins(abc.fHistoAsymBins), fHistoAsymMax(abc.fHistoAsymMax), fHistoAsymMin(abc.fHistoAsymMin) | |
1c5acb87 | 90 | { |
91 | // cpy ctor | |
fb9841b8 | 92 | |
1c5acb87 | 93 | } |
78219bac | 94 | */ |
95 | /* | |
1c5acb87 | 96 | //_________________________________________________________________________ |
97 | AliAnaPartCorrBaseClass & AliAnaPartCorrBaseClass::operator = (const AliAnaPartCorrBaseClass & abc) | |
98 | { | |
477d6cee | 99 | // assignment operator |
100 | ||
101 | if(this == &abc) return *this; | |
102 | ((TObject *)this)->operator=(abc); | |
103 | ||
104 | fDataMC = abc.fDataMC; | |
105 | fDebug = abc.fDebug ; | |
106 | fRecalculateCaloPID = abc.fRecalculateCaloPID ; | |
107 | fCheckCaloPID = abc.fCheckCaloPID ; | |
108 | fCheckFidCut = abc.fCheckFidCut ; | |
1c5acb87 | 109 | |
fb9841b8 | 110 | //delete fAODCaloClusters; fAODCaloClusters = new TClonesArray(*abc.fAODCaloClusters) ; |
111 | delete fAODCaloCells ; fAODCaloCells = new AliAODCaloCells(*abc.fAODCaloCells) ; | |
477d6cee | 112 | |
113 | fMinPt = abc.fMinPt; | |
114 | fMaxPt = abc.fMaxPt; | |
fb9841b8 | 115 | |
765d44e7 | 116 | delete fCaloPID; fCaloPID = new AliCaloPID (*abc.fCaloPID); |
117 | delete fFidCut; fFidCut = new AliFiducialCut (*abc.fFidCut); | |
118 | delete fMCUtils; fMCUtils = new AliMCAnalysisUtils(*abc.fMCUtils); | |
119 | delete fIC; fIC = new AliIsolationCut (*abc.fIC); | |
120 | delete fNMS; fNMS = new AliNeutralMesonSelection(*abc.fNMS); | |
121 | delete fCaloUtils; fCaloUtils = new AliCalorimeterUtils(*abc.fCaloUtils); | |
122 | delete fReader; fReader = new AliCaloTrackReader(*abc.fReader) ; | |
123 | ||
4a745797 | 124 | //fAnaOutContainer = abc.fAnaOutContainer; |
125 | ||
fb9841b8 | 126 | delete fInputAODBranch; fInputAODBranch = new TClonesArray(*abc.fInputAODBranch) ; |
a3aebfff | 127 | fInputAODName = abc.fInputAODName; |
fb9841b8 | 128 | delete fOutputAODBranch; fOutputAODBranch = new TClonesArray(*abc.fOutputAODBranch) ; |
a3aebfff | 129 | fNewAOD = abc.fNewAOD ; |
130 | fOutputAODName = abc.fOutputAODName; | |
131 | fOutputAODClassName = abc.fOutputAODClassName; | |
132 | fAddToHistogramsName = abc.fAddToHistogramsName; | |
591cc579 | 133 | fAODObjArrayName = abc.fAODObjArrayName; |
a3aebfff | 134 | |
5a2dbc3c | 135 | fHistoPtBins = abc.fHistoPtBins; fHistoPtMax = abc.fHistoPtMax; fHistoPtMin = abc.fHistoPtMin; |
136 | fHistoPhiBins = abc.fHistoPhiBins; fHistoPhiMax = abc.fHistoPhiMax; fHistoPhiMin = abc.fHistoPhiMin; | |
137 | fHistoEtaBins = abc.fHistoEtaBins; fHistoEtaMax = abc.fHistoEtaMax; fHistoEtaMin = abc.fHistoEtaMin; | |
477d6cee | 138 | |
139 | return *this; | |
140 | ||
1c5acb87 | 141 | } |
78219bac | 142 | */ |
1c5acb87 | 143 | //____________________________________________________________________________ |
144 | AliAnaPartCorrBaseClass::~AliAnaPartCorrBaseClass() | |
145 | { | |
146 | // Remove all pointers except analysis output pointers. | |
7787a778 | 147 | //printf("---Delete analysis %s\n", fAODObjArrayName.Data()); |
148 | // Not sure if it should be me who deletes the delta AOD branches. | |
149 | // if(fOutputAODBranch){ | |
150 | // fOutputAODBranch->Clear() ; | |
151 | // delete fOutputAODBranch ; | |
152 | // } | |
153 | // | |
154 | // if(fInputAODBranch){ | |
155 | // fInputAODBranch->Clear() ; | |
156 | // delete fInputAODBranch ; | |
157 | // } | |
477d6cee | 158 | |
159 | // if(fAODCaloClusters){ | |
160 | // fAODCaloClusters->Clear() ; | |
161 | // delete fAODCaloClusters ; | |
162 | // } | |
1c5acb87 | 163 | |
477d6cee | 164 | if(fAODCaloCells){ |
165 | fAODCaloCells->Clear() ; | |
166 | delete fAODCaloCells ; | |
167 | } | |
7787a778 | 168 | |
169 | //Already deleted in maker | |
4a745797 | 170 | // if(fAnaOutContainer){ |
171 | // fAnaOutContainer->Clear() ; | |
172 | // delete fAnaOutContainer ; | |
173 | // } | |
174 | ||
7787a778 | 175 | //if(fCaloUtils) delete fCaloUtils ; //Already deleted in maker |
176 | //if(fReader) delete fReader ; //Already deleted in maker | |
177 | ||
765d44e7 | 178 | if(fCaloPID) delete fCaloPID ; |
179 | if(fFidCut) delete fFidCut ; | |
180 | if(fIC) delete fIC ; | |
181 | if(fMCUtils) delete fMCUtils ; | |
182 | if(fNMS) delete fNMS ; | |
7787a778 | 183 | // printf("--- analysis deleted \n"); |
1c5acb87 | 184 | } |
185 | ||
477d6cee | 186 | ////____________________________________________________________________________ |
187 | //void AliAnaPartCorrBaseClass::AddAODCaloCluster(AliAODCaloCluster calo) { | |
188 | // //Put AOD calo cluster in the CaloClusters array | |
189 | // | |
190 | // Int_t i = fAODCaloClusters->GetEntriesFast(); | |
191 | // new((*fAODCaloClusters)[i]) AliAODCaloCluster(calo); | |
192 | // | |
193 | //} | |
1c5acb87 | 194 | |
195 | ||
196 | //____________________________________________________________________________ | |
197 | void AliAnaPartCorrBaseClass::AddAODParticle(AliAODPWG4Particle pc) { | |
198 | //Put AOD calo cluster in the AODParticleCorrelation array | |
199 | ||
477d6cee | 200 | if(fOutputAODBranch){ |
201 | ||
202 | Int_t i = fOutputAODBranch->GetEntriesFast(); | |
203 | //new((*fOutputAODBranch)[i]) AliAODPWG4Particle(pc); | |
204 | if(strcmp(fOutputAODBranch->GetClass()->GetName(),"AliAODPWG4Particle")==0) | |
205 | new((*fOutputAODBranch)[i]) AliAODPWG4Particle(pc); | |
206 | else if(strcmp(fOutputAODBranch->GetClass()->GetName(),"AliAODPWG4ParticleCorrelation")==0) | |
207 | new((*fOutputAODBranch)[i]) AliAODPWG4ParticleCorrelation(pc); | |
208 | else { | |
209 | printf("AliAnaPartCorrBaseClass::AddAODParticle() - Cannot add an object of type < %s >, to the AOD TClonesArray \n", | |
210 | fOutputAODBranch->GetClass()->GetName()); | |
211 | abort(); | |
212 | } | |
213 | } | |
214 | else { | |
215 | printf(" AliAnaPartCorrBaseClass::AddAODParticle() - No AOD branch available!!!\n"); | |
216 | abort(); | |
217 | } | |
218 | ||
1c5acb87 | 219 | } |
220 | ||
221 | ||
222 | //___________________________________________________ | |
477d6cee | 223 | //void AliAnaPartCorrBaseClass::ConnectAODCaloClusters() { |
224 | // //Recover the list of AODCaloClusters | |
225 | // | |
226 | // fAODCaloClusters = fReader->GetOutputEvent()->GetCaloClusters(); | |
227 | // | |
228 | //} | |
229 | // | |
1c5acb87 | 230 | //___________________________________________________ |
231 | void AliAnaPartCorrBaseClass::ConnectAODPHOSCells() { | |
232 | //Recover the list of PHOS AODCaloCells | |
233 | ||
477d6cee | 234 | fAODCaloCells = fReader->GetOutputEvent()->GetPHOSCells(); |
1c5acb87 | 235 | |
236 | } | |
237 | ||
238 | //___________________________________________________ | |
239 | void AliAnaPartCorrBaseClass::ConnectAODEMCALCells() { | |
240 | //Recover the list of EMCAL AODCaloCells | |
241 | ||
477d6cee | 242 | fAODCaloCells = fReader->GetOutputEvent()->GetEMCALCells(); |
1c5acb87 | 243 | |
244 | } | |
245 | ||
246 | //___________________________________________________ | |
42dc8e7d | 247 | TClonesArray * AliAnaPartCorrBaseClass::GetAODBranch(TString aodName) const { |
248 | //Recover ouput and input AOD pointers for each event in the maker | |
249 | ||
250 | //Delta AODs | |
1e86c71e | 251 | if(fDebug > 3) printf("AliAnaPartCorrBaseClass::GetAODBranch() - Get Input Branch with name: <%s>; \n",aodName.Data()); |
252 | ||
253 | //Get the AOD handler, if output AOD is created use it, if not get the branches from the input which should be deltaAODs | |
254 | AliAODHandler* aodHandler = 0x0; | |
255 | Bool_t outAOD = kFALSE; | |
256 | if((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()) outAOD = kTRUE; | |
257 | if(outAOD) aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()); | |
258 | else aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler()); | |
259 | ||
42dc8e7d | 260 | if (aodHandler->GetExtensions()) { |
261 | AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(GetReader()->GetDeltaAODFileName()); | |
262 | if(ext){ | |
263 | AliAODEvent *aodEvent = ext->GetAOD(); | |
264 | TClonesArray * aodbranch = (TClonesArray*) aodEvent->FindListObject(aodName); | |
265 | if(aodbranch) return aodbranch; | |
1e86c71e | 266 | else { |
267 | if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName); | |
268 | else return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName); | |
269 | } | |
42dc8e7d | 270 | } |
271 | else{//If no Delta AODs, kept in standard branch, to revise. | |
1e86c71e | 272 | if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName); |
273 | else return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName); | |
42dc8e7d | 274 | } |
275 | } | |
276 | else{ //If no Delta AODs, kept in standard branch, to revise. | |
1e86c71e | 277 | if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName); |
278 | else return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName); | |
42dc8e7d | 279 | } |
280 | } | |
477d6cee | 281 | |
477d6cee | 282 | |
42dc8e7d | 283 | //___________________________________________________ |
284 | void AliAnaPartCorrBaseClass::ConnectInputOutputAODBranches() { | |
285 | //Recover ouput and input AOD pointers for each event in the maker | |
286 | ||
287 | //Delta AODs | |
1e86c71e | 288 | if(fDebug > 3) printf("AliAnaPartCorrBaseClass::ConnectInputOutputAODBranches() - Connect Input with name: <%s>; Connect output with name <%s>\n",fInputAODName.Data(),fOutputAODName.Data()); |
289 | ||
290 | //Get the AOD handler, if output AOD is created use it, if not get the branches from the input which should be deltaAODs | |
291 | AliAODHandler* aodHandler = 0x0; | |
292 | Bool_t outAOD = kFALSE; | |
293 | if((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()) outAOD = kTRUE; | |
294 | if(outAOD) aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()); | |
295 | else aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler()); | |
296 | ||
42dc8e7d | 297 | if (aodHandler->GetExtensions()) { |
1e86c71e | 298 | |
42dc8e7d | 299 | AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(GetReader()->GetDeltaAODFileName()); |
300 | if(ext){ | |
301 | AliAODEvent *aodEvent = ext->GetAOD(); | |
1e86c71e | 302 | if(fNewAOD)fOutputAODBranch = (TClonesArray*) aodEvent->FindListObject(fOutputAODName); |
42dc8e7d | 303 | fInputAODBranch = (TClonesArray*) aodEvent->FindListObject(fInputAODName); |
1e86c71e | 304 | if(!fOutputAODBranch && fNewAOD) fOutputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName); |
42dc8e7d | 305 | if(!fInputAODBranch) fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName); |
306 | } | |
307 | else{//If no Delta AODs, kept in standard branch, to revise. | |
0866d83a | 308 | if(fNewAOD && fReader->GetOutputEvent()) { |
1e86c71e | 309 | fOutputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName); |
310 | fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName); | |
311 | } | |
7cd31fd6 | 312 | else { |
313 | fInputAODBranch = (TClonesArray *) fReader->GetInputEvent()->FindListObject(fInputAODName); | |
0866d83a | 314 | if(!fInputAODBranch && fReader->GetOutputEvent() ) |
315 | fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);//Try the output event. | |
7cd31fd6 | 316 | } |
1e86c71e | 317 | } |
318 | } | |
319 | else{ //If no Delta AODs, kept in standard branch | |
0866d83a | 320 | if(fNewAOD && fReader->GetOutputEvent()) { |
42dc8e7d | 321 | fOutputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName); |
1e86c71e | 322 | fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName); |
42dc8e7d | 323 | } |
7cd31fd6 | 324 | else{ |
1e86c71e | 325 | fInputAODBranch = (TClonesArray *) fReader->GetInputEvent()->FindListObject(fInputAODName); |
0866d83a | 326 | if(!fInputAODBranch && fReader->GetOutputEvent()) |
327 | fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);//Try the output event. | |
7cd31fd6 | 328 | } |
42dc8e7d | 329 | } |
1e86c71e | 330 | |
331 | if(GetDebug() > 1){ | |
332 | if(fNewAOD && !fOutputAODBranch) | |
333 | printf(" AliAnaPartCorrBaseClass::ConnectInputOutputAODBranches() - Output Branch <%s>, not found!\n",fOutputAODName.Data()); | |
334 | if(!fNewAOD && !fInputAODBranch) | |
335 | printf(" AliAnaPartCorrBaseClass::ConnectInputOutputAODBranches() - Input Branch <%s>, not found!\n",fInputAODName.Data()); | |
42dc8e7d | 336 | } |
1c5acb87 | 337 | } |
338 | ||
339 | //__________________________________________________ | |
591cc579 | 340 | TObjArray * AliAnaPartCorrBaseClass::GetAODCTS() const { |
477d6cee | 341 | //Get list of referenced tracks from reader |
1c5acb87 | 342 | |
343 | return fReader->GetAODCTS(); | |
344 | ||
345 | } | |
346 | ||
347 | //__________________________________________________ | |
591cc579 | 348 | TObjArray * AliAnaPartCorrBaseClass::GetAODPHOS() const { |
477d6cee | 349 | //Get list of PHOS reference caloclusters from reader |
1c5acb87 | 350 | |
351 | return fReader->GetAODPHOS(); | |
352 | ||
353 | } | |
354 | ||
1c5acb87 | 355 | //__________________________________________________ |
591cc579 | 356 | TObjArray * AliAnaPartCorrBaseClass::GetAODEMCAL() const { |
477d6cee | 357 | //Get list of emcal referenced caloclusters from reader |
1c5acb87 | 358 | |
359 | return fReader->GetAODEMCAL(); | |
360 | ||
361 | } | |
362 | ||
477d6cee | 363 | //__________________________________________________ |
364 | TClonesArray * AliAnaPartCorrBaseClass::GetAODCaloClusters() const { | |
365 | //Get list of all caloclusters in AOD output file | |
366 | ||
367 | return fReader->GetOutputEvent()->GetCaloClusters(); | |
368 | ||
369 | } | |
370 | ||
371 | //__________________________________________________ | |
372 | TClonesArray * AliAnaPartCorrBaseClass::GetAODTracks() const { | |
373 | //Get list of all tracks in AOD output file | |
374 | ||
375 | return fReader->GetOutputEvent()->GetTracks(); | |
376 | ||
377 | } | |
378 | ||
1c5acb87 | 379 | //__________________________________________________ |
380 | TString AliAnaPartCorrBaseClass::GetBaseParametersList() { | |
381 | //Put data member values in string to keep in output container | |
382 | ||
477d6cee | 383 | TString parList ; //this will be list of parameters used for this analysis. |
384 | char onePar[255] ; | |
385 | sprintf(onePar,"--- AliAnaPartCorrBaseClass ---\n") ; | |
386 | parList+=onePar ; | |
387 | sprintf(onePar,"Minimal P_t: %2.2f ; Max\n", fMinPt) ; | |
388 | parList+=onePar ; | |
389 | sprintf(onePar,"Minimal P_t: %2.2f ; Max\n", fMaxPt) ; | |
390 | parList+=onePar ; | |
391 | sprintf(onePar,"fDataMC =%d (Check MC information, on/off) \n",fDataMC) ; | |
392 | parList+=onePar ; | |
ff45398a | 393 | sprintf(onePar,"fCheckFidCut=%d (Check Fiducial cut selection on/off) \n",fCheckFidCut) ; |
477d6cee | 394 | parList+=onePar ; |
a3aebfff | 395 | sprintf(onePar,"fCheckCaloPID =%d (Use Bayesian PID in calorimetes, on/off) \n",fCheckCaloPID) ; |
477d6cee | 396 | parList+=onePar ; |
397 | sprintf(onePar,"fRecalculateCaloPID =%d (Calculate PID from shower/tof/tracking parameters, on/off) \n",fRecalculateCaloPID) ; | |
398 | parList+=onePar ; | |
a3aebfff | 399 | sprintf(onePar,"fInputAODName =%s Input AOD name \n",fInputAODName.Data()) ; |
400 | parList+=onePar ; | |
401 | if(fNewAOD){ | |
402 | sprintf(onePar,"fOutputAODName =%s Output AOD name \n",fOutputAODName.Data()) ; | |
403 | parList+=onePar ; | |
404 | sprintf(onePar,"fOutputAODClassName =%s Output AOD class name \n",fOutputAODClassName.Data()) ; | |
405 | parList+=onePar ; | |
406 | } | |
591cc579 | 407 | sprintf(onePar,"fAODObjArrayName =%s Reference arrays in AOD name \n",fAODObjArrayName.Data()) ; |
a3aebfff | 408 | parList+=onePar ; |
409 | sprintf(onePar,"fAddToHistogramsName =%s String added to beginning of histograms name \n",fAddToHistogramsName.Data()) ; | |
410 | parList+=onePar ; | |
411 | ||
1c5acb87 | 412 | return parList; |
413 | ||
414 | } | |
415 | ||
416 | //__________________________________________________ | |
417 | TClonesArray * AliAnaPartCorrBaseClass::GetCreateOutputAODBranch() { | |
477d6cee | 418 | //Create AOD branch filled in the analysis |
419 | ||
420 | printf("Create AOD branch of %s objects and with name < %s >\n", | |
421 | fOutputAODClassName.Data(),fOutputAODName.Data()) ; | |
422 | ||
423 | TClonesArray * aodBranch = new TClonesArray(fOutputAODClassName, 0); | |
424 | aodBranch->SetName(fOutputAODName); | |
425 | return aodBranch ; | |
426 | ||
1c5acb87 | 427 | } |
428 | ||
429 | //__________________________________________________ | |
430 | TNamed * AliAnaPartCorrBaseClass::GetPHOSCells() const { | |
431 | //Get list of PHOS calo cells (ESD or AOD) from reader | |
432 | ||
433 | return fReader->GetPHOSCells(); | |
434 | ||
435 | } | |
436 | ||
437 | ||
438 | //__________________________________________________ | |
439 | TNamed * AliAnaPartCorrBaseClass::GetEMCALCells() const { | |
440 | //Get list of emcal calo cells (ESD or AOD) from reader | |
441 | ||
442 | return fReader->GetEMCALCells(); | |
443 | ||
444 | } | |
445 | ||
6639984f | 446 | //__________________________________________________ |
447 | Int_t AliAnaPartCorrBaseClass::GetEventNumber() const { | |
448 | //Get current event number | |
449 | ||
450 | return fReader->GetEventNumber() ; | |
451 | } | |
452 | ||
1c5acb87 | 453 | //__________________________________________________ |
454 | AliStack * AliAnaPartCorrBaseClass::GetMCStack() const { | |
455 | //Get stack pointer from reader | |
456 | ||
457 | return fReader->GetStack(); | |
458 | ||
459 | } | |
460 | //__________________________________________________ | |
461 | AliHeader * AliAnaPartCorrBaseClass::GetMCHeader() const { | |
462 | //Get header pointer from reader | |
463 | ||
464 | return fReader->GetHeader(); | |
465 | ||
466 | } | |
467 | ||
468 | //__________________________________________________ | |
469 | AliGenEventHeader * AliAnaPartCorrBaseClass::GetMCGenEventHeader() const { | |
470 | //Get GenEventHeader pointer from reader | |
471 | ||
472 | return fReader->GetGenEventHeader(); | |
473 | ||
474 | } | |
475 | ||
476 | //__________________________________________________ | |
477 | void AliAnaPartCorrBaseClass::InitParameters() | |
478 | { | |
479 | //Initialize the parameters of the analysis. | |
480 | fDataMC = kFALSE; | |
481 | fDebug = -1; | |
482 | fCheckCaloPID = kTRUE ; | |
483 | fCheckFidCut = kFALSE ; | |
484 | fRecalculateCaloPID = kFALSE ; | |
1e86c71e | 485 | fMinPt = 0.1 ; //Min pt in particle analysis |
1c5acb87 | 486 | fMaxPt = 300. ; //Max pt in particle analysis |
487 | ||
78219bac | 488 | //fReader = new AliCaloTrackReader(); //Initialized in maker |
489 | //fCaloUtils = new AliCalorimeterUtils();//Initialized in maker | |
765d44e7 | 490 | fCaloPID = new AliCaloPID(); |
491 | fFidCut = new AliFiducialCut(); | |
492 | fIC = new AliIsolationCut(); | |
493 | fMCUtils = new AliMCAnalysisUtils(); | |
494 | fNMS = new AliNeutralMesonSelection; | |
4a745797 | 495 | |
496 | //fAnaOutContainer = new TList(); | |
497 | ||
498 | fNewAOD = kFALSE ; | |
499 | fOutputAODName = "PartCorr"; | |
500 | fOutputAODClassName = "AliAODPWG4Particle"; | |
501 | fInputAODName = "PartCorr"; | |
a3aebfff | 502 | fAddToHistogramsName = ""; |
4a745797 | 503 | fAODObjArrayName = "Ref"; |
7cd4e982 | 504 | |
5a2dbc3c | 505 | //Histogram settings |
506 | fHistoPtBins = 240 ; | |
507 | fHistoPtMax = 120 ; | |
508 | fHistoPtMin = 0. ; | |
509 | ||
510 | fHistoPhiBins = 120 ; | |
511 | fHistoPhiMax = TMath::TwoPi(); | |
512 | fHistoPhiMin = 0. ; | |
513 | ||
514 | fHistoEtaBins = 100 ; | |
515 | fHistoEtaMax = 1 ; | |
516 | fHistoEtaMin = -1 ; | |
517 | ||
518 | fHistoMassBins = 200; | |
519 | fHistoMassMax = 1. ; | |
520 | fHistoMassMin = 0. ; | |
521 | ||
522 | fHistoAsymBins = 10 ; | |
523 | fHistoAsymMax = 1. ; | |
524 | fHistoAsymMin = 0. ; | |
525 | ||
1c5acb87 | 526 | } |
527 | ||
528 | //__________________________________________________________________ | |
529 | void AliAnaPartCorrBaseClass::Print(const Option_t * opt) const | |
530 | { | |
477d6cee | 531 | //Print some relevant parameters set for the analysis |
532 | ||
533 | if(! opt) | |
534 | return; | |
a3aebfff | 535 | |
477d6cee | 536 | printf("New AOD: = %d\n",fNewAOD); |
537 | printf("Input AOD name: = %s\n",fInputAODName.Data()); | |
538 | printf("Output AOD name: = %s\n",fOutputAODName.Data()); | |
539 | printf("Output AOD Class name: = %s\n",fOutputAODClassName.Data()); | |
540 | printf("Min Photon pT = %2.2f\n", fMinPt) ; | |
541 | printf("Max Photon pT = %3.2f\n", fMaxPt) ; | |
542 | printf("Check PID = %d\n", fCheckCaloPID) ; | |
543 | printf("Recalculate PID = %d\n", fRecalculateCaloPID) ; | |
ff45398a | 544 | printf("Check Fiducial cut = %d\n", fCheckFidCut) ; |
477d6cee | 545 | printf("Check MC labels = %d\n", fDataMC); |
546 | printf("Debug Level = %d\n", fDebug); | |
5a2dbc3c | 547 | printf("Histograms: %3.1f < pT < %3.1f, Nbin = %d\n", fHistoPtMin, fHistoPtMax, fHistoPtBins); |
548 | printf("Histograms: %3.1f < phi < %3.1f, Nbin = %d\n", fHistoPhiMin, fHistoPhiMax, fHistoPhiBins); | |
549 | printf("Histograms: %3.1f < eta < %3.1f, Nbin = %d\n", fHistoEtaMin, fHistoEtaMax, fHistoEtaBins); | |
550 | printf("Histograms: %3.1f < mass < %3.1f, Nbin = %d\n", fHistoMassMin, fHistoMassMax, fHistoMassBins); | |
551 | printf("Histograms: %3.1f < asymmetry < %3.1f, Nbin = %d\n", fHistoAsymMin, fHistoAsymMax, fHistoAsymBins); | |
591cc579 | 552 | printf("Name of reference array : %s\n", fAODObjArrayName.Data()); |
a3aebfff | 553 | printf("String added histograms name : %s\n",fAddToHistogramsName.Data()); |
554 | ||
477d6cee | 555 | printf(" \n") ; |
556 | ||
1c5acb87 | 557 | } |