30 TString LHAPDF_DATA_PATH=
"/afs/cern.ch/sw/lcg/external/lhapdfsets/current/";
34 void geometry( TString tag, Bool_t agml=
true )
36 TString cmd =
"DETP GEOM "; cmd += tag;
37 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
38 geant_maker -> LoadGeometry(cmd);
42 void command( TString cmd )
44 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
45 geant_maker -> Do( cmd );
53 void trig( Int_t n=1 )
62 void Pythia8( TString config=
"pp:W" )
70 if ( config==
"pp:W" ) {
75 pythia8->
Set(
"WeakSingleBoson:all=off");
76 pythia8->
Set(
"WeakSingleBoson:ffbar2W=on");
77 pythia8->
Set(
"24:onMode=0");
78 pythia8->
Set(
"24:onIfAny 11 -11");
81 if ( config==
"pp:510:minbias" ) {
85 pythia8->
Set(
"SoftQCD:minBias = on");
88 if ( config==
"pp:200:charmonium" ) {
92 pythia8->
ReadFile(
"star_hf_tune_v1.1-1.cmnd" );
93 pythia8->
Set(
"HardQCD:all = off" );
94 pythia8->
Set(
"Charmonium:all=on" );
96 if ( config==
"pp:200:bottomonium" ) {
100 pythia8->
ReadFile(
"star_hf_tune_v1.1-1.cmnd" );
101 pythia8->
Set(
"HardQCD:all = off" );
102 pythia8->
Set(
"Bottomonium:all=on" );
104 if ( config==
"pp:200:drellyan" ) {
108 pythia8->
ReadFile(
"star_hf_tune_v1.1-1.cmnd" );
109 pythia8->
Set(
"HardQCD:all = off" );
110 pythia8->
Set(
"WeakSingleBoson:ffbar2gmZ=on" );
112 if ( config==
"pp:200:minbias" ) {
116 pythia8->
ReadFile(
"star_hf_tune_v1.1-1.cmnd" );
117 pythia8->
Set(
"HardQCD:all = on" );
118 pythia8->
Set(
"SoftQCD:minbias = on" );
123 pythia8->
Set(
"Main:numberOfEvents = 1 ");
131 void starsim( Int_t nevents=10000, Int_t rngSeed=1234 )
134 gROOT->ProcessLine(
".L bfc.C");
136 TString simple =
"y2012 geant gstar usexgeom agml -detdb -db";
140 gSystem->Load(
"libVMC.so");
142 gSystem->Load(
"StarGeneratorUtil.so");
143 gSystem->Load(
"StarGeneratorEvent.so");
144 gSystem->Load(
"StarGeneratorBase.so" );
147 if ( LHAPDF_DATA_PATH.Contains(
"afs") ) {
148 cout << endl << endl;
149 cout <<
"WARNING: LHAPDF_DATA_PATH points to an afs volume" << endl << endl;
150 cout <<
" You are advised to copy the PDF files you need into a local" << endl;
151 cout <<
" directory and set the LHAPDF_DATA_PATH to point to it." << endl;
152 cout << endl << endl;
155 gSystem->Setenv(
"LHAPDF_DATA_PATH", LHAPDF_DATA_PATH.Data() );
156 gSystem->Load(
"/opt/star/$STAR_HOST_SYS/lib/libLHAPDF.so");
158 gSystem->Load(
"Pythia8_1_62.so");
160 gSystem->Load(
"libMathMore.so" );
163 gSystem->Load(
"xgeometry.so" );
172 gSystem->Load(
"Pythia8_1_62.so" );
183 _primary =
new Star_PrimaryMaker();
187 _primary ->
SetSigma ( 0.1, 0.1, 30.0 );
188 chain -> AddBefore(
"geant", _primary );
194 Pythia8(
"pp:200:bottomonium");
216 _primary->
SetSigma( 0.1, 0.1, 30.0 );
230 command(
"gkine -4 0");
231 command(
"gfile o pythia8.starsim.fzd");
247 command(
"call agexit");
void ReadFile(const char *f)
Read in a command file.
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 SetFileName(const Char_t *name)
Set the filename of the output TTree.
void Print(const Option_t *opts="head") const
void SetPhiRange(Double_t phimin, Double_t phimax)
Set phi range. Particles falling outside this range will be dropped from simulation.
void AddGenerator(StarGenerator *gener)
void SetBlue(const Char_t *b)
Sets the particle species for the blue beam.
static void seed(UInt_t s)
Base class for event records.
StarGenEvent * event()
Return a pointer to the event.
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.
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.