20 const bool GEANT_HANDLES_DECAYS =
true;
35 void trig( Int_t n=1 )
37 for ( Int_t i=0; i<n; i++ ) {
40 _primary -> event() -> Print();
46 void Pythia6( TString mode=
"pp:W", Int_t tune=320 )
50 gSystem->Load(
"libPythia6_4_28.so");
58 if ( tune ) pythia6->
PyTune( tune );
62 int& msel = pysubs.msel;
66 float& ckin3 = pysubs.ckin(3);
73 pythia6 -> SetDecayFlag( +24, 0 );
74 pythia6 -> SetDecayFlag( -24, 0 );
75 pythia6 -> SetDecayFlag( +23, 0 );
76 pythia6 -> SetDecayFlag( -23, 0 );
77 pythia6 -> SetDecayFlag( +15, 0 );
78 pythia6 -> SetDecayFlag( -15, 0 );
82 if ( mode ==
"pp:minbias" )
87 if ( tune ) pythia6->
PyTune( tune );
91 Double_t pblue[]={0.,0.,30.0};
92 Double_t pyell[]={0.,0.,-320.0};
93 pythia6->
SetFrame(
"3MOM", pblue, pyell );
96 if ( tune ) pythia6->
PyTune( tune );
104 void Pythia8( TString config=
"pp:W",
const char* _library=
"libPythia8_1_62.so" )
106 gSystem->Load( _library );
114 if ( config==
"pp:W" )
120 pythia8->
Set(
"WeakSingleBoson:all=off");
121 pythia8->
Set(
"WeakSingleBoson:ffbar2W=on");
122 pythia8->
Set(
"24:onMode=0");
123 pythia8->
Set(
"24:onIfAny 11 -11");
126 if ( config==
"pp:minbias" )
132 pythia8->
Set(
"SoftQCD:minBias = on");
135 _primary -> AddGenerator( pythia8 );
141 void starsim( Int_t nevents=1000, UInt_t rngSeed = 12345 )
144 gROOT->ProcessLine(
".L bfc.C");
146 TString simple =
"tables nodefault";
150 gSystem->Load(
"libVMC.so");
151 gSystem->Load(
"St_g2t.so" );
152 gSystem->Load(
"St_geant_Maker.so" );
154 gSystem->Load(
"StarGeneratorUtil.so" );
155 gSystem->Load(
"StarGeneratorEvent.so" );
156 gSystem->Load(
"StarGeneratorBase.so" );
158 gSystem->Load(
"libMathMore.so" );
167 _primary -> SetFileName(
"pythia8.starsim.root");
174 Pythia8(
"pp:minbias" );
181 random.
seed( rngSeed );
214 if ( GEANT_HANDLES_DECAYS ) {
215 _pythia8->
Set(
"111:onMode=1");
216 _pythia8->
Set(
"211:onMode=1");
217 _pythia8->
Set(
"221:onMode=1");
218 _pythia8->
Set(
"321:onMode=1");
219 _pythia8->
Set(
"310:onMode=1");
220 _pythia8->
Set(
"130:onMode=1");
221 _pythia8->
Set(
"3122:onMode=1");
222 _pythia8->
Set(
"3112:onMode=1");
223 _pythia8->
Set(
"3222:onMode=1");
224 _pythia8->
Set(
"3212:onMode=1");
225 _pythia8->
Set(
"3312:onMode=1");
226 _pythia8->
Set(
"3322:onMode=1");
227 _pythia8->
Set(
"3334:onMode=1");
void PyTune(Int_t tune)
Calls the pytune function.
static StarRandom & Instance()
Obtain the single instance of the random number generator.
void SetSigma(Double_t sx, Double_t sy, Double_t sz, Double_t rho=0)
void SetFrame(const Char_t *frame, const Double_t val)
void SetPhiRange(Double_t phimin, Double_t phimax)
Set phi range. Particles falling outside this range will be dropped from simulation.
virtual void Clear(Option_t *option="")
User defined functions.
void AddGenerator(StarGenerator *gener)
void SetBlue(const Char_t *b)
Sets the particle species for the blue beam.
A class for providing random number generation.
PySubs_t & pysubs()
Returns a reference to the /PYSUBS/ common block.
static void seed(UInt_t s)
Base class for event records.
Main steering class for event generation.
void SetYell(const Char_t *y)
Sets the particle species for the yellow beam.
void SetPtRange(Double_t ptmin, Double_t ptmax=-1)
Set PT range. Particles falling outside this range will be dropped from simulation.
static void capture()
Capture gRandom random number generator.
void SetEtaRange(Double_t etamin, Double_t etamax)
Set rapidity range. Particles falling outside this range will be dropped from simulation.
int Init()
Initialize the event generator.
void Set(const char *s)
Pass a string to Pythia8::Pythia::readString(), for user configuration.
void SetVertex(Double_t x, Double_t y, Double_t z)
Set the x, y and z vertex position.