23 void geometry( TString tag, Bool_t agml=
true ){
24 TString cmd =
"DETP GEOM "; cmd += tag; cmd += Form(
" field=%f", field);
25 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
26 geant_maker -> LoadGeometry(cmd);
30 void command( TString cmd ){
31 if ( !geant_maker ) geant_maker = (
St_geant_Maker *)chain->GetMaker(
"geant");
32 geant_maker -> Do( cmd );
35 void trig( Int_t n=1,
const char* pid=
"mu-",
int print=0){
36 for ( Int_t i=0; i<n; i++ ) {
37 cout <<
"==== Event="<<i<<
"===="<<endl;
41 kinematics->
Kine( 1, pid, 2.99, 3.01, 2.50, 4.60, 0.0, 3.141592654*2.0);
52 cout << Form(
" ===> pt=%7.3f eta=%7.3f phi=%7.3f\n",v.Pt(),v.Eta(),v.Phi());
55 if(print>2) command(
"gpri hits");
61 gSystem->Load(
"libKinematics.so");
66 void runSimFlat( Int_t nevents=1000, Int_t run=1,
const char* pid=
"muon",
int print=0){
67 gROOT->ProcessLine(
".L bfc.C");{
68 TString simple =
"y2015 geant gstar agml usexgeom";
71 gSystem->Load(
"libVMC.so");
72 gSystem->Load(
"StarGeneratorUtil.so" );
73 gSystem->Load(
"StarGeneratorEvent.so" );
74 gSystem->Load(
"StarGeneratorBase.so" );
75 gSystem->Load(
"libMathMore.so" );
82 chain -> AddBefore(
"geant", primary );
84 primary -> SetFileName(Form(
"test_%s_run%i.root",pid,run));
86 primary -> SetVertex( 0., 0., 0. );
87 primary -> SetSigma ( 0., 0., 0. );
100 command(
"gkine -4 0");
101 command(Form(
"gfile o test_%s_run%i.fzd",pid,run));
104 const Char_t *cmds[] = {
107 for ( UInt_t i=0;i<
sizeof(cmds)/
sizeof(Char_t*); i++ ){command( cmds[i] );}
110 trig(nevents, pid, print);
112 command(
"call agexit");
void Print(const Option_t *opts="head") const
Star Simple Kinematics Generator.
Yet another particle class.
virtual void Clear(Option_t *option="")
User defined functions.
void AddGenerator(StarGenerator *gener)
Int_t Init()
Initialize generator.
TLorentzVector momentum()
Return the 4-momentum of the particle.
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.
TIter IterAll(Bool_t dir=kIterForward)
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())