11 #include "HepMC/GenRanges.h" 12 #include "CLHEP/Units/GlobalSystemOfUnits.h" 13 #include "CLHEP/Random/RandomEngine.h" 16 src_(iPSet.getParameter<
edm::InputTag>(
"src")),
17 baseSZ_(iPSet.getParameter<double>(
"baseSZ")*cm),
18 baseZ0_(iPSet.getParameter<double>(
"baseZ0")*cm),
19 newSZ_(iPSet.getParameter<double>(
"newSZ")*cm),
20 newZ0_(iPSet.getParameter<double>(
"newZ0")*cm)
25 <<
"The GaussianZBeamSpotFilter requires the RandomNumberGeneratorService\n" 26 "which is not present in the configuration file. You must add the service\n" 27 "in the configuration file or remove the modules that require it.";
56 HepMC::GenEvent::vertex_const_iterator vitr= HepMCEvt->
GetEvent()->vertex_range().begin();
58 if ( vitr != HepMCEvt->
GetEvent()->vertex_range().end() ) {
60 double vtxZ = (*vitr)->point3d().z();
62 if ( engine.flat() > gaussRatio ) { pass =
false; }
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
~GaussianZBeamSpotFilter() override
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool filter(edm::Event &, const edm::EventSetup &) override
const HepMC::GenEvent * GetEvent() const
GaussianZBeamSpotFilter(const edm::ParameterSet &)
StreamID streamID() const