61 (
fMasterGen->event).
append(990, -11, 0, 0, 2, 1 + NTotParticles, 0, 0, 0., 0., 0., 15000., 15000.);
80 bool passLoop =
false;
95 for (
int i = 0;
i < 10000;
i++) {
97 vy = (pt * dxy + vx * py) / px;
98 lxy =
sqrt(vx * vx + vy * vy);
106 double theta = 2. * atan(
exp(-eta));
108 mass = (
fMasterGen->particleData).m0(particleID);
110 double pp = pt /
sin(theta);
111 ee =
sqrt(pp * pp + mass * mass);
113 pz = pp *
cos(theta);
116 for (
int j = 0;
j < 100;
j++) {
119 if (v0 <= 0 || lxy * lxy / (coneTheta * coneTheta) > v0 * v0) {
126 passLoop = (passLxy && passLz);
132 float time =
sqrt(vx * vx + vy * vy + vz * vz);
134 if (!((
fMasterGen->particleData).isParticle(particleID))) {
138 (
fMasterGen->event).
append(particleID, 23, 1, 0, 0, 0, 101, 0, px, py, pz, ee, mass);
139 else if (
std::abs(particleID) == 21)
140 (
fMasterGen->event).append(21, 23, 1, 0, 0, 0, 101, 102, px, py, pz, ee, mass);
143 (
fMasterGen->event).
append(particleID, 1, 1, 0, 0, 0, 0, 0, px, py, pz, ee, mass);
149 (
fMasterGen->event).back().vProd(vx, vy, vz, time);
157 (
fMasterGen->event).
append(-particleID, 23, 1, 0, 0, 0, 0, 101, -px, -py, -pz, ee, mass);
158 }
else if (
std::abs(particleID) == 21) {
159 (
fMasterGen->event).
append(21, 23, 1, 0, 0, 0, 102, 101, -px, -py, -pz, ee, mass);
161 if ((
fMasterGen->particleData).isParticle(-particleID)) {
162 (
fMasterGen->event).
append(-particleID, 1, 1, 0, 0, 0, 0, 0, -px, -py, -pz, ee, mass);
164 (
fMasterGen->event).
append(particleID, 1, 1, 0, 0, 0, 0, 0, -px, -py, -pz, ee, mass);
171 (
fMasterGen->event).back().vProd(-vx, -vy, -vz, time);
179 event() = std::make_unique<HepMC::GenEvent>();
static std::vector< std::string > checklist log
edm::GeneratorFilter< gen::Py8PtAndDxyGun, gen::ExternalDecayDriver > Pythia8PtAndDxyGun
#define DEFINE_FWK_MODULE(type)
boost::dynamic_bitset append(const boost::dynamic_bitset<> &bs1, const boost::dynamic_bitset<> &bs2)
this method takes two bitsets bs1 and bs2 and returns result of bs2 appended to the end of bs1 ...
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
Exp< T >::type exp(const T &t)
bool generatePartonsAndHadronize() override
Py8PtAndDxyGun(edm::ParameterSet const &)
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
std::unique_ptr< HepMC::GenEvent > & event()
std::vector< int > fPartIDs
~Py8PtAndDxyGun() override
P8RndmEngine & randomEngine()
T getParameter(std::string const &) const
HepMC::Pythia8ToHepMC toHepMC
std::unique_ptr< Pythia8::Pythia > fMasterGen
const char * classname() const override
tuple size
Write out results.