58 edm::
InputTag(iConfig.getUntrackedParameter(
"moduleLabel",
std::
string(
"generator")),
"unsmeared"))) {
67 std::ostringstream
str;
68 str <<
"=========================================================\n" 69 <<
"Filter MCZll being constructed with parameters: " 72 <<
"\nzMassMax " <<
zMassRange_.second <<
"\n=========================================================";
75 produces<HepMCProduct>();
79 std::unique_ptr<HepMCProduct> bare_product(
new HepMCProduct());
81 bool accepted =
false;
87 if (myGenEvent->signal_process_id() != 1) {
95 for (HepMC::GenEvent::particle_iterator
p = myGenEvent->particles_begin();
p != myGenEvent->particles_end(); ++
p) {
96 if (!accepted && ((*p)->pdg_id() == 23) && (*p)->status() == 3) {
98 HepMC::GenVertex*
zVertex =
new HepMC::GenVertex();
104 std::vector<HepMC::GenParticle*>
children;
105 HepMC::GenVertex* outVertex = (*p)->end_vertex();
106 for (HepMC::GenVertex::particles_out_const_iterator iter = outVertex->particles_out_const_begin();
107 iter != outVertex->particles_out_const_end();
110 std::vector<HepMC::GenParticle*>::const_iterator aDaughter;
111 for (aDaughter =
children.begin(); aDaughter !=
children.end(); aDaughter++) {
113 zVertex->add_particle_out(myDa);
114 if ((*aDaughter)->status() == 2)
138 bare_product->addHepMCData(zEvent);
141 LogDebug(
"MCZll") <<
"Event " <<
iEvent.id().event() <<
" accepted" << std::endl;
Log< level::Info, true > LogVerbatim
const edm::EDGetTokenT< edm::HepMCProduct > token_
T getUntrackedParameter(std::string const &, T const &) const
bool filter(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
const HepMC::GenEvent * GetEvent() const
std::pair< double, double > zMassRange_
MCZll(const edm::ParameterSet &)