73 bool passLoop =
false;
88 for (
int i = 0;
i < 10000;
i++) {
90 vy = (pt * dxy + vx * py) / px;
91 lxy =
sqrt(vx * vx + vy * vy);
101 mass = (
fMasterGen->particleData).m0(particleID);
103 double pp = pt /
sin(theta);
104 ee =
sqrt(pp * pp + mass * mass);
106 pz = pp *
cos(theta);
109 for (
int j = 0;
j < 100;
j++) {
112 if (v0 <= 0 || lxy * lxy / (coneTheta * coneTheta) > v0 * v0) {
119 passLoop = (passLxy && passLz);
125 float time =
sqrt(vx * vx + vy * vy + vz * vz);
127 if (!((
fMasterGen->particleData).isParticle(particleID))) {
132 else if (
std::abs(particleID) == 21)
133 (
fMasterGen->event).append(21, 23, 101, 102, px, py, pz, ee, mass);
142 (
fMasterGen->event).back().vProd(vx, vy, vz, time);
150 (
fMasterGen->event).
append(-particleID, 23, 0, 101, -px, -py, -pz, ee, mass);
151 }
else if (
std::abs(particleID) == 21) {
154 if ((
fMasterGen->particleData).isParticle(-particleID)) {
164 (
fMasterGen->event).back().vProd(-vx, -vy, -vz, time);
172 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.