14 #include "HepMC/GenEvent.h" 24 #include "CLHEP/Random/RandomEngine.h" 40 produces<edm::HepMCProduct>();
41 produces<edm::LHCTransportLinkContainer>();
48 <<
"LHCTransport (CTPPSHectorProducer) requires the RandomNumberGeneratorService\n" 49 "which is not present in the configuration file. You must add the service\n" 50 "in the configuration file or remove the modules that require it.";
66 HepMC::GenEvent * evt_;
69 if ( engine->name() !=
"TRandom3" ) {
71 <<
"The TRandom3 engine type must be used with CTPPSHectorProducer, Random Number Generator Service not correctly configured!";
81 <<
"Invalid reference to HepMCProduct\n";
86 <<
"HectorTrasported HepMCProduce already exists\n";
89 evt_ =
new HepMC::GenEvent( *HepMCEvt->
GetEvent() );
103 NewProduct->addHepMCData( evt_ ) ;
109 (*NewCorrespondenceMap).swap(thisLink);
112 for (
unsigned int i = 0;
i < (*NewCorrespondenceMap).size();
i++)
113 LogDebug(
"HectorEventProcessing") <<
"Hector correspondence table: " << (*NewCorrespondenceMap)[
i];
HepMC::GenEvent * addPartToHepMC(HepMC::GenEvent *event)
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::HepMCProduct > m_InTagToken
void clearApertureFlags()
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void beginRun(const edm::Run &r, const edm::EventSetup &c) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
CTPPSHectorProducer(edm::ParameterSet const &p)
default constructor
#define DEFINE_FWK_MODULE(type)
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
void produce(edm::Event &e, const edm::EventSetup &c) override
CTPPSHector * hector_ctpps
void add(const HepMC::GenEvent *ev, const edm::EventSetup &es, CLHEP::HepRandomEngine *engine)
int eventsAnalysed
just to count events that have been analysed
const HepMC::GenEvent * GetEvent() const
void endRun(const edm::Run &r, const edm::EventSetup &c) override
std::string const & moduleLabel() const
~CTPPSHectorProducer() override
default destructor
StreamID streamID() const
std::vector< LHCTransportLink > LHCTransportLinkContainer
void filterCTPPS(TRandom3 *)
std::vector< LHCTransportLink > & getCorrespondenceMap()
Provenance const * provenance() const