87 produces<edm::HepMCProduct>();
88 produces<edm::LHCTransportLinkContainer>();
92 if (m_transportMethod ==
"Totem") {
94 }
else if (m_transportMethod ==
"Hector") {
98 <<
"LHCTransport (ProtonTransport) requires a Method (Hector or Totem) \n" 99 "which is not present in the configuration file. You should add one of the method\n" 100 "above in the configuration file or remove the module that requires it.";
106 <<
"LHCTransport (ProtonTransport) requires the RandomNumberGeneratorService\n" 107 "which is not present in the configuration file. You must add the service\n" 108 "in the configuration file or remove the modules that require it.";
132 if (engine->name() !=
"TRandom3") {
133 throw cms::Exception(
"Configuration") <<
"The TRandom3 engine type must be used with ProtonTransport, Random " 134 "Number Generator Service not correctly configured!";
142 throw cms::Exception(
"InvalidReference") <<
"Invalid reference to HepMCProduct\n";
146 throw cms::Exception(
"LogicError") <<
"HectorTrasported HepMCProduce already exists\n";
158 newProduct->addHepMCData(evt);
164 (*NewCorrespondenceMap).swap(thisLink);
167 for (
unsigned int i = 0;
i < (*NewCorrespondenceMap).size();
i++)
168 LogDebug(
"HectorEventProcessing") <<
"Hector correspondence table: " << (*NewCorrespondenceMap)[
i];
T getParameter(std::string const &) const
void beginStream(edm::StreamID) override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
ProtonTransport * theTransporter
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
void produce(edm::Event &, const edm::EventSetup &) override
int m_eventsAnalysed
just to count events that have been analysed
#define DEFINE_FWK_MODULE(type)
void addDefault(ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< edm::HepMCProduct > m_InTagToken
std::vector< LHCTransportLink > & getCorrespondenceMap()
std::string m_transportMethod
PPSSimTrackProducer(const edm::ParameterSet &)
const HepMC::GenEvent * GetEvent() const
~PPSSimTrackProducer() override
std::string const & moduleLabel() const
StreamID streamID() const
std::vector< LHCTransportLink > LHCTransportLinkContainer
void endStream() override
virtual void process(const HepMC::GenEvent *ev, const edm::EventSetup &es, CLHEP::HepRandomEngine *engine)=0
Provenance const * provenance() const