#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()
// 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
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) iNele=1; //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
fQ-=qdcEle*TMath::Log(rnd);
}
+ }
return fQ;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++