10#include <klm/dbobjects/bklm/BKLMSimulationPar.h>
13#include <framework/gearbox/GearDir.h>
14#include <framework/logging/Logger.h>
33 B2FATAL(
"The GearDir to look for BKLM simulation parameters is not valid.");
39 for (
int div = 0; div <=
c_NDIV; ++div) {
49 phiContent.
append(
"/RPCStripMultiplicity/Phi");
52 for (
int div = 0; div < nDiv; ++div) {
53 sprintf(name,
"/Division[@id=\"%d\"]", div);
59 for (
int j = 1; j <= nWeight; ++j) {
60 sprintf(name,
"/Weight[@multiplicity=\"%d\"]", j);
62 weight[j] = divContent.
getDouble(name) + weight[j - 1];
63 weight[0] = weight[j];
71 zContent.
append(
"/RPCStripMultiplicity/Z");
74 for (
int div = 0; div < nDiv; ++div) {
75 sprintf(name,
"/Division[@id=\"%d\"]", div);
81 for (
int j = 1; j <= nWeight; ++j) {
82 sprintf(name,
"/Weight[@multiplicity=\"%d\"]", j);
84 weight[j] = divContent.
getDouble(name) + weight[j - 1];
85 weight[0] = weight[j];
99 int stripIndex = (int) fabs(stripDiv *
c_NDIV / 0.5);
111 int stripIndex = (int) fabs(stripDiv *
c_NDIV / 0.5);
double m_PhiMultiplicityCDF[c_NDIV+1][c_MAX_NHIT]
RPC phiStrip multiplicity cumulative probability distribution table.
~BKLMSimulationPar()
Default destructor.
static const int c_MAX_NHIT
Maximum number of hits.
static const int c_NDIV
Number of divisions.
double m_ZWeight[c_NDIV+1][c_MAX_NHIT]
RPC zStrip weight table.
double m_ZMultiplicityCDF[c_NDIV+1][c_MAX_NHIT]
RPC zStrip multiplicity cumulative probability distribution table.
int m_NZDiv
Number of division for zstrips.
double getZMultiplicityCDF(double stripDiv, int mult) const
Get the RPC z-strip cumulative prob density function.
double getPhiMultiplicityCDF(double stripDiv, int mult) const
Get the RPC phi-strip cumulative prob density function.
BKLMSimulationPar()
Default constructor.
double m_PhiWeight[c_NDIV+1][c_MAX_NHIT]
RPC phiStrip weight table.
double m_HitTimeMax
Maximum global time for a recorded sim hit.
int m_NPhiDiv
Number of division for phistrips.
int m_NPhiMultiplicity[c_NDIV+1]
Number of kind of multiplicity of phistrips in each division.
void read(const GearDir &)
Get simulation parameters from Gearbox.
int m_NZMultiplicity[c_NDIV+1]
Number of weights of zstrips in each division.
GearDir is the basic class used for accessing the parameter store.
void append(const std::string &path)
Append something to the current path, modifying the GearDir in place.
virtual int getNumberNodes(const std::string &path="") const override
Return the number of nodes a given path will expand to.
double getDouble(const std::string &path="") const noexcept(false)
Get the parameter path as a double.
Abstract base class for different kinds of events.