Skip to content
Snippets Groups Projects
Commit e579ec5f authored by Felix Weiglhofer's avatar Felix Weiglhofer
Browse files

StsPhysics: Add getter for landau table.

parent f45ec1c0
No related branches found
No related tags found
1 merge request!1070Move STS Gpu Hitfinder into algo namespace.
...@@ -188,6 +188,30 @@ Double_t CbmStsPhysics::LandauWidth(Double_t mostProbableCharge) ...@@ -188,6 +188,30 @@ Double_t CbmStsPhysics::LandauWidth(Double_t mostProbableCharge)
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
std::pair<std::vector<double>, double> CbmStsPhysics::GetLandauWidthTable() const
{
std::vector<double> landauTableFlat;
auto landauEntry = fLandauWidth.begin();
landauTableFlat.push_back(landauEntry->second);
auto prevLandauEntry = landauEntry;
landauEntry++;
double stepSize = landauEntry->first - prevLandauEntry->first;
for (; landauEntry != fLandauWidth.end(); landauEntry++) {
LOG_IF(fatal, stepSize != landauEntry->first - prevLandauEntry->first)
<< "StsLandau table doesn't have fixed step size.";
landauTableFlat.push_back(landauEntry->second);
prevLandauEntry = landauEntry;
}
return std::make_pair(std::move(landauTableFlat), stepSize);
}
// ----- Particle charge for PDG PID ---------------------------------- // ----- Particle charge for PDG PID ----------------------------------
Double_t CbmStsPhysics::ParticleCharge(Int_t pid) Double_t CbmStsPhysics::ParticleCharge(Int_t pid)
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
#include <RtypesCore.h> // for Double_t, Int_t, Bool_t #include <RtypesCore.h> // for Double_t, Int_t, Bool_t
#include <map> // for map #include <map> // for map
#include <utility>
#include <vector>
/** @class CbmStsPhysics /** @class CbmStsPhysics
** @brief Auxiliary class for physics processes in Silicon ** @brief Auxiliary class for physics processes in Silicon
...@@ -88,8 +90,10 @@ public: ...@@ -88,8 +90,10 @@ public:
**/ **/
Double_t LandauWidth(Double_t mostProbableCharge); Double_t LandauWidth(Double_t mostProbableCharge);
std::map<Double_t, Double_t> GetLandauWidthTable() const { return fLandauWidth; } /** @brief Raw values of landau width interpolation table
** @return interpolation table values and step size of table
**/
std::pair<std::vector<double>, double> GetLandauWidthTable() const;
/** @brief Energy for electron-hole pair creation in silicon /** @brief Energy for electron-hole pair creation in silicon
** @return Pair creation energy [GeV] ** @return Pair creation energy [GeV]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment