19 #include "HepMC/IO_HEPEVT.h" 20 #include "HepMC/HEPEVT_Wrapper.h" 23 #include "HepMC/WeightContainer.h" 26 #define KI_BHG_INIT ki_bhg_init_ 31 #define BHSETPARAM bhsetparam_ 33 void BHSETPARAM(
int* iparam,
float* fparam,
const char* cparam,
int length);
36 #define KI_BHG_FILL ki_bhg_fill_ 41 #define KI_BHG_STAT ki_bhg_stat_ 50 static HepMC::IO_HEPEVT
conv;
55 call_ki_bhg_stat(iret);
86 produces<HepMCProduct>(
"unsmeared");
87 produces<GenEventInfoProduct>();
88 produces<GenRunInfoProduct, Transition::EndRun>();
90 usesResource(
"BeamHaloProducer");
92 cout <<
"BeamHaloProducer: starting event generation ... " << endl;
135 <<
"BeamHaloProducer: function call_ki_bhg_fill returned " << iret << endl;
144 for (
int theindex = 1; theindex<=
wrapper.number_entries(); theindex++) {
145 HepMC::GenVertex* Vtx =
new HepMC::GenVertex(HepMC::FourVector(
wrapper.x(theindex),
wrapper.y(theindex),
wrapper.z(theindex),
wrapper.t(theindex)));
149 Vtx->add_particle_out(Part);
150 evt->add_vertex(Vtx);
156 weights.push_back(weight);
158 std::unique_ptr<HepMCProduct> CMProduct(
new HepMCProduct());
159 if (
evt) CMProduct->addHepMCData(
evt);
176 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