29 TString LHAPDF_DATA_PATH=
"/star/u/akio/lhapdf";
32 void geometry( TString tag, Bool_t agml=
true )
34 TString cmd =
"DETP GEOM "; cmd += tag;
35 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
36 geant_maker -> LoadGeometry(cmd);
40 void command( TString cmd )
42 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
43 geant_maker -> Do( cmd );
46 void trig( Int_t n=1 )
48 for ( Int_t i=0; i<n; i++ ) {
56 void Pythia6( TString mode=
"pp:DY", Int_t tune=370)
60 if ( LHAPDF_DATA_PATH.Contains(
"afs") ) {
61 cout <<
"WARNING: LHAPDF_DATA_PATH points to an afs volume" << endl << endl;
62 cout <<
" You are advised to copy the PDF files you need into a local" << endl;
63 cout <<
" directory and set the LHAPDF_DATA_PATH to point to it." << endl;
66 gSystem->Setenv(
"LHAPDF_DATA_PATH", LHAPDF_DATA_PATH.Data() );
68 gSystem->Load(
"/opt/star/$STAR_HOST_SYS/lib/libLHAPDF.so");
69 gSystem->Load(
"libPythia6_4_28.so");
77 if ( mode ==
"pp:minbias" ) {
79 }
else if( mode ==
"pp:qcd" ) {
81 }
else if( mode ==
"pp:DY" ) {
84 }
else if( mode ==
"pp:JPsi" ) {
93 printf(
"PARP(90) was %f, replacing it with 0.213\n",pypars.parp(90));
94 pypars.parp(90)=0.213;
98 printf(
"MDCY(102,1) was %f, replacing it with 0\n",pydat3.mdcy(102,1));
100 pydat3.mdcy(102,1) = 0;
101 pydat3.mdcy(106,1) = 0;
102 pydat3.mdcy(109,1) = 0;
103 pydat3.mdcy(116,1) = 0;
104 pydat3.mdcy(112,1) = 0;
105 pydat3.mdcy(105,1) = 0;
106 pydat3.mdcy(164,1) = 0;
107 pydat3.mdcy(167,1) = 0;
108 pydat3.mdcy(162,1) = 0;
109 pydat3.mdcy(169,1) = 0;
110 pydat3.mdcy(172,1) = 0;
111 pydat3.mdcy(174,1) = 0;
112 pydat3.mdcy(176,1) = 0;
119 void runPythia( Int_t nevents=100, Int_t run=1,
char* particle=
"JPsi",
float vz=0.0, Int_t tune=370){
120 cout<<
"Random seed : "<<run<<endl;
122 gROOT->ProcessLine(
".L bfc.C");{
123 TString simple =
"y2023 geant gstar agml usexgeom ";
127 gSystem->Load(
"libfastjet.so");
128 gSystem->Load(
"libVMC.so");
129 gSystem->Load(
"StarGeneratorUtil.so" );
130 gSystem->Load(
"StarGeneratorEvent.so" );
131 gSystem->Load(
"StarGeneratorBase.so" );
132 gSystem->Load(
"StarGeneratorFilt.so");
133 gSystem->Load(
"libMathMore.so" );
134 gSystem->Load(
"xgeometry.so" );
139 db_maker->SetAttr(
"blacklist",
"tpc");
140 db_maker->SetAttr(
"blacklist",
"svt");
141 db_maker->SetAttr(
"blacklist",
"ssd");
142 db_maker->SetAttr(
"blacklist",
"ist");
143 db_maker->SetAttr(
"blacklist",
"pxl");
144 db_maker->SetAttr(
"blacklist",
"pp2pp");
145 db_maker->SetAttr(
"blacklist",
"ftpc");
146 db_maker->SetAttr(
"blacklist",
"emc");
147 db_maker->SetAttr(
"blacklist",
"eemc");
148 db_maker->SetAttr(
"blacklist",
"mtd");
149 db_maker->SetAttr(
"blacklist",
"pmd");
150 db_maker->SetAttr(
"blacklist",
"tof");
164 primaryMaker -> SetFileName( Form(
"pythia_%s_vz%d_run%d.root",particle,
int(vz),run));
165 chain -> AddBefore(
"geant", primaryMaker );
171 TString proc(particle);
172 if(proc.Contains(
"mb")){
173 Pythia6(
"pp:minbias", tune);
174 }
else if(proc.Contains(
"jet")){
175 Pythia6(
"pp:qcd", tune);
178 }
else if( proc.Contains(
"dy") && !proc.Contains(
"dybg") ){
179 Pythia6(
"pp:DY", tune);
182 }
else if(proc.Contains(
"dybg") && !proc.Contains(
"dybgSingle") ){
183 Pythia6(
"pp:qcd", tune);
186 }
else if(proc.Contains(
"dybgSingle")){
187 Pythia6(
"pp:qcd", tune);
189 primaryMaker->
AddFilter(dybgSinglefilter);
190 }
else if( proc.Contains(
"JPsi")){
191 Pythia6(
"pp:JPsi", tune);
224 primaryMaker->
SetSigma( 0., 0., 0. );
229 primaryMaker -> Init();
234 printf(
"PARP(90) was %f, replacing it with 0.213\n",pypars.parp(90));
235 pypars.parp(90)=0.213;
244 command(
"gkine -4 0");
245 command(Form(
"gfile o pythia_%s_vz%d_run%d.fzd",particle,
int(vz),run));
254 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)
PyDat3_t & pydat3()
Returns a reference to the /PYDAT3/ common block.
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.
Main filter class. Goes anywhere in the chain, filters StarGenEvent objects.
void AddGenerator(StarGenerator *gener)
void SetBlue(const Char_t *b)
Sets the particle species for the blue beam.
void PyStat(Int_t stat)
Calls the pystat function.
PySubs_t & pysubs()
Returns a reference to the /PYSUBS/ common block.
static void seed(UInt_t s)
Base class for event records.
PyPars_t & pypars()
Returns a reference to the /PYPARS/ common block.
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 AddFilter(StarFilterMaker *filt)
void SetVertex(Double_t x, Double_t y, Double_t z)
Set the x, y and z vertex position.