]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HMPID/AliHMPIDHit.h
i)Moving the tag classes to the base class ii)Enabling the aod tag creation in the...
[u/mrichter/AliRoot.git] / HMPID / AliHMPIDHit.h
index 942a762fcac03ebcfc8d6d9501abcc0d8dee121b..14b9404c42465e283dc5f5f98d908f3c62c7a528 100644 (file)
@@ -2,7 +2,10 @@
 #define AliHMPIDHit_h
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
-
+//.
+// HMPID base class to produce hits
+//.
+//.
 #include <AliHit.h>           //base class
 #include <TVector3.h>         //ctor
 #include "AliHMPIDDigit.h"    //QdcTot() 
@@ -45,8 +48,10 @@ Float_t AliHMPIDHit::QdcTot(Float_t e)
 // Arguments: e- hit energy [GeV] for mip Eloss for photon Etot   
 //   Returns: total QDC
   Int_t pc,px,py;
-  AliHMPIDDigit::Lors2Pad(fLx,fLy,pc,px,py); 
-  Float_t y=AliHMPIDDigit::LorsY(pc,py);  
+  AliHMPIDParam::Lors2Pad(fLx,fLy,pc,px,py); 
+  if(py<0) fQ=0;
+ else {
+  Float_t y=AliHMPIDParam::LorsY(pc,py);  
   fLy=((y-fLy)>0)?y-0.2:y+0.2;                                                                       //shift to the nearest anod wire   
   
   Float_t  x=(fLx > 66.6)? fLx-66.6:fLx;                                                             //sagita is for PC (0-64) and not for chamber   
@@ -58,6 +63,7 @@ Float_t AliHMPIDHit::QdcTot(Float_t e)
     Double_t rnd=gRandom->Rndm(); if(rnd==0) rnd=1e-12;                                              //1e-12 is a protection against 0 from rndm  
     fQ-=qdcEle*TMath::Log(rnd);                
   }
+ }
   return fQ;
 }  
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++