001 #ifndef _WGRAD_MODULE_HH
002 #define _WGRAD_MODULE_HH
003
004
005 extern "C" {
006
007 void wgrad_set_external_();
008 void wgrad_use_pythia_(int wgrad_use_pythia[]);
009 void wgrad_set_switches_(int ppswitches[]);
010 void wgrad_set_soft_collinear_cuts_(double soft_coll_cuts[]);
011 void wgrad_set_pdflib_(int pdflib_choice[]);
012 void wgrad_set_properties_(double properties[]);
013 void wgrad_set_kinematic_cuts_(double kinematic_cuts[]);
014 void wgrad_set_grid_pars_(int grid_pars[]);
015 void wgrad_set_rndm_seed_(int rndm_seed[]);
016
017
018 void wgrad_begin_();
019
020
021 void wgrad_evt_();
022
023
024 void wgrad_end_();
025
026
027
028
029
030
031
032
033 void wgrad_get_event_weight_(double wgrad_event_weight[]);
034
035
036 void wgrad_get_particle_codes_(int wgrad_particle_codes[]);
037 void wgrad_get_charged_lepton_(double wgrad_charged_lepton[]);
038 void wgrad_get_neutrino_(double wgrad_neutrino[]);
039 void wgrad_get_photon_(double wgrad_photon[]);
040 }
041
042
043
044
045 #include "Framework/APPModule.hh"
046 #include "Framework/AbsParmBool.hh"
047 #include "Framework/AbsParmFilename.hh"
048 #include "Framework/APPMenu.hh"
049 #include "generatorMods/PythiaSetCommands.hh"
050 #include "generatorMods/PythiaShowCommands.hh"
051 #include "generatorMods/AbsGenModule.hh"
052 #include "generatorMods/PythiaMenu.hh"
053 #include "Framework/AbsParmGeneral.hh"
054 typedef AbsParmGeneral<long> AbsParmGeneral_long;
055
056 #ifdef CDF
057 #include "BaBar/Cdf.hh"
058 #endif
059
060
061
062
063 class WGRAD_Module : public AbsGenModule {
064
065
066
067
068
069 public:
070
071 static const char* genId;
072
073
074 WGRAD_Module();
075
076
077 virtual ~WGRAD_Module();
078
079
080 AppResult genBeginJob ();
081 AppResult genBeginRun (AbsEvent* run);
082 AppResult genEndJob ();
083 AppResult genEndRun (AbsEvent* run );
084 int callGenerator(AbsEvent* event);
085 void fillHepevt();
086
087 private:
088
089
090 APPMenu _randomNumberMenu;
091
092
093 AbsParmGeneral_long _randomSeed1;
094 static const long _defaultRandomSeed1;
095 AbsParmGeneral_long _randomSeed2;
096 static const long _defaultRandomSeed2;
097
098
099
100 AbsParmBool _debug;
101
102
103 AbsParmBool _usePythia;
104
105
106 AbsParmBool _useLesHouchesModule;
107
108
109
110
111
112
113 AbsParmGeneral<int> _beamType;
114
115 AbsParmGeneral<int> _W_charge;
116
117 AbsParmGeneral<int> _widthTreatment;
118
119 AbsParmGeneral<int> _decayLepton;
120
121 AbsParmGeneral<int> _QED_radType;
122
123 AbsParmGeneral<int> _fsrType;
124
125 AbsParmGeneral<int> _smearingRecombination;
126
127 AbsParmGeneral<int> _order;
128
129 AbsParmGeneral<int> _scale;
130
131 AbsParmGeneral<int> _fsrCollinearCut;
132
133 AbsParmGeneral<double> _photonEnergyCut;
134
135 AbsParmGeneral<double> _photonCollinearCut;
136
137 AbsParmGeneral<int> _pdflibGroup;
138
139 AbsParmGeneral<int> _pdflibSet;
140
141 AbsParmGeneral<double> _wMass;
142
143 AbsParmGeneral<double> _wWidth;
144
145 AbsParmGeneral<double> _CME;
146
147 AbsParmGeneral<double> _lepton_ptmin;
148
149 AbsParmGeneral<double> _lepton_ymax;
150
151 AbsParmGeneral<double> _neutrino_ptmin;
152
153 AbsParmGeneral<double> _neutrino_ymax;
154
155 AbsParmGeneral<double> _photon_ptmin;
156
157 AbsParmGeneral<double> _photon_ymax;
158
159 AbsParmGeneral<double> _tmass_low;
160
161 AbsParmGeneral<double> _tmass_high;
162
163 AbsParmGeneral<int> _itmaxGrid;
164
165 AbsParmGeneral<int> _ncallGrid;
166
167 AbsParmGeneral<int> _itmaxPrecision;
168
169 AbsParmGeneral<int> _ncallPrecision;
170
171 AbsParmGeneral<int> _rndmSeed;
172
173 APPMenu _cardsMenu;
174
175
176
177
178
179
180
181
182
183
184
185 APPMenu _pythiaInterfaceMenu;
186
187
188 PythiaMenu* _pythiaMenu;
189
190
191 private:
192
193 WGRAD_Module(const char* name,
194 const char* description) :
195 AbsGenModule( WGRAD_Module::genId,
196 "W production including O(alpha) EW radiative corrections"),
197 _debug("debug",this,false),
198 _usePythia("usePythia",this,true),
199 _useLesHouchesModule("useLesHouchesModule",this,false),
200 _beamType("BeamType",this,1),
201 _W_charge("W_Charge",this,1),
202 _widthTreatment("widthTreatment",this,2),
203 _decayLepton("DecayLepton",this,2),
204 _QED_radType("QED_RadType",this,2),
205 _fsrType("fsrType",this,1),
206 _smearingRecombination("SmearingRecombination",this,0),
207 _order("Order",this,2),
208 _scale("Scale",this,0),
209 _fsrCollinearCut("fsrCollinearCut",this,0),
210 _photonEnergyCut("PhotonEnergyCut",this,0.0001),
211 _photonCollinearCut("PhotonCollinearCut",this,0.0001),
212 _pdflibGroup("pdflibGroup",this,3),
213 _pdflibSet("pdflibSet",this,54),
214 _wMass("W_Mass",this,80.3),
215 _wWidth("W_Width",this,2.1),
216 _CME("CME",this,2000.0),
217 _lepton_ptmin("Lepton_ptmin",this,0.),
218 _lepton_ymax("Lepton_ymax",this,100.),
219 _neutrino_ptmin("Neutrino_ptmin",this,0.),
220 _neutrino_ymax("Neutrino_ymax",this,100.),
221 _photon_ptmin("Photon_ptmin",this,0.),
222 _photon_ymax("Photon_ymax",this,100.),
223 _tmass_low("mT_low",this,0.),
224 _tmass_high("mT_high",this,2000.),
225 _itmaxGrid("itmaxGrid",this,1),
226 _ncallGrid("ncallGrid",this,2000),
227 _itmaxPrecision("itmaxPrecision",this,2),
228 _ncallPrecision("ncallPrecision",this,5000),
229 _rndmSeed("randomSeed",this,4567),
230
231
232
233
234
235
236
237
238 _randomSeed1("RandomSeed",this,0),
239 _randomSeed2("RandomSeed",this,0) ,
240 _pythiaMenu()
241 {}
242
243 WGRAD_Module(const WGRAD_Module& m)
244 :
245 AbsGenModule( "x", "x" ),
246 _debug("debug",this,false),
247 _usePythia("usePythia",this,true),
248 _useLesHouchesModule("useLesHouchesModule",this,false),
249 _beamType("BeamType",this,1),
250 _W_charge("W_Charge",this,1),
251 _widthTreatment("widthTreatment",this,2),
252 _decayLepton("DecayLepton",this,2),
253 _QED_radType("QED_RadType",this,2),
254 _fsrType("fsrType",this,1),
255 _smearingRecombination("SmearingRecombination",this,0),
256 _order("Order",this,2),
257 _scale("Scale",this,0),
258 _fsrCollinearCut("fsrCollinearCut",this,0),
259 _photonEnergyCut("PhotonEnergyCut",this,0.0001),
260 _photonCollinearCut("PhotonCollinearCut",this,0.0001),
261 _pdflibGroup("pdflibGroup",this,3),
262 _pdflibSet("pdflibSet",this,54),
263 _wMass("W_Mass",this,80.3),
264 _wWidth("W_Width",this,2.1),
265 _CME("CME",this,2000.0),
266 _lepton_ptmin("Lepton_ptmin",this,0.),
267 _lepton_ymax("Lepton_ymax",this,100.),
268 _neutrino_ptmin("Neutrino_ptmin",this,0.),
269 _neutrino_ymax("Neutrino_ymax",this,100.),
270 _photon_ptmin("Photon_ptmin",this,0.),
271 _photon_ymax("Photon_ymax",this,100.),
272 _tmass_low("mT_low",this,0.),
273 _tmass_high("mT_high",this,2000.),
274 _itmaxGrid("itmaxGrid",this,1),
275 _ncallGrid("ncallGrid",this,2000),
276 _itmaxPrecision("itmaxPrecision",this,2),
277 _ncallPrecision("ncallPrecision",this,5000),
278 _rndmSeed("randomSeed",this,4567),
279
280
281
282
283
284
285
286
287 _randomSeed1("RandomSeed",this,0),
288 _randomSeed2("RandomSeed",this,0),
289 _pythiaMenu()
290 {}
291
292 };
293
294 #endif
Send problems or questions to cdfcode@fnal.gov