]>
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) | |
0a14e9ae | 20 | // |
21 | // | |
1c5acb87 | 22 | //_________________________________________________________________________ |
0a14e9ae | 23 | |
1c5acb87 | 24 | |
25 | // --- ROOT system --- | |
26 | #include <TClonesArray.h> | |
477d6cee | 27 | //#include <Riostream.h> |
1c5acb87 | 28 | |
29 | //---- AliRoot system ---- | |
1c5acb87 | 30 | #include "AliAnaPartCorrBaseClass.h" |
31 | #include "AliCaloTrackReader.h" | |
765d44e7 | 32 | #include "AliCalorimeterUtils.h" |
1c5acb87 | 33 | #include "AliCaloPID.h" |
ff45398a | 34 | #include "AliFiducialCut.h" |
1c5acb87 | 35 | #include "AliIsolationCut.h" |
6639984f | 36 | #include "AliMCAnalysisUtils.h" |
1c5acb87 | 37 | #include "AliNeutralMesonSelection.h" |
f37fa8d2 | 38 | #include "AliVCaloCells.h" |
477d6cee | 39 | #include "AliAODEvent.h" |
42dc8e7d | 40 | #include "AliAODHandler.h" |
41 | #include "AliAnalysisManager.h" | |
c8fe2783 | 42 | #include "AliAODPWG4Particle.h" |
1c5acb87 | 43 | |
44 | ClassImp(AliAnaPartCorrBaseClass) | |
0a14e9ae | 45 | |
46 | ||
1c5acb87 | 47 | //_______________________________________________ |
0a14e9ae | 48 | AliAnaPartCorrBaseClass::AliAnaPartCorrBaseClass() : |
49 | TObject(), | |
50 | fDataMC(0), fDebug(0), fCheckFidCut(0), | |
51 | fCheckCaloPID(0), fRecalculateCaloPID(0), | |
52 | fMinPt(0), fMaxPt(0), fPairTimeCut(200), | |
53 | fMultiBin(0), fNZvertBin(0), | |
54 | fNrpBin(0), fNCentrBin(0), | |
55 | fNmaxMixEv(0), fMaxMulti(0), fMinMulti(0), | |
56 | fUseSelectEvent(kFALSE), fMakePlots(kFALSE), | |
57 | fReader(0x0), fInputAODBranch(0x0), fInputAODName(""), | |
58 | fOutputAODBranch(0x0), fNewAOD(kFALSE), | |
59 | fOutputAODName(""), fOutputAODClassName(""), | |
60 | fAODObjArrayName(""), fAddToHistogramsName(""), | |
61 | fCaloPID(0x0), fFidCut(0x0), fIC(0x0), | |
62 | fMCUtils(0x0), fNMS(0x0), fCaloUtils(0x0), | |
63 | fHistoPtBins(0), fHistoPtMax(0.), fHistoPtMin(0.), | |
64 | fHistoPhiBins(0), fHistoPhiMax(0.), fHistoPhiMin(0.), | |
65 | fHistoEtaBins(0), fHistoEtaMax(0.), fHistoEtaMin(0.), | |
66 | fHistoMassBins(0), fHistoMassMax(0.), fHistoMassMin(0.), | |
67 | fHistoAsymBins(0), fHistoAsymMax(0.), fHistoAsymMin(0.), | |
68 | fHistoV0SBins(0), fHistoV0SMax(0), fHistoV0SMin(0), | |
69 | fHistoV0MBins(0), fHistoV0MMax(0), fHistoV0MMin(0), | |
70 | fHistoTrMBins(0), fHistoTrMMax(0), fHistoTrMMin(0), | |
71 | fHistoFinePtBins(1000), fHistoFinePtMax(5.), fHistoFinePtMin(0.), | |
72 | fHistoPOverEBins(100), fHistoPOverEMax(100.), fHistoPOverEMin(0.), | |
73 | fHistodEdxBins(100), fHistodEdxMax(100.), fHistodEdxMin(0.), | |
74 | fHistodRBins(100), fHistodRMax(100.), fHistodRMin(0.), | |
75 | fHistoTimeBins(100), fHistoTimeMax(100.), fHistoTimeMin(0.), | |
76 | fHistoNClusCellBins(100), fHistoNClusCellMax(100), fHistoNClusCellMin(0), | |
77 | fHistoNCellsBins(100), fHistoNCellsMax(100), fHistoNCellsMin(0), | |
78 | fHistoNClustersBins(100), fHistoNClustersMax(100), fHistoNClustersMin(0), | |
79 | fHistoRatioBins(100), fHistoRatioMax(100.), fHistoRatioMin(0.), | |
80 | fHistoVertexDistBins(100), fHistoVertexDistMax(100.), fHistoVertexDistMin(0.), | |
81 | fHistoRBins(100), fHistoRMax(1000), fHistoRMin(-1000), | |
82 | fHistoXBins(100), fHistoXMax(1000), fHistoXMin(-1000), | |
83 | fHistoYBins(100), fHistoYMax(1000), fHistoYMin(-1000), | |
84 | fHistoZBins(100), fHistoZMax(1000), fHistoZMin(-1000), | |
85 | fHistoSSBins(0), fHistoSSMax(0), fHistoSSMin(0), | |
86 | fHistoDiffTimeBins(0), fHistoDiffTimeMax(0), fHistoDiffTimeMin(0) | |
1c5acb87 | 87 | { |
88 | //Default Ctor | |
0a14e9ae | 89 | |
1c5acb87 | 90 | //Initialize parameters |
91 | InitParameters(); | |
92 | } | |
fb9841b8 | 93 | |
0a14e9ae | 94 | //_________________________________________________ |
1c5acb87 | 95 | AliAnaPartCorrBaseClass::~AliAnaPartCorrBaseClass() |
96 | { | |
97 | // Remove all pointers except analysis output pointers. | |
0a14e9ae | 98 | //printf("---Delete analysis %s\n", fAODObjArrayName.Data()); |
7787a778 | 99 | // Not sure if it should be me who deletes the delta AOD branches. |
0a14e9ae | 100 | // if(fOutputAODBranch){ |
101 | // fOutputAODBranch->Clear() ; | |
102 | // delete fOutputAODBranch ; | |
103 | // } | |
104 | // | |
105 | // if(fInputAODBranch){ | |
106 | // fInputAODBranch->Clear() ; | |
107 | // delete fInputAODBranch ; | |
108 | // } | |
477d6cee | 109 | |
7787a778 | 110 | //if(fCaloUtils) delete fCaloUtils ; //Already deleted in maker |
111 | //if(fReader) delete fReader ; //Already deleted in maker | |
112 | ||
765d44e7 | 113 | if(fCaloPID) delete fCaloPID ; |
114 | if(fFidCut) delete fFidCut ; | |
115 | if(fIC) delete fIC ; | |
116 | if(fMCUtils) delete fMCUtils ; | |
117 | if(fNMS) delete fNMS ; | |
0a14e9ae | 118 | |
5025c139 | 119 | // printf("--- analysis deleted \n"); |
1c5acb87 | 120 | } |
121 | ||
0a14e9ae | 122 | //_________________________________________________________________ |
123 | void AliAnaPartCorrBaseClass::AddAODParticle(AliAODPWG4Particle pc) | |
124 | { | |
1c5acb87 | 125 | //Put AOD calo cluster in the AODParticleCorrelation array |
126 | ||
477d6cee | 127 | if(fOutputAODBranch){ |
128 | ||
129 | Int_t i = fOutputAODBranch->GetEntriesFast(); | |
130 | //new((*fOutputAODBranch)[i]) AliAODPWG4Particle(pc); | |
131 | if(strcmp(fOutputAODBranch->GetClass()->GetName(),"AliAODPWG4Particle")==0) | |
132 | new((*fOutputAODBranch)[i]) AliAODPWG4Particle(pc); | |
133 | else if(strcmp(fOutputAODBranch->GetClass()->GetName(),"AliAODPWG4ParticleCorrelation")==0) | |
134 | new((*fOutputAODBranch)[i]) AliAODPWG4ParticleCorrelation(pc); | |
135 | else { | |
136 | printf("AliAnaPartCorrBaseClass::AddAODParticle() - Cannot add an object of type < %s >, to the AOD TClonesArray \n", | |
0a14e9ae | 137 | fOutputAODBranch->GetClass()->GetName()); |
477d6cee | 138 | abort(); |
139 | } | |
140 | } | |
141 | else { | |
142 | printf(" AliAnaPartCorrBaseClass::AddAODParticle() - No AOD branch available!!!\n"); | |
143 | abort(); | |
144 | } | |
f37fa8d2 | 145 | |
0a14e9ae | 146 | } |
477d6cee | 147 | |
f37fa8d2 | 148 | |
0a14e9ae | 149 | //___________________________________________________________ |
150 | void AliAnaPartCorrBaseClass::ConnectInputOutputAODBranches() | |
151 | { | |
42dc8e7d | 152 | //Recover ouput and input AOD pointers for each event in the maker |
153 | ||
154 | //Delta AODs | |
1e86c71e | 155 | if(fDebug > 3) printf("AliAnaPartCorrBaseClass::ConnectInputOutputAODBranches() - Connect Input with name: <%s>; Connect output with name <%s>\n",fInputAODName.Data(),fOutputAODName.Data()); |
f37fa8d2 | 156 | |
521636d2 | 157 | //Get the AOD handler, if output AOD is created use it, if not get the branches from the input which should be deltaAODs |
158 | AliAODHandler* aodHandler = 0x0; | |
159 | Bool_t outAOD = kFALSE; | |
160 | if((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()) outAOD = kTRUE; | |
161 | if(outAOD) aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()); | |
162 | else aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler()); | |
163 | ||
f37fa8d2 | 164 | if(!GetReader()->WriteDeltaAODToFile()) |
165 | { | |
166 | fOutputAODBranch = (TClonesArray *) (fReader->GetAODBranchList())->FindObject(fOutputAODName); | |
167 | fInputAODBranch = (TClonesArray *) (fReader->GetAODBranchList())->FindObject(fInputAODName); | |
168 | } | |
169 | else if (aodHandler->GetExtensions()) { | |
170 | ||
521636d2 | 171 | AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(GetReader()->GetDeltaAODFileName()); |
172 | if(ext){ | |
f37fa8d2 | 173 | AliAODEvent *aodEvent = ext->GetAOD(); |
174 | if(fNewAOD)fOutputAODBranch = (TClonesArray*) aodEvent->FindListObject(fOutputAODName); | |
175 | fInputAODBranch = (TClonesArray*) aodEvent->FindListObject(fInputAODName); | |
176 | if(!fOutputAODBranch && fNewAOD) fOutputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName); | |
177 | if(!fInputAODBranch) fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName); | |
521636d2 | 178 | } |
179 | else{//If no Delta AODs, kept in standard branch, to revise. | |
180 | if(fNewAOD && fReader->GetOutputEvent()) { | |
0a14e9ae | 181 | fOutputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName); |
182 | fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName); | |
521636d2 | 183 | } |
184 | else { | |
0a14e9ae | 185 | fInputAODBranch = (TClonesArray *) fReader->GetInputEvent()->FindListObject(fInputAODName); |
186 | if(!fInputAODBranch && fReader->GetOutputEvent() ) | |
187 | fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);//Try the output event. | |
521636d2 | 188 | } |
189 | } | |
1e86c71e | 190 | } |
191 | else{ //If no Delta AODs, kept in standard branch | |
521636d2 | 192 | if(fNewAOD && fReader->GetOutputEvent()) { |
193 | fOutputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fOutputAODName); | |
194 | fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName); | |
195 | } | |
196 | else{ | |
197 | fInputAODBranch = (TClonesArray *) fReader->GetInputEvent()->FindListObject(fInputAODName); | |
198 | if(!fInputAODBranch && fReader->GetOutputEvent()) | |
0a14e9ae | 199 | fInputAODBranch = (TClonesArray *) fReader->GetOutputEvent()->FindListObject(fInputAODName);//Try the output event. |
521636d2 | 200 | } |
42dc8e7d | 201 | } |
521636d2 | 202 | |
1e86c71e | 203 | if(GetDebug() > 1){ |
f37fa8d2 | 204 | if(fNewAOD && !fOutputAODBranch) |
205 | printf(" AliAnaPartCorrBaseClass::ConnectInputOutputAODBranches() - Output Branch <%s>, not found!\n",fOutputAODName.Data()); | |
206 | if(!fNewAOD && !fInputAODBranch) | |
207 | printf(" AliAnaPartCorrBaseClass::ConnectInputOutputAODBranches() - Input Branch <%s>, not found!\n",fInputAODName.Data()); | |
42dc8e7d | 208 | } |
1c5acb87 | 209 | } |
521636d2 | 210 | |
1c5acb87 | 211 | |
0a14e9ae | 212 | //_____________________________________________________________________________________ |
213 | AliVCluster * AliAnaPartCorrBaseClass::FindCluster(TObjArray* clusters, const Int_t id, | |
214 | Int_t & iclus, const Int_t first) | |
215 | { | |
216 | // Given the cluster ID stored in AliAODPWG4Particle, get the originator cluster and its index in the array | |
217 | ||
218 | if(!clusters) return 0x0; | |
219 | ||
220 | for(iclus = first; iclus < clusters->GetEntriesFast(); iclus++){ | |
221 | AliVCluster *cluster= dynamic_cast<AliVCluster*> (clusters->At(iclus)); | |
222 | if(cluster){ | |
223 | if (cluster->GetID()==id) { | |
224 | return cluster; | |
225 | } | |
226 | } | |
227 | }// calorimeter clusters loop | |
228 | ||
229 | return 0x0; | |
230 | ||
231 | } | |
232 | ||
233 | ||
234 | //_________________________________________________________________________ | |
235 | TClonesArray * AliAnaPartCorrBaseClass::GetAODBranch(TString aodName) const | |
236 | { | |
237 | //Recover ouput and input AOD pointers for each event in the maker | |
238 | ||
239 | //Delta AODs | |
240 | if(fDebug > 3) printf("AliAnaPartCorrBaseClass::GetAODBranch() - Get Input Branch with name: <%s>; \n",aodName.Data()); | |
241 | ||
242 | //Get the AOD handler, if output AOD is created use it, if not get the branches from the input which should be deltaAODs | |
243 | AliAODHandler* aodHandler = 0x0; | |
244 | Bool_t outAOD = kFALSE; | |
245 | if((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()) outAOD = kTRUE; | |
246 | if(outAOD) aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler()); | |
247 | else aodHandler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler()); | |
248 | ||
249 | if(!GetReader()->WriteDeltaAODToFile()) | |
250 | { | |
251 | return (TClonesArray *) (fReader->GetAODBranchList())->FindObject(aodName); | |
252 | } | |
253 | else if (aodHandler->GetExtensions()) | |
254 | { | |
255 | AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(GetReader()->GetDeltaAODFileName()); | |
256 | if(ext){ | |
257 | AliAODEvent *aodEvent = ext->GetAOD(); | |
258 | TClonesArray * aodbranch = (TClonesArray*) aodEvent->FindListObject(aodName); | |
259 | if(aodbranch) return aodbranch; | |
260 | else { | |
261 | if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName); | |
262 | else return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName); | |
263 | } | |
264 | } | |
265 | else{//If no Delta AODs, kept in standard branch, to revise. | |
266 | if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName); | |
267 | else return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName); | |
268 | } | |
269 | } | |
270 | else{ //If no Delta AODs, kept in standard branch, to revise. | |
271 | if(outAOD) return (TClonesArray *) fReader->GetOutputEvent()->FindListObject(aodName); | |
272 | else return (TClonesArray *) fReader->GetInputEvent() ->FindListObject(aodName); | |
273 | } | |
274 | ||
275 | } | |
1c5acb87 | 276 | |
0a14e9ae | 277 | //________________________________________________________ |
278 | TObjArray * AliAnaPartCorrBaseClass::GetCTSTracks() const | |
279 | { | |
280 | //Get list of referenced tracks from reader | |
281 | ||
282 | return fReader->GetCTSTracks(); | |
283 | ||
1c5acb87 | 284 | } |
285 | ||
0a14e9ae | 286 | //___________________________________________________________ |
287 | TObjArray * AliAnaPartCorrBaseClass::GetPHOSClusters() const | |
288 | { | |
477d6cee | 289 | //Get list of PHOS reference caloclusters from reader |
0a14e9ae | 290 | |
be518ab0 | 291 | return fReader->GetPHOSClusters(); |
0a14e9ae | 292 | |
1c5acb87 | 293 | } |
294 | ||
0a14e9ae | 295 | //____________________________________________________________ |
296 | TObjArray * AliAnaPartCorrBaseClass::GetEMCALClusters() const | |
297 | { | |
477d6cee | 298 | //Get list of emcal referenced caloclusters from reader |
0a14e9ae | 299 | |
be518ab0 | 300 | return fReader->GetEMCALClusters(); |
0a14e9ae | 301 | |
1c5acb87 | 302 | } |
303 | ||
0a14e9ae | 304 | //_________________________________________________________________ |
305 | TClonesArray * AliAnaPartCorrBaseClass::GetAODCaloClusters() const | |
306 | { | |
477d6cee | 307 | //Get list of all caloclusters in AOD output file |
0a14e9ae | 308 | |
477d6cee | 309 | return fReader->GetOutputEvent()->GetCaloClusters(); |
0a14e9ae | 310 | |
477d6cee | 311 | } |
312 | ||
0a14e9ae | 313 | //___________________________________________________________ |
314 | TClonesArray * AliAnaPartCorrBaseClass::GetAODTracks() const | |
315 | { | |
477d6cee | 316 | //Get list of all tracks in AOD output file |
0a14e9ae | 317 | |
477d6cee | 318 | return fReader->GetOutputEvent()->GetTracks(); |
0a14e9ae | 319 | |
477d6cee | 320 | } |
321 | ||
0a14e9ae | 322 | //_______________________________________________________ |
323 | TString AliAnaPartCorrBaseClass::GetBaseParametersList() | |
324 | { | |
1c5acb87 | 325 | //Put data member values in string to keep in output container |
0a14e9ae | 326 | |
477d6cee | 327 | TString parList ; //this will be list of parameters used for this analysis. |
5ae09196 | 328 | const Int_t buffersize = 255; |
329 | char onePar[buffersize] ; | |
330 | snprintf(onePar,buffersize,"--- AliAnaPartCorrBaseClass ---\n") ; | |
477d6cee | 331 | parList+=onePar ; |
5ae09196 | 332 | snprintf(onePar,buffersize,"Minimal P_t: %2.2f ; Max\n", fMinPt) ; |
477d6cee | 333 | parList+=onePar ; |
5ae09196 | 334 | snprintf(onePar,buffersize,"Minimal P_t: %2.2f ; Max\n", fMaxPt) ; |
477d6cee | 335 | parList+=onePar ; |
a5fb4114 | 336 | snprintf(onePar,buffersize,"|t_{1}-t_{2}| < %2.2f ; Max\n", fPairTimeCut) ; |
337 | parList+=onePar ; | |
5ae09196 | 338 | snprintf(onePar,buffersize,"fDataMC =%d (Check MC information, on/off) \n",fDataMC) ; |
477d6cee | 339 | parList+=onePar ; |
5ae09196 | 340 | snprintf(onePar,buffersize,"fCheckFidCut=%d (Check Fiducial cut selection on/off) \n",fCheckFidCut) ; |
477d6cee | 341 | parList+=onePar ; |
5ae09196 | 342 | snprintf(onePar,buffersize,"fCheckCaloPID =%d (Use Bayesian PID in calorimetes, on/off) \n",fCheckCaloPID) ; |
477d6cee | 343 | parList+=onePar ; |
5ae09196 | 344 | snprintf(onePar,buffersize,"fRecalculateCaloPID =%d (Calculate PID from shower/tof/tracking parameters, on/off) \n",fRecalculateCaloPID) ; |
477d6cee | 345 | parList+=onePar ; |
5ae09196 | 346 | snprintf(onePar,buffersize,"fInputAODName =%s Input AOD name \n",fInputAODName.Data()) ; |
a3aebfff | 347 | parList+=onePar ; |
348 | if(fNewAOD){ | |
0a14e9ae | 349 | snprintf(onePar,buffersize,"fOutputAODName =%s Output AOD name \n",fOutputAODName.Data()) ; |
350 | parList+=onePar ; | |
351 | snprintf(onePar,buffersize,"fOutputAODClassName =%s Output AOD class name \n",fOutputAODClassName.Data()) ; | |
352 | parList+=onePar ; | |
a3aebfff | 353 | } |
5ae09196 | 354 | snprintf(onePar,buffersize,"fAODObjArrayName =%s Reference arrays in AOD name \n",fAODObjArrayName.Data()) ; |
a3aebfff | 355 | parList+=onePar ; |
5ae09196 | 356 | snprintf(onePar,buffersize,"fAddToHistogramsName =%s String added to beginning of histograms name \n",fAddToHistogramsName.Data()) ; |
a3aebfff | 357 | parList+=onePar ; |
358 | ||
1c5acb87 | 359 | return parList; |
0a14e9ae | 360 | |
1c5acb87 | 361 | } |
362 | ||
0a14e9ae | 363 | //________________________________________________________________ |
364 | TClonesArray * AliAnaPartCorrBaseClass::GetCreateOutputAODBranch() | |
365 | { | |
366 | //Create AOD branch filled in the analysis | |
367 | ||
368 | printf("Create AOD branch of %s objects and with name < %s >\n", | |
369 | fOutputAODClassName.Data(),fOutputAODName.Data()) ; | |
370 | ||
371 | TClonesArray * aodBranch = new TClonesArray(fOutputAODClassName, 0); | |
372 | aodBranch->SetName(fOutputAODName); | |
373 | return aodBranch ; | |
374 | ||
375 | } | |
1c5acb87 | 376 | |
0a14e9ae | 377 | //___________________________________________________ |
378 | Int_t AliAnaPartCorrBaseClass::GetEventNumber() const | |
379 | { | |
521636d2 | 380 | //Get current event number |
381 | ||
382 | return fReader->GetEventNumber() ; | |
0a14e9ae | 383 | |
6639984f | 384 | } |
3ff76907 | 385 | |
1c5acb87 | 386 | |
0a14e9ae | 387 | //_____________________________________________________ |
388 | AliStack * AliAnaPartCorrBaseClass::GetMCStack() const | |
389 | { | |
390 | //Get stack pointer from reader | |
391 | ||
1c5acb87 | 392 | return fReader->GetStack(); |
0a14e9ae | 393 | |
1c5acb87 | 394 | } |
0a14e9ae | 395 | //_______________________________________________________ |
396 | AliHeader * AliAnaPartCorrBaseClass::GetMCHeader() const | |
397 | { | |
1c5acb87 | 398 | //Get header pointer from reader |
0a14e9ae | 399 | |
1c5acb87 | 400 | return fReader->GetHeader(); |
0a14e9ae | 401 | |
1c5acb87 | 402 | } |
403 | ||
0a14e9ae | 404 | //_______________________________________________________________________ |
405 | AliGenEventHeader * AliAnaPartCorrBaseClass::GetMCGenEventHeader() const | |
406 | { | |
1c5acb87 | 407 | //Get GenEventHeader pointer from reader |
0a14e9ae | 408 | |
1c5acb87 | 409 | return fReader->GetGenEventHeader(); |
0a14e9ae | 410 | |
1c5acb87 | 411 | } |
412 | ||
0a14e9ae | 413 | //____________________________________________ |
1c5acb87 | 414 | void AliAnaPartCorrBaseClass::InitParameters() |
415 | { | |
416 | //Initialize the parameters of the analysis. | |
521636d2 | 417 | fDataMC = kFALSE; |
418 | fDebug = -1; | |
419 | fCheckCaloPID = kTRUE ; | |
420 | fCheckFidCut = kFALSE ; | |
421 | fRecalculateCaloPID = kFALSE ; | |
422 | fMinPt = 0.1 ; //Min pt in particle analysis | |
423 | fMaxPt = 300. ; //Max pt in particle analysis | |
424 | fMultiBin = 1; | |
425 | fNZvertBin = 1; | |
426 | fNrpBin = 1; | |
427 | fMaxMulti = 1000; | |
428 | fMinMulti = 0; | |
429 | fUseSelectEvent = kFALSE ; | |
5025c139 | 430 | |
78219bac | 431 | //fReader = new AliCaloTrackReader(); //Initialized in maker |
432 | //fCaloUtils = new AliCalorimeterUtils();//Initialized in maker | |
0a14e9ae | 433 | |
4a745797 | 434 | fNewAOD = kFALSE ; |
435 | fOutputAODName = "PartCorr"; | |
436 | fOutputAODClassName = "AliAODPWG4Particle"; | |
437 | fInputAODName = "PartCorr"; | |
a3aebfff | 438 | fAddToHistogramsName = ""; |
4a745797 | 439 | fAODObjArrayName = "Ref"; |
0a14e9ae | 440 | |
5a2dbc3c | 441 | //Histogram settings |
442 | fHistoPtBins = 240 ; | |
443 | fHistoPtMax = 120 ; | |
444 | fHistoPtMin = 0. ; | |
0a14e9ae | 445 | |
5a2dbc3c | 446 | fHistoPhiBins = 120 ; |
447 | fHistoPhiMax = TMath::TwoPi(); | |
448 | fHistoPhiMin = 0. ; | |
0a14e9ae | 449 | |
5a2dbc3c | 450 | fHistoEtaBins = 100 ; |
451 | fHistoEtaMax = 1 ; | |
452 | fHistoEtaMin = -1 ; | |
0a14e9ae | 453 | |
5a2dbc3c | 454 | fHistoMassBins = 200; |
455 | fHistoMassMax = 1. ; | |
456 | fHistoMassMin = 0. ; | |
457 | ||
458 | fHistoAsymBins = 10 ; | |
459 | fHistoAsymMax = 1. ; | |
460 | fHistoAsymMin = 0. ; | |
798a9b04 | 461 | |
462 | fHistoV0SBins = 100 ; | |
463 | fHistoV0SMax = 10000 ; | |
464 | fHistoV0SMin = 0 ; | |
465 | ||
466 | fHistoV0MBins = 100; | |
467 | fHistoV0MMax = 10000 ; | |
468 | fHistoV0MMin = 0 ; | |
469 | ||
470 | fHistoTrMBins = 100 ; | |
af7b3903 | 471 | fHistoTrMMax = 2000 ; |
798a9b04 | 472 | fHistoTrMMin = 0 ; |
521636d2 | 473 | |
35c71d5c | 474 | fHistoPOverEBins = 100 ; fHistoPOverEMax = 10. ; fHistoPOverEMin = 0. ; |
475 | fHistodEdxBins = 200 ; fHistodEdxMax = 400. ; fHistodEdxMin = 0. ; | |
476 | fHistodRBins = 300 ; fHistodRMax = 3.15 ; fHistodRMin = 0. ; | |
477 | fHistoTimeBins = 1000; fHistoTimeMax = 1.e3 ; fHistoTimeMin = 0. ;//ns | |
478 | fHistoNClusCellBins = 200 ; fHistoNClusCellMax = 200 ; fHistoNClusCellMin = 0 ; | |
479 | fHistoNCellsBins = 300 ; fHistoNCellsMax = 300 ; fHistoNCellsMin = 0 ; | |
480 | fHistoNClustersBins = 50 ; fHistoNClustersMax = 50 ; fHistoNClustersMin = 0 ; | |
481 | fHistoRatioBins = 200 ; fHistoRatioMax = 2 ; fHistoRatioMin = 0. ; | |
482 | fHistoVertexDistBins = 100 ; fHistoVertexDistMax = 500. ; fHistoVertexDistMin = 0. ; | |
483 | fHistoRBins = 100 ; fHistoRMax = 500 ; fHistoRMin = -500 ;//cm | |
484 | fHistoXBins = 100 ; fHistoXMax = 500 ; fHistoXMin = -500 ;//cm | |
485 | fHistoYBins = 100 ; fHistoYMax = 500 ; fHistoYMin = -500 ;//cm | |
486 | fHistoZBins = 100 ; fHistoZMax = 600 ; fHistoZMin = -500 ;//cm | |
487 | fHistoSSBins = 500 ; fHistoSSMax = 5 ; fHistoSSMin = 0 ; | |
488 | fHistoDiffTimeBins = 800 ; fHistoDiffTimeMax = 400 ; fHistoDiffTimeMin = -400; // ns | |
0a14e9ae | 489 | |
1c5acb87 | 490 | } |
491 | ||
0a14e9ae | 492 | //_____________________________________________________________ |
1c5acb87 | 493 | void AliAnaPartCorrBaseClass::Print(const Option_t * opt) const |
494 | { | |
477d6cee | 495 | //Print some relevant parameters set for the analysis |
496 | ||
497 | if(! opt) | |
498 | return; | |
a3aebfff | 499 | |
477d6cee | 500 | printf("New AOD: = %d\n",fNewAOD); |
501 | printf("Input AOD name: = %s\n",fInputAODName.Data()); | |
502 | printf("Output AOD name: = %s\n",fOutputAODName.Data()); | |
503 | printf("Output AOD Class name: = %s\n",fOutputAODClassName.Data()); | |
504 | printf("Min Photon pT = %2.2f\n", fMinPt) ; | |
505 | printf("Max Photon pT = %3.2f\n", fMaxPt) ; | |
506 | printf("Check PID = %d\n", fCheckCaloPID) ; | |
507 | printf("Recalculate PID = %d\n", fRecalculateCaloPID) ; | |
ff45398a | 508 | printf("Check Fiducial cut = %d\n", fCheckFidCut) ; |
477d6cee | 509 | printf("Check MC labels = %d\n", fDataMC); |
d7c10d78 | 510 | printf("Make plots? = %d \n", fMakePlots); |
477d6cee | 511 | printf("Debug Level = %d\n", fDebug); |
5a2dbc3c | 512 | printf("Histograms: %3.1f < pT < %3.1f, Nbin = %d\n", fHistoPtMin, fHistoPtMax, fHistoPtBins); |
513 | printf("Histograms: %3.1f < phi < %3.1f, Nbin = %d\n", fHistoPhiMin, fHistoPhiMax, fHistoPhiBins); | |
514 | printf("Histograms: %3.1f < eta < %3.1f, Nbin = %d\n", fHistoEtaMin, fHistoEtaMax, fHistoEtaBins); | |
515 | printf("Histograms: %3.1f < mass < %3.1f, Nbin = %d\n", fHistoMassMin, fHistoMassMax, fHistoMassBins); | |
516 | printf("Histograms: %3.1f < asymmetry < %3.1f, Nbin = %d\n", fHistoAsymMin, fHistoAsymMax, fHistoAsymBins); | |
798a9b04 | 517 | printf("Histograms: %d < V0 Signal < %d, Nbin = %d\n", fHistoV0SMin, fHistoV0SMax, fHistoV0SBins); |
518 | printf("Histograms: %d < V0 Mult < %d, Nbin = %d\n", fHistoV0MMin, fHistoV0MMax, fHistoV0MBins); | |
519 | printf("Histograms: %d < Track Mult < %d, Nbin = %d\n", fHistoTrMMin, fHistoTrMMax, fHistoTrMBins); | |
521636d2 | 520 | printf("Histograms: %3.1f < p/E < %3.1f, Nbin = %d\n", fHistoPOverEMin, fHistoPOverEMax, fHistoPOverEBins); |
521 | printf("Histograms: %3.1f < dEdx < %3.1f, Nbin = %d\n", fHistodEdxMin, fHistodEdxMax, fHistodEdxBins); | |
522 | printf("Histograms: %3.1f < dR (track cluster) < %3.1f, Nbin = %d\n", fHistodRMin, fHistodRMax, fHistodRBins); | |
523 | printf("Histograms: %3.1f < R=sqrt{x^2+y^2} < %3.1f, Nbin = %d\n", fHistoRMin, fHistoRMax, fHistoRBins); | |
524 | printf("Histograms: %3.1f < X < %3.1f, Nbin = %d\n", fHistoXMin, fHistoXMax, fHistoXBins); | |
525 | printf("Histograms: %3.1f < Y < %3.1f, Nbin = %d\n", fHistoYMin, fHistoYMax, fHistoYBins); | |
526 | printf("Histograms: %3.1f < Z < %3.1f, Nbin = %d\n", fHistoZMin, fHistoZMax, fHistoZBins); | |
527 | printf("Histograms: %g < Time < %g, Nbin = %d\n" , fHistoTimeMin, fHistoTimeMax, fHistoTimeBins); | |
35c71d5c | 528 | printf("Histograms: %d < N cells per cluster < %d, Nbin = %d\n", fHistoNClusCellMin, fHistoNClusCellMax, fHistoNClusCellBins); |
529 | printf("Histograms: %d < N cells < %d, Nbin = %d\n" , fHistoNCellsMin, fHistoNCellsMax, fHistoNCellsBins); | |
530 | printf("Histograms: %d < N clusters < %d, Nbin = %d\n" , fHistoNClustersMin, fHistoNClustersMax, fHistoNClustersBins); | |
521636d2 | 531 | printf("Histograms: %3.1f < Ratio< %3.1f, Nbin = %d\n", fHistoRatioMin, fHistoRatioMax, fHistoRatioBins); |
532 | printf("Histograms: %3.1f < Vertex Distance < %3.1f, Nbin = %d\n", fHistoVertexDistMin, fHistoVertexDistMax, fHistoVertexDistBins); | |
0a14e9ae | 533 | |
591cc579 | 534 | printf("Name of reference array : %s\n", fAODObjArrayName.Data()); |
a3aebfff | 535 | printf("String added histograms name : %s\n",fAddToHistogramsName.Data()); |
536 | ||
477d6cee | 537 | printf(" \n") ; |
538 | ||
1c5acb87 | 539 | } |
c8fe2783 | 540 | |
c8fe2783 | 541 | |
542 |