From: martinez Date: Wed, 29 May 2002 13:47:26 +0000 (+0000) Subject: Reading ListOfHits using the entries in treeH, since the primaries in treeK does... X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=3962b6a1c23f082c3aed0697d13c75b37d32756b;p=u%2Fmrichter%2FAliRoot.git Reading ListOfHits using the entries in treeH, since the primaries in treeK does not correspond to the primaries in geant --- diff --git a/PHOS/AliPHOSSDigitizer.cxx b/PHOS/AliPHOSSDigitizer.cxx index 8616449e2e3..5cd484e927f 100644 --- a/PHOS/AliPHOSSDigitizer.cxx +++ b/PHOS/AliPHOSSDigitizer.cxx @@ -181,13 +181,12 @@ void AliPHOSSDigitizer::Exec(Option_t *option) //Now make SDigits from hits, for PHOS it is the same, so just copy - -//******************** CHECK HERE -//YS DOES NOT UNDERSTAND THE NEED FOR THE FOLLOWING LOOP -// Int_t itrack ; -// for (itrack=0; itrack < gAlice->GetNtrack(); itrack++){ -// //=========== Get the PHOS branch from Hits Tree for the Primary track itrack -// gime->Track(itrack) ; + Int_t Nprim = (Int_t) (gAlice->TreeH())->GetEntries(); + // Attention Nprim is the number of primaries tracked by Geant and this number could be different to the number of Primaries in TreeK; + Int_t iprim; + for (iprim=0; iprimTrack(iprim) ; Int_t i; for ( i = 0 ; i < hits->GetEntries() ; i++ ) { AliPHOSHit * hit = dynamic_cast(hits->At(i)) ; @@ -202,19 +201,19 @@ void AliPHOSSDigitizer::Exec(Option_t *option) nSdigits++ ; } -// } // loop over tracks + } // loop over iprim sdigits->Sort() ; nSdigits = sdigits->GetEntriesFast() ; fSDigitsInRun += nSdigits ; sdigits->Expand(nSdigits) ; -// Int_t i ; + Int_t i ; for (i = 0 ; i < nSdigits ; i++) { AliPHOSDigit * digit = dynamic_cast(sdigits->At(i)) ; digit->SetIndexInList(i) ; } - + if(gAlice->TreeS() == 0) gAlice->MakeTree("S") ;