#include "TBRIK.h"
#include "TNode.h"
+#include "TRandom.h"
// --- Standard library ---
// - fTmpHits, which retains all the hits of the current event. It
// is used for the digitization part.
+ fPINElectronicNoise = 0.010 ;
+
fHits = new TClonesArray("AliPHOSHit",100) ;
gAlice->AddHitList(fHits) ;
//
// - fTmpHits, which retains all the hits of the current event. It
// is used for the digitization part.
-
+ fPINElectronicNoise = 0.010 ;
fHits = new TClonesArray("AliPHOSHit",100) ;
fDigits = new TClonesArray("AliPHOSDigit",100) ;
fTmpHits= new TClonesArray("AliPHOSHit",100) ;
digit = new AliPHOSDigit(hit->GetId(),Digitize(hit->GetEnergy())) ;
new(lDigits[fNdigits]) AliPHOSDigit(* digit) ;
fNdigits++; delete digit ;
+ }
+ Float_t energyandnoise ;
+ for ( i = 0 ; i < fNdigits ; i++ ) {
+ digit = (AliPHOSDigit * ) fDigits->At(i) ;
+ // printf("GetId is %d and GetAmp is %d \n",digit->GetId(), digit->GetAmp()) ;
+ energyandnoise = digit->GetAmp() + Digitize(gRandom->Gaus(0.,fPINElectronicNoise)) ;
+ if (energyandnoise < 0 ) energyandnoise = 0 ;
+ digit->SetAmp(energyandnoise);
+ // printf("GetId is %d and GetAmp is %d \n",digit->GetId(), digit->GetAmp()) ;
+
+
}
+
// Reset the array of all the "accumulated hits" of this event.
fNTmpHits = 0 ;
fTmpHits->Delete();
TrackSegmentsList * TrackSegments(){return fTrackSegments ;}
protected:
-
+ Float_t fPINElectronicNoise ; // Electronic Noise in the PIN
RecPointsList * fEmcClusters ; //! (!=do not stream)
AliPHOSGeometry * fGeom ; // geometry definition
Int_t fNTmpHits ; //! used internally for digitalization