]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added additional call to AliDetector::StepManager when on geometrical boundary
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 23 Sep 2000 16:01:49 +0000 (16:01 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 23 Sep 2000 16:01:49 +0000 (16:01 +0000)
AliGeant4/AliSensitiveDetector.cxx

index 2e56cf4541345503668731787bcaf6c747d836aa..4e6c50cf902498a6a3568d438ae0b8ad342167df 100644 (file)
@@ -84,8 +84,20 @@ G4bool AliSensitiveDetector::ProcessHits(G4Step* step, G4TouchableHistory*)
   if (parentID==0) shunt = 1;
   fModule->SetIshunt(shunt);
 
+  if ((step->GetPreStepPoint()->GetStepStatus() == fGeomBoundary) ||
+      (step->GetTrack()->GetCurrentStepNumber() == 1) ){
+
+    // if first step or crossing boundary
+    // let AliModule process step in PreStepPoint
+    // (this ensures compatibility with G3 that
+    // makes additional step of zero length) 
+
+    fStepManager->SetStep(step, kPreStepPoint);
+    fModule->StepManager();
+  }  
+
   // let AliModule process step
-  fStepManager->SetStep(step);
+  fStepManager->SetStep(step, kPostStepPoint);
   fModule->StepManager();
 
   return true;