|
19 | 19 |
|
20 | 20 | #include "TPCSimulation/Point.h" |
21 | 21 | #include "TPCBase/Sector.h" |
| 22 | +#include "DataFormatsTPC/BetheBlochAleph.h" |
22 | 23 |
|
23 | 24 | class FairVolume; // lines 10-10 |
24 | 25 |
|
@@ -115,7 +116,10 @@ class Detector : public o2::base::DetImpl<Detector> |
115 | 116 | /// @param kp* Parameters for the ALICE TPC |
116 | 117 | /// @return Bethe-Bloch value in MIP units |
117 | 118 | template <typename T> |
118 | | - static T BetheBlochAleph(T bg, T kp1, T kp2, T kp3, T kp4, T kp5); |
| 119 | + static T BetheBlochAleph(T bg, T kp1, T kp2, T kp3, T kp4, T kp5) |
| 120 | + { |
| 121 | + return o2::tpc::BetheBlochAleph(bg, kp1, kp2, kp3, kp4, kp5); |
| 122 | + } |
119 | 123 |
|
120 | 124 | /// Copied from AliRoot - should go to someplace else |
121 | 125 | /// Function to generate random numbers according to Gamma function |
@@ -188,18 +192,6 @@ class Detector : public o2::base::DetImpl<Detector> |
188 | 192 | ClassDefOverride(Detector, 1); |
189 | 193 | }; |
190 | 194 |
|
191 | | -template <typename T> |
192 | | -inline T Detector::BetheBlochAleph(T bg, T kp1, T kp2, T kp3, T kp4, T kp5) |
193 | | -{ |
194 | | - T beta = bg / std::sqrt(static_cast<T>(1.) + bg * bg); |
195 | | - |
196 | | - T aa = std::pow(beta, kp4); |
197 | | - T bb = std::pow(static_cast<T>(1.) / bg, kp5); |
198 | | - bb = std::log(kp3 + bb); |
199 | | - |
200 | | - return (kp2 - aa - bb) * kp1 / aa; |
201 | | -} |
202 | | - |
203 | 195 | } // namespace tpc |
204 | 196 | } // namespace o2 |
205 | 197 |
|
|
0 commit comments