23 TString material =
"Al";
25 const Double_t inch = 2.54;
27 Double_t bp_oradius = 1.125;
28 Double_t bp_iradius = 0.975;
29 Double_t bp_startz = -55.21 * inch;
30 Double_t bp_endz = +55.21 * inch;
90 void geometry( TString tag, Bool_t agml=
true )
92 TString cmd =
"DETP GEOM "; cmd += tag;
93 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
94 geant_maker -> LoadGeometry(cmd);
98 void command( TString cmd )
100 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
101 geant_maker -> Do( cmd );
118 bp_iradius = 0.7875 * inch;
120 if ( TMath::Abs(z) < 55.21 * inch ) bp_oradius = bp_iradius + 0.065 * inch;
121 if ( TMath::Abs(z) < 43.71 * inch ) bp_oradius = bp_iradius + 0.055 * inch;
122 if (z>-15.75 *inch && z<31.5*inch ) bp_oradius = bp_iradius + 0.030 * inch;
132 circle.SetMagPhi( r, phi );
134 Double_t x = circle.X();
135 Double_t y = circle.Y();
143 void trig( Int_t n=0 )
145 for ( Int_t i=0; i<n+1; i++ ) {
158 TDataSet *geant = chain->DataSet(
"geant");
160 St_g2t_track *trackTable = Iter.Find(
"g2t_track");
161 St_g2t_vertex *vertexTable = Iter.Find(
"g2t_vertex");
162 if (!trackTable)
return;
163 if (!vertexTable)
return;
164 Int_t nt = trackTable->GetNRows();
165 Int_t nv = vertexTable->GetNRows();
167 g2t_track_st *
track = trackTable->GetTable();
168 g2t_vertex_st *
vertex = vertexTable->GetTable();
170 for ( Int_t i=0;i<nt; i++, track++ )
172 Float_t px = track->p[0];
173 Float_t py = track->p[1];
174 Float_t pz = track->p[2];
176 hPT -> Fill( TMath::Sqrt( px*px + py*py ) );
179 nv=1;
for ( Int_t i=0;i<nv; i++, vertex++ )
181 Float_t x = vertex->ge_x[0];
182 Float_t y = vertex->ge_x[1];
183 Float_t z = vertex->ge_x[2];
193 hijing->SetTitle(
"Hijing 1.383");
202 void starsim(
const Char_t *basename=
"rcf14000",
207 TString name = basename;
208 Float_t energy = 0.0;
209 if ( setnum<3000 ) energy = -7.25;
210 if ( setnum<2000 ) energy = +7.25;
212 name += Form(
"_%i_%ievts",setnum,nevents);
215 Int_t rngSeed = setnum;
217 hXY =
new TH2F(
"hXY",
"Y_{vertex} vs X_{vertex}",101,-2.525,2.525,100,-2.5,2.5);
218 hZ =
new TH1F(
"hZ",
"Z_{vertex}",101,-101.,+101.);
219 hPT =
new TH1F(
"hPT",
"p_{T} [GeV]",100,0.,10.);
220 hPz =
new TH1F(
"hPz",
"p_{z} [GeV]",101,-50.5,50.5);
222 gROOT->ProcessLine(
".L bfc.C");
224 TString simple =
"y2014 geant gstar usexgeom agml ";
228 gSystem->Load(
"libVMC.so");
230 gSystem->Load(
"StarGeneratorUtil.so" );
231 gSystem->Load(
"StarGeneratorEvent.so" );
232 gSystem->Load(
"StarGeneratorBase.so" );
233 gSystem->Load(
"libMathMore.so" );
234 gSystem->Load(
"libHijing1_383.so");
235 gSystem->Load(
"xgeometry.so" );
247 _primary -> SetFileName( Form(
"%s.genevents.root",name.Data()) );
248 chain -> AddBefore(
"geant", _primary );
265 _primary -> AddGenerator(hijing);
266 _primary -> SetCuts( 1.0E-6 , -1., -2.5, +2.5 );
290 command(
"gkine -4 0");
292 command( Form(
"gfile o %s.fzd",name.Data()) );
298 command(
"gprint kine");
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 SetImpact(Double_t bmin, Double_t bmax)
Set the minimum and maximum impact parameters for the collision (HI generators)
virtual void Clear(Option_t *option="")
User defined functions.
void SetBlue(const Char_t *b)
Sets the particle species for the blue beam.
Double_t flat() const
Return a random number uniformly distributed between 0 and 1.
HiParnt_t & hiparnt()
Returns a reference to the hijing parameters.
Interface to the HIJING event generator.
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.
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.