1 #include "StarPythia6.h"
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"
21 StarPythia6::StarPythia6(
const Char_t *name ) :
StarGenerator(name)
28 const Int_t decays[] = { 2, 3, 4, 5, 11, 12, 13, 14, 15 };
29 for ( UInt_t i=0;i<
sizeof(decays)/
sizeof(Int_t); i++ )
33 const Int_t docum[] = { 21, 31, 32, 41, 42, 51, 52 };
34 for ( UInt_t i=0;i<
sizeof(docum)/
sizeof(Int_t); i++ )
79 std::map< TString, string > particle;
80 particle[
"proton"]=
"p";
99 return StMaker::Init();
116 mNumberOfParticles =
pyjets().n;
117 for ( Int_t idx=1; idx<=mNumberOfParticles; idx++ )
120 Int_t
id =
pyjets().k(idx,2);
121 Int_t stat = mStatusCode[
pyjets().k(idx,1) ];
125 Int_t m1 =
pyjets().k(idx,3);
127 Int_t d1 =
pyjets().k(idx,4);
128 Int_t d2 =
pyjets().k(idx,5);
129 Double_t px =
pyjets().p(idx,1);
130 Double_t py =
pyjets().p(idx,2);
131 Double_t pz =
pyjets().p(idx,3);
132 Double_t E =
pyjets().p(idx,4);
133 Double_t M =
pyjets().p(idx,5);
134 Double_t vx =
pyjets().v(idx,1);
135 Double_t vy =
pyjets().v(idx,2);
136 Double_t vz =
pyjets().v(idx,3);
137 Double_t vt =
pyjets().v(idx,4);
139 mEvent -> AddParticle( stat,
id, m1, m2, d1, d2, px, py, pz, E, M, vx, vy, vz, vt );
154 myevent -> idBlue =
pypars().msti(11);
155 myevent -> idYell =
pypars().msti(12);
156 myevent -> process =
pysubs().msel;
157 myevent -> subprocess =
pypars().msti(1);
159 myevent -> idParton1 =
pypars().msti(15);
160 myevent -> idParton2 =
pypars().msti(16);
161 myevent -> xParton1 =
pypars().pari(31);
162 myevent -> xParton2 =
pypars().pari(32);
163 myevent -> xPdf1 = 0;
164 myevent -> xPdf2 = 0;
165 myevent -> Q2fac =
pypars().pari(22);
166 myevent -> Q2ren = 0.;
167 myevent -> valence1 = -1;
168 myevent -> valence2 = -1;
170 myevent -> sHat =
pypars().pari(14);
171 myevent -> tHat =
pypars().pari(15);
172 myevent -> uHat =
pypars().pari(16);
173 myevent -> ptHat =
pypars().pari(17);
174 myevent -> thetaHat = TMath::ACos(
pypars().pari(41) );
175 myevent -> phiHat = -999;
177 myevent -> weight =
pypars().pari(7);
179 myevent -> mstu72 =
pydat1().mstu(72);
180 myevent -> mstu73 =
pydat1().mstu(73);
192 myevent -> idBlue =
pypars().msti(11);
193 myevent -> idYell =
pypars().msti(12);
194 myevent -> process =
pysubs().msel;
195 myevent -> subprocess =
pypars().msti(1);
198 Int_t
id =
pypars().msti(15);
199 Double_t x =
pypars().pari(31);
200 if ( TMath::Abs(
id)>6 ) {
id =
pypars().msti(16); x =
pypars().pari(32); }
201 myevent -> idParton = id;
202 myevent -> xParton = x;
206 myevent -> Q2 =
pypars().pari(22);
207 myevent -> weight =
pypars().pari(7);
213 StarGenStats stats(
"Pythia6Stats",
"Pythia 6 Run Statistics");
216 stats.nTried =
pyint5().ngen(0,1);
217 stats.nSelected =
pyint5().ngen(0,2);
218 stats.nAccepted =
pyint5().ngen(0,3);
219 stats.sigmaGen =
pyint5().xsec(0,3);
224 stats.nFilterSeen = stats.nAccepted;
225 stats.nFilterAccept = stats.nAccepted;
void FillEP(StarGenEvent *event)
(Optional) Method to fill a DIS event
void PyTune(Int_t tune)
Calls the pytune function.
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)
PyDat3_t & pydat3()
Returns a reference to the /PYDAT3/ common block.
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.
void FillPP(StarGenEvent *event)
(Optional) Method to fill a PP event
PyInt5_t & pyint5()
Returns a reference to the /PYINT5/ common block.
void PyStat(Int_t stat)
Calls the pystat function.
TLorentzVector mBlueMomentum
4-Momentum of the blue beam
PyDat1_t & pydat1()
Returns a reference to the /PYDAT1/ common block.
PySubs_t & pysubs()
Returns a reference to the /PYSUBS/ common block.
Double_t flat() const
Return a random number uniformly distributed between 0 and 1.
End of run statistics for event generators.
StarGenStats Stats()
Create and retrieve end-of-run statistics.
PyJets_t & pyjets()
Returns a reference to the /PYJETS/ common block.
Base class for event records.
Event record class tailored to DIS kinemaics.
PyPars_t & pypars()
Returns a reference to the /PYPARS/ common block.
TString mFrame
Frame of the collision, i.e. CMS, FIXT, 3MOM, 4MOM, 5MOM.
TString mBlue
Name of the blue beam particle (+z)
void PyList(Int_t list)
Calls the pylist function.