+ TBrowser * bs = new TBrowser("Root Memory Bowser", gROOT->FindObjectAny("AOD.root") ) ;
+ bs->Show() ;
+ out->Write() ;
+ return kTRUE ;
+}
+
+//__________________________________________________________________________
+void Match(AliESDtrack * ct, AliESDtrack * cp, Double_t * dist)
+{
+ // Calculates the distance (x,z) between the particle detected by PHOS and
+ // the charged particle reconstructed by the global tracking
+
+
+ // Int_t phN ;
+// Double_t phZ, phX ;
+
+// if (ct->IsPHOS()) { // it is a PHOS particle
+// Double_t cpTheta, cpPhi ;
+// Double_t phTheta, phPhi ;
+// cpTheta = cpPhi = phTheta = phPhi = 0. ;
+// // cout << "PHOS particle # " << " pos ("
+// // << pp->GetPos().X() << ", " << pp->GetPos().Y() << ", " << pp->GetPos().Z() << ")" << endl ;
+
+// AliPHOSGetter * gime = AliPHOSGetter::Instance() ;
+// gime->PHOSGeometry()->ImpactOnEmc(*pp, phN, phZ, phX) ;
+// Double_t xyzAtPHOS[3] ;
+// cp->GetOuterXYZ(xyzAtPHOS) ;
+// if ( (xyzAtPHOS[0] + xyzAtPHOS[1] + xyzAtPHOS[2]) != 0.) { //it has reached PHOS
+// //the next check are only if we want high quality tracks
+// // ULong_t status = cp->GetStatus() ;
+// // if ((status & AliESDtrack::kTRDput)==0)
+// // do not continue;
+// // if ((status & AliESDtrack::kTRDStop)!=0)
+// // do not continue;
+// // cout << "Charged particle # " << " pos ("
+// // << xyzAtPHOS[0] << ", " << xyzAtPHOS[1] << ", " << xyzAtPHOS[2] << ")" << endl ;
+// TVector3 poscp(xyzAtPHOS[0], xyzAtPHOS[1], xyzAtPHOS[2]) ;
+// Int_t cpN ;
+// Double_t cpZ,cpX ;
+// gime->PHOSGeometry()->ImpactOnEmc(poscp, cpN, cpZ, cpX) ;
+// if (cpN) {// we are inside the PHOS acceptance
+// // cout << "Charged Matching 1: " << cpN << " " << cpZ << " " << cpX << endl ;
+// // cout << "Charged Matching 2: " << phN << " " << phZ << " " << phX << endl ;
+// dist[0] = TMath::Sqrt( (cpZ-phZ)*(cpZ-phZ) + (cpX-phX)*(cpX-phX)) ;
+// }
+// phTheta = pp->Theta() ;
+// phPhi = pp->Phi() ;
+// TParticle tempo ;
+// tempo.SetMomentum(xyzAtPHOS[0], xyzAtPHOS[1], xyzAtPHOS[2], 0.) ;
+// cpTheta = tempo.Theta() ;
+// cpPhi = tempo.Phi() ;
+// //cout << phTheta << " " << phPhi << " " << endl
+// //cout << cpTheta << " " << cpPhi-phPhi << " " << endl ;
+// }
+// dist[1] = (phTheta - cpTheta)*TMath::RadToDeg() ;
+// dist[2] = (phPhi - cpPhi)*TMath::RadToDeg() ;
+// }
+
+// if (ep) {
+// //cout << "EMCAL particle # " << endl ;
+// }