4 #include <TDataSetIter.h>
5 #include <TLorentzVector.h>
8 #include <tables/St_g2t_event_Table.h>
9 #include <tables/St_g2t_vertex_Table.h>
10 #include <tables/St_g2t_pythia_Table.h>
11 #include <tables/St_particle_Table.h>
13 #include <StjMCParticleCutParton.h>
14 #include <StjMCMuDst.h>
15 #include "StarGenerator/StarGenEventReader/StarGenEventReader.h"
16 #include "StarGenerator/EVENT/StarGenParticle.h"
23 if (
const St_g2t_vertex* g2t_vertex_descriptor = (
const St_g2t_vertex*)geantDstI(
"g2t_vertex"))
24 if (
const g2t_vertex_st* g2t_vertex_table = g2t_vertex_descriptor->GetTable())
26 const float* geantvertex = g2t_vertex_table[0].ge_x;
27 vertex.mPosition.SetXYZ(geantvertex[0],geantvertex[1],geantvertex[2]);
33 StjMCParticleList StjMCMuDst::getMCParticleList()
35 StjMCParticleList theList;
44 if (
const St_g2t_event* g2t_event_descriptor = (
const St_g2t_event*)geantDstI(
"g2t_event")) {
45 if (
const g2t_event_st* g2t_event_table = g2t_event_descriptor->GetTable()) {
46 runNumber = g2t_event_table->n_run;
47 eventNumber = g2t_event_table->n_event;
52 if (St_g2t_pythia* g2t_pythia = (St_g2t_pythia*)geantDstI(
"g2t_pythia")) {
53 if (g2t_pythia_st* pythiaTable = g2t_pythia->GetTable()) {
54 StjMCParticleCutParton::mstu72 = pythiaTable->mstu72;
55 StjMCParticleCutParton::mstu73 = pythiaTable->mstu73;
60 if (
const St_particle* particle_descriptor = (
const St_particle*)geantDstI(
"particle")) {
61 if (
const particle_st* particle_table = particle_descriptor->GetTable()) {
62 for (
int i = 0; i < particle_descriptor->GetNRows(); ++i) {
64 particle.runNumber = runNumber;
65 particle.eventId = eventNumber;
66 particle.status = particle_table[i].isthep;
67 particle.mcparticleId = i+1;
68 particle.pdg = particle_table[i].idhep;
69 particle.firstMotherId = particle_table[i].jmohep[0];
70 particle.lastMotherId = particle_table[i].jmohep[1];
71 particle.firstDaughterId = particle_table[i].jdahep[0];
72 particle.lastDaughterId = particle_table[i].jdahep[1];
73 particle.vertexZ = particle_table[i].vhep[2];
75 TLorentzVector p4(particle_table[i].phep);
76 particle.pt = p4.Pt();
77 particle.eta = p4.Eta();
78 particle.phi = p4.Phi();
82 theList.push_back(particle);
88 LOG_INFO <<
"There is no geant in _maker. Proceed with Particle info from StarGenEventReader. " << endm;
100 for(
int ipar = 0; ipar < nparts; ipar++){
104 mcParticle.runNumber = runNumber;
105 mcParticle.eventId = eventNumber;
107 mcParticle.status = particle->
GetStatus();
108 mcParticle.mcparticleId = ipar+1;
109 mcParticle.pdg = particle->
GetId();
114 mcParticle.vertexZ = particle->
GetVz();
116 TLorentzVector p4 = particle->
momentum();
117 mcParticle.pt = p4.Pt();
118 mcParticle.eta = p4.Eta();
119 mcParticle.phi = p4.Phi();
120 mcParticle.m = p4.M();
121 mcParticle.e = p4.E();
123 theList.push_back(mcParticle);
Float_t GetVz()
Get the z-component of the start vertex.
Int_t GetNumberOfParticles()
Obtain the number of particles in the event record.
Yet another particle class.
Int_t GetStatus()
Get the status code of the particle according to the HEPEVT standard.
Int_t GetEventNumber()
Get the event number.
Int_t GetId()
Get the id code of the particle according to the PDG standard.
TLorentzVector momentum()
Return the 4-momentum of the particle.
Int_t GetLastMother()
Get the last mother particle.
Int_t GetFirstMother()
Get the first mother particle.
Int_t GetLastDaughter()
Get the last daughter particle.
Int_t GetFirstDaughter()
Get the first daughter particle.
Int_t GetRunNumber()
Get the run number for this event.