#include <TDatabasePDG.h>
#include "AliITSdEdxAnalyzer.h"
#include "AliExternalTrackParam.h"
-#include "AliITSpidESD.h"
+//#include "AliITSpidESD.h"
+#include "AliITSPIDResponse.h"
#include "AliPID.h"
ClassImp(AliITSdEdxAnalyzer)
//______________________________________________________________________
Double_t AliITSdEdxAnalyzer::BetheBloch(const Float_t p, const Float_t m) const {
//
+ static AliITSPIDResponse pidResponse;
Double_t dedxbb=0.;
if(fBBmodel==0){
Double_t betagamma=p/m;
- Double_t conv=fDensity*1E6*fThickness/116.31*fMIP;
+ Double_t conv=fDensity*1E6*fThickness/116.24*fMIP;
dedxbb=conv*AliExternalTrackParam::BetheBlochSolid(betagamma);
}else if(fBBmodel==1){
- dedxbb=fMIP*AliITSpidESD::Bethe(p,m);
+ dedxbb=pidResponse.Bethe(p,m);
}
return dedxbb;
}
//______________________________________________________________________
TGraph* AliITSdEdxAnalyzer::GetBetheBlochGraph(const Int_t pdgcode) const {
- // Fills a TGraph with Bethe-Bloch expe
- TGraph* g=new TGraph(0);
- TParticlePDG* p=TDatabasePDG::Instance()->GetParticle(pdgcode);
- Float_t mass=p->Mass();
- for(Int_t ip=0; ip<100;ip++){
- Float_t p=fPMin+(ip+0.5)*(fPMax-fPMin)/100.;
- g->SetPoint(ip,p,BetheBloch(p,mass));
- }
- g->GetXaxis()->SetTitle("Momentum (GeV/c)");
- g->GetYaxis()->SetTitle("dE/dx (keV/300 #mum)");
- return g;
+ // Fills a TGraph with Bethe-Bloch expe
+ TGraph* g=new TGraph(0);
+ TParticlePDG* part=TDatabasePDG::Instance()->GetParticle(pdgcode);
+ Float_t mass=part->Mass();
+ for(Int_t ip=0; ip<100;ip++){
+ Float_t p=fPMin+(ip+0.5)*(fPMax-fPMin)/100.;
+ g->SetPoint(ip,p,BetheBloch(p,mass));
+ }
+ g->GetXaxis()->SetTitle("Momentum (GeV/c)");
+ g->GetYaxis()->SetTitle("dE/dx (keV/300 #mum)");
+ return g;
}