#include "AliKalmanTrack.h"
#include "AliLog.h"
-#include "AliPDG.h"
-#include "TPDGCode.h"
-#include "TDatabasePDG.h"
ClassImp(AliKalmanTrack)
AliKalmanTrack::AliKalmanTrack():
fLab(-3141593),
fChi2(0),
- fMass(0.13957),
+ fMass(AliPID::ParticleMass(AliPID::kPion)),
fN(0)
{
//
// AliWarning("Reseting Recorded Time.");
fStartTimeIntegral = kTRUE;
- for(Int_t i=0; i<fgkTypes; i++) fIntegratedTime[i] = 0;
+ for(Int_t i=0; i<AliPID::kSPECIES; i++) fIntegratedTime[i] = 0;
fIntegratedLength = 0;
}
//_______________________________________________________________________
fIntegratedLength += length;
- static Int_t pdgCode[fgkTypes] = {kElectron, kMuonMinus, kPiPlus, kKPlus, kProton};
- TDatabasePDG *db = TDatabasePDG::Instance();
-
Double_t xr, param[5];
Double_t pt, tgl;
if (length > 100) return;
- for (Int_t i=0; i<fgkTypes; i++) {
+ for (Int_t i=0; i<AliPID::kSPECIES; i++) {
- Double_t mass = db->GetParticle(pdgCode[i])->Mass();
+ Double_t mass = AliPID::ParticleMass(i);
Double_t correction = TMath::Sqrt( pt*pt * (1 + tgl*tgl) + mass * mass ) / p;
Double_t time = length * correction / kcc;
return 0.;
}
- static Int_t pdgCode[fgkTypes] = {kElectron, kMuonMinus, kPiPlus, kKPlus, kProton};
-
- for (Int_t i=0; i<fgkTypes; i++)
- if (pdgCode[i] == TMath::Abs(pdg)) return fIntegratedTime[i];
+ for (Int_t i=0; i<AliPID::kSPECIES; i++)
+ if (AliPID::ParticleCode(i) == TMath::Abs(pdg)) return fIntegratedTime[i];
AliWarning(Form("Particle type [%d] not found", pdg));
return 0;
}
void AliKalmanTrack::GetIntegratedTimes(Double_t *times) const {
- for (Int_t i=0; i<fgkTypes; i++) times[i]=fIntegratedTime[i];
+ for (Int_t i=0; i<AliPID::kSPECIES; i++) times[i]=fIntegratedTime[i];
}
void AliKalmanTrack::SetIntegratedTimes(const Double_t *times) {
- for (Int_t i=0; i<fgkTypes; i++) fIntegratedTime[i]=times[i];
+ for (Int_t i=0; i<AliPID::kSPECIES; i++) fIntegratedTime[i]=times[i];
}
//_______________________________________________________________________
// Prints time for all hypothesis
//
- static Int_t pdgCode[fgkTypes] = {kElectron, kMuonMinus, kPiPlus, kKPlus, kProton};
-
- for (Int_t i=0; i<fgkTypes; i++)
- printf("%d: %.2f ", pdgCode[i], fIntegratedTime[i]);
+ for (Int_t i=0; i<AliPID::kSPECIES; i++)
+ printf("%d: %.2f ", AliPID::ParticleCode(i), fIntegratedTime[i]);
printf("\n");
}