10#include <top/modules/TOPChannelT0MC/TOPChannelT0MCModule.h>
13#include <framework/datastore/StoreArray.h>
16#include <framework/database/DBStore.h>
42 std::vector<double> frange = {100, 0., 1.};
61 unsigned channel = digit.getChannel();
62 if (channel < c_NumChannels) {
66 ss <<
"chan" << channel ;
69 string title =
"Times " + name;
74 histo->Fill(digit.getTime());
82 auto otree =
new TTree(
"t0MC",
"extract channel t0 info. from MC");
87 otree->Branch(
"maxpos", &maxpos,
"maxpos/D");
88 otree->Branch(
"channel", &channel,
"channel/I");
90 for (
int i = 0; i < c_NumChannels; i++) {
92 maxpos =
m_histo[i]->GetXaxis()->GetBinCenter(
m_histo[i]->GetMaximumBin());
void setDescription(const std::string &description)
Sets the description of the module.
std::vector< double > m_fitRange
fit range [nbins, xmin, xmax]
std::string m_outputFile
output root file name
StoreArray< TOPDigit > m_digits
collection of digits
TH1F * m_histo[c_NumChannels]
profile histograms
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
virtual void terminate() override
Termination action.
TOPChannelT0MCModule()
Constructor.
Abstract base class for different kinds of events.