- // 1.
-
- // gAlice->MakeTree("R") ;
-
- MakeBranch("R") ;
-
- // 3.
-
- fReconstructioner->Make(fDigits, fEmcRecPoints, fPpsdRecPoints, fTrackSegments, fRecParticles);
-
- printf("Reconstruction: %d %d %d %d\n",
- fEmcRecPoints->GetEntries(),fPpsdRecPoints->GetEntries(),
- fTrackSegments->GetEntries(),fRecParticles->GetEntries());
-
- // 4. Expand or Shrink the arrays to the proper size
-
- Int_t size ;
-
- size = fEmcRecPoints->GetEntries() ;
- fEmcRecPoints->Expand(size) ;
-
- size = fPpsdRecPoints->GetEntries() ;
- fPpsdRecPoints->Expand(size) ;
-
- size = fTrackSegments->GetEntries() ;
- fTrackSegments->Expand(size) ;
-
- size = fRecParticles->GetEntries() ;
- fRecParticles->Expand(size) ;
-
- gAlice->TreeR()->Fill() ;
- // 5.
-
- gAlice->TreeR()->Write(0,TObject::kOverwrite) ;
-
- // Deleting reconstructed objects
- ResetReconstruction();
-
-}
-
-//____________________________________________________________________________
-void AliPHOSv1::ResetReconstruction()
-{
- // Deleting reconstructed objects
-
- if ( fEmcRecPoints ) fEmcRecPoints ->Delete();
- if ( fPpsdRecPoints ) fPpsdRecPoints->Delete();
- if ( fTrackSegments ) fTrackSegments->Delete();
- if ( fRecParticles ) fRecParticles ->Delete();
-
-}
-
-//____________________________________________________________________________
-
-void AliPHOSv1::StepManager(void)
-{
- // Accumulates hits as long as the track stays in a single crystal or PPSD gas Cell
-
- Int_t relid[4] ; // (box, layer, row, column) indices
- Int_t absid ; // absolute cell ID number
- Float_t xyze[4]={0,0,0,0} ; // position wrt MRS and energy deposited
- TLorentzVector pos ; // Lorentz vector of the track current position
- TLorentzVector pmom ; //momentum of the particle initiated hit
- Float_t xyd[3]={0,0,0} ; //local posiiton of the entering
- Bool_t entered = kFALSE ;
- Int_t copy ;
-
- Int_t tracknumber = gAlice->CurrentTrack() ;
- Int_t primary = gAlice->GetPrimary( gAlice->CurrentTrack() );
- TString name = fGeom->GetName() ;
- Int_t trackpid = 0 ;
-
- if( gMC->IsTrackEntering() ){ // create hit with position and momentum of new particle,
- // but may be without energy deposition
+ ndigits = cpvDigits->GetEntriesFast();
+ for (idigit=0; idigit<ndigits; idigit++) {
+ AliPHOSCPVDigit *cpvDigit = dynamic_cast<AliPHOSCPVDigit*>(cpvDigits->UncheckedAt(idigit));
+ relid[0] = moduleNumber + 1 ; // CPV (or PHOS) module number
+ relid[1] =-1 ; // means CPV
+ relid[2] = cpvDigit->GetXpad() ; // column number of a pad
+ relid[3] = cpvDigit->GetYpad() ; // row number of a pad
+
+ // get the absolute Id number
+ GetGeometry()->RelToAbsNumbering(relid, absid) ;
+
+ // add current digit to the temporary hit list