]>
Commit | Line | Data |
---|---|---|
a9457410 | 1 | // $Id$ |
6e9fad59 | 2 | // |
3 | // Task to skim ESD files. | |
4 | // | |
5 | // | |
a9457410 | 6 | |
7 | #include "AliEsdSkimTask.h" | |
8 | #include <TClonesArray.h> | |
9 | #include <TFile.h> | |
10 | #include <TTree.h> | |
6e9fad59 | 11 | #include "AliAnalysisManager.h" |
bc826438 | 12 | #include "AliCentrality.h" |
a9457410 | 13 | #include "AliESDEvent.h" |
bc826438 | 14 | #include "AliESDFMD.h" |
a9457410 | 15 | #include "AliESDtrackCuts.h" |
bc826438 | 16 | #include "AliEsdTrackExt.h" |
0e003bf1 | 17 | #include "AliEventplane.h" |
76121c9a | 18 | #include "AliInputEventHandler.h" |
a9457410 | 19 | #include "AliMultiplicity.h" |
0e003bf1 | 20 | #include "AliPicoTrack.h" |
76121c9a | 21 | #include "AliVEventHandler.h" |
a9457410 | 22 | |
23 | //_________________________________________________________________________________________________ | |
24 | AliEsdSkimTask::AliEsdSkimTask(const char *opt) : | |
25 | AliAnalysisTaskSE(opt), fEvent(0), fTree(0), fCuts(0), | |
26 | fDoZDC(1), fDoV0(1), fDoT0(1), fDoTPCv(1), fDoSPDv(1), fDoPriv(1), | |
0e003bf1 | 27 | fDoEmCs(1), fDoPCs(0), fDoEmT(1), fDoPT(0), fDoTracks(0), fDoFmd(1), |
28 | fDoMult(1), fDoTof(0), fDoPileup(1), fDoClus(0), fEmcNames(""), | |
29 | fDoMiniTracks(0), fTracks("Tracks"), fPhosClusOnly(0), fDoSaveBytes(0), | |
30 | fDoCent(1), fDoRP(1), fRemoveCP(0), fResetCov(1), fDoPicoTracks(0) | |
a9457410 | 31 | { |
32 | // Constructor. | |
33 | ||
34 | if (!opt) | |
35 | return; | |
36 | ||
bc826438 | 37 | fBranchNames = "ESD:AliESDHeader.,AliESDRun."; |
38 | ||
a9457410 | 39 | DefineOutput(1, TTree::Class()); |
40 | } | |
41 | ||
42 | //_________________________________________________________________________________________________ | |
43 | void AliEsdSkimTask::UserExec(Option_t */*opt*/) | |
44 | { | |
45 | // Process event. | |
46 | ||
47 | AliESDEvent *esdin = dynamic_cast<AliESDEvent*>(InputEvent()); | |
48 | if (!esdin) | |
49 | return; | |
50 | ||
6e9fad59 | 51 | AliAnalysisManager *am = AliAnalysisManager::GetAnalysisManager(); |
52 | ||
0e003bf1 | 53 | fEvent->ResetStdContent(); |
a9457410 | 54 | |
6e9fad59 | 55 | TList* objsin = esdin->GetList(); |
56 | TList* objsout = fEvent->GetList(); | |
a9457410 | 57 | |
bc826438 | 58 | AliESDHeader *header = dynamic_cast<AliESDHeader*>(objsout->FindObject("AliESDHeader")); |
a9457410 | 59 | if (header) { |
6e9fad59 | 60 | am->LoadBranch("AliESDHeader."); |
0e003bf1 | 61 | if (!fDoSaveBytes) { |
62 | *header = *esdin->GetHeader(); | |
63 | } else { | |
64 | AliESDHeader *hin = esdin->GetHeader(); | |
65 | header->SetTriggerMask(hin->GetTriggerMask()); | |
66 | header->SetOrbitNumber(hin->GetOrbitNumber()); | |
67 | header->SetTimeStamp(hin->GetTimeStamp()); | |
68 | header->SetEventType(hin->GetEventType()); | |
69 | header->SetEventSpecie(hin->GetEventSpecie()); | |
70 | header->SetEventNumberInFile(hin->GetEventNumberInFile()); | |
71 | header->SetBunchCrossNumber(hin->GetBunchCrossNumber()); | |
72 | header->SetPeriodNumber(hin->GetPeriodNumber()); | |
73 | header->SetTriggerCluster(hin->GetTriggerCluster()); | |
74 | header->SetL0TriggerInputs(hin->GetL0TriggerInputs()); | |
75 | header->SetL1TriggerInputs(hin->GetL1TriggerInputs()); | |
76 | header->SetL2TriggerInputs(hin->GetL2TriggerInputs()); | |
77 | for (Int_t i=0;i<24;++i) { | |
78 | const char *name = hin->GetTriggerInputName(i,0); | |
79 | if (name) | |
80 | header->SetActiveTriggerInputs(name,i); | |
81 | } | |
82 | for (Int_t i=0;i<24;++i) { | |
83 | const char *name = hin->GetTriggerInputName(i,1); | |
84 | if (name) | |
85 | header->SetActiveTriggerInputs(name,i+24); | |
86 | } | |
87 | for (Int_t i=0;i<12;++i) { | |
88 | const char *name = hin->GetTriggerInputName(i,2); | |
89 | if (name) | |
90 | header->SetActiveTriggerInputs(name,i+48); | |
91 | } | |
92 | } | |
76121c9a | 93 | header->SetUniqueID(((AliInputEventHandler*)(am->GetInputEventHandler()))->IsEventSelected()); |
0e003bf1 | 94 | if (am->GetInputEventHandler()) { |
95 | TTree *tree = am->GetInputEventHandler()->GetTree(); | |
96 | if (tree) { | |
97 | TFile *cfile = tree->GetCurrentFile(); | |
98 | if (cfile) { | |
99 | TString cname(cfile->GetName()); | |
100 | header->SetTitle(cname); | |
101 | } | |
102 | } | |
103 | } | |
a9457410 | 104 | } |
bc826438 | 105 | AliESDRun *run = dynamic_cast<AliESDRun*>(objsout->FindObject("AliESDRun")); |
a9457410 | 106 | if (run) { |
6e9fad59 | 107 | am->LoadBranch("AliESDRun."); |
a9457410 | 108 | *run = *esdin->GetESDRun(); |
109 | } | |
bc826438 | 110 | AliCentrality *cent = dynamic_cast<AliCentrality*>(objsout->FindObject("Cent")); |
111 | if (cent) { | |
112 | cent->Reset(); | |
113 | AliCentrality *centin = esdin->GetCentrality(); | |
114 | cent->SetQuality(centin->GetQuality()); | |
115 | cent->SetCentralityV0M(centin->GetCentralityPercentileUnchecked("V0M")); | |
116 | cent->SetCentralityFMD(centin->GetCentralityPercentileUnchecked("FMD")); | |
117 | cent->SetCentralityTRK(centin->GetCentralityPercentileUnchecked("TRK")); | |
118 | cent->SetCentralityTKL(centin->GetCentralityPercentileUnchecked("TKL")); | |
119 | cent->SetCentralityCL0(centin->GetCentralityPercentileUnchecked("CL0")); | |
120 | cent->SetCentralityCL1(centin->GetCentralityPercentileUnchecked("CL1")); | |
121 | cent->SetCentralityV0MvsFMD(centin->GetCentralityPercentileUnchecked("V0MvsFMD")); | |
122 | cent->SetCentralityTKLvsV0M(centin->GetCentralityPercentileUnchecked("TKLvsV0M")); | |
123 | cent->SetCentralityZEMvsZDC(centin->GetCentralityPercentileUnchecked("ZEMvsZDC")); | |
124 | } | |
125 | AliEventplane *ep = dynamic_cast<AliEventplane*>(objsout->FindObject("EP")); | |
126 | if (ep) { | |
127 | ep->Reset(); | |
128 | AliEventplane *epin = esdin->GetEventplane(); | |
129 | if (!fDoSaveBytes) { | |
130 | *ep = *epin; | |
131 | } else { | |
132 | if (epin->GetQVector()) { | |
133 | ep->SetQVector(new TVector2(*epin->GetQVector())); | |
134 | ep->SetEventplaneQ(epin->GetEventplane("Q")); | |
135 | ep->SetQsub(new TVector2(*epin->GetQsub1()),new TVector2(*epin->GetQsub2())); | |
136 | ep->SetQsubRes(epin->GetQsubRes()); | |
137 | } | |
138 | } | |
139 | } | |
140 | AliESDZDC *zdc = dynamic_cast<AliESDZDC*>(objsout->FindObject("AliESDZDC")); | |
a9457410 | 141 | if (zdc) { |
6e9fad59 | 142 | am->LoadBranch("AliESDZDC."); |
a9457410 | 143 | *zdc = *esdin->GetESDZDC(); |
144 | } | |
bc826438 | 145 | AliESDVZERO *v0 = dynamic_cast<AliESDVZERO*>(objsout->FindObject("AliESDVZERO")); |
a9457410 | 146 | if (v0) { |
6e9fad59 | 147 | am->LoadBranch("AliESDVZERO."); |
a9457410 | 148 | *v0 = *esdin->GetVZEROData(); |
149 | } | |
bc826438 | 150 | AliESDTZERO *t0 = dynamic_cast<AliESDTZERO*>(objsout->FindObject("AliESDTZERO")); |
a9457410 | 151 | if (t0) { |
6e9fad59 | 152 | am->LoadBranch("AliESDTZERO."); |
a9457410 | 153 | *t0 = *esdin->GetESDTZERO(); |
154 | } | |
bc826438 | 155 | AliESDVertex *tpcv = dynamic_cast<AliESDVertex*>(objsout->FindObject("TPCVertex")); |
a9457410 | 156 | if (tpcv) { |
6e9fad59 | 157 | am->LoadBranch("TPCVertex."); |
a9457410 | 158 | *tpcv = *esdin->GetPrimaryVertexTPC(); |
159 | } | |
bc826438 | 160 | AliESDVertex *spdv = dynamic_cast<AliESDVertex*>(objsout->FindObject("SPDVertex")); |
a9457410 | 161 | if (spdv) { |
6e9fad59 | 162 | am->LoadBranch("SPDVertex."); |
a9457410 | 163 | *spdv = *esdin->GetPrimaryVertexSPD(); |
164 | } | |
bc826438 | 165 | AliESDVertex *priv = dynamic_cast<AliESDVertex*>(objsout->FindObject("PrimaryVertex")); |
a9457410 | 166 | if (priv) { |
6e9fad59 | 167 | am->LoadBranch("PrimaryVertex."); |
a9457410 | 168 | *priv = *esdin->GetPrimaryVertexTracks(); |
169 | } | |
bc826438 | 170 | AliESDCaloCells *ecells = dynamic_cast<AliESDCaloCells*>(objsout->FindObject("EMCALCells")); |
a9457410 | 171 | if (ecells) { |
6e9fad59 | 172 | am->LoadBranch("EMCALCells."); |
a9457410 | 173 | *ecells = *esdin->GetEMCALCells(); |
174 | } | |
bc826438 | 175 | AliESDCaloCells *pcells = dynamic_cast<AliESDCaloCells*>(objsout->FindObject("PHOSCells")); |
a9457410 | 176 | if (pcells) { |
6e9fad59 | 177 | am->LoadBranch("PHOSCells."); |
a9457410 | 178 | *pcells = *esdin->GetPHOSCells(); |
179 | } | |
bc826438 | 180 | AliESDCaloTrigger *etrig = dynamic_cast<AliESDCaloTrigger*>(objsout->FindObject("EMCALTrigger")); |
a9457410 | 181 | if (etrig) { |
6e9fad59 | 182 | am->LoadBranch("EMCALTrigger."); |
a9457410 | 183 | *etrig = *esdin->GetCaloTrigger("EMCAL"); |
184 | } | |
bc826438 | 185 | AliESDCaloTrigger *ptrig = dynamic_cast<AliESDCaloTrigger*>(objsout->FindObject("PHOSTrigger")); |
a9457410 | 186 | if (ptrig) { |
6e9fad59 | 187 | am->LoadBranch("PHOSTrigger."); |
a9457410 | 188 | *ptrig = *esdin->GetCaloTrigger("PHOS"); |
189 | } | |
bc826438 | 190 | AliESDFMD *fmd = dynamic_cast<AliESDFMD*>(objsout->FindObject("AliESDFMD")); |
191 | if (fmd) { | |
192 | am->LoadBranch("AliESDFMD."); | |
193 | if (!fDoSaveBytes) { | |
194 | *fmd = *esdin->GetFMDData(); | |
195 | } | |
196 | } | |
197 | AliMultiplicity *mult = dynamic_cast<AliMultiplicity*>(objsout->FindObject("AliMultiplicity")); | |
a9457410 | 198 | if (mult) { |
6e9fad59 | 199 | am->LoadBranch("AliMultiplicity."); |
bc826438 | 200 | if (!fDoSaveBytes) { |
201 | *mult = *esdin->GetMultiplicity(); | |
202 | } else { | |
203 | const AliMultiplicity *multin = esdin->GetMultiplicity();; | |
204 | mult->SetFiredChips(0, multin->GetNumberOfFiredChips(0)); | |
205 | mult->SetFiredChips(1, multin->GetNumberOfFiredChips(1)); | |
206 | for (Int_t i=0; i<6; ++i) | |
207 | mult->SetITSClusters(i,mult->GetNumberOfITSClusters(i)); | |
208 | } | |
a9457410 | 209 | } |
bc826438 | 210 | AliTOFHeader *tofh = dynamic_cast<AliTOFHeader*>(objsout->FindObject("AliTOFHeader")); |
a9457410 | 211 | if (tofh) { |
6e9fad59 | 212 | am->LoadBranch("AliTOFHeader."); |
a9457410 | 213 | *tofh = *esdin->GetTOFHeader(); |
214 | } | |
bc826438 | 215 | TClonesArray *spup = dynamic_cast<TClonesArray*>(objsout->FindObject("SPDPileupVertices")); |
a9457410 | 216 | if (spup) { |
6e9fad59 | 217 | am->LoadBranch("SPDPileupVertices"); |
a9457410 | 218 | Int_t N = esdin->GetNumberOfPileupVerticesSPD(); |
219 | for (Int_t i=0; i<N; ++i) { | |
220 | const AliESDVertex *vtx = esdin->GetPileupVertexSPD(i); | |
221 | if (vtx) | |
222 | fEvent->AddPileupVertexSPD(vtx); | |
223 | } | |
224 | } | |
bc826438 | 225 | TClonesArray *tpup = dynamic_cast<TClonesArray*>(objsout->FindObject("TrkPileupVertices")); |
a9457410 | 226 | if (tpup) { |
6e9fad59 | 227 | am->LoadBranch("TrkPileupVertices"); |
a9457410 | 228 | Int_t N = esdin->GetNumberOfPileupVerticesTracks(); |
229 | for (Int_t i=0; i<N; ++i) { | |
230 | const AliESDVertex *vtx = esdin->GetPileupVertexTracks(i); | |
231 | if (vtx) | |
232 | fEvent->AddPileupVertexTracks(vtx); | |
233 | } | |
234 | } | |
bc826438 | 235 | TClonesArray *clus = dynamic_cast<TClonesArray*>(objsout->FindObject("CaloClusters")); |
a9457410 | 236 | if (clus) { |
bc826438 | 237 | am->LoadBranch("CaloClusters"); |
a9457410 | 238 | Int_t N = esdin->GetNumberOfCaloClusters(); |
239 | for (Int_t i=0; i<N; ++i) { | |
240 | AliESDCaloCluster *c = esdin->GetCaloCluster(i); | |
6e9fad59 | 241 | if (fPhosClusOnly && c->IsEMCAL()) |
242 | continue; | |
a9457410 | 243 | if (c) |
244 | fEvent->AddCaloCluster(c); | |
245 | } | |
246 | } | |
6e9fad59 | 247 | TObjArray *namearr = fEmcNames.Tokenize(";"); |
248 | if (namearr) { | |
249 | for (Int_t i=0; i<namearr->GetEntries(); ++i) { | |
250 | TString cname(namearr->At(i)->GetName()); | |
251 | if (cname.Length()<=0) | |
252 | continue; | |
253 | TClonesArray *arrin = dynamic_cast<TClonesArray*>(objsin->FindObject(cname)); | |
bc826438 | 254 | if (!arrin) { |
255 | AliFatal(Form("Can not find input clusters with name %s", cname.Data())); | |
256 | return; | |
257 | } | |
6e9fad59 | 258 | TClonesArray *arrout = dynamic_cast<TClonesArray*>(objsout->FindObject(cname)); |
bc826438 | 259 | if (!arrout) { |
260 | AliFatal(Form("Can not find output clusters with name %s", cname.Data())); | |
261 | return; | |
262 | } | |
6e9fad59 | 263 | arrout->Delete(); |
eb997149 | 264 | Double_t emin=0.1; |
265 | if (cname.Contains("FEE")) | |
266 | emin = 1; | |
6e9fad59 | 267 | const Int_t N = arrin->GetEntries(); |
268 | for (Int_t iC=0, nC=0; iC<N; ++iC) { | |
269 | AliESDCaloCluster *c = dynamic_cast<AliESDCaloCluster*>(arrin->At(iC)); | |
270 | if (!c) | |
271 | continue; | |
eb997149 | 272 | if (c->E()<emin) |
273 | continue; | |
0e003bf1 | 274 | AliESDCaloCluster *newCluster = new ((*arrout)[nC]) AliESDCaloCluster(*c); |
275 | newCluster->SetID(nC); | |
276 | ++nC; | |
6e9fad59 | 277 | } |
278 | } | |
279 | delete namearr; | |
280 | } | |
a9457410 | 281 | if (fDoTracks) { |
6e9fad59 | 282 | am->LoadBranch("Tracks"); |
bc826438 | 283 | TClonesArray *tracksin = dynamic_cast<TClonesArray*>(objsin->FindObject(fTracks)); |
284 | if (!tracksin) { | |
6e9fad59 | 285 | AliFatal(Form("Can not find tracks with name %s", fTracks.Data())); |
286 | return; | |
287 | } | |
bc826438 | 288 | TClonesArray *tracksout = dynamic_cast<TClonesArray*>(objsout->FindObject("Tracks")); |
289 | if (!tracksout) { | |
290 | AliFatal(Form("Can not find tracks with name %s", "Tracks")); | |
291 | return; | |
292 | } | |
293 | const Int_t Ntracks = tracksin->GetEntries(); | |
a9457410 | 294 | Int_t nacc = 0; |
295 | for (Int_t iTracks = 0; iTracks < Ntracks; ++iTracks) { | |
0e003bf1 | 296 | if (iTracks>1500) break; |
bc826438 | 297 | AliESDtrack *track = dynamic_cast<AliESDtrack*>(tracksin->At(iTracks)); |
a9457410 | 298 | if (!track) |
299 | continue; | |
300 | if (fCuts) { | |
301 | if (!fCuts->IsSelected(track)) | |
302 | continue; | |
303 | } | |
0e003bf1 | 304 | if (fDoPicoTracks) { |
305 | AliEsdTrackExt newtrack(*track); | |
306 | Double_t etaemc = 0; | |
307 | Double_t phiemc = 0; | |
308 | if (newtrack.IsEMCAL()) { | |
309 | etaemc = newtrack.GetEmcEta(); | |
310 | phiemc = newtrack.GetEmcPhi(); | |
311 | } | |
312 | new ((*tracksout)[nacc]) AliPicoTrack(newtrack.Pt(), newtrack.Eta(), newtrack.Phi(), | |
313 | newtrack.Charge(), newtrack.GetLabel(), | |
314 | etaemc, phiemc, newtrack.IsEMCAL()); | |
315 | ++nacc; | |
bc826438 | 316 | } else { |
0e003bf1 | 317 | AliEsdTrackExt *newtrack = new ((*tracksout)[nacc]) AliEsdTrackExt(*track); |
318 | if (fDoMiniTracks) { | |
319 | newtrack->MakeMiniTrack(0,fRemoveCP); | |
320 | newtrack->ResetCovariance(fResetCov); | |
321 | } else { | |
322 | newtrack->DeleteParams(); | |
323 | } | |
324 | newtrack->SetID(nacc); | |
325 | ++nacc; | |
6e9fad59 | 326 | } |
a9457410 | 327 | } |
328 | if (fCuts) | |
6e9fad59 | 329 | AliInfo(Form("Selected %d out of %d \n", nacc, Ntracks)); |
a9457410 | 330 | } |
331 | fTree->Fill(); | |
332 | } | |
333 | ||
334 | //_________________________________________________________________________________________________ | |
335 | void AliEsdSkimTask::UserCreateOutputObjects() | |
336 | { | |
337 | // Create output objects. | |
338 | ||
0e003bf1 | 339 | TFile *file = OpenFile(1); |
6e9fad59 | 340 | fTree = new TTree("esdTree", "Tree with skimmed ESD objects"); |
0e003bf1 | 341 | file->SetCompressionLevel(2); |
342 | fTree->SetDirectory(file); | |
343 | fTree->SetAutoFlush(-10*1024*1024); | |
344 | ||
a9457410 | 345 | fEvent = new AliESDEvent; |
346 | fEvent->AddObject(new AliESDHeader()); | |
347 | fEvent->AddObject(new AliESDRun()); | |
bc826438 | 348 | if (fDoCent) { |
349 | AliCentrality *cent = new AliCentrality; | |
350 | cent->SetName("Cent"); | |
351 | fEvent->AddObject(cent); | |
352 | } | |
353 | if (fDoRP) { | |
354 | AliEventplane *ep = new AliEventplane; | |
355 | ep->SetName("EP"); | |
356 | fEvent->AddObject(ep); | |
357 | } | |
a9457410 | 358 | if (fDoZDC) |
359 | fEvent->AddObject(new AliESDZDC()); | |
360 | if (fDoV0) | |
361 | fEvent->AddObject(new AliESDVZERO()); | |
362 | if (fDoT0) | |
363 | fEvent->AddObject(new AliESDTZERO()); | |
364 | if (fDoTPCv) { | |
365 | AliESDVertex *tpcv = new AliESDVertex(); | |
366 | tpcv->SetName("TPCVertex"); | |
367 | fEvent->AddObject(tpcv); | |
368 | } | |
369 | if (fDoSPDv) { | |
370 | AliESDVertex *spdv = new AliESDVertex(); | |
371 | spdv->SetName("SPDVertex"); | |
372 | fEvent->AddObject(spdv); | |
373 | } | |
374 | if (fDoPriv) { | |
375 | AliESDVertex *priv = new AliESDVertex(); | |
376 | priv->SetName("PrimaryVertex"); | |
377 | fEvent->AddObject(priv); | |
378 | } | |
379 | if (fDoEmCs) { | |
380 | fEvent->AddObject(new AliESDCaloCells("EMCALCells","EMCALCells")); | |
381 | } | |
382 | if (fDoPCs) { | |
383 | fEvent->AddObject(new AliESDCaloCells("PHOSCells","PHOSCells")); | |
384 | } | |
385 | if (fDoEmT) { | |
386 | AliESDCaloTrigger *etrig = new AliESDCaloTrigger; | |
387 | etrig->SetName("EMCALTrigger"); | |
388 | fEvent->AddObject(etrig); | |
389 | } | |
390 | if (fDoPT) { | |
391 | AliESDCaloTrigger *ptrig = new AliESDCaloTrigger; | |
392 | ptrig->SetName("PHOSTrigger"); | |
393 | fEvent->AddObject(ptrig); | |
394 | } | |
bc826438 | 395 | if (fDoFmd) { |
396 | AliESDFMD *fmd = new AliESDFMD; | |
397 | fEvent->AddObject(fmd); | |
398 | } | |
a9457410 | 399 | if (fDoMult) { |
400 | fEvent->AddObject(new AliMultiplicity()); | |
401 | } | |
402 | if (fDoPileup) { | |
403 | TClonesArray *arr1 = new TClonesArray("AliESDVertex",0); | |
404 | arr1->SetName("SPDPileupVertices"); | |
405 | fEvent->AddObject(arr1); | |
406 | TClonesArray *arr2 = new TClonesArray("AliESDVertex",0); | |
bc826438 | 407 | arr2->SetName("TrkPileupVertices"); |
a9457410 | 408 | fEvent->AddObject(arr2); |
409 | } | |
410 | if (fDoTof) { | |
411 | fEvent->AddObject(new AliTOFHeader()); | |
412 | } | |
413 | if (fDoClus) { | |
414 | TClonesArray *arr = new TClonesArray("AliESDCaloCluster",0); | |
415 | arr->SetName("CaloClusters"); | |
416 | fEvent->AddObject(arr); | |
417 | } | |
6e9fad59 | 418 | TObjArray *namearr = fEmcNames.Tokenize(";"); |
419 | if (namearr) { | |
420 | for (Int_t i=0; i<namearr->GetEntries(); ++i) { | |
421 | TString cname(namearr->At(i)->GetName()); | |
422 | if (cname.Length()<=0) | |
423 | continue; | |
424 | TClonesArray *arr = new TClonesArray("AliESDCaloCluster",0); | |
425 | arr->SetName(cname); | |
426 | fEvent->AddObject(arr); | |
427 | } | |
428 | delete namearr; | |
429 | } | |
430 | if (fDoTracks) { | |
bc826438 | 431 | TClonesArray *arr = 0; |
0e003bf1 | 432 | if (fDoPicoTracks) { |
433 | arr = new TClonesArray("AliPicoTrack",0); | |
434 | arr->SetName("Tracks"); | |
435 | } else if (fDoMiniTracks) { | |
bc826438 | 436 | arr = new TClonesArray("AliEsdTrackExt",0); |
437 | arr->SetName("Tracks"); | |
438 | } else { | |
f85ffff8 | 439 | arr = new TClonesArray("AliEsdTrackExt",0); |
bc826438 | 440 | arr->SetName("Tracks"); |
441 | } | |
6e9fad59 | 442 | fEvent->AddObject(arr); |
443 | } | |
a9457410 | 444 | fEvent->GetStdContent(); |
445 | fEvent->WriteToTree(fTree); | |
446 | fTree->GetUserInfo()->Add(fEvent); | |
a9457410 | 447 | PostData(1,fTree); |
448 | } |