X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=PWG2%2FSPECTRA%2FAliProtonAnalysisBase.cxx;h=9c9982977f3a2fb2be89c8f884003fc5f3b6f162;hp=3d883289ec04627ebb12d9cfd5817cbf2e169877;hb=f81f1b195228c75423c4f838f2be6de0f27b9004;hpb=2293155b791f4307fd27ee15e4d9af1519771e76;ds=sidebyside diff --git a/PWG2/SPECTRA/AliProtonAnalysisBase.cxx b/PWG2/SPECTRA/AliProtonAnalysisBase.cxx index 3d883289ec0..9c9982977f3 100644 --- a/PWG2/SPECTRA/AliProtonAnalysisBase.cxx +++ b/PWG2/SPECTRA/AliProtonAnalysisBase.cxx @@ -30,6 +30,7 @@ #include #include #include +#include class AliLog; class AliESDVertex; @@ -917,13 +918,28 @@ Bool_t AliProtonAnalysisBase::IsProton(AliESDtrack *track) { gP = tpcTrack->P(); gEta = tpcTrack->Eta(); } - //We start the P slices at >0.3GeV/c with a bining of 50MeV/c ==> Int_t(0.3001/0.05) = 6 - Int_t nbinP = Int_t(gP/0.05) - 6; - Double_t tpcSignal = track->GetTPCsignal(); - Double_t dEdxTheory = Bethe(gP/9.38270000000000048e-01); - Double_t dEdxSigma = fdEdxSigma[nbinP]; - Double_t nsigma = TMath::Abs(tpcSignal - dEdxTheory)/(tpcSignal*(dEdxSigma/TMath::Sqrt(track->GetTPCsignalN()))); - if(nsigma <= fNSigma) + Double_t fAlephParameters[5]; + if(fAnalysisMC) { + fAlephParameters[0] = 2.15898e+00/50.; + fAlephParameters[1] = 1.75295e+01; + fAlephParameters[2] = 3.40030e-09; + fAlephParameters[3] = 1.96178e+00; + fAlephParameters[4] = 3.91720e+00; + } + else { + fAlephParameters[0] = 0.0283086; + fAlephParameters[1] = 2.63394e+01; + fAlephParameters[2] = 5.04114e-11; + fAlephParameters[3] = 2.12543e+00; + fAlephParameters[4] = 4.88663e+00; + } + + AliESDpid *fESDpid = new AliESDpid(); + AliTPCPIDResponse tpcResponse = fESDpid->GetTPCResponse(); + tpcResponse.SetBetheBlochParameters(fAlephParameters[0],fAlephParameters[1],fAlephParameters[2],fAlephParameters[3],fAlephParameters[4]); + Double_t normalizeddEdx = TMath::Log(track->GetTPCsignal()/tpcResponse.GetExpectedSignal(gP,AliPID::kProton)); + + if(normalizeddEdx >= -0.15) return kTRUE; }