65 #include "StDedxPidTraits.h"
66 #include "StBichsel/Bichsel.h"
71 static const
char rcsid[] = "$Id:
StDedxPidTraits.cxx,v 2.17 2015/12/24 00:14:44 fisyak Exp $";
75 static const Int_t N70 = 6;
76 static const Double_t T70[N70] = {
85 if (method() == kTruncatedMeanId) {
86 Double_t x = TMath::Log(length());
87 Double_t Corr = T70[N70-1];
for (
int i = N70-2; i >= 0; i--) Corr = Corr*x + T70[i];
88 dEdx *= TMath::Exp(-Corr);
97 StDedxPidTraits::errorOnMean()
const {
101 static const Int_t N70 = 6;
102 static const Double_t T70[N70] = {
111 if (method() == kTruncatedMeanId) {
112 Double_t x = TMath::Log(length());
113 Double_t Corr = T70[N70-1];
for (
int i = N70-2; i >= 0; i--) Corr = Corr*x + T70[i];
122 StDedxPidTraits::encodedMethod()
const {
return mMethod; }
125 StDedxPidTraits::method()
const
128 case kTruncatedMeanId:
129 return kTruncatedMeanId;
131 case kEnsembleTruncatedMeanId:
132 return kEnsembleTruncatedMeanId;
134 case kLikelihoodFitId:
135 return kLikelihoodFitId;
137 case kWeightedTruncatedMeanId:
138 return kWeightedTruncatedMeanId;
141 return kOtherMethodId;
143 case kOtherMethodId2:
144 return kOtherMethodId2;
147 return kUndefinedMethodId;
152 void StDedxPidTraits::Print(Option_t *opt)
const {
153 cout <<
"StDedxPidTraits : \t method" << method()
154 <<
"\t encodedMethod : " << encodedMethod()
155 <<
"\t numberOfPoints : " << numberOfPoints()
156 <<
"\t length : " << length()
157 <<
"\t mean : " << mean()
158 <<
"\t errorOnMean : " << errorOnMean()
159 <<
"\t Log2<dX> : " << log2dX() << endl;