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