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.};
71 unsigned channel = digit.getChannel();
72 if (channel < c_NumChannels) {
76 ss <<
"chan" << channel ;
79 string title =
"Times " + name;
84 histo->Fill(digit.getTime());
96 auto otree =
new TTree(
"t0MC",
"extract channel t0 info. from MC");
101 otree->Branch(
"maxpos", &maxpos,
"maxpos/D");
102 otree->Branch(
"channel", &channel,
"channel/I");
104 for (
int i = 0; i < c_NumChannels; i++) {
106 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 endRun() override
End-of-run action.
virtual void terminate() override
Termination action.
TOPChannelT0MCModule()
Constructor.
virtual void beginRun() override
Called when entering a new run.
virtual ~TOPChannelT0MCModule()
Destructor.
Abstract base class for different kinds of events.