1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 //_________________________________________________________________________
17 // Macros analyzing the ESD file
19 // root> .L AnaESD.C++
20 // root> ana() --> prints the objects stored in ESD
22 // author : Yves Schutz (CERN/SUBATECH)
24 //_________________________________________________________________________
26 #include "AliPHOSGetter.h"
27 #include "Riostream.h"
29 #include "AliESDCaloTrack.h"
30 #include "AliEMCALRecParticle.h"
31 #include "AliPHOSRecParticle.h"
35 AliPHOSGetter * gime = AliPHOSGetter::Instance("galice.root") ;
36 Int_t nEvent = gime->MaxEvent() ;
39 for (event = 0 ; event < nEvent; event++) {
40 esd = gime->ESD(event) ;
43 AliESDCaloTrack * ct ;
44 AliPHOSRecParticle * pp ;
45 AliEMCALRecParticle * ep ;
46 for (index = 0 ; index < esd->GetNumberOfCaloTracks() ; index++) {
47 ct = esd->GetCaloTrack(index) ;
48 pp = dynamic_cast<AliPHOSRecParticle*>(ct->GetRecParticle()) ;
49 ep = dynamic_cast<AliEMCALRecParticle*>(ct->GetRecParticle()) ;
51 cout << "particle # " << index << " is from PHOS " << endl ;
53 cout << "particle # " << index << " is from EMCAL " << endl ;