25 #include "StHbtMaker/Infrastructure/StHbtAihongPid.h"
27 #include "StEventUtilities/StuProbabilityPidAlgorithm.h"
41 StHbtAihongPid::StHbtAihongPid(
const char* fileName) {
42 cout <<
" StHbtAihongPid::StHbtAihongPid() " << endl;
44 setPidTable(fileName);
47 void StHbtAihongPid::setPidTable(
const char* fileName) {
48 StuProbabilityPidAlgorithm::readParametersFromFile(fileName);
52 void StHbtAihongPid::updateEvent(
int refMult) {
53 if (refMult > 225 ) mAihongCentrality = 0.03;
54 else if (refMult > 215 ) mAihongCentrality = 0.05;
55 else if (refMult > 200 ) mAihongCentrality = 0.07;
56 else if (refMult > 180 ) mAihongCentrality = 0.10;
57 else if (refMult > 140 ) mAihongCentrality = 0.18;
58 else if (refMult > 130 ) mAihongCentrality = 0.20;
59 else if (refMult > 120 ) mAihongCentrality = 0.23;
60 else if (refMult > 115 ) mAihongCentrality = 0.24;
61 else if (refMult > 100 ) mAihongCentrality = 0.28;
62 else mAihongCentrality = 0.99;
65 void StHbtAihongPid::updateTrack(
int charge,
double p,
double eta,
int nHitsDedx,
double dedx) {
66 mAihongPid->processPIDAsFunction(mAihongCentrality, 0., charge, p, eta, nHitsDedx, dedx);
73 StuProbabilityPidAlgorithm* StHbtAihongPid::aihongPid(
int refMult,
int charge,
double p,
double eta,
int nHitsDedx,
double dedx){
75 updateTrack(charge, p, eta, nHitsDedx, dedx);
80 updateTrack(charge, p, eta, nHitsDedx, dedx);