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,
"B_c+", 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 ";
74 gSystem->Load(
"libVMC.so");
76 gSystem->Load(
"StarGeneratorUtil.so" );
77 gSystem->Load(
"StarGeneratorEvent.so" );
78 gSystem->Load(
"StarGeneratorBase.so" );
79 gSystem->Load(
"StarGeneratorDecay.so" );
80 gSystem->Load(
"libPythia8_1_86.so");
82 gSystem->Load(
"libMathMore.so" );
83 gSystem->Load(
"xgeometry.so" );
98 _primary -> SetFileName(
"kinematics.starsim.root");
99 chain -> AddBefore(
"geant", _primary );
113 decayPy8->
Set(
"WeakSingleBoson:all = on");
118 double mass, lifetime, charge;
119 int tracktype, pdgcode, g3code;
130 decayPy8->
Set(
"541:onMode = 0");
131 decayPy8->
Set(
"541:onIfAll = 443 11 12");
132 decayPy8->
Set(
"443:onMode = 0");
133 decayPy8->
Set(
"443:onIfAll = 11");
147 command(
"gkine -4 0");
148 command(
"gfile o kinematics.starsim.fzd");
155 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.