29 const Char_t *_part =
"pi-";
32 Int_t rngSeed = 12345;
35 void geometry( TString tag, Bool_t agml=
true )
37 TString cmd =
"DETP GEOM "; cmd += tag; cmd+=
" phys_off=1";
39 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
40 geant_maker -> LoadGeometry(cmd);
43 TString path =
"$STAR/StarDb/AgMLGeometry";
44 Char_t *file = gSystem->Which( path.Data(), Form(
"Geometry.%s.C",tag.Data()), kReadPermission );
47 TString cmdL = Form(
".L %s",file);
48 TString cmdX = Form(
"CreateTable()");
49 TString cmdU = Form(
".U %s",file);
51 gInterpreter -> ProcessLine( cmdL );
52 gInterpreter -> Calc ( cmdX );
53 gInterpreter -> ProcessLine( cmdU );
57 void command( TString cmd )
59 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
60 geant_maker -> Do( cmd );
63 void trig( Int_t n=1 )
69 Double_t zvertex = _zslice;
77 kinematics ->
Kine( _ntracks, _part, _pt - 0.005, _pt + 0.00t, _eta - 0.0005, _eta + 0.0005 );
93 gSystem->Load(
"libKinematics.so");
102 void LoadLibraries(
const Char_t *chopts =
"y2014a geant gstar usexgeom agml " )
104 gROOT->ProcessLine(
".L bfc.C");
106 TString simple = chopts;
110 gSystem->Load(
"libVMC.so");
112 gSystem->Load(
"StarGeneratorUtil.so" );
113 gSystem->Load(
"StarGeneratorEvent.so" );
114 gSystem->Load(
"StarGeneratorBase.so" );
115 gSystem->Load(
"StarGeneratorStep.so" );
117 gSystem->Load(
"libMathMore.so" );
118 gSystem->Load(
"xgeometry.so" );
125 void starsim( Double_t zslice = 0.0,
128 const Char_t *fzname =
"stiscan_zslice.fz",
129 const Char_t *roname =
"stiscan_zslice.track_history.root",
130 const Char_t *rcname =
"stiscan_zslice.evgen_record.root"
142 AgUStep *step = AgUStep::Instance();
144 step->
Init( roname );
158 _primary -> SetFileName( rcname );
159 chain -> AddBefore(
"geant", _primary );
161 _primary->
SetSigma( 0.0, 0.0, 0.0 );
175 command(
"gkine -4 0");
196 command( Form(
"gfile o %s",fzname ) );
202 for ( Int_t i=0;i<nevents;i++ ) trig();
209 command(
"call agexit");
void SetSigma(Double_t sx, Double_t sy, Double_t sz, Double_t rho=0)
Star Simple Kinematics Generator.
virtual void Clear(Option_t *option="")
User defined functions.
void Init(const Char_t *filename="")
Initialize stepping routine. Opens TFile and creates TTree.
void AddGenerator(StarGenerator *gener)
Int_t Init()
Initialize generator.
static void seed(UInt_t s)
Base class for event records.
Main steering class for event generation.
static void capture()
Capture gRandom random number generator.
Sparse class to hold track kinematics.
void Kine(Int_t ntrack, const Char_t *type="pi+,pi-,K+,K-,proton,antiproton", Double_t ptlow=0.0, Double_t pthigh=500.0, Double_t ylow=-10.0, Double_t yhigh=+10.0, Double_t philow=0.0, Double_t phihigh=TMath::TwoPi())
void SetVertex(Double_t x, Double_t y, Double_t z)
Set the x, y and z vertex position.