]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONResponseV0.cxx
- adding time information in NbyN clusterizer
[u/mrichter/AliRoot.git] / MUON / AliMUONResponseV0.cxx
index 8522676bcd9926ea29c5fa6dffa95bae610405b2..65b9ad5ef22b144483ff2c22addfbd2d187c172f 100644 (file)
@@ -28,6 +28,7 @@
 #include "AliMUONDigit.h"
 #include "AliMUONGeometryTransformer.h"
 #include "AliMUONHit.h"
+#include "AliMUONConstants.h"
 
 #include "AliMpArea.h"
 #include "AliMpDEManager.h"
@@ -201,7 +202,7 @@ AliMUONResponseV0::GetAnod(Float_t x) const
 
 //______________________________________________________________________________
 void 
-AliMUONResponseV0::DisIntegrate(const AliMUONHit& hit, TList& digits)
+AliMUONResponseV0::DisIntegrate(const AliMUONHit& hit, TList& digits, Float_t timeDif)
 {
   /// Go from 1 hit to a list of digits.
   /// The energy deposition of that hit is first converted into charge
@@ -265,6 +266,11 @@ AliMUONResponseV0::DisIntegrate(const AliMUONHit& hit, TList& digits)
   // Get pulse height from energy loss.
   Float_t qtot = IntPH(hit.Eloss());
   
+  // If from a pileup event we apply a reduction factor to the charge
+  if (timeDif!=0){
+    qtot = AliMUONConstants::ReducedQTot(qtot,timeDif);
+  }
+  
   // Get the charge correlation between cathodes.
   Float_t currentCorrel = TMath::Exp(gRandom->Gaus(0.0,ChargeCorrel()/2.0));
 
@@ -295,13 +301,13 @@ AliMUONResponseV0::DisIntegrate(const AliMUONHit& hit, TList& digits)
                                         kFALSE);
       if ( pad.IsValid() )
       {
-        AliWarning(Form("Got an invalid iterator bug (area.Position() is within "
+        AliDebug(1, Form("Got an invalid iterator bug (area.Position() is within "
                       " DE but the iterator is void) for detElemId %d cath %d",
                       detElemId,cath));        
       }
       else
       {
-        AliError(Form("Got an invalid iterator bug for detElemId %d cath %d."
+        AliDebug(1, Form("Got an invalid iterator bug for detElemId %d cath %d."
                       "Might be a bad hit ? area.Position()=(%e,%e) "
                       "Dimensions()=(%e,%e)",
                       detElemId,cath,area.GetPositionX(),area.GetPositionY(),