// This block handles if a cell is fired
// many times by many tracks
status1 = new Int_t[nn];
- status2 = new Int_t[nn];
+ status2 = new Int_t[2*nn];
trnarray = new Int_t[nn];
for (iz = 0; iz < nn; iz++)
{
// This block handles if a cell is fired
// many times by many tracks
status1 = new Int_t[nn];
- status2 = new Int_t[nn];
+ status2 = new Int_t[2*nn];
trnarray = new Int_t[nn];
for (iz = 0; iz < nn; iz++)
{
Float_t sigrr = 0.605016 - 0.000273*adc12bit + 6.54e-8*adc12bit*adc12bit;
Float_t adcwithrr = gRandom->Gaus(adc12bit,sigrr);
- if(adcwithrr < 1600.0)
+ if(adcwithrr < 0.)
{
- adc = (Float_t) adcwithrr;
+ adc = 0.;
+ }
+ else if(adcwithrr >= 0. && adcwithrr < 1600.0)
+ {
+ adc = adcwithrr;
}
else if (adcwithrr >= 1600.0)
{