]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Energy assignment to photon and charged particle protected.
authordibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Apr 2008 12:40:35 +0000 (12:40 +0000)
committerdibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Apr 2008 12:40:35 +0000 (12:40 +0000)
HMPID/AliHMPIDHit.h

index 3b27f17c787dbe9631fbc3698d700e1538fd64a7..f7c7663403db3cf211446ce25d100b88c4c2d018 100644 (file)
@@ -57,7 +57,7 @@ Float_t AliHMPIDHit::QdcTot(Float_t e)
   Float_t  x=(fLx > 66.6)? fLx-66.6:fLx;                                                             //sagita is for PC (0-64) and not for chamber   
   Float_t  qdcEle=34.06311+0.2337070*x+5.807476e-3*x*x-2.956471e-04*x*x*x+2.310001e-06*x*x*x*x;      //reparametrised from DiMauro
   
-  Int_t iNele=Int_t(e/26e-9);  if(iNele<1) return 0;                                                 //number of electrons created by hit
+  Int_t iNele=Int_t(e/26e-9);  if(iNele<1) iNele = 1;                                                //number of electrons created by hit, if photon e=0 implies iNele=1
   fQ=0;
   for(Int_t i=1;i<=iNele;i++){
     Double_t rnd=gRandom->Rndm(); if(rnd==0) rnd=1e-12;                                              //1e-12 is a protection against 0 from rndm