#include <Bhwide.h>
Public Member Functions | |
Bhwide (const string &name, ISvcLocator *pSvcLocator) | |
Bhwide (const string &name, ISvcLocator *pSvcLocator) | |
StatusCode | execute () |
StatusCode | execute () |
StatusCode | finalize () |
StatusCode | finalize () |
StatusCode | initialize () |
StatusCode | initialize () |
Private Attributes | |
double | m_Acolli |
double | m_cmEnergy |
double | m_EnMine |
double | m_EnMinp |
double | m_infraredCut |
std::vector< int > | m_initSeed |
std::vector< int > | m_initSeed |
double | m_ThMaxe |
double | m_ThMaxp |
double | m_ThMine |
double | m_ThMinp |
int | npar [100] |
double | xpar [100] |
|
00060 :Algorithm( name, pSvcLocator ) 00061 { 00062 declareProperty("CMEnergy", m_cmEnergy = 3.097); // 2*Ebeam [GeV] 00063 declareProperty("EleMinThetaAngle", m_ThMine = 22); // [deg] 00064 declareProperty("EleMaxThetaAngle", m_ThMaxe = 158); // [deg] 00065 declareProperty("PosMinThetaAngle", m_ThMinp = 22); // [deg] 00066 declareProperty("PosMaxThetaAngle", m_ThMaxp = 158); // [deg] 00067 declareProperty("EleMinEnergy", m_EnMine = 0.01); // [GeV] 00068 declareProperty("PosMinEnergy", m_EnMinp = 0.01); // [GeV] 00069 declareProperty("Acollinearity", m_Acolli = 10); // [deg] 00070 declareProperty("SoftPhotonCut", m_infraredCut = 1E-5); // dimensionless, Ephoton > m_infraredCut*sqrt(s)/2 00071 m_initSeed.clear(); 00072 m_initSeed.push_back(54217137); m_initSeed.push_back(0); m_initSeed.push_back(0); 00073 declareProperty("InitializedSeed", m_initSeed); 00074 }
|
|
|
|
|
|
00137 { 00138 MsgStream log(messageService(), name()); 00139 log << MSG::INFO << "Bhwide executing" << endreq; 00140 00141 00142 BHWIDE( 0,xpar,npar); 00143 00144 if( log.level() < MSG::INFO ) 00145 { 00146 DUMPS(6); 00147 // dump output to file 00148 // DUMPS(16); 00149 } 00150 00151 int npart = 0; 00152 00153 // Fill event information 00154 GenEvent* evt = new GenEvent(1,1); 00155 00156 GenVertex* prod_vtx = new GenVertex(); 00157 // prod_vtx->add_particle_out( p ); 00158 evt->add_vertex( prod_vtx ); 00159 00160 // incoming beam e+ 00161 GenParticle* p = new GenParticle( HepLorentzVector( MOMSET.p1[0], MOMSET.p1[1], 00162 MOMSET.p1[2], MOMSET.p1[3]), 00163 -11, 3); 00164 p->suggest_barcode( ++npart ); 00165 prod_vtx->add_particle_in(p); 00166 00167 // incoming beam e- 00168 p = new GenParticle( HepLorentzVector( MOMSET.q1[0], MOMSET.q1[1], MOMSET.q1[2], MOMSET.q1[3]), 00169 11, 3); 00170 p->suggest_barcode( ++npart ); 00171 prod_vtx->add_particle_in(p); 00172 00173 // scattered e+ 00174 p = new GenParticle( HepLorentzVector( MOMSET.p2[0], MOMSET.p2[1], 00175 MOMSET.p2[2], MOMSET.p2[3]), 00176 -11, 1); 00177 p->suggest_barcode( ++npart ); 00178 prod_vtx->add_particle_out(p); 00179 00180 // scattered e- 00181 p = new GenParticle( HepLorentzVector( MOMSET.q2[0], MOMSET.q2[1], MOMSET.q2[2], MOMSET.q2[3]), 00182 11, 1); 00183 p->suggest_barcode( ++npart ); 00184 prod_vtx->add_particle_out(p); 00185 00186 int iphot=0; 00187 for (iphot=0; iphot<MOMSET.nphot; iphot++) 00188 { 00189 // gamma 00190 p = new GenParticle( HepLorentzVector( MOMSET.phot[0][iphot], MOMSET.phot[1][iphot], 00191 MOMSET.phot[2][iphot], MOMSET.phot[3][iphot]), 00192 22, 1); 00193 p->suggest_barcode( ++npart ); 00194 prod_vtx->add_particle_out(p); 00195 } 00196 00197 if( log.level() < MSG::INFO ) 00198 { 00199 evt->print(); 00200 } 00201 00202 // Check if the McCollection already exists 00203 SmartDataPtr<McGenEventCol> anMcCol(eventSvc(), "/Event/Gen"); 00204 if (anMcCol!=0) 00205 { 00206 // Add event to existing collection 00207 MsgStream log(messageService(), name()); 00208 log << MSG::INFO << "Add McGenEvent to existing collection" << endreq; 00209 McGenEvent* mcEvent = new McGenEvent(evt); 00210 anMcCol->push_back(mcEvent); 00211 } 00212 else 00213 { 00214 // Create Collection and add to the transient store 00215 McGenEventCol *mcColl = new McGenEventCol; 00216 McGenEvent* mcEvent = new McGenEvent(evt); 00217 mcColl->push_back(mcEvent); 00218 StatusCode sc = eventSvc()->registerObject("/Event/Gen",mcColl); 00219 if (sc != StatusCode::SUCCESS) 00220 { 00221 log << MSG::ERROR << "Could not register McGenEvent" << endreq; 00222 delete mcColl; 00223 delete evt; 00224 delete mcEvent; 00225 return StatusCode::FAILURE; 00226 } 00227 else 00228 { 00229 log << MSG::INFO << "McGenEventCol created and " << npart <<" particles stored in McGenEvent" << endreq; 00230 } 00231 } 00232 00233 return StatusCode::SUCCESS; 00234 }
|
|
|
|
00237 { 00238 MsgStream log(messageService(), name()); 00239 00240 BHWIDE( 2,xpar,npar); 00241 00242 log << MSG::INFO << "Bhwide finalized" << endreq; 00243 00244 return StatusCode::SUCCESS; 00245 }
|
|
|
|
--------------------------------------------------------------------------- Input parameters for Bhwide ---------------------------------------------------------------------- Try both options for KeyWgt, result should be the same # KeyWgt = 1 // ! weighted events -------------------------------------- 2*Ebeam [GeV] 00076 { 00077 00078 MsgStream log(messageService(), name()); 00079 00080 log << MSG::INFO << "Bhwide initialize" << endreq; 00081 00082 GLIMIT(50000); 00083 00087 double WTMAX = 3.0; // ! Maximum Weight for rejection 00088 double AMAZ = 91.1882; // ! Z mass 00089 double GAMMZ = 2.4952; // ! Z width (may be recalculated by EW library) 00090 double SINW2 = 0.22225; // ! sin^2(theta_W) (may be recalculated by EW library) 00091 double AMTOP = 174.3; // ! top quark mass 00092 double AMHIG = 115.0; // ! Higgs mass 00094 int KeyWgt = 0; // ! unweighted (WT=1) events, for detector simulation 00096 int KeyRnd = 1; // ! RANMAR random numbers 00097 int KeyCha = 0; // ! Channel choice: all/s-only/t-only: =0/1/2 00098 int KeyZof = 1; // ! Z-contribution ON/OFF: =0/1 00099 int KeyOpt = 1000*KeyZof +100*KeyCha +10*KeyWgt + KeyRnd; 00100 // !# KeyEWC = 0 ! QED corrections only 00101 int KeyEWC = 1; // ! Total O(alpha) ElectroWeak corr. included 00102 // !# KeyLib = 1 ! ElectroWeak corrections from BABAMC (obsolete!) 00103 int KeyLib = 2; // ! ElectroWeak corrections from ALIBABA 00104 // !# KeyMod = 1 ! Hard bremsstr. matrix element from MODEL1 00105 int KeyMod = 2; // ! Hard bremsstr. matrix alement from MODEL2 00106 int KeyPia = 3; // ! Vacuum polarization option (0/1/2/3) 00107 int KeyRad = 1000*KeyEWC + 100*KeyLib + 10*KeyMod + KeyPia; 00108 00110 npar[0]= KeyOpt; 00111 npar[1]= KeyRad; 00112 00113 xpar[0] = m_cmEnergy; 00114 xpar[1] = m_ThMinp; 00115 xpar[2] = m_ThMaxp; 00116 xpar[3] = m_ThMine; 00117 xpar[4] = m_ThMaxe; 00118 xpar[5] = m_EnMinp; 00119 xpar[6] = m_EnMine; 00120 xpar[7] = m_Acolli; 00121 xpar[8] = m_infraredCut; // ! Infrared cut on photon energy 00122 xpar[9] = WTMAX; 00123 xpar[10] = AMAZ; 00124 xpar[11] = GAMMZ; 00125 xpar[12] = SINW2; 00126 xpar[13] = AMTOP; 00127 xpar[14] = AMHIG; 00128 00129 MARINI(m_initSeed[0], m_initSeed[1], m_initSeed[2]); 00130 00131 BHWIDE(-1,xpar,npar); 00132 00133 return StatusCode::SUCCESS; 00134 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|