22 TString LHAPDF_DATA_PATH=
"/afs/cern.ch/sw/lcg/external/lhapdfsets/current/";
25 void geometry( TString tag, Bool_t agml=
true )
27 TString cmd =
"DETP GEOM "; cmd += tag;
28 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
29 geant_maker -> LoadGeometry(cmd);
33 void command( TString cmd )
35 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
36 geant_maker -> Do( cmd );
39 void trig( Int_t n=1 )
41 for ( Int_t i=0; i<n; i++ ) {
49 void Pythia6( TString mode=
"pp:W", Int_t tune=370 )
53 if ( LHAPDF_DATA_PATH.Contains(
"afs") ) {
54 cout <<
"WARNING: LHAPDF_DATA_PATH points to an afs volume" << endl << endl;
55 cout <<
" You are advised to copy the PDF files you need into a local" << endl;
56 cout <<
" directory and set the LHAPDF_DATA_PATH to point to it." << endl;
59 gSystem->Setenv(
"LHAPDF_DATA_PATH", LHAPDF_DATA_PATH.Data() );
61 gSystem->Load(
"/opt/star/$STAR_HOST_SYS/lib/libLHAPDF.so");
62 gSystem->Load(
"libPythia6_4_28.so");
67 if ( mode ==
"pp:minbias" )
73 if ( tune ) pythia6->
PyTune( tune );
80 Double_t pblue[]={0.,0.,30.0};
81 Double_t pyell[]={0.,0.,-320.0};
82 pythia6->
SetFrame(
"3MOM", pblue, pyell );
85 if ( tune ) pythia6->
PyTune( tune );
93 void starsim( Int_t nevents=1, Int_t rngSeed=0 , Int_t eventnameid=0)
98 Int_t currenttime=time(0);
99 cout<<
"time : "<<currenttime<<endl;
100 rngSeed=abs((eventnameid +currenttime)*21474836) % (int)(pow(2,20));
102 cout<<
"Random seed : "<<rngSeed<<endl;
104 gROOT->ProcessLine(
".L bfc.C");
106 TString simple =
"y2012 geant gstar agml usexgeom ";
110 gSystem->Load(
"libVMC.so");
112 gSystem->Load(
"StarGeneratorUtil.so" );
113 gSystem->Load(
"StarGeneratorEvent.so" );
114 gSystem->Load(
"StarGeneratorBase.so" );
116 gSystem->Load(
"libMathMore.so" );
117 gSystem->Load(
"xgeometry.so" );
130 _primary ->
SetFileName( Form(
"pythia6.starsim_%d.root",eventnameid));
131 chain -> AddBefore(
"geant", _primary );
137 Pythia6(
"pp:minbias" ,370);
180 command(
"gkine -4 0");
181 command(
"gfile o pythia6.starsim.fzd");
189 command(
"call agexit");
void PyTune(Int_t tune)
Calls the pytune function.
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 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.
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 SetVertex(Double_t x, Double_t y, Double_t z)
Set the x, y and z vertex position.