19 #include "HepMC/IO_HEPEVT.h" 20 #include "HepMC/HEPEVT_Wrapper.h" 23 #include "HepMC/WeightContainer.h" 25 #define KI_BHG_INIT ki_bhg_init_ 30 #define BHSETPARAM bhsetparam_ 32 void BHSETPARAM(
int* iparam,
float* fparam,
const char* cparam,
int length);
35 #define KI_BHG_FILL ki_bhg_fill_ 40 #define KI_BHG_STAT ki_bhg_stat_ 48 static HepMC::IO_HEPEVT
conv;
52 call_ki_bhg_stat(iret);
78 produces<HepMCProduct>(
"unsmeared");
79 produces<GenEventInfoProduct>();
80 produces<GenRunInfoProduct, Transition::EndRun>();
82 usesResource(
"BeamHaloProducer");
84 cout <<
"BeamHaloProducer: starting event generation ... " << endl;
120 <<
"BeamHaloProducer: function call_ki_bhg_fill returned " << iret << endl;
128 for (
int theindex = 1; theindex <=
wrapper.number_entries(); theindex++) {
129 HepMC::GenVertex* Vtx =
new HepMC::GenVertex(
133 Vtx->add_particle_out(Part);
134 evt->add_vertex(Vtx);
139 HepMC::WeightContainer&
weights =
evt->weights();
140 weights.push_back(weight);
142 std::unique_ptr<HepMCProduct> CMProduct(
new HepMCProduct());
144 CMProduct->addHepMCData(
evt);
160 BHSETPARAM(ival, fval, cval_string.c_str(), cval_string.length());
~BeamHaloProducer() override
Destructor.
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
LuminosityBlockIndex index() const
static HepMC::IO_HEPEVT conv
void setRandomEngine(CLHEP::HepRandomEngine *v)
void beginLuminosityBlock(LuminosityBlock const &, EventSetup const &) override
void produce(Event &e, const EventSetup &es) override
CLHEP::HepRandomEngine * _BeamHalo_randomEngine
void endRunProduce(Run &r, const EventSetup &es) override
bool call_ki_bhg_fill(int &iret, float &weight)
BeamHaloProducer(const ParameterSet &)
Constructor.
bool call_bh_set_parameters(int *ival, float *fval, const std::string cval_string)
void put(std::unique_ptr< PROD > product)
Put a new product.
bool call_ki_bhg_stat(int &iret)
StreamID streamID() const
bool call_ki_bhg_init(long &seed)
static HepMC::HEPEVT_Wrapper wrapper