]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Hits primary definition changes so that exclude primaries from depth of crystal
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Oct 2004 11:11:47 +0000 (11:11 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Oct 2004 11:11:47 +0000 (11:11 +0000)
PHOS/AliPHOSv1.cxx

index 1a7fec91aabe2c887ee8fd3747f7b59e1abf0437..c1a318d49d0116e90a4f87eec8112482de7169b2 100644 (file)
@@ -406,12 +406,20 @@ void AliPHOSv1::StepManager(void)
       Float_t xyzd[3] ;
       gMC -> Gmtod (xyzte, xyzd, 1);    // transform coordinate from master to daughter system    
       if (xyzd[1] < -GetGeometry()->GetCrystalSize(1)/2.+0.1){   //Entered close to forward surface  
-       TParticle * part = 0 ; 
        Int_t parent = gAlice->GetMCApp()->GetCurrentTrackNumber() ; 
-       while ( parent != -1 ) {
-         part = gAlice->GetMCApp()->Particle(parent) ; 
-         part->SetBit(kKeepBit);
-         parent = part->GetFirstMother() ; 
+       TParticle * part = gAlice->GetMCApp()->Particle(parent) ; 
+       Float_t vert[3],vertd[3] ;
+       vert[0]=part->Vx() ;
+       vert[1]=part->Vy() ;
+       vert[2]=part->Vz() ;
+       gMC -> Gmtod (vert, vertd, 1);    // transform coordinate from master to daughter system
+       if(vertd[1]<-GetGeometry()->GetCrystalSize(1)/2.-0.1){ //Particle is created in foront of PHOS 0.1 to get rid of numerical errors 
+         while ( parent != -1 ) {
+           part = gAlice->GetMCApp()->Particle(parent) ; 
+           part->Print() ;
+           part->SetBit(kKeepBit);
+           parent = part->GetFirstMother() ; 
+         }
        }
       }
     }