132 MsgStream log(messageService(), name());
134 log << MSG::INFO <<
"Bhwide initialize" << endreq;
136 static const bool CREATEIFNOTTHERE(
true);
137 StatusCode RndmStatus = service(
"BesRndmGenSvc", p_BesRndmGenSvc, CREATEIFNOTTHERE);
138 if (!RndmStatus.isSuccess() || 0 == p_BesRndmGenSvc)
140 log << MSG::ERROR <<
" Could not initialize Random Number Service" << endreq;
143 CLHEP::HepRandomEngine* engine = p_BesRndmGenSvc->
GetEngine(
"Bhwide");
144 engine->showStatus();
153 double AMAZ = 91.1882;
154 double GAMMZ = 2.4952;
155 double SINW2 = 0.22225;
156 double AMTOP = 174.3;
157 double AMHIG = 115.0;
164 int KeyOpt = 1000*KeyZof +100*KeyCha +10*KeyWgt + KeyRnd;
166 int KeyEWC = m_keyEwc;
168 int KeyLib = m_keyLib;
170 int KeyMod = m_keyMod;
171 int KeyPia = m_keyPia;
172 int KeyRad = 1000*KeyEWC + 100*KeyLib + 10*KeyMod + KeyPia;
178 xpar[0] = m_cmEnergy;
186 xpar[8] = m_infraredCut;
198 return StatusCode::SUCCESS;
203 MsgStream log(messageService(), name());
204 log << MSG::INFO <<
"Bhwide executing" << endreq;
209 if( log.level() < MSG::INFO )
219 GenEvent* evt =
new GenEvent(1,1);
221 GenVertex* prod_vtx =
new GenVertex();
223 evt->add_vertex( prod_vtx );
226 GenParticle* p =
new GenParticle( CLHEP::HepLorentzVector(
MOMSET.p1[0],
MOMSET.p1[1],
229 p->suggest_barcode( ++npart );
230 prod_vtx->add_particle_in(p);
235 p->suggest_barcode( ++npart );
236 prod_vtx->add_particle_in(p);
239 p =
new GenParticle( CLHEP::HepLorentzVector(
MOMSET.p2[0],
MOMSET.p2[1],
242 p->suggest_barcode( ++npart );
243 prod_vtx->add_particle_out(p);
248 p->suggest_barcode( ++npart );
249 prod_vtx->add_particle_out(p);
252 for (iphot=0; iphot<
MOMSET.nphot; iphot++)
255 p =
new GenParticle( CLHEP::HepLorentzVector(
MOMSET.phot[0][iphot],
MOMSET.phot[1][iphot],
258 p->suggest_barcode( ++npart );
259 prod_vtx->add_particle_out(p);
262 if( log.level() < MSG::INFO )
268 SmartDataPtr<McGenEventCol> anMcCol(eventSvc(),
"/Event/Gen");
272 MsgStream log(messageService(), name());
273 log << MSG::INFO <<
"Add McGenEvent to existing collection" << endreq;
275 anMcCol->push_back(mcEvent);
282 mcColl->push_back(mcEvent);
283 StatusCode sc = eventSvc()->registerObject(
"/Event/Gen",mcColl);
284 if (sc != StatusCode::SUCCESS)
286 log << MSG::ERROR <<
"Could not register McGenEvent" << endreq;
290 return StatusCode::FAILURE;
294 log << MSG::INFO <<
"McGenEventCol created and " << npart <<
" particles stored in McGenEvent" << endreq;
298 return StatusCode::SUCCESS;