+ if(Nevent >= fRunLoader->GetNumberOfEvents() ) {
+ AliError(Form("There is no event %d only %d events available", Nevent, fRunLoader->GetNumberOfEvents() )) ;
+ return ;
+ }
+ const AliPHOSGeometry * phosgeom = gime->PHOSGeometry() ;
+ fRunLoader->GetEvent(Nevent);
+
+ Int_t nx = phosgeom->GetNPhi() ;
+ Int_t nz = phosgeom->GetNZ() ;
+ Float_t * cri= phosgeom->GetEMCAGeometry()->GetCrystalHalfSize() ;
+ Float_t x = nx*cri[0] ;
+ Float_t z = nz*cri[2] ;
+ Int_t nxCPV = (Int_t) (nx*phosgeom->GetPadSizePhi()/(2.*cri[0])) ;
+ Int_t nzCPV = (Int_t) (nz*phosgeom->GetPadSizeZ()/(2.*cri[2])) ;
+
+ TH2F * emcDigits = (TH2F*) gROOT->FindObject("emcDigits") ;
+ if(emcDigits)
+ emcDigits->Delete() ;
+ emcDigits = new TH2F("emcDigits","EMC digits", nx,-x,x,nz,-z,z);
+ TH2F * emcSdigits =(TH2F*) gROOT->FindObject("emcSdigits") ;
+ if(emcSdigits)
+ emcSdigits->Delete() ;
+ emcSdigits = new TH2F("emcSdigits","EMC sdigits", nx,-x,x,nz,-z,z);
+ TH2F * emcRecPoints = (TH2F*)gROOT->FindObject("emcRecPoints") ;
+ if(emcRecPoints)
+ emcRecPoints->Delete() ;
+ emcRecPoints = new TH2F("emcRecPoints","EMC RecPoints",nx,-x,x,nz,-z,z);
+ TH2F * cpvSdigits =(TH2F*) gROOT->FindObject("cpvSdigits") ;
+ if(cpvSdigits)
+ cpvSdigits->Delete() ;
+ cpvSdigits = new TH2F("cpvSdigits","CPV sdigits", nx,-x,x,nz,-z,z);
+ TH2F * cpvDigits = (TH2F*)gROOT->FindObject("cpvDigits") ;
+ if(cpvDigits)
+ cpvDigits->Delete() ;
+ cpvDigits = new TH2F("cpvDigits","CPV digits", nxCPV,-x,x,nzCPV,-z,z) ;
+ TH2F * cpvRecPoints= (TH2F*)gROOT->FindObject("cpvRecPoints") ;
+ if(cpvRecPoints)
+ cpvRecPoints->Delete() ;
+ cpvRecPoints = new TH2F("cpvRecPoints","CPV RecPoints", nxCPV,-x,x,nzCPV,-z,z) ;
+
+ TH2F * phot = (TH2F*)gROOT->FindObject("phot") ;
+ if(phot)
+ phot->Delete() ;
+ phot = new TH2F("phot","Primary Photon", nx,-x,x,nz,-z,z);
+ TH2F * recPhot = (TH2F*)gROOT->FindObject("recPhot") ;
+ if(recPhot)
+ recPhot->Delete() ;
+ recPhot = new TH2F("recPhot","RecParticles with primary Photon",nx,-x,x,nz,-z,z);