26 using namespace CLHEP;
32 throw cms::Exception(
"Configuration") <<
"The BaseEvtVtxGenerator requires the RandomNumberGeneratorService\n" 33 "which is not present in the configuration file. \n" 34 "You must add the service\n" 35 "in the configuration file or remove the modules that require it.";
38 sourceToken = consumes<edm::HepMCProduct>(
pset.getParameter<
edm::InputTag>(
"src"));
39 produces<edm::HepMCProduct>();
50 evt.
getByToken(sourceToken, HepUnsmearedMCEvt);
57 HepMCEvt->applyVtxGen(newVertex(engine));
60 HepMCEvt->boostToLab(GetInvLorentzBoost(),
"vertex");
61 HepMCEvt->boostToLab(GetInvLorentzBoost(),
"momentum");
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void produce(edm::Event &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
BaseEvtVtxGenerator(const edm::ParameterSet &)
StreamID streamID() const
const HepMC::GenEvent * GetEvent() const
~BaseEvtVtxGenerator() override