Added documentation of each file.
[u/mrichter/AliRoot.git] / FMD / AliFMDDigitizer.cxx
index 64f4918..61d79c9 100644 (file)
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-
 /* $Id$ */
-
+/** @file    AliFMDDigitizer.cxx
+    @author  Christian Holm Christensen <cholm@nbi.dk>
+    @date    Mon Mar 27 12:38:26 2006
+    @brief   FMD Digitizers implementation
+*/
 //////////////////////////////////////////////////////////////////////////////
 //
 //  This class contains the procedures simulation ADC  signal for the
@@ -332,10 +335,21 @@ AliFMDBaseDigitizer::SumContributions(AliFMD* fmd)
       UShort_t sector   = fmdHit->Sector();
       UShort_t strip    = fmdHit->Strip();
       Float_t  edep     = fmdHit->Edep();
-
+      UShort_t minstrip = param->GetMinStrip(detector, ring, sector, strip);
+      UShort_t maxstrip = param->GetMaxStrip(detector, ring, sector, strip);
       // Check if strip is `dead' 
-      if (param->IsDead(detector, ring, sector, strip)) continue;
-      
+      if (param->IsDead(detector, ring, sector, strip)) { 
+       AliDebug(5, Form("FMD%d%c[%2d,%3d] is marked as dead", 
+                        detector, ring, sector, strip));
+       continue;
+      }
+      // Check if strip is out-side read-out range 
+      if (strip < minstrip || strip > maxstrip) {
+       AliDebug(5, Form("FMD%d%c[%2d,%3d] is outside range [%3d,%3d]", 
+                        detector, ring, sector, strip, minstrip, maxstrip));
+       continue;
+      }
+       
       // Give warning in case of double hit 
       if (fEdep(detector, ring, sector, strip).fEdep != 0)
        AliDebug(5, Form("Double hit in %d%c(%d,%d)", 
@@ -458,7 +472,7 @@ AliFMDBaseDigitizer::ConvertToCount(Float_t   edep,
   Float_t  convF          = 1/param->GetPulseGain(detector,ring,sector,strip);
   UShort_t ped            = MakePedestal(detector,ring,sector,strip);
   UInt_t   maxAdc         = param->GetAltroChannelSize();
-  UShort_t rate           = param->GetSampleRate(AliFMDParameters::kBaseDDL);
+  UShort_t rate           = param->GetSampleRate(detector,ring,sector,strip);
   UShort_t size           = param->GetAltroChannelSize();
   
   // In case we don't oversample, just return the end value.