10 #include <arich/modules/arichRateCal/ARICHRateCalModule.h>
11 #include <arich/dataobjects/ARICHThParam.h>
12 #include <arich/dataobjects/ARICHRawDigit.h>
13 #include <arich/dataobjects/ARICHInfo.h>
16 #include <framework/dataobjects/EventMetaData.h>
17 #include <framework/datastore/StoreArray.h>
18 #include <framework/datastore/StoreObjPtr.h>
51 addParam(
"nrun", m_nrun,
"# of scan runs", 100);
52 addParam(
"nevents", m_nevents,
"# of events per run", 1000);
56 addParam(
"debug", m_debugmode,
"debug mode",
false);
57 addParam(
"internal", m_internalmode,
"Internal thscan mode",
false);
58 addParam(
"daqdb", m_daqdb,
"daqdb config name", std::string(
""));
86 B2WARNING(
"dth is set to 0");
88 for (
int i = 0; i < 100; i++) {
89 h_rate2D[i] =
new TH2F(Form(
"h_rate2D_%d", i), Form(
"MRG#%d;Channel ID; Vth [mV]", i), 144 * 6, -0.5, -0.5 + 144 * 6,
90 m_nrun, (m_th0 - 0.5 * m_dth) * 1000, (m_th0 + (m_nrun - 0.5)*m_dth) * 1000);
108 int runno = evtmetadata->getRun();
109 if (runno == 100 && !m_internalmode) {
118 if (!arichinfo->getthscan_mode())
return;
119 double vth_thscan = arichinfo->getvth_thscan();
123 int runno = evtmetadata->getRun();
128 for (
auto& rawdigit : rawdigits) {
129 const int mrgid = rawdigit.getBoardId();
132 std::vector<ARICHRawDigit::FEBDigit>& febs(rawdigit.getFEBs());
133 for (
auto& feb : febs) {
134 const int febno = feb.febno;
135 std::vector<ARICHRawDigit::FEBDigit::ChannelDigit>& channels(feb());
136 for (
auto& channel : channels) {
137 if (channel.val > 0) {
139 double vth = m_internalmode ? vth_thscan * 1000 : param.getVth() * 1000 ;
140 h_rate2D[mrgid]->Fill(channel.chno + febno * 144, vth);
148 if (m_evt_count == m_nevents) {
ARICHThParam class for storing photon hit information.
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
virtual void terminate() override
Function to terminate module.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Accessor to arrays stored in the data store.
Type-safe access to single objects in the data store.
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
ARICHRateCalModule()
Constructor.
virtual void beginRun() override
Called when entering a new run.
REG_MODULE(arichBtest)
Register the Module.
virtual ~ARICHRateCalModule()
Destructor.
virtual void defineHisto() override
Function to define histograms.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Abstract base class for different kinds of events.