|
ATLAS Offline Software
|
Go to the documentation of this file.
31 const auto p = std::abs(signedP);
35 double pLG[4]={1,1,1,1};
42 return asymGaus(dedx, pLG[1], pLG[0], pLG[3]);
44 else if (
m_fun==
"CB") {
50 return crystalBall(dedx, pLG[0], pLG[1], pLG[2], pLG[3]);
61 if (itr!=
m_par.end()) {
62 const std::vector<double> ¶m = itr->second;
63 if (j<(
int)param.size()) {
72 std::array<double,3> vhypo{-2,-2,-2};
73 if (nGoodPixels<=0) {
return vhypo; }
75 const auto p = std::fabs(signedP);
77 const auto dedx =
std::log(dedxArg)-9.4;
94 std::array<double,9>
par{};
95 auto setNGoodPixels{nGoodPixels};
96 if (setNGoodPixels>5) { setNGoodPixels=5; }
97 if (
p<0 &&
m_posneg) { setNGoodPixels += 5; }
98 for (
int i=0;
i<npar;
i++){
108 if (nGoodPixels<=0) {
return -2; }
111 const auto p = std::abs(signedP);
134 if (nGoodPixels<=0) {
return -2; }
136 const auto p = std::abs(signedP);
144 const auto p = std::abs(signedP);
154 double B =
n/std::abs(alp)-std::abs(alp);
156 double N =
sig*(
n/alp*(1/(
n-1))*
std::exp(-alp*alp*0.5)+std::sqrt(M_PI_2)*(1+std::erf(alp*M_SQRT1_2)));
165 double sigp =
sig*asym;
166 double sigm =
sig/asym;
168 if (
x>x0) {
fun = TMath::Gaus(
x,x0,sigp,
false); }
169 else {
fun = TMath::Gaus(
x,x0,sigm,
false); }
170 return fun/(std::sqrt(2*
M_PI)*((sigp*0.5) + (sigm*0.5)));
175 double lambda = (
x-Ep)/
R;
180 double gamma = std::sqrt(xbg*xbg+1.);
191 double gamma = std::sqrt(xbg*xbg+1);
203 double gamma = std::sqrt(xbg*xbg+1);
207 double fdedx = (pp[0]/
std::pow(beta2,pp[2]))*(
std::log(std::abs(pp[1])*beta2*gamma2))-pp[0];
225 std::vector<float> vecResult(3,-1);
227 const auto &
array {
getP(dedx,
p,nGoodPixels)};
double getdEdx(const double p, const double mass, const int nGoodPixels) const
void setPosNeg(const bool posneg)
static double asymGaus(const double x, const double x0, const double sig, const double asym)
static constexpr double m_pMass
std::array< double, 9 > getFirstNPar(const double p, const int nGoodPixels, const int np) const
double dEdxPdf(const double dedx, const double signedP, const double mass, const std::array< double, 9 > &par, const int offset) const
double fdEdxZero(const double x, const std::array< double, 9 > &par) const
static double dEdx_BG(const double xbg, const std::array< double, 9 > &pp)
std::vector< float > getLikelihoods(const double dedx2, const double p2, const int nGoodPixels) const
static double dEdx_5p_BG(const double xbg, const std::array< double, 9 > &pp)
static constexpr double m_piMass
static double dEdx_5p_aleph(const double p, double mass, const std::array< double, 9 > &pp)
void setFunctionType(const std::string &fun)
Store pixel dEdx data in PixeldEdxData.
static constexpr double m_kMass
double getMass(const double dedx, const double signedP, const int nGoodPixels) const
static double dEdx_5p(const double p, const double mass, const std::array< double, 9 > &pp)
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
static double dEdx_3p(const double p, const double mass, const std::array< double, 9 > &pp)
static double crystalBall(const double x, const double x0, const double sig, const double alp, const double n)
static double dEdx_def(const double p, const double mass, const std::array< double, 9 > &pp)
std::unordered_map< uint32_t, std::vector< double > > m_par
double getPar(const int i, const int j) const
void setBetheBlochType(const std::string &bb)
static double moyal(const double x, const double Ep, const double R)
std::array< double, 3 > getP(const double dedxArg, const double signedP, const int nGoodPixels) const
constexpr int pow(int base, int exp) noexcept
void setMinimumdEdxForMass(const double mindedxMass)
void setPar(const int i, const double param)
static double dEdx_5p_BG_aleph(const double xbg, const std::array< double, 9 > &pp)