15#include <fairlogger/Logger.h>
29 mParamDescr.emplace_back(
"TestDefault");
30 std::array<std::array<float, NMAXPAR>, NDDL>
a;
31 for (
int iDDL = 0; iDDL < NDDL; iDDL++) {
37 mParamSets.emplace_back(
a);
38 mCurrentSet = mParamSets[0];
44 mParamDescr.emplace_back(versionName);
45 mParamSets.emplace_back(
params);
50 if (
static_cast<std::size_t
>(
v) >= mParamDescr.size()) {
51 LOG(error) <<
"impossible parameterization " <<
v;
52 LOG(error) <<
"Available are:";
53 for (std::size_t
i = 0;
i < mParamDescr.size();
i++) {
54 LOG(error) <<
i <<
" : " << mParamDescr[
i];
56 LOG(error) <<
" keep current " << mParamDescr[mVersion];
60 LOG(info) <<
"Will use parameterization " << mParamDescr[mVersion];
61 mCurrentSet = mParamSets[mVersion];
67 while (
static_cast<std::size_t
>(mVersion) < mParamDescr.size()) {
68 if (versionName.compare(mParamDescr[mVersion]) == 0.) {
74 LOG(error) <<
"Can not fine parameterization " << versionName;
75 LOG(error) <<
"Available are:";
76 for (std::size_t
i = 0;
i < mParamDescr.size();
i++) {
77 LOG(error) <<
i <<
" : " << mParamDescr[
i];
85 if (mCurrentSet.size() == 0) {
86 LOG(error) <<
"Parameteriztion not chosen";
90 return mCurrentSet[ddl][0] / (TMath::Exp((mCurrentSet[ddl][1] - e) / mCurrentSet[ddl][2]) + 1.) +
91 (1. - mCurrentSet[ddl][0]) / (TMath::Exp((mCurrentSet[ddl][3] - e) / mCurrentSet[ddl][4]) + 1.);
100 short iTRU =
module * 4 + ix / 16 - 6;
108 short iTRU =
module * 4 + ix / 16 - 6;
static short truRelToAbsNumbering(const char *relId, short trigType)
float L0triggerProbability(float e, short ddl) const
void setTurnOnCurvesVestion(int v=0)
bool isFiredMC2x2(float a, short iTRU, short ix, short iz) const
random return true with probability to fire trigger
bool isFiredMC4x4(float a, short iTRU, short ix, short iz) const
random return true with probability to fire trigger
bool isGood2x2(short cellID) const
tests if cell is in active trigger region
void addTurnOnCurvesParams(std::string_view versionName, std::array< std::array< float, 10 >, 14 > ¶ms)
bool try2x2(float a, short iTRU) const
bool selectTurnOnCurvesParams(std::string_view versionName)
bool try4x4(float a, short iTRU) const
TriggerMap()=default
Constructor.
bool isGood4x4(short cellID) const
tests if cell is in active trigger region
GLenum const GLfloat * params
GLboolean GLboolean GLboolean GLboolean a
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"