23 void geometry( TString tag, Bool_t agml=
true )
25 TString cmd =
"DETP GEOM "; cmd += tag;
26 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
27 geant_maker -> LoadGeometry(cmd);
31 void command( TString cmd )
33 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
34 geant_maker -> Do( cmd );
38 const char* types[] = {
"mu+",
"mu-" };
39 void trig( Int_t n=1 )
41 for ( Int_t i=0; i<n; i++ ) {
56 kinematics ->
Cosmic( 1, types[i%2], 3.0, 10.0, 510.0, -10.0, +10.0, 5.0 );
64 command(
"gprint hits");
75 gSystem->Load(
"libKinematics.so");
83 void starsim( Int_t nevents=1, Int_t rngSeed=1234 )
86 gROOT->ProcessLine(
".L bfc.C");
88 TString simple =
"y2015a geant gstar usexgeom agml ";
92 gSystem->Load(
"libVMC.so");
94 gSystem->Load(
"StarGeneratorUtil.so" );
95 gSystem->Load(
"StarGeneratorEvent.so" );
96 gSystem->Load(
"StarGeneratorBase.so" );
98 gSystem->Load(
"libMathMore.so" );
99 gSystem->Load(
"xgeometry.so" );
112 _primary -> SetFileName(
"kinematics.starsim.root");
113 chain -> AddBefore(
"geant", _primary );
127 command(
"gkine -4 0");
128 command(
"gfile o kinematics.starsim.fzd");
136 ptDist =
new TF1(
"ptDist",
"(x/[0])/(1+(x/[0])^2)^6",0.0,10.0);
137 ptDist->SetParameter(0, pt0);
140 etaDist =
new TF1(
"etaDist",
"-TMath::Erf(x+2.6)*TMath::Erf(x-2.6)",-0.8,+0.8);
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)
Int_t Init()
Initialize generator.
static void seed(UInt_t s)
Base class for event records.
StarGenEvent * event()
Return a pointer to the event.
void Cosmic(int ntrack, const char *type="mu+", double plow=3.0, double phigh=10.0, double radius=300.0, double zmin=-3.0, double zmax=+3.0, double dtheta=15.0)
Main steering class for event generation.
static void capture()
Capture gRandom random number generator.
Sparse class to hold track kinematics.