9 #include <beast/srsensor/modules/SrsensorModule.h>
10 #include <beast/srsensor/dataobjects/SrsensorSimHit.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 Synchroton Radiation senor - 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));
53 void SrsensorModule::initialize()
55 B2INFO(
"Srsensor: Initialize");
70 B2FATAL(
"Not all collections found, exiting processing");
74 void SrsensorModule::beginRun()
76 B2INFO(
"Srsensor: Begin of new run");
80 void SrsensorModule::event()
82 B2INFO(
"Srsensor: Event is being processed");
109 for (
int i = 0; i < nMCParticles; ++i) {
114 BOOST_FOREACH(
const relMCSimHit_Element & relation, relMCSimHit.
getElementsFrom(mcp)) {
115 B2INFO(
"MCParticle #" << i <<
" created the AwesomSimHit #" << relation.indexTo
116 <<
" which has an energy deposition of " << relation.to->getEnergyDep());
121 void SrsensorModule::endRun()
123 B2INFO(
"Srsensor: End of run");
128 void SrsensorModule::terminate()
130 B2INFO(
"Srsensor: 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.