2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
6 inline EnergyLoss::EnergyLoss(double deltaE,
11 , m_sigmaDeltaE(sigmaDeltaE)
12 , m_sigmaMinusDeltaE(sMinusDeltaE > 0.0 ? sMinusDeltaE : sigmaDeltaE)
13 , m_sigmaPlusDeltaE(sPlusDeltaE > 0.0 ? sPlusDeltaE : sigmaDeltaE)
18 , m_length(-std::numeric_limits<double>::min())
22 inline EnergyLoss::EnergyLoss(double deltaE,
32 , m_sigmaDeltaE(sigmaDeltaE)
33 , m_sigmaMinusDeltaE(sMinusDeltaE)
34 , m_sigmaPlusDeltaE(sPlusDeltaE)
35 , m_mean_ioni(mean_ioni)
36 , m_sig_ioni(sig_ioni)
37 , m_mean_rad(mean_rad)
43 inline EnergyLoss::EnergyLoss(double deltaE,
50 , m_sigmaDeltaE(sigmaDeltaE)
51 , m_sigmaMinusDeltaE(0.)
52 , m_sigmaPlusDeltaE(0.)
53 , m_mean_ioni(mean_ioni)
54 , m_sig_ioni(sig_ioni)
55 , m_mean_rad(mean_rad)
57 , m_length(-std::numeric_limits<double>::min())
62 EnergyLoss::clone() const
64 return new EnergyLoss(*this);
68 EnergyLoss::deltaE() const
74 EnergyLoss::sigmaDeltaE() const
80 EnergyLoss::sigmaMinusDeltaE() const
82 return m_sigmaMinusDeltaE;
86 EnergyLoss::sigmaPlusDeltaE() const
88 return m_sigmaPlusDeltaE;
92 EnergyLoss::meanIoni() const
98 EnergyLoss::sigmaIoni() const
104 EnergyLoss::meanRad() const
110 EnergyLoss::sigmaRad() const
116 EnergyLoss::length() const
119 } // length can be positive and negative like Eloss depending on (back)tracking
122 EnergyLoss::update(double ioni, double sigi, double rad, double sigr, bool mpv)
128 m_deltaE += mpv ? 0.9 * ioni + 0.15 * rad : ioni + rad;
129 m_sigmaDeltaE = std::sqrt(m_sig_ioni * m_sig_ioni + m_sig_rad * m_sig_rad);
133 EnergyLoss::update(const EnergyLoss& eloss, bool mpv)
135 m_mean_ioni += eloss.meanIoni();
136 m_mean_rad += eloss.meanRad();
137 m_sig_ioni += eloss.sigmaIoni();
138 m_sig_rad += eloss.sigmaRad();
139 m_deltaE += mpv ? 0.9 * eloss.meanIoni() + 0.15 * eloss.meanRad()
140 : eloss.meanIoni() + eloss.meanRad();
141 m_sigmaDeltaE = std::sqrt(m_sig_ioni * m_sig_ioni + m_sig_rad * m_sig_rad);
145 EnergyLoss::set(double eloss,
156 m_deltaE = ioni + rad + 0 * eloss;
157 m_sigmaDeltaE = std::sqrt(m_sig_ioni * m_sig_ioni + m_sig_rad * m_sig_rad +