StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StarGenerator
macros
starsim.reader.standalone.C
1
19
class
St_geant_Maker
;
20
St_geant_Maker
*geant_maker = 0;
21
22
class
StarGenEvent
;
23
StarGenEvent
*
event
= 0;
24
25
class
StarPrimaryMaker
;
26
StarPrimaryMaker
*_primary = 0;
27
28
class
StarGenEventReader
;
29
StarGenEventReader
*eventreader = 0;
30
31
32
// ----------------------------------------------------------------------------
33
// ----------------------------------------------------------------------------
34
// ----------------------------------------------------------------------------
35
void
reader( Int_t nevents=1, UInt_t rngSeed = 12345 )
36
{
37
38
gROOT->ProcessLine(
".L bfc.C"
);
39
{
40
TString simple =
"tables nodefault"
;
41
bfc(0, simple );
42
}
43
44
gSystem->Load(
"libVMC.so"
);
45
gSystem->Load(
"St_g2t.so"
);
46
gSystem->Load(
"St_geant_Maker.so"
);
47
48
gSystem->Load(
"StarGeneratorUtil.so"
);
49
gSystem->Load(
"StarGeneratorEvent.so"
);
50
gSystem->Load(
"StarGeneratorBase.so"
);
51
52
gSystem->Load(
"libMathMore.so"
);
53
gSystem->Load(
"libStarGenEventReader.so"
);
54
55
56
eventreader =
new
StarGenEventReader
();
57
eventreader -> SetInputFile(
"pythia_jet_vz0_run1.genevent.root"
,
"genevents"
,
"primaryEvent"
);
58
59
60
chain->
Clear
();
61
chain->
Make
();
62
63
StarGenEvent
*
event
= eventreader->
Event
();
64
65
66
std::cout <<
"GENERATOR ID = "
<<
event
->
GetGeneratorId
() << std::endl;
67
std::cout <<
"PROCESS ID = "
<<
event
->GetProcessId() << std::endl;
68
std::cout <<
"RUN NUMBER = "
<<
event
->GetRunNumber() << std::endl;
69
std::cout <<
"EVENT NUMBER = "
<<
event
->GetEventNumber() << std::endl;
70
std::cout <<
"NUM PARTICLES = "
<<
event
->GetNumberOfParticles() << std::endl;
71
72
StarGenParticle
* particle;
73
TIter&
Next
=
event
->IterAll();
74
while
( (particle = (
StarGenParticle
*)
Next
() ) ) {
75
particle->
Print
();
76
}
77
78
79
80
81
}
82
// ----------------------------------------------------------------------------
83
StarGenerator::Event
StarGenEvent * Event()
Retrieves the event record.
Definition:
StarGenerator.h:157
StarGenParticle
Yet another particle class.
Definition:
StarGenParticle.h:69
StChain::Clear
virtual void Clear(Option_t *option="")
User defined functions.
Definition:
StChain.cxx:77
StarGenEventReader
Definition:
StarGenEventReader.h:7
TDataSet::Next
virtual TDataSet * Next() const
Definition:
TDataSet.cxx:447
StChain::Make
virtual Int_t Make()
Definition:
StChain.cxx:110
StarGenEvent
Base class for event records.
Definition:
StarGenEvent.h:81
StarPrimaryMaker
Main steering class for event generation.
Definition:
StarPrimaryMaker.h:103
StarGenParticle::Print
void Print(const Option_t *opts="") const
Print the particle.
Definition:
StarGenParticle.cxx:39
St_geant_Maker
Definition:
St_geant_Maker.h:156
StarGenEvent::GetGeneratorId
Int_t GetGeneratorId()
Returns the generator ID.
Definition:
StarGenEvent.h:93
Generated by
1.8.5