16 #include "HepMC/GenEvent.h" 26 #include <CLHEP/Random/RandomEngine.h> 36 tok_pdt_ = esConsumes<HepPDT::ParticleDataTable, PDTRecord>();
42 produces<edm::HepMCProduct>();
43 produces<edm::LHCTransportLinkContainer>();
49 throw cms::Exception(
"Configuration") <<
"LHCTransport (HectorProducer) requires the " 50 "RandomNumberGeneratorService\n" 51 "which is not present in the configuration file. You must add the " 53 "in the configuration file or remove the modules that require it.";
67 if (engine->name() !=
"TRandom3") {
68 throw cms::Exception(
"Configuration") <<
"The TRandom3 engine type must be used with HectorProducer, " 69 <<
"Random Number Generator Service not correctly configured!";
81 throw cms::Exception(
"InvalidReference") <<
"Invalid reference to HepMCProduct\n";
85 throw cms::Exception(
"LogicError") <<
"HectorTrasported HepMCProduce already exists\n";
111 NewProduct->addHepMCData(
evt_);
115 edm::LogVerbatim(
"SimTransportHectorProducer") <<
"new LHCTransportLinkContainer ";
118 (*NewCorrespondenceMap).swap(thisLink);
121 for (
unsigned int i = 0;
i < (*NewCorrespondenceMap).size(); ++
i)
122 edm::LogVerbatim(
"HectorEventProcessing") <<
"Hector correspondence table: " << (*NewCorrespondenceMap)[
i];
Log< level::Info, true > LogVerbatim
int m_evtAnalysed
just to count events that have been analysed
void beginRun(const edm::Run &r, const edm::EventSetup &c) override
edm::EDGetTokenT< edm::HepMCProduct > m_HepMC
#define DEFINE_FWK_MODULE(type)
HectorProducer(edm::ParameterSet const &p)
Provenance const * provenance() const
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
void endRun(const edm::Run &r, const edm::EventSetup &c) override
void filterD1(TRandom3 *)
void filterFP420(TRandom3 *)
const HepMC::GenEvent * GetEvent() const
edm::ESGetToken< HepPDT::ParticleDataTable, PDTRecord > tok_pdt_
void filterZDC(TRandom3 *)
~HectorProducer() override
void add(const HepMC::GenEvent *ev, const edm::EventSetup &es)
std::vector< LHCTransportLink > & getCorrespondenceMap()
HepMC::GenEvent * addPartToHepMC(HepMC::GenEvent *event)
std::vector< LHCTransportLink > LHCTransportLinkContainer
std::string const & moduleLabel() const
void clearApertureFlags()
void produce(edm::Event &e, const edm::EventSetup &c) override