4 #include "StarCallf77.h"
5 #include "StarGenerator/EVENT/StarGenPPEvent.h"
6 #include "StarGenerator/EVENT/StarGenEPEvent.h"
7 #include "StarGenerator/EVENT/StarGenParticle.h"
9 #include "StarGenerator/UTIL/StarRandom.h"
33 for ( UInt_t i=0; i<200; i++)
50 Double_t ProtonMass = 0.938272046;
52 Double_t NeutronMass = 0.939565378;
55 map<TString,Int_t> A, Z;
56 A[
"p"] = 1; Z[
"p"] = 1;
57 A[
"n"] = 1; Z[
"n"] = 0;
58 A[
"d"] = 2; Z[
"d"] = 1;
59 A[
"He3"]= 3; Z[
"He3"]= 2;
60 A[
"Au"] = 197; Z[
"Au"] = 79;
61 A[
"Cu"] = 64; Z[
"Cu"] = 29;
62 A[
"U"] = 238; Z[
"U"] = 92;
64 A[
"proton"] =1; Z[
"proton"] =1;
65 A[
"neutron"] =1; Z[
"neutron"] =0;
66 A[
"deuteron"] =2; Z[
"deuteron"] =1;
67 A[
"e-"] =0; Z[
"e-"] =0;
68 A[
"electron"] =0; Z[
"electron"] =0;
69 A[
"e+"] =0; Z[
"e+"] =0;
70 A[
"positron"] =0; Z[
"positron"] =0;
73 TString myBlue =
mBlue;
74 TString myYell =
mYell;
79 Blue << A[myBlue] <<
" " << Z[myBlue];
80 Yell << A[myYell] <<
" " << Z[myYell];
82 InputParametersString[
"pro"] = Blue.str().c_str();
83 InputParametersString[
"tar"] = Yell.str().c_str();
85 stringstream impactParameters;
87 InputParametersString[
"IMP"] = impactParameters.str().c_str();
96 std::map< TString, string > particle;
98 particle[
"proton"] =
"P ";
99 particle[
"e-"] =
"E- ";
104 InputParametersDouble[
"ecm"]=
mRootS;
110 InputParametersDouble[
"ecm"]=
mRootS;
119 StableParticles.push_back(
"101");
121 StableParticles.push_back(
"102");
123 StableParticles.push_back(
"");
125 StableParticles.push_back(
"");
127 StableParticles.push_back(
"");
129 StableParticles.push_back(
"27");
133 StableParticles.push_back(
"40");
136 StableParticles.push_back(
"49");
138 StableParticles.push_back(
"55");
143 return StMaker::Init();
159 mNumberOfParticles = 1;
161 for ( Int_t idx=1; idx<=mNumberOfParticles; idx++ )
164 Int_t
id = isys().uid(idx);
170 Int_t m1 = itdelay().ityptd(idx,1);
171 Int_t m2 = itdelay().ityptd(idx,2);
174 Double_t px = coor().px(idx);
175 Double_t py = coor().py(idx);
176 Double_t pz = coor().pz(idx);
177 Double_t E = coor().p0(idx);
178 Double_t M = coor().fmass(idx);
182 Double_t vt = sqrt(E*2/M);
184 mEvent -> AddParticle( stat,
id, m1, m2, d1, d2, px, py, pz, E, M, vx, vy, vz, vt );
205 myevent -> idBlue = 0;
206 myevent -> idYell = 0;
207 myevent -> process = 0;
211 myevent -> subprocess = 0;
213 myevent -> idParton1 = -999;
214 myevent -> idParton2 = -999;
215 myevent -> xParton1 = 0;
216 myevent -> xParton2 = 0;
217 myevent -> xPdf1 = -999;
218 myevent -> xPdf2 = -999;
219 myevent -> Q2fac = -999;
220 myevent -> Q2ren = -999;
221 myevent -> valence1 = 0;
222 myevent -> valence2 = 0;
227 myevent -> ptHat = -999;
228 myevent -> thetaHat = -999;
229 myevent -> phiHat = -999;
231 myevent -> weight = -999;
256 std::ofstream inputfile;
257 inputfile.open(
"UrQMD.in" );
258 for(map<TString,Int_t>::iterator i = InputParametersInt.begin(); i != InputParametersInt.end(); i++)
260 inputfile << i->first <<
" " << i->second << endl;
262 for(map<TString,Double_t>::iterator i = InputParametersDouble.begin(); i != InputParametersDouble.end(); i++)
264 inputfile << i->first <<
" " << i->second << endl;
266 for(map<TString,TString>::iterator i = InputParametersString.begin(); i != InputParametersString.end(); i++)
268 inputfile << i->first <<
" " << i->second << endl;
271 for(
unsigned int i = 0; i< StableParticles.size(); i++)
273 inputfile <<
"stb " << StableParticles[i] << endl;
276 inputfile <<
"tim 200 200" << endl;
278 inputfile <<
"f13 \n f14 \n f15 \n f16 \n f17 \n f18 \n f19 \n f20" << endl;
280 inputfile <<
"nev 1000" << endl;
282 inputfile <<
"rsd 111" << endl;
284 inputfile <<
"xxx and done" << endl;
Double_t mRootS
CMS energy or incident beam momentum for fixed target collisions.
static StarRandom & Instance()
Obtain the single instance of the random number generator.
TString mYell
Name of the yellow beam particle (-z)
Event record class tailored to PP kinematics.
TLorentzVector mYellMomentum
4-Momentum of the yellow beam
ABC for defining event generator interfaces.
StarGenEvent * mEvent
Generated event.
Double_t mImpactMin
Minimum impact parameter in a HI collision.
Double_t mImpactMax
Maximum impact parameter in a HI collision.
TLorentzVector mBlueMomentum
4-Momentum of the blue beam
StarUrQMD(const Char_t *name="UrQMD3_3_1")
Double_t flat() const
Return a random number uniformly distributed between 0 and 1.
Base class for event records.
Event record class tailored to DIS kinemaics.
void FillEP(StarGenEvent *event)
(Optional) Method to fill a DIS event
TString mFrame
Frame of the collision, i.e. CMS, FIXT, 3MOM, 4MOM, 5MOM.
TString mBlue
Name of the blue beam particle (+z)
void FillPP(StarGenEvent *event)
JFN 11/18/12 13:24 - I think having a clear function is optional, and UrQMD doesn't have any explicit...