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 //_________________________________________________________________________
27 #include "AliPHOSGetter.h"
28 #include "Riostream.h"
30 #include "AliESDtrack.h"
31 #include "AliESDCaloTrack.h"
32 #include "AliEMCALRecParticle.h"
33 #include "AliPHOSRecParticle.h"
34 #include "AliKalmanTrack.h"
38 AliPHOSGetter * gime = AliPHOSGetter::Instance("galice.root") ;
39 Int_t nEvent = gime->MaxEvent() ;
42 for (event = 0 ; event < nEvent; event++) {
43 esd = gime->ESD(event) ;
47 AliESDCaloTrack * ct ;
48 AliPHOSRecParticle * pp ;
49 AliEMCALRecParticle * ep ;
50 for (index = 0 ; index < esd->GetNumberOfCaloTracks() ; index++) {
51 ct = esd->GetCaloTrack(index) ;
52 pp = dynamic_cast<AliPHOSRecParticle*>(ct->GetRecParticle()) ;
53 ep = dynamic_cast<AliEMCALRecParticle*>(ct->GetRecParticle()) ;
55 TVector3 pos = pp->GetPos() ;
56 cout << "PHOS particle # " << index << " pos " <<
57 TMath::Sqrt(pos.X()*pos.X() + pos.Y()*pos.Y() + pos.Z()*pos.Z() ) << endl ;
60 TVector3 pos = ep->GetPos() ;
61 cout << "EMCAL particle # " << index << " pos " <<
62 TMath::Sqrt(pos.X()*pos.X() + pos.Y()*pos.Y() + pos.Z()*pos.Z() ) << endl ;
65 //Charged tracks from central tracking
67 for (index = 0 ; index < esd->GetNumberOfTracks() ; index++) {
68 cp = esd->GetTrack(index) ;
69 ULong_t status = cp->GetStatus() ;
71 // check if the tracks comes out of TRD
72 if ((status & AliESDtrack::kTRDout)==0)
74 if ((status & AliESDtrack::kTRDStop)!=0)
77 // Gets the Global coordinate of the track at the entrance of PHOS
78 Double_t xyzAtPHOS[3] ;
79 cp->GetOuterXYZ(xyzAtPHOS) ;
80 // cout << xyzAtPHOS[0] << " " << xyzAtPHOS[1] << " "<< xyzAtPHOS[2] << endl ;
81 //cout << TMath::Sqrt(xyzAtPHOS[0]*xyzAtPHOS[0] + xyzAtPHOS[1]*xyzAtPHOS[1] + xyzAtPHOS[2]*xyzAtPHOS[2]) << endl ;
83 // Does the matching with PHOS/EMCAL
84 // for (index = 0 ; index < esd->GetNumberOfCaloTracks() ; index++) {
85 // ct = esd->GetCaloTrack(index) ;
86 // pp = dynamic_cast<AliPHOSRecParticle*>(ct->GetRecParticle()) ;
87 // ep = dynamic_cast<AliEMCALRecParticle*>(ct->GetRecParticle()) ;
89 // TVector3 pos = pp->GetPos() ;