41 #include "CLHEP/Random/RandomEngine.h" 80 : theTransporter(iConfig, consumesCollector()) {
88 produces<edm::HepMCProduct>();
89 produces<edm::LHCTransportLinkContainer>();
92 if (!rng.isAvailable()) {
94 <<
"LHCTransport (ProtonTransport) requires the RandomNumberGeneratorService\n" 95 "which is not present in the configuration file. You must add the service\n" 96 "in the configuration file or remove the modules that require it.";
111 if (engine->name() !=
"TRandom3") {
112 throw cms::Exception(
"Configuration") <<
"The TRandom3 engine type must be used with ProtonTransport, Random " 113 "Number Generator Service not correctly configured!";
121 throw cms::Exception(
"InvalidReference") <<
"Invalid reference to HepMCProduct\n";
125 throw cms::Exception(
"LogicError") <<
"LHCTrasport HepMCProduce already exists\n";
138 newProduct->addHepMCData(evt);
144 (*NewCorrespondenceMap).swap(thisLink);
147 for (
unsigned int i = 0;
i < (*NewCorrespondenceMap).size(); ++
i)
148 LogDebug(
"ProtonTransportEventProcessing")
149 <<
"ProtonTransport correspondence table: " << (*NewCorrespondenceMap)[
i];
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
void addPartToHepMC(const HepMC::GenEvent *iev, HepMC::GenEvent *ev)
#define DEFINE_FWK_MODULE(type)
~PPSSimTrackProducer() override=default
ProtonTransport theTransporter
Provenance const * provenance() 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
edm::EDGetTokenT< edm::HepMCProduct > m_InTagToken
std::vector< LHCTransportLink > & getCorrespondenceMap()
std::string m_transportMethod
PPSSimTrackProducer(const edm::ParameterSet &)
const HepMC::GenEvent * GetEvent() const
std::vector< LHCTransportLink > LHCTransportLinkContainer
std::string const & moduleLabel() const
void process(const HepMC::GenEvent *ev, const edm::EventSetup &es, CLHEP::HepRandomEngine *engine)