]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsimulationSSD.cxx
Bad channel treatment in SSD simulation and reconstruction (E.Fragiacomo)
[u/mrichter/AliRoot.git] / ITS / AliITSsimulationSSD.cxx
index 52f3ff590a221bb990a46bc216175449ee436542..77993a7823d6fab523ae5ffa0869a569446c2e42 100644 (file)
@@ -113,6 +113,7 @@ AliITSsimulationSSD& AliITSsimulationSSD::operator=(
   this->fDriftVel[1] = s.fDriftVel[1];
   return *this;
 }
+/*
 //______________________________________________________________________
 AliITSsimulation& AliITSsimulationSSD::operator=(
                                          const AliITSsimulation &s){
@@ -124,6 +125,7 @@ AliITSsimulation& AliITSsimulationSSD::operator=(
   
   return *this;
 }
+*/
 //______________________________________________________________________
 AliITSsimulationSSD::AliITSsimulationSSD(const AliITSsimulationSSD &source):
     AliITSsimulation(source),
@@ -280,8 +282,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;
@@ -423,16 +425,13 @@ void AliITSsimulationSSD::ApplyDeadChannels(Int_t module) {
 
   AliITSCalibrationSSD* res = (AliITSCalibrationSSD*)GetCalibrationModel(module);
 
-  deadentries = res->GetDeadPChannelsList().GetSize();
-  //cout<<module<<" "<<deadentries<<endl;
-  for(Int_t i=0; i<deadentries; i++) {
-    res->AddGainP(res->GetDeadPChannelsList().At(i),0.0);
-  }
+  for(Int_t i=0;i<GetNStrips();i++){
 
-  deadentries = res->GetDeadNChannelsList().GetSize();
-  for(Int_t i=0; i<deadentries; i++) {
-    res->AddGainN(res->GetDeadNChannelsList().At(i),0.0);
-  }
+    //if((res->IsPChannelBad(i))||(res->IsNChannelBad(i))) cout<<module<<" "<<i<<" "<<res->IsPChannelBad(i)<<" "<<res->IsNChannelBad(i)<<endl;
+    if(res->IsPChannelBad(i)) res->AddGainP(i,0.0);
+    if(res->IsNChannelBad(i)) res->AddGainN(i,0.0);
+
+  } // loop over strips 
 
 }
 
@@ -592,6 +591,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
@@ -600,7 +600,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