9 #include <beast/claws/modules/CLAWSModule.h>
10 #include <beast/claws/dataobjects/CLAWSSimHit.h>
11 #include <mdst/dataobjects/MCParticle.h>
12 #include <framework/datastore/StoreArray.h>
13 #include <framework/datastore/RelationArray.h>
14 #include <framework/datastore/RelationIndex.h>
15 #include <framework/logging/Logger.h>
16 #include <boost/foreach.hpp>
36 setDescription(
"Creates CLAWS crystals - sub-detector of BEASTII");
41 addParam(
"intParameter", m_intParameter,
42 "Useless parameter of type integer", 0);
43 addParam(
"doubleParameter", m_doubleParameter,
44 "Useless parameter of type double", 0.0);
45 addParam(
"stringParameter", m_stringParameter,
46 "Useless parameter of type string",
string(
""));
47 addParam(
"doubleListParameter", m_doubleListParameter,
48 "Useless parameter of type vector<double>", vector<double>(3, 0));
54 void CLAWSModule::initialize()
56 B2INFO(
"CLAWS: Initialize");
71 B2FATAL(
"Not all collections found, exiting processing");
75 void CLAWSModule::beginRun()
77 B2INFO(
"CLAWS: Begin of new run");
81 void CLAWSModule::event()
83 B2INFO(
"CLAWS: Event is being processed");
110 for (
int i = 0; i < nMCParticles; ++i) {
115 BOOST_FOREACH(
const relMCSimHit_Element & relation, relMCSimHit.
getElementsFrom(mcp)) {
116 B2INFO(
"MCParticle #" << i <<
" created the AwesomSimHit #" << relation.indexTo
117 <<
" which has an energy deposition of " << relation.to->getEnergyDep());
122 void CLAWSModule::endRun()
124 B2INFO(
"CLAWS: End of run");
129 void CLAWSModule::terminate()
131 B2INFO(
"CLAWS: Terminate");
A Class to store the Monte Carlo particle information.
Low-level class to create/modify relations between StoreArrays.
Provides access to fast ( O(log n) ) bi-directional lookups on a specified relation.
range_from getElementsFrom(const FROM *from) const
Return a range of all elements pointing from the given object.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
int getEntries() const
Get the number of objects in the array.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.
Element type for the index.