ATLAS Offline Software
PixeldEdxData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
12 #ifndef PIXELDEDXDATA_H
13 #define PIXELDEDXDATA_H
14 
15 #include "AthenaKernel/CLASS_DEF.h"
16 #include <string>
17 #include <vector>
18 #include <unordered_map>
19 #include <array>
20 
21 #include "AthenaKernel/CondCont.h"
22 
24  public:
25  void setPar(const int i, const double param);
26  void setPosNeg(const bool posneg);
27  void setFunctionType(const std::string &fun);
28  void setBetheBlochType(const std::string &bb);
29  void setMinimumdEdxForMass(const double mindedxMass);
30 
31  double dEdxPdf(const double dedx, const double signedP, const double mass, const std::array<double,9> & par, const int offset) const;
32  double fdEdxZero(const double x, const std::array<double,9> & par) const;
33 
34  double getPar(const int i, const int j) const;
35  std::array<double, 3> getP(const double dedxArg, const double signedP, const int nGoodPixels) const;
36  std::array<double,9> getFirstNPar( const double p, const int nGoodPixels, const int np) const;
37  double getMass(const double dedx, const double signedP, const int nGoodPixels) const;
38  double getdEdx(const double p, const double mass, const int nGoodPixels) const;
39  double getdEdx(const double p, const double mass, const std::array<double,9> & par) const;
40 
41  // Crystal Ball distribution
42  static double crystalBall(const double x, const double x0,const double sig,const double alp,const double n) ;
43  // Asymetric Gaussian distribution
44  static double asymGaus(const double x,const double x0,const double sig,const double asym) ;
45  // Moyal distribution
46  static double moyal(const double x,const double Ep,const double R) ;
47 
48  static double dEdx_5p_BG_aleph(const double xbg, const std::array<double,9>& pp) ;
49  static double dEdx_5p_aleph(const double p,double mass, const std::array<double,9>& pp) ;
50  static double dEdx_5p_BG(const double xbg, const std::array<double,9>& pp) ;
51  static double dEdx_5p(const double p,const double mass, const std::array<double,9>& pp) ;
52  static double dEdx_BG(const double xbg, const std::array<double,9>& pp) ;
53  static double dEdx_def(const double p,const double mass, const std::array<double,9>& pp) ;
54  static double dEdx_3p(const double p, const double mass, const std::array<double,9>& pp) ;
55 
56  std::vector<float> getLikelihoods(const double dedx2, const double p2, const int nGoodPixels) const;
57 
58  private:
59  static constexpr double m_piMass = 0.13957;
60  static constexpr double m_kMass = 0.49368;
61  static constexpr double m_pMass = 0.93827;
62 
63  std::unordered_map<uint32_t,std::vector<double>> m_par;
64  bool m_posneg;
65  std::string m_fun;
66  std::string m_bb;
68 
69 };
70 
71 CLASS_DEF( PixeldEdxData , 127567078 , 1 )
72 
74 
75 #endif
generateReferenceFile.fun
fun
Definition: generateReferenceFile.py:18
PixeldEdxData::getdEdx
double getdEdx(const double p, const double mass, const int nGoodPixels) const
Definition: PixeldEdxData.cxx:133
PixeldEdxData::m_posneg
bool m_posneg
Definition: PixeldEdxData.h:64
PixeldEdxData::setPosNeg
void setPosNeg(const bool posneg)
Definition: PixeldEdxData.cxx:14
CondCont.h
Hold mappings of ranges to condition objects.
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
PixeldEdxData::asymGaus
static double asymGaus(const double x, const double x0, const double sig, const double asym)
Definition: PixeldEdxData.cxx:164
PixeldEdxData::m_pMass
static constexpr double m_pMass
Definition: PixeldEdxData.h:61
PixeldEdxData::getFirstNPar
std::array< double, 9 > getFirstNPar(const double p, const int nGoodPixels, const int np) const
Definition: PixeldEdxData.cxx:93
CONDCONT_DEF
CONDCONT_DEF(PixeldEdxData, 127560679)
PixeldEdxData::dEdxPdf
double dEdxPdf(const double dedx, const double signedP, const double mass, const std::array< double, 9 > &par, const int offset) const
Definition: PixeldEdxData.cxx:30
PlotPulseshapeFromCool.np
np
Definition: PlotPulseshapeFromCool.py:64
PixeldEdxData::fdEdxZero
double fdEdxZero(const double x, const std::array< double, 9 > &par) const
Definition: PixeldEdxData.cxx:55
x
#define x
PixeldEdxData::dEdx_BG
static double dEdx_BG(const double xbg, const std::array< double, 9 > &pp)
Definition: PixeldEdxData.cxx:202
PixeldEdxData::getLikelihoods
std::vector< float > getLikelihoods(const double dedx2, const double p2, const int nGoodPixels) const
Definition: PixeldEdxData.cxx:222
PixeldEdxData::dEdx_5p_BG
static double dEdx_5p_BG(const double xbg, const std::array< double, 9 > &pp)
Definition: PixeldEdxData.cxx:190
PixeldEdxData::m_piMass
static constexpr double m_piMass
Definition: PixeldEdxData.h:59
PixeldEdxData::dEdx_5p_aleph
static double dEdx_5p_aleph(const double p, double mass, const std::array< double, 9 > &pp)
Definition: PixeldEdxData.cxx:185
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
PixeldEdxData::setFunctionType
void setFunctionType(const std::string &fun)
Definition: PixeldEdxData.cxx:18
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
PixeldEdxData::m_fun
std::string m_fun
Definition: PixeldEdxData.h:65
PixeldEdxData::m_kMass
static constexpr double m_kMass
Definition: PixeldEdxData.h:60
python.BuildSignatureFlags.sig
sig
Definition: BuildSignatureFlags.py:218
PixeldEdxData::getMass
double getMass(const double dedx, const double signedP, const int nGoodPixels) const
Definition: PixeldEdxData.cxx:104
PixeldEdxData::dEdx_5p
static double dEdx_5p(const double p, const double mass, const std::array< double, 9 > &pp)
Definition: PixeldEdxData.cxx:197
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
PixeldEdxData
Definition: PixeldEdxData.h:23
PixeldEdxData::dEdx_3p
static double dEdx_3p(const double p, const double mass, const std::array< double, 9 > &pp)
Definition: PixeldEdxData.cxx:216
PixeldEdxData::crystalBall
static double crystalBall(const double x, const double x0, const double sig, const double alp, const double n)
Definition: PixeldEdxData.cxx:152
PixeldEdxData::dEdx_def
static double dEdx_def(const double p, const double mass, const std::array< double, 9 > &pp)
Definition: PixeldEdxData.cxx:211
PixeldEdxData::m_par
std::unordered_map< uint32_t, std::vector< double > > m_par
Definition: PixeldEdxData.h:63
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
PixeldEdxData::getPar
double getPar(const int i, const int j) const
Definition: PixeldEdxData.cxx:59
PixeldEdxData::m_mindedxformass
double m_mindedxformass
Definition: PixeldEdxData.h:67
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
PixeldEdxData::setBetheBlochType
void setBetheBlochType(const std::string &bb)
Definition: PixeldEdxData.cxx:22
PixeldEdxData::moyal
static double moyal(const double x, const double Ep, const double R)
Definition: PixeldEdxData.cxx:174
PixeldEdxData::getP
std::array< double, 3 > getP(const double dedxArg, const double signedP, const int nGoodPixels) const
Definition: PixeldEdxData.cxx:71
PixeldEdxData::m_bb
std::string m_bb
Definition: PixeldEdxData.h:66
CLASS_DEF.h
macros to associate a CLID to a type
PixeldEdxData::setMinimumdEdxForMass
void setMinimumdEdxForMass(const double mindedxMass)
Definition: PixeldEdxData.cxx:26
PixeldEdxData::setPar
void setPar(const int i, const double param)
Definition: PixeldEdxData.cxx:10
PixeldEdxData::dEdx_5p_BG_aleph
static double dEdx_5p_BG_aleph(const double xbg, const std::array< double, 9 > &pp)
Definition: PixeldEdxData.cxx:179