16 #include "HepMC/IO_HEPEVT.h"
17 #include "HepMC/HEPEVT_Wrapper.h"
20 #include "HepMC/WeightContainer.h"
23 #define KI_BHG_INIT ki_bhg_init_
28 #define BHSETPARAM bhsetparam_
30 void BHSETPARAM(
int* iparam,
float* fparam,
const char* cparam,
int length);
33 #define KI_BHG_FILL ki_bhg_fill_
38 #define KI_BHG_STAT ki_bhg_stat_
47 static HepMC::IO_HEPEVT
conv;
52 call_ki_bhg_stat(iret);
87 long seed = (long)(rng->
mySeed());
94 produces<HepMCProduct>();
95 cout <<
"BeamHaloSource: starting event generation ... " << endl;
115 if( iret < 0 )
return false;
122 evt =
new HepMC::GenEvent();
124 for (
int theindex = 1; theindex<=
wrapper.number_entries(); theindex++) {
125 HepMC::GenVertex* Vtx =
new HepMC::GenVertex(HepMC::FourVector(
wrapper.x(theindex),
wrapper.y(theindex),
wrapper.z(theindex),
wrapper.t(theindex)));
129 Vtx->add_particle_out(Part);
130 evt->add_vertex(Vtx);
136 weights.push_back(weight);
138 std::auto_ptr<HepMCProduct> CMProduct(
new HepMCProduct());
139 if (
evt) CMProduct->addHepMCData(
evt );
148 BHSETPARAM(ival,fval,cval_string.c_str(),cval_string.length());
T getUntrackedParameter(std::string const &, T const &) const
static HepMC::IO_HEPEVT conv
CLHEP::HepRandomEngine * _BeamHalo_randomEngine
bool call_ki_bhg_stat(int &iret)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool call_ki_bhg_fill(int &iret, float &weight)
bool call_bh_set_parameters(int *ival, float *fval, const std::string cval_string)
static HepMC::HEPEVT_Wrapper wrapper
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
virtual ~BeamHaloSource()
Destructor.
BeamHaloSource(const ParameterSet &, const InputSourceDescription &)
Constructor.
bool call_ki_bhg_init(long &seed)
virtual bool produce(Event &e)
virtual uint32_t mySeed() const =0
Exists for backward compatibility.