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 "AliPHOSGeometry.h"
29 #include "Riostream.h"
31 #include "AliESDtrack.h"
32 #include "AliESDCaloTrack.h"
33 #include "AliEMCALRecParticle.h"
34 #include "AliPHOSRecParticle.h"
35 #include "AliKalmanTrack.h"
39 AliPHOSGetter * gime = AliPHOSGetter::Instance("galice.root") ;
40 Int_t nEvent = gime->MaxEvent() ;
43 for (event = 0 ; event < nEvent; event++) {
44 esd = gime->ESD(event) ;
48 AliESDCaloTrack * ct ;
49 AliPHOSRecParticle * pp ;
50 AliEMCALRecParticle * ep ;
51 for (index = 0 ; index < esd->GetNumberOfCaloTracks() ; index++) {
52 ct = esd->GetCaloTrack(index) ;
53 pp = dynamic_cast<AliPHOSRecParticle*>(ct->GetRecParticle()) ;
54 ep = dynamic_cast<AliEMCALRecParticle*>(ct->GetRecParticle()) ;
56 TVector3 pos = pp->GetPos() ;
57 cout << "PHOS particle # " << index << " pos ("
58 << pos.X() << ", " << pos.Y() << ", " <<pos.Z() << ") : (" << pos.Eta()
59 << ", " << pos.Phi()*TMath::RadToDeg() << ") : "
60 << TMath::Sqrt(pos.X()*pos.X() + pos.Y()*pos.Y() ) << endl ;
63 gime->PHOSGeometry()->ImpactOnEmc(pos.Theta(), pos.Phi(), n, z, x) ;
65 cout << "Matching: " << n << " " << z << " " << x << endl ;
68 TVector3 pos = ep->GetPos() ;
69 //cout << "EMCAL particle # " << index << " pos " <<
70 // TMath::Sqrt(pos.X()*pos.X() + pos.Y()*pos.Y() ) << endl ;
73 //Charged tracks from central tracking
75 for (index = 0 ; index < esd->GetNumberOfTracks() ; index++) {
76 cp = esd->GetTrack(index) ;
77 ULong_t status = cp->GetStatus() ;
79 // check if the tracks comes out of TRD
80 if ((status & AliESDtrack::kTRDout)==0)
82 if ((status & AliESDtrack::kTRDStop)!=0)
85 // Gets the Global coordinate of the track at the entrance of PHOS
86 Double_t xyzAtPHOS[3] ;
87 cp->GetOuterXYZ(xyzAtPHOS) ;
88 TVector3 poscp(xyzAtPHOS[0], xyzAtPHOS[1], xyzAtPHOS[2]) ;
89 cout << "Charged particle # " << index << " pos ("
90 << poscp.X() << ", " << poscp.Y() << ", " <<poscp.Z() << ") : (" << poscp.Eta()
91 << ", " << poscp.Phi()*TMath::RadToDeg() << ") : "
92 << TMath::Sqrt(poscp.X()*poscp.X() + poscp.Y()*poscp.Y() ) << endl ;
95 gime->PHOSGeometry()->ImpactOnEmc(poscp.Theta(), poscp.Phi(), n, z, x) ;
97 cout << "Matching: " << n << " " << z << " " << x << endl ;
98 // Does the matching with PHOS/EMCAL
99 // for (index = 0 ; index < esd->GetNumberOfCaloTracks() ; index++) {
100 // ct = esd->GetCaloTrack(index) ;
101 // pp = dynamic_cast<AliPHOSRecParticle*>(ct->GetRecParticle()) ;
102 // ep = dynamic_cast<AliEMCALRecParticle*>(ct->GetRecParticle()) ;
104 // TVector3 pos = pp->GetPos() ;