From 1d13ffb1d18359e4149199077beda02950c2c922 Mon Sep 17 00:00:00 2001 From: schutz Date: Fri, 6 Feb 2004 10:28:03 +0000 Subject: [PATCH] Updating --- PHOS/AnaESD.C | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/PHOS/AnaESD.C b/PHOS/AnaESD.C index 1d23291ca38..1f5c6fb7aa3 100644 --- a/PHOS/AnaESD.C +++ b/PHOS/AnaESD.C @@ -26,16 +26,31 @@ #include "AliPHOSGetter.h" #include "Riostream.h" #include "AliESD.h" +#include "AliESDCaloTrack.h" +#include "AliEMCALRecParticle.h" +#include "AliPHOSRecParticle.h" void Ana() { AliPHOSGetter * gime = AliPHOSGetter::Instance("galice.root") ; Int_t nEvent = gime->MaxEvent() ; Int_t event ; - AliESD * esd ; + AliESD * esd = 0 ; for (event = 0 ; event < nEvent; event++) { esd = gime->ESD(event) ; - esd->Print(); - + esd->Print(); + Int_t index ; + AliESDCaloTrack * ct ; + AliPHOSRecParticle * pp ; + AliEMCALRecParticle * ep ; + for (index = 0 ; index < esd->GetNumberOfCaloTracks() ; index++) { + ct = esd->GetCaloTrack(index) ; + pp = dynamic_cast(ct->GetRecParticle()) ; + ep = dynamic_cast(ct->GetRecParticle()) ; + if (pp) + cout << "particle # " << index << " is from PHOS " << endl ; + if(ep) + cout << "particle # " << index << " is from EMCAL " << endl ; + } } } -- 2.43.0