9#include <beast/bgo/modules/BgoModule.h>
10#include <beast/bgo/dataobjects/BgoSimHit.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 "Useless parameter of type integer", 0);
38 "Useless parameter of type double", 0.0);
40 "Useless parameter of type string",
string(
""));
42 "Useless parameter of type vector<double>", vector<double>(3, 0));
50 B2INFO(
"Bgo: Initialize");
65 B2FATAL(
"Not all collections found, exiting processing");
71 B2INFO(
"Bgo: Begin of new run");
77 B2INFO(
"Bgo: Event is being processed");
104 for (
int i = 0; i < nMCParticles; ++i) {
109 BOOST_FOREACH(
const relMCSimHit_Element & relation, relMCSimHit.
getElementsFrom(mcp)) {
110 B2INFO(
"MCParticle #" << i <<
" created the AwesomSimHit #" << relation.indexTo
111 <<
" which has an energy deposition of " << relation.to->getEnergyDep());
118 B2INFO(
"Bgo: End of run");
125 B2INFO(
"Bgo: Terminate");
A Class to store the Monte Carlo particle information.
void setDescription(const std::string &description)
Sets the description of the module.
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.
Accessor to arrays stored in the data store.
int getEntries() const
Get the number of objects in the array.
virtual void event()
Called for every end run.
virtual void initialize()
Init the module.
std::string m_stringParameter
Useless variable showing how to create string parameters.
virtual void beginRun()
Called for every begin run.
virtual void terminate()
Called on termination.
virtual void endRun()
Called for every end run.
double m_doubleParameter
Useless variable showing how to create double parameters.
int m_intParameter
Useless variable showing how to create integer parameters.
std::vector< double > m_doubleListParameter
Useless variable showing how to create array parameters.
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.
Namespace to encapsulate code needed for the BGO detector.
Abstract base class for different kinds of events.
Element type for the index.