12 #include "HepMC/GenEvent.h"
22 #include "CLHEP/Random/RandomEngine.h"
43 produces<edm::HepMCProduct>();
44 produces<edm::LHCTransportLinkContainer>();
54 <<
"LHCTransport (HectorProducer) requires the RandomNumberGeneratorService\n"
55 "which is not present in the configuration file. You must add the service\n"
56 "in the configuration file or remove the modules that require it.";
63 LogDebug(
"HectorSetup") <<
"Delete HectorProducer"
76 if ( engine->name() !=
"TRandom3" ) {
78 <<
"The TRandom3 engine type must be used with HectorProducer, Random Number Generator Service not correctly configured!";
87 if ( !HepMCEvt.isValid() )
90 <<
"Invalid reference to HepMCProduct\n";
93 if ( HepMCEvt.provenance()->moduleLabel() ==
"LHCTransport" )
96 <<
"HectorTrasported HepMCProduce already exists\n";
99 evt_ =
new HepMC::GenEvent( *HepMCEvt->GetEvent() );
121 NewProduct->addHepMCData(
evt_ ) ;
123 iEvent.
put( NewProduct ) ;
127 (*NewCorrespondenceMap).swap(thisLink);
130 for (
unsigned int i = 0;
i < (*NewCorrespondenceMap).size();
i++)
131 LogDebug(
"HectorEventProcessing") <<
"Hector correspondence table: " << (*NewCorrespondenceMap)[
i];
134 iEvent.
put( NewCorrespondenceMap );
T getParameter(std::string const &) const
void produce(edm::Event &iEvent, const edm::EventSetup &es)
this method will do the user analysis
HectorProducer(edm::ParameterSet const &p)
default constructor
void filterD1(TRandom3 *)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void filterFP420(TRandom3 *)
int eventsAnalysed
just to count events that have been analysed
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void filterZDC(TRandom3 *)
virtual ~HectorProducer()
default destructor
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &) const =0
Use this engine in event methods.
void add(const HepMC::GenEvent *ev, const edm::EventSetup &es)
std::vector< LHCTransportLink > & getCorrespondenceMap()
HepMC::GenEvent * addPartToHepMC(HepMC::GenEvent *event)
StreamID streamID() const
std::vector< LHCTransportLink > LHCTransportLinkContainer
void clearApertureFlags()