11 #include <generators/modules/teegginput/TeeggInputModule.h>
13 #include <framework/datastore/StoreArray.h>
30 setDescription(
"Generates events with TEEGG.");
33 addParam(
"VACPOL", m_sVACPOL,
"Vacuum polarization: off, nsk (Novosibirsk) or hlmnt (Teubner et al., default)",
34 std::string(
"hlmnt"));
35 addParam(
"CMSEnergy", m_cmsEnergy,
"CMS energy [GeV] (default: take from xml)", 0.0);
36 addParam(
"TEVETO", m_TEVETO,
"Maximum theta of e+ in final state (in deg)", 0.1);
37 addParam(
"TEMIN", m_TEMIN,
"Minimum angle between the e- and -z axis (EGAMMA conf. only) (in deg)", 20.0);
38 addParam(
"TGMIN", m_TGMIN,
"Minimum angle between the gamma and -z axis (in deg)", 20.0);
39 addParam(
"TGVETO", m_TGVETO,
"Maximum angle between the gamma and -z axis(ETRON conf. only) (in deg)", 0.05);
40 addParam(
"EEMIN", m_EEMIN,
"Minimum energy of the e- (EGAMMA and ETRON conf.) (in GeV)", 2.0);
41 addParam(
"EGMIN", m_EGMIN,
"Minimum energy of the gamma (EGAMMA and GAMMA conf.) (in GeV)", 2.0);
42 addParam(
"PEGMIN", m_PEGMIN,
"Minimum phi sep of e-gamma (EGAMMA config with hard rad. corr.) (in deg)", 0.0);
43 addParam(
"EEVETO", m_EEVETO,
"Minimum energy to veto (GAMMA config with hard rad. corr.) (in GeV)", 0.0);
44 addParam(
"EGVETO", m_EGVETO,
"Minimum energy to veto (ETRON/GAMMA config with hard rad. corr.) (in GeV)", 0.0);
45 addParam(
"PHVETO", m_PHVETO,
"Minimum phi sep to veto (ETRON/GAMMA config with hard rad. corr. (in deg)", 0.0);
46 addParam(
"CUTOFF", m_CUTOFF,
"Cutoff energy for radiative corrections (in CM frame) (in GeV)", 0.250);
47 addParam(
"EPS", m_EPS,
"Param. epsilon_s (smaller val. increases sampling of k_s^pbc)", 0.01);
48 addParam(
"FRAPHI", m_FRAPHI,
"Fraction of time phi_ks is generated with peak(hard rad corr)", 0.0);
49 addParam(
"EPSPHI", m_EPSPHI,
"Param. epsilon_phi ('cutoff' of the phi_ks peak)", 1.0e-4);
50 addParam(
"WGHT1M", m_WGHT1M,
"Maximum weight for generation of QP0, cos(theta QP)", 1.001);
51 addParam(
"WGHTMX", m_WGHTMX,
"Maximum weight for the trial events", 1.000);
52 addParam(
"RADCOR", m_sRADCOR,
"Specifies radiative correction (NONE, SOFT or HARD)", std::string(
"NONE"));
53 addParam(
"CONFIG", m_sCONFIG,
"Specifies the event configuration (EGAMMA, GAMMA, GAMMAE or ETRON)", std::string(
"EGAMMA"));
54 addParam(
"MATRIX", m_sMATRIX,
"Specifies which eeg matrix element (BK, BKM2, TCHAN or EPA)", std::string(
"BKM2"));
55 addParam(
"MTRXGG", m_sMTRXGG,
"Specifies which eegg matrix element (EPADC, BEEGG or MEEGG)", std::string(
"EPADC"));
56 addParam(
"UNWEIGHTED", m_UNWGHT,
"If true then generate unweighted events", 1);
59 TeeggInputModule::~TeeggInputModule()
65 void TeeggInputModule::initialize()
69 mcparticle.registerInDataStore();
72 m_initial.initialize();
75 m_generator.initExtraInfo();
80 void TeeggInputModule::event()
84 if (m_beamParams.hasChanged()) {
86 initializeGenerator();
88 B2FATAL(
"TeeggInputModule::event(): BeamParameters have changed within a job, this is not supported for TEEGG!");
103 m_generator.generateEvent(m_mcGraph, vertex, boost);
104 m_mcGraph.generateList(
"", MCParticleGraph::c_setDecayInfo | MCParticleGraph::c_checkCyclic);
108 void TeeggInputModule::terminate()
113 void TeeggInputModule::initializeGenerator()
116 m_cmsEnergy = nominal.getMass();
118 m_generator.setCMSEnergy(m_cmsEnergy);
119 m_generator.setVACPOL(m_sVACPOL);
120 m_generator.setTEVETO(m_TEVETO);
121 m_generator.setTEMIN(m_TEMIN);
122 m_generator.setTGMIN(m_TGMIN);
123 m_generator.setTGVETO(m_TGVETO);
124 m_generator.setEEMIN(m_EEMIN);
125 m_generator.setEGMIN(m_EGMIN);
126 m_generator.setPEGMIN(m_PEGMIN);
127 m_generator.setEEVETO(m_EEVETO);
128 m_generator.setEGVETO(m_EGVETO);
129 m_generator.setPHVETO(m_PHVETO);
130 m_generator.setCUTOFF(m_CUTOFF);
131 m_generator.setEPS(m_EPS);
132 m_generator.setFRAPHI(m_FRAPHI);
133 m_generator.setEPSPHI(m_EPSPHI);
134 m_generator.setWGHT1M(m_WGHT1M);
135 m_generator.setWGHTMX(m_WGHTMX);
136 m_generator.setRADCOR(m_sRADCOR);
137 m_generator.setCONFIG(m_sCONFIG);
138 m_generator.setMATRIX(m_sMATRIX);
139 m_generator.setMTRXGG(m_sMTRXGG);
140 m_generator.setUNWGHT(m_UNWGHT);
144 m_initialized =
true;