/usr/include/Rivet/RivetHepMC.hh is in librivet-dev 1.8.3-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | // -*- C++ -*-
#ifndef RIVET_RivetHepMC_HH
#define RIVET_RivetHepMC_HH
#include "HepMC/GenEvent.h"
#include "HepMC/GenParticle.h"
#include "HepMC/GenVertex.h"
#include <vector>
namespace Rivet {
using HepMC::GenEvent;
using HepMC::GenParticle;
using HepMC::GenVertex;
inline vector<GenParticle*> particles(const GenEvent& ge) {
vector<GenParticle*> rtn;
for (GenEvent::particle_const_iterator pi = ge.particles_begin(); pi != ge.particles_end(); ++pi) {
rtn.push_back(*pi);
}
return rtn;
}
inline vector<GenParticle*> particles(const GenEvent* ge) {
assert(ge);
return particles(*ge);
}
// inline std::pair<GenEvent::particle_const_iterator, GenEvent::particle_const_iterator> particles(const GenEvent& ge) {
// return make_pair(ge.particles_begin(), ge.particles_end());
// }
// inline std::pair<GenEvent::particle_const_iterator, GenEvent::particle_const_iterator> particles(const GenEvent* ge) {
// assert(ge);
// return particles(*ge);
// }
inline vector<GenVertex*> vertices(const GenEvent& ge) {
vector<GenVertex*> rtn;
for (GenEvent::vertex_const_iterator vi = ge.vertices_begin(); vi != ge.vertices_end(); ++vi) {
rtn.push_back(*vi);
}
return rtn;
}
inline vector<GenVertex*> vertices(const GenEvent* ge) {
assert(ge);
return vertices(*ge);
}
// inline std::pair<GenEvent::vertex_const_iterator, GenEvent::vertex_const_iterator> vertices(const GenEvent& ge) {
// return make_pair(ge.vertices_begin(), ge.vertices_end());
// }
// inline std::pair<GenEvent::vertex_const_iterator, GenEvent::vertex_const_iterator> vertices(const GenEvent* ge) {
// assert(ge);
// return vertices(*ge);
// }
inline const std::pair<GenVertex::particles_in_const_iterator, GenVertex::particles_in_const_iterator> particles_in(const GenVertex* gv) {
return make_pair(gv->particles_in_const_begin(), gv->particles_in_const_end());
}
inline const std::pair<GenVertex::particles_out_const_iterator, GenVertex::particles_out_const_iterator> particles_out(const GenVertex* gv) {
return make_pair(gv->particles_out_const_begin(), gv->particles_out_const_end());
}
inline vector<GenParticle*> particles(GenVertex* gv, HepMC::IteratorRange range=HepMC::relatives) {
vector<GenParticle*> rtn;
for (GenVertex::particle_iterator pi = gv->particles_begin(range); pi != gv->particles_end(range); ++pi) {
rtn.push_back(*pi);
}
return rtn;
}
// inline std::pair<GenVertex::particle_iterator, GenVertex::particle_iterator> particles(GenVertex* gv, HepMC::IteratorRange range=HepMC::relatives) {
// return make_pair(gv->particles_begin(range), gv->particles_end(range));
// }
}
#endif
|