9#include <beast/cave/modules/CaveModule.h>
10#include <beast/cave/dataobjects/CaveSimHit.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));
49 B2INFO(
"Cave: Initialize");
64 B2FATAL(
"Not all collections found, exiting processing");
70 B2INFO(
"Cave: Begin of new run");
76 B2INFO(
"Cave: Event is being processed");
103 for (
int i = 0; i < nMCParticles; ++i) {
108 BOOST_FOREACH(
const relMCSimHit_Element & relation, relMCSimHit.
getElementsFrom(mcp)) {
109 B2INFO(
"MCParticle #" << i <<
" created the AwesomSimHit #" << relation.indexTo
110 <<
" which has an energy deposition of " << relation.to->getEnergyDep());
117 B2INFO(
"Cave: End of run");
124 B2INFO(
"Cave: 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 CAVE detector.
Abstract base class for different kinds of events.
Element type for the index.