13 #include "VectorConversion.h"
14 #include "HepMC/GenEvent.h"
15 #include "CLHEP/Vector/LorentzVector.h"
22 using namespace HepMC;
23 using namespace CLHEP;
57 evt->
use_units(HepMC::Units::GEV, HepMC::Units::MM);
71 new GenParticle( HepLorentzVector(.750,-1.569,32.191,32.238), 1, 3 );
74 new GenParticle( HepLorentzVector(-3.047,-19.,-54.629,57.920), -2, 3 );
83 new GenParticle( HepLorentzVector(-3.813,0.113,-1.833,4.233 ), 22, 1 )
86 new GenParticle( HepLorentzVector(1.517,-20.68,-20.605,85.925), -24,3);
94 new GenParticle( HepLorentzVector(-2.445,28.816,6.082,29.552), 1,1 )
97 new GenParticle( HepLorentzVector(3.962,-49.498,-26.687,56.373), -2,1 )
107 std::cout << std::endl;
108 std::cout <<
" Add output momenta " << std::endl;
109 HepLorentzVector sum;
112 if( (*p)->status() == 1 ) {
113 sum += convertTo( (*p)->momentum() );
117 std::cout <<
"Vector Sum: " << sum << std::endl;
void set_signal_process_vertex(GenVertex *)
set pointer to the vertex containing the signal process
void add_particle_in(GenParticle *inparticle)
add incoming particle
particle_const_iterator particles_begin() const
begin particle iteration
GenVertex contains information about decay vertices.
The GenEvent class is the core of HepMC.
void add_particle_out(GenParticle *outparticle)
add outgoing particle
bool add_vertex(GenVertex *vtx)
adds to evt and adopts
void print(std::ostream &ostr=std::cout) const
dumps to ostr
particle_const_iterator particles_end() const
end particle iteration
void use_units(Units::MomentumUnit, Units::LengthUnit)
The GenParticle class contains information about generated particles.