9 #include <generators/modules/CosmicsModule.h>
10 #include <framework/datastore/StoreArray.h>
11 #include <boost/assign/std/vector.hpp>
15 using namespace boost::assign;
29 setDescription(
"cosmics generator to generate cosmic ray tracks");
32 m_parameters.level = 1;
33 m_parameters.ipRequirement = 0;
34 m_parameters.ipdr = 3.;
35 m_parameters.ipdz = 3.;
36 m_parameters.ptmin = 0.7;
37 m_parameters.cylindricalR = 125.0;
40 addParam(
"level", m_parameters.level,
41 "level of the generator (1 or 2 with slightly different kinematic distributions and mu+/mu- ratio), default is 1",
43 addParam(
"ipRequirement", m_parameters.ipRequirement,
44 "Radial and longitudinal constraints near the Interaction Point can be required (ipRequirement == 1), default is 0 (no additional IP requirements)",
45 m_parameters.ipRequirement);
46 addParam(
"ipdr", m_parameters.ipdr,
47 "Constraint on the radial distance from the IP in cm, default is 3.", m_parameters.ipdr);
48 addParam(
"ipdz", m_parameters.ipdz,
49 "Constraint on the longitudinal distance from the IP in cm, default is 3, default is 3.", m_parameters.ipdz);
50 addParam(
"ptmin", m_parameters.ptmin,
51 "Minimal value of the transverse momentum in GeV, default is 0.7", m_parameters.ptmin);
52 addParam(
"cylindricalR", m_parameters.cylindricalR,
53 "Radius of tube around detector at whose surface particles are generated (in cm), default is 125, but this does not include whole Belle 2 detector!",
54 m_parameters.cylindricalR);
57 void CosmicsModule::initialize()
63 m_cosmics.setParameters(m_parameters);
67 void CosmicsModule::event()
70 m_particleGraph.clear();
71 m_cosmics.generateEvent(m_particleGraph);
72 m_particleGraph.generateList();
73 }
catch (runtime_error& e) {
The Cosmics module Generates tracks with the cosmics generator and store them into the MCParticle cla...
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.