#include <BesTwogam.h>
Public Member Functions | |
BesTwogam (const string &name, ISvcLocator *pSvcLocator) | |
BesTwogam (const string &name, ISvcLocator *pSvcLocator) | |
StatusCode | execute () |
StatusCode | execute () |
StatusCode | finalize () |
StatusCode | finalize () |
StatusCode | initialize () |
StatusCode | initialize () |
Private Attributes | |
float | m_cmEnergy |
float | m_m2min |
int | m_numberEvent |
int | m_seed |
int | m_unw |
|
00135 :Algorithm( name, pSvcLocator ) 00136 { 00137 declareProperty("InitialSeed",m_seed=1001); 00138 declareProperty("CMEnergy", m_cmEnergy = 3.097); // 2*Ebeam [GeV] 00139 declareProperty("MinimumW2",m_m2min=0.02); 00140 declareProperty("Unweighted",m_unw=1); 00141 }
|
|
|
|
|
|
00162 { 00163 MsgStream log(messageService(), name()); 00164 log << MSG::INFO << "BesTwogam executing" << endreq; 00165 HepMC::HEPEVT_Wrapper::set_max_number_entries(2000); 00166 HepMC::HEPEVT_Wrapper::set_sizeof_real(8); 00167 HepMC::IO_HEPEVT HepEvtIO; 00168 HEPEVT_CLEAN(); 00169 GEN1EVT(); 00170 if(CFLAGS.GOODEV!=1){ 00171 log << MSG::ERROR<<" BesTwogam: fail to generate good event"<<endl; 00172 return StatusCode::FAILURE; 00173 } 00174 m_numberEvent++; 00175 if( log.level() < MSG::INFO )LULIST(1); 00176 LUHEPC(1); 00177 // HEPEVT_PRINT(); 00178 HepMC::GenEvent* evt = HepEvtIO.read_next_event(); 00179 evt->set_event_number(m_numberEvent); 00180 evt->set_signal_process_id(1); 00181 // evt->print(); 00182 // Check if the McCollection already exists 00183 SmartDataPtr<McGenEventCol> anMcCol(eventSvc(), "/Event/Gen"); 00184 if (anMcCol!=0) { 00185 // Add event to existing collection 00186 MsgStream log(messageService(), name()); 00187 log << MSG::INFO << "Add McGenEvent to existing collection" << endreq; 00188 McGenEvent* mcEvent = new McGenEvent(evt); 00189 anMcCol->push_back(mcEvent); 00190 } else { 00191 // Create Collection and add to the transient store 00192 McGenEventCol *mcColl = new McGenEventCol; 00193 McGenEvent* mcEvent = new McGenEvent(evt); 00194 mcColl->push_back(mcEvent); 00195 StatusCode sc = eventSvc()->registerObject("/Event/Gen",mcColl); 00196 if (sc != StatusCode::SUCCESS) { 00197 log << MSG::ERROR << "Could not register McGenEvent" << endreq; 00198 delete mcColl; 00199 delete evt; 00200 delete mcEvent; 00201 return StatusCode::FAILURE; 00202 } 00203 } 00204 return StatusCode::SUCCESS; 00205 }
|
|
|
|
00208 { 00209 MsgStream log(messageService(), name()); 00210 log << MSG::INFO << "BesTwogam finalized" << endreq; 00211 FINISH(); 00212 return StatusCode::SUCCESS; 00213 }
|
|
|
|
00143 { 00144 MsgStream log(messageService(), name()); 00145 log << MSG::WARNING << "BesTwogam initialize" << endreq; 00146 RDCUTS(); 00147 ISEEDC.ISEED=m_seed; 00148 EXCUTS.EBEAME=0.5*m_cmEnergy; 00149 EXCUTS.W2MINE=m_m2min; 00150 INPARC.NTUNW=m_unw; 00151 00152 SETDEF(); 00153 QCDSTA(); 00154 DOCUTS(); 00155 PRTCUT(); 00156 // USRINI(); 00157 m_numberEvent=0; 00158 return StatusCode::SUCCESS; 00159 }
|
|
|
|
|
|
|
|
|
|
|