pile-up is taken into account in digitization
authorbasanta <basanta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Feb 2010 05:05:19 +0000 (05:05 +0000)
committerbasanta <basanta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Feb 2010 05:05:19 +0000 (05:05 +0000)
PMD/AliPMDDigitizer.cxx

index fcee91d..012376d 100644 (file)
@@ -376,10 +376,13 @@ void AliPMDDigitizer::Hits2SDigits(Int_t ievt)
              trackno=tracknoOld;
              
              //-----------------end of modification----------------
+             Float_t ptime = fPMDHit->GetTime()*1e6;   // time in microsec
+             if (ptime < 0. || ptime > 1.2) continue;  
+
              xPos = fPMDHit->X();
              yPos = fPMDHit->Y();
              zPos = fPMDHit->Z();
-             
+
              edep       = fPMDHit->GetEnergy();
              Int_t vol1 = fPMDHit->GetVolume(1); // Column
              Int_t vol2 = fPMDHit->GetVolume(2); // Row
@@ -621,6 +624,9 @@ void AliPMDDigitizer::Hits2Digits(Int_t ievt)
              mtrackno=trackno;
              trackpid=trackpidOld;
              trackno=tracknoOld;
+
+             Float_t ptime = fPMDHit->GetTime()*1e6;
+             if (ptime < 0. || ptime > 1.2) continue;
              
              xPos = fPMDHit->X();
              yPos = fPMDHit->Y();