115 MsgStream log(messageService(), name());
117 log << MSG::INFO <<
"Eepipi initialize" << endreq;
120 static const bool CREATEIFNOTTHERE(
true);
121 StatusCode RndmStatus = service(
"BesRndmGenSvc", p_BesRndmGenSvc, CREATEIFNOTTHERE);
122 if (!RndmStatus.isSuccess() || 0 == p_BesRndmGenSvc)
124 log << MSG::ERROR <<
" Could not initialize Random Number Service" << endreq;
127 CLHEP::HepRandomEngine* engine = p_BesRndmGenSvc->
GetEngine(
"Eepipi");
128 std::cout<<
"==============================="<<engine<<endl;
133 COSEE.setcos=m_cosee;
135 DIGAM.onlyDigam =m_onlyDigam;
136 DIGAM.excludeDigam=m_excludeDigam;
138 std::string locvp=getenv(
"EEPIPIROOT");
139 locvp +=
"/share/fitpipi.dat";
141 std::cout<<
"myfile :"<<
FORMFACTOR.myfile<<std::endl;
142 system(
"cat $EEPIPIROOT/share/fitpipi.dat>fitpipi.dat");
145 std::cout<<
"m_evtMax = "<<m_evtMax<<std::endl;
149 return StatusCode::SUCCESS;
155 MsgStream log(messageService(), name());
159 int pid1,pid2,pid3,pid4,pst1,pst2;
170 GenEvent* evt =
new GenEvent(1,1);
172 GenVertex* prod_vtx =
new GenVertex();
174 evt->add_vertex( prod_vtx );
177 GenParticle* p =
new GenParticle( CLHEP::HepLorentzVector(
MOMSET.p1[1][evtgen],
MOMSET.p1[2][evtgen],
180 p->suggest_barcode( ++npart );
181 prod_vtx->add_particle_in(p);
185 p =
new GenParticle( CLHEP::HepLorentzVector(
MOMSET.q1[1][evtgen],
MOMSET.q1[2][evtgen],
189 p->suggest_barcode( ++npart );
190 prod_vtx->add_particle_in(p);
193 p =
new GenParticle( CLHEP::HepLorentzVector(
MOMSET.p2[1][evtgen],
MOMSET.p2[2][evtgen],
196 p->suggest_barcode( ++npart );
197 prod_vtx->add_particle_out(p);
200 p =
new GenParticle( CLHEP::HepLorentzVector(
MOMSET.q2[1][evtgen],
MOMSET.q2[2][evtgen],
203 p->suggest_barcode( ++npart );
204 prod_vtx->add_particle_out(p);
207 p =
new GenParticle( CLHEP::HepLorentzVector(
MOMSET.p3[1][evtgen],
MOMSET.p3[2][evtgen],
210 p->suggest_barcode( ++npart );
211 prod_vtx->add_particle_out(p);
214 p =
new GenParticle( CLHEP::HepLorentzVector(
MOMSET.q3[1][evtgen],
MOMSET.q3[2][evtgen],
217 p->suggest_barcode( ++npart );
218 prod_vtx->add_particle_out(p);
224 if( log.level() < MSG::INFO )
230 SmartDataPtr<McGenEventCol> anMcCol(eventSvc(),
"/Event/Gen");
234 MsgStream log(messageService(), name());
235 log << MSG::INFO <<
"Add McGenEvent to existing collection" << endreq;
237 anMcCol->push_back(mcEvent);
244 mcColl->push_back(mcEvent);
245 StatusCode sc = eventSvc()->registerObject(
"/Event/Gen",mcColl);
246 if (sc != StatusCode::SUCCESS)
248 log << MSG::ERROR <<
"Could not register McGenEvent" << endreq;
252 return StatusCode::FAILURE;
260 return StatusCode::SUCCESS;
276 IProperty* appPropMgr=0;
278 serviceLocator()->getService(
"ApplicationMgr", IProperty::interfaceID(),
279 reinterpret_cast<IInterface*&
>( appPropMgr ));
280 if( status.isFailure() )
return status;
282 IntegerProperty evtMax(
"EvtMax",0);
283 status = appPropMgr->getProperty( &evtMax );
284 if (status.isFailure())
return status;
286 m_evtMax = evtMax.value();