]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Some protection added in case of high multiplicity
authorbarbera <barbera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 23 Nov 2001 13:04:07 +0000 (13:04 +0000)
committerbarbera <barbera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 23 Nov 2001 13:04:07 +0000 (13:04 +0000)
ITS/AliITSsimulationSPD.cxx

index 154183514b4fd0ab66522705e421e3b636db14e9..bfbb7459f5b603e2119358e6a8f0f690b120a32c 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.13  2001/11/13 11:13:24  barbera
+A protection against tracks with the same entrance and exit has been made more strict
+
 Revision 1.12  2001/10/04 22:44:31  nilsen
 Major changes in supppor of PreDigits (SDigits). Changes made with will make
 it easier to suppor expected changes in AliITSHit class. Added use of new
@@ -292,8 +295,8 @@ void AliITSsimulationSPD::HitToDigit(AliITSmodule *mod,Int_t hitpos,
 
     // to account for unexpected equal entrance and 
     // exit coordinates
-    if (x1l==x2l) x2l=x2l+x2l*0.0001;
-    if (z1l==z2l) z2l=z2l+z2l*0.0001;
+    if (x1l==x2l) x2l=x2l+x2l*0.1;
+    if (z1l==z2l) z2l=z2l+z2l*0.1;
 
     if ((r1==r2) && (c1==c2)){
        // no charge sharing
@@ -347,9 +350,12 @@ void AliITSsimulationSPD::ChargeSharing(Float_t x1l,Float_t z1l,Float_t x2l,
     xa     = x1l;
     za     = z1l;
     dx     = TMath::Abs(x1l-x2l);
+    if (dx == 0.) dx = 0.01;
     dz     = TMath::Abs(z1l-z2l);
+    if (dz == 0.) dz = 0.01;    
     dtot   = TMath::Sqrt((dx*dx)+(dz*dz));   
     dm     = (x2l - x1l) / (z2l - z1l);
+    if (dm == 0.) dm = 0.01; 
     dirx   = (Int_t) ((x2l - x1l) / dx);
     dirz   = (Int_t) ((z2l - z1l) / dz);