12#define BOOST_TEST_MODULE Test decay step of Generator
13#define BOOST_TEST_MAIN
14#define BOOST_TEST_DYN_LINK
15#include <boost/test/unit_test.hpp>
32const std::string FORCE =
"4232:mayDecay = on\n4232:onMode = off\n4232:oneChannel = 1 1.0 0 3324 211\n4232:tau0 = 0.1358\n";
34std::string writeCfg(std::string
const& text)
36 char name[] =
"/tmp/test_GeneratorEventDecayer_XXXXXX";
37 int fd = mkstemp(
name);
39 std::ofstream out(
name);
47 static const std::string forcePath = writeCfg(FORCE);
49 ";EventDecayer.enable=" + (
enable ?
"true" :
"false"));
61 for (
int i = 0;
i < (int)
tracks.size(); ++
i) {
63 if (
t.GetPdgCode() == 4232) {
68 if (
t.GetPdgCode() == 3324) {
70 int m =
t.getMotherTrackId();
71 BOOST_REQUIRE(
m >= 0 &&
m < (
int)
tracks.size());
75 double r = std::sqrt(
t.Vx() *
t.Vx() +
t.Vy() *
t.Vy() +
t.Vz() *
t.Vz());
77 for (
int d =
t.getFirstDaughterTrackId();
d >= 0 &&
d <=
t.getLastDaughterTrackId(); ++
d) {
86 auto summary =
header.getInfo<std::string>(
"eventDecayer",
valid);
88 BOOST_CHECK(summary.find(
"pythia8/decays/base.cfg") != std::string::npos);
94 BOOST_REQUIRE_EQUAL(
tracks.size(), 5);
std::vector< std::string > header
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events d
std::vector< o2::its::TrackITS > tracks
Definition of the MCTrack class.
static void updateFromString(std::string const &)
A class offering convenient generator configuration and encapsulation of lower level classes....
std::pair< std::vector< MCTrack >, o2::dataformats::MCEventHeader > generateEvent()
void initService(std::string const &generatorName, std::string const &triggerName, VertexOption const &vtxOption)
GLuint const GLchar * name
int getHepMCStatusCode(MCGenStatusEncoding enc)
BOOST_AUTO_TEST_CASE(decay_step_on)
BOOST_CHECK_EQUAL(triggersD.size(), triggers.size())