X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSpidESD.cxx;h=4c6c0572e34de4d8d1638f63c62b09f6c5f78030;hb=b89be497ffcbeed9d2347e8de59d0586836e82d4;hp=b058f043e8dd6b60aea45c56b9249080f4ce6162;hpb=ca75fe5f3369103e85e13d37ef59e3b2eb619804;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSpidESD.cxx b/ITS/AliITSpidESD.cxx index b058f043e8d..4c6c0572e34 100644 --- a/ITS/AliITSpidESD.cxx +++ b/ITS/AliITSpidESD.cxx @@ -13,71 +13,36 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ +/* $Id$ */ + //----------------------------------------------------------------- // Implementation of the ITS PID class // Very naive one... Should be made better by the detector experts... // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch //----------------------------------------------------------------- +#include + #include "AliITSpidESD.h" -#include "AliESD.h" #include "AliESDtrack.h" +#include "AliExternalTrackParam.h" ClassImp(AliITSpidESD) -//_________________________________________________________________________ -AliITSpidESD::AliITSpidESD(Double_t *param) -{ - // - // The main constructor - // - fMIP=param[0]; - fRes=param[1]; - fRange=param[2]; -} -Double_t AliITSpidESD::Bethe(Double_t bg) { - // - // This is the Bethe-Bloch function normalised to 1 at the minimum - // - Double_t bg2=bg*bg; - Double_t bethe; - /*if (bg<3.5) - bethe=(1.+ bg2)/bg2*(log(5940*bg2) - bg2/(1.+ bg2)); - else*/ // not 100% clear why... - bethe=(1.+ bg2)/bg2*(log(3.5*5940*bg) - bg2/(1.+ bg2)); - return bethe/11.091; +//______________________________________________________________________ +AliITSpidESD::AliITSpidESD():TObject(){ + //Default constructor + } -//_________________________________________________________________________ -Int_t AliITSpidESD::MakePID(AliESD *event) -{ - // - // This function calculates the "detector response" PID probabilities - // - static const Double_t masses[]={ - 0.000511, 0.105658, 0.139570, 0.493677, 0.938272, 1.875613 - }; - Int_t ntrk=event->GetNumberOfTracks(); - for (Int_t i=0; iGetTrack(i); - if ((t->GetStatus()&AliESDtrack::kITSin )==0) - if ((t->GetStatus()&AliESDtrack::kITSout)==0) continue; - Double_t mom=t->GetP(); - Double_t dedx=t->GetITSsignal()/fMIP; - Int_t ns=AliESDtrack::kSPECIES; - Double_t p[10]; - for (Int_t j=0; j fRange*sigma) { - p[j]=TMath::Exp(-0.5*fRange*fRange)/sigma; - continue; - } - p[j]=TMath::Exp(-0.5*(dedx-bethe)*(dedx-bethe)/(sigma*sigma))/sigma; - } - t->SetITSpid(p); - } - return 0; +Double_t AliITSpidESD::Bethe(Double_t p,Double_t mass) { + // returns AliExternalTrackParam::BetheBloch normalized to 1 at the minimum + Double_t density=2.33; // g/cm3 + Double_t thickness=0.03; // cm + Double_t meanMIPSi=116.24; // keV in 300 microns of Si + Double_t conv=density*1E6*thickness/meanMIPSi; + Float_t betagamma=p/mass; + return conv*AliExternalTrackParam::BetheBlochSolid(betagamma); + }