]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsimulationSSD.cxx
Fix of parsing bug related to the reading of the calib header. Added consistency...
[u/mrichter/AliRoot.git] / ITS / AliITSsimulationSSD.cxx
index f6a6ee6aa6bef66c808c75ccd8111db60bac1119..8904fc0a3a43d318502860d92a7c71cb82bee395 100644 (file)
@@ -19,6 +19,8 @@
 #include <stdlib.h>
 #include <Riostream.h>
 #include <TObjArray.h>
+#include <TRandom.h>
+
 #include "AliITSmodule.h"
 #include "AliITSMapA2.h"
 #include "AliITSpList.h"
@@ -278,8 +280,8 @@ void AliITSsimulationSSD::HitToDigit(Int_t module, Double_t x0, Double_t y0,
     if ( y > (seg->Dy()/2+10)*1.0E-4 ) {
       // check if particle is within the detector
       Warning("HitToDigit",
-             "hit out of detector y0=%e,y=%e,dey=%e,j =%e module=%d",
-             y0,y,dey,j,module);
+             "hit out of detector y0=%e,y=%e,dey=%e,j =%d module=%d,  exceed=%e",
+             y0,y,dey,j,module, y-(seg->Dy()/2+10)*1.0E-4);
       return;
     } // end if
     z = z0 + (j+0.5)*dez;
@@ -590,6 +592,7 @@ void AliITSsimulationSSD::ChargeToSignal(Int_t module,AliITSpList *pList) {
        // if strip is dead -> gain=0
        if( ((k==0)&&(res->GetGainP(ix)==0)) || ((k==1)&&(res->GetGainN(ix)==0))) continue;
        
+       signal = fMapA2->GetSignal(k,ix);
        // signal has to be uncalibrated
        // In real life, gains are supposed to be calculated from calibration runs,
        // stored in the calibration DB and used in the reconstruction
@@ -598,7 +601,7 @@ void AliITSsimulationSSD::ChargeToSignal(Int_t module,AliITSpList *pList) {
        else signal /= res->GetGainN(ix);
 
        // signal is converted in unit of ADC
-       signal = res->GetDEvToADC(fMapA2->GetSignal(k,ix));
+       signal = res->GetDEvToADC(signal);
        if(signal>4096.) signal = 4096.;//if exceeding, accumulate last one
 
        // threshold for zero suppression is set on the basis of the noise