22 void geometry( TString tag, Bool_t agml=
true )
24 TString cmd =
"DETP GEOM "; cmd += tag;
25 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
26 geant_maker -> LoadGeometry(cmd);
30 void command( TString cmd )
32 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
33 geant_maker -> Do( cmd );
36 void trig( Int_t n=1 )
38 for ( Int_t i=0; i<n; i++ ) {
44 kinematics->
Kine( 1,
"mu-", 10.0, 50.0, -2.0, 2.0 );
47 kinematics->
Kine(4,
"mu+", 0., 5., -2.0, +2.0 );
50 kinematics->
Dist(4,
"pi0", ptDist, etaDist );
66 gSystem->Load(
"libKinematics.so");
74 void starsim( Int_t nevents=1, Int_t rngSeed=1234 )
77 gROOT->ProcessLine(
".L bfc.C");
79 TString simple =
"y2018a geant gstar usexgeom agml ";
83 gSystem->Load(
"libVMC.so");
85 gSystem->Load(
"StarGeneratorUtil.so" );
86 gSystem->Load(
"StarGeneratorEvent.so" );
87 gSystem->Load(
"StarGeneratorBase.so" );
89 gSystem->Load(
"libMathMore.so" );
90 gSystem->Load(
"xgeometry.so" );
103 _primary -> SetFileName(
"kinematics.starsim.root");
104 chain -> AddBefore(
"geant", _primary );
118 command(
"gkine -4 0");
119 command(
"gfile o kinematics.starsim.fzd");
127 ptDist =
new TF1(
"ptDist",
"(x/[0])/(1+(x/[0])^2)^6",0.0,10.0);
128 ptDist->SetParameter(0, pt0);
131 etaDist =
new TF1(
"etaDist",
"-TMath::Erf(x+2.6)*TMath::Erf(x-2.6)",-0.8,+0.8);
138 command(
"call agexit");
void Print(const Option_t *opts="head") const
Star Simple Kinematics Generator.
virtual void Clear(Option_t *option="")
User defined functions.
void AddGenerator(StarGenerator *gener)
void Dist(Int_t ntrack, const Char_t *type, TF1 *pt, TF1 *y, TF1 *phi=0)
Int_t Init()
Initialize generator.
static void seed(UInt_t s)
Base class for event records.
StarGenEvent * event()
Return a pointer to the event.
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())