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=10, 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 =
"y2017 geant gstar agml usexgeom ";
127 gSystem->Load(
"libVMC.so");
128 gSystem->Load(
"StarGeneratorUtil.so" );
129 gSystem->Load(
"StarGeneratorEvent.so" );
130 gSystem->Load(
"StarGeneratorBase.so" );
131 gSystem->Load(
"StarGeneratorFilt.so");
132 gSystem->Load(
"libMathMore.so" );
133 gSystem->Load(
"xgeometry.so" );
138 db_maker->SetAttr(
"blacklist",
"tpc");
139 db_maker->SetAttr(
"blacklist",
"svt");
140 db_maker->SetAttr(
"blacklist",
"ssd");
141 db_maker->SetAttr(
"blacklist",
"ist");
142 db_maker->SetAttr(
"blacklist",
"pxl");
143 db_maker->SetAttr(
"blacklist",
"pp2pp");
144 db_maker->SetAttr(
"blacklist",
"ftpc");
145 db_maker->SetAttr(
"blacklist",
"emc");
146 db_maker->SetAttr(
"blacklist",
"eemc");
147 db_maker->SetAttr(
"blacklist",
"mtd");
148 db_maker->SetAttr(
"blacklist",
"pmd");
149 db_maker->SetAttr(
"blacklist",
"tof");
163 primaryMaker -> SetFileName( Form(
"pythia_%s_vz%d_run%d.root",particle,
int(vz),run));
164 chain -> AddBefore(
"geant", primaryMaker );
170 TString proc(particle);
171 if(proc.Contains(
"mb")){
172 Pythia6(
"pp:minbias", tune);
173 }
else if(proc.Contains(
"jet")){
174 Pythia6(
"pp:qcd", tune);
177 }
else if( proc.Contains(
"dy") && !proc.Contains(
"dybg") ){
178 Pythia6(
"pp:DY", tune);
181 }
else if(proc.Contains(
"dybg") && !proc.Contains(
"dybgSingle") ){
182 Pythia6(
"pp:qcd", tune);
185 }
else if(proc.Contains(
"dybgSingle")){
186 Pythia6(
"pp:qcd", tune);
188 primaryMaker->
AddFilter(dybgSinglefilter);
189 }
else if( proc.Contains(
"JPsi")){
190 Pythia6(
"pp:JPsi", tune);
223 primaryMaker->
SetSigma( 0., 0., 0. );
228 primaryMaker -> Init();
233 printf(
"PARP(90) was %f, replacing it with 0.213\n",pypars.parp(90));
234 pypars.parp(90)=0.213;
243 command(
"gkine -4 0");
244 command(Form(
"gfile o pythia_%s_vz%d_run%d.fzd",particle,
int(vz),run));
253 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.