12 hepMCProductTag_(iConfig.getUntrackedParameter<
edm::
InputTag>(
"hepMCProductTag",
edm::
InputTag(
"generator",
"unsmeared"))) {
40 HepMC::GenEvent::particle_const_iterator
p;
42 for (p = generated_event->particles_begin(); p != generated_event->particles_end(); p++)
45 if(((*p)->production_vertex() !=
nullptr) && ((*p)->end_vertex()!=
nullptr))
47 float dist =
sqrt((((*p)->production_vertex())->
position().x()-((*p)->end_vertex())->
position().x())*(((*p)->production_vertex())->
position().x()-((*p)->end_vertex())->
position().x())+
48 (((*p)->production_vertex())->
position().y()-((*p)->end_vertex())->
position().y())*(((*p)->production_vertex())->
position().y()-((*p)->end_vertex())->
position().y()));
53 if(((*p)->production_vertex()==
nullptr) && (!((*p)->end_vertex()!=
nullptr)))
T getUntrackedParameter(std::string const &, T const &) const
bool filter(edm::Event &, const edm::EventSetup &) override
edm::InputTag hepMCProductTag_
MCLongLivedParticles(const edm::ParameterSet &)
~MCLongLivedParticles() override
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const HepMC::GenEvent * GetEvent() const
static int position[264][3]