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++ ) {
42 kinematics->
Kine( 1,
"J/psi", 5.0, 10.0, -2.0, 2.0 );
46 command(
"gprint kine");
57 gSystem->Load(
"libKinematics.so");
65 void starsim( Int_t nevents=1, Int_t rngSeed=1234 )
68 gROOT->ProcessLine(
".L bfc.C");
70 TString simple =
"y2012 geant gstar usexgeom agml debug"; bfc(0, simple );
73 gSystem->Load(
"libVMC.so");
75 gSystem->Load(
"StarGeneratorUtil.so" );
76 gSystem->Load(
"StarGeneratorEvent.so" );
77 gSystem->Load(
"StarGeneratorBase.so" );
78 gSystem->Load(
"StarGeneratorDecay.so" );
79 gSystem->Load(
"libPythia8_1_86.so");
81 gSystem->Load(
"libMathMore.so" );
82 gSystem->Load(
"xgeometry.so" );
97 _primary -> SetFileName(
"kinematics.starsim.root");
98 chain -> AddBefore(
"geant", _primary );
112 decayPy8->
Set(
"WeakSingleBoson:all = on");
117 double mass, lifetime, charge;
118 int tracktype, pdgcode, g3code;
129 decayPy8->
Set(
"541:onMode = 0");
130 decayPy8->
Set(
"541:onIfAll = 443 11 12");
131 decayPy8->
Set(
"443:onMode = 0");
132 decayPy8->
Set(
"443:onIfAll = 11");
145 command(
"gkine -4 0");
146 command(
"gfile o kinematics.starsim.fzd");
153 command(
"call agexit");
void Print(const Option_t *opts="head") const
Star Simple Kinematics Generator.
virtual void Clear(Option_t *option="")
User defined functions.
static StarParticleData & instance()
Returns a reference to the single instance of this class.
TParticlePDG * GetParticle(const Char_t *name)
Get a particle by name.
Interface to PDG information.
void AddGenerator(StarGenerator *gener)
Connects VMC to class(es) which handle particle decays.
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.
void AddDecayer(Int_t pdgid, TVirtualMCDecayer *decayer)
void SetDebug(int dbg=1)
Set the debug level.
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())
TParticlePDG * AddParticleToG3(const char *name, const double mass, const double lifetime, const double charge, const int tracktype, const int pdgcode, const int g3code, const double *bratio=0, const int *mode=0)
void Set(const char *cmd)
Modify pythia8 behavior.