9#include <generators/modules/cryinput/CRYInputModule.h>
11#include <framework/datastore/StoreArray.h>
12#include <framework/gearbox/Unit.h>
13#include <framework/utilities/FileSystem.h>
37The showers will be generated in the xz plane in a square plane of n bt n meters
38centered at the IP (n can be choosen with the boxLength parameter). Then the
39cosmics will be propagated from there to the boundary of the detector world volume.
41Finally, if the track would intersect with the acceptance volume the track is
42kept. The acceptance volume can be either a sphere, a cylinder or a box centered
43at the IP. This depends on how many values are given to the acceptance parameter.
46data for CRY. Empty string will look in the default location)DOC", std::string(""));
501. one value being the radius of a sphere
512. two values for the radius (in xy) and the half-length (in z) of a cylinder
523. three values for x,y,z half-length of a box
54All volumes are centered around the IP. All values are in cm)DOC", m_acceptance);
60the xz plane in which CRY will generate cosmics in cm. Will be rounded down to
61meters. According to the CRY documentation good values are 1, 3, 10, 30, 100 and
62300m but anything in between should work as well. The default is 100m and should
63be fine for almost all use cases.)DOC", m_boxLength);
64 addParam("date",
m_date, R
"DOC(Date used for the generation: a string in the form of
65'month-date-year'. The cosmic-ray distribution is adjusted to account for the eleven
66year, sunspot cycle (the default solar minimum date is January 1, 2008).)DOC", m_date);
89 if (m_boxLength < 100 or m_boxLength > 30000) {
90 B2FATAL(
"Box length should be between 100 and 30000 cm (1 to 300 m)");
void setReturnKaons(bool kaons)
Set whether or not CRY should return kaons.
void setDate(const std::string &date)
Sets the date used for generation (the cosmic-ray distribution is adjusted to account for the eleven ...
void setTimeOffset(double timeoffset)
Sets the time offset.
void setMaxTrials(int maxtrials)
Sets the maximum number of trials.
void setReturnProtons(bool protons)
Set whether or not CRY should return protons.
void setBoxLength(double length)
Set the size of the square nxn plane where CRY generates cosmics.
void setReturnGammas(bool gammas)
Set whether or not CRY should return gammas.
void setReturnElectrons(bool electrons)
Set whether or not CRY should return electrons.
void setCosmicDataDir(const std::string &cosmicdatadir)
Sets the directory that holds cosmic data.
void setReturnMuons(bool muons)
Set whether or not CRY should return muons.
void setReturnNeutrons(bool neutrons)
Set whether or not CRY should return neutrons.
void setKineticEnergyThreshold(double kineticenergythreshold)
Sets the kinetic energy threshold, particles below that value will be ignored.
void setReturnPions(bool pions)
Set whether or not CRY should return pions.
void setAcceptance(const std::vector< double > &size)
Sets the size of the acceptance volume.
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
void generateList(const std::string &name="", int options=c_setNothing)
Generates the MCParticle list and stores it in the StoreArray with the given name.
void setDescription(const std::string &description)
Sets the description of the module.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
Accessor to arrays stored in the data store.
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.
void init()
Initializes the generator.
void generateEvent(MCParticleGraph &mcGraph)
Generates one single event.
void term()
Terminates the generator.
void clear()
Reset particles and decay information to make the class reusable.
Abstract base class for different kinds of events.