40 #include "HepMC/HeavyIon.h"
70 putToken_(produces<edm::GenHIEvent>()),
71 doParticleInfo_(iConfig.getUntrackedParameter<bool>(
"doParticleInfo",
false)) {
96 int nChargedPtCut = 0;
97 int nChargedPtCutMR = 0;
102 double TotEnergy = 0;
107 if (mix.
size() < 1) {
108 throw cms::Exception(
"MatchVtx") <<
"Mixing has " << mix.
size() <<
" sub-events, should have been at least 1"
115 HepMC::GenEvent::particle_const_iterator
begin = evt->particles_begin();
116 HepMC::GenEvent::particle_const_iterator
end = evt->particles_end();
117 for (HepMC::GenEvent::particle_const_iterator it = begin; it !=
end; ++it) {
118 if ((*it)->status() != 1)
120 int pdg_id = (*it)->pdg_id();
122 int charge =
static_cast<int>(part->charge());
126 float pt = (*it)->momentum().perp();
127 float eta = (*it)->momentum().eta();
128 float energy = (*it)->momentum().e();
133 if (fabs(eta) < 1.0) {
138 if (fabs(eta) < 0.5) {
150 const HepMC::HeavyIon* hi = evt->heavy_ion();
153 ncoll = ncoll + hi->Ncoll();
154 nhard = nhard + hi->Ncoll_hard();
155 int np = hi->Npart_proj() + hi->Npart_targ();
158 b = hi->impact_parameter();
159 phi = hi->event_plane_angle();
160 ecc = hi->eccentricity();
165 if (TotEnergy != 0) {
166 EtMR = TotEnergy / 2;
169 if (nChargedMR != 0) {
170 meanPtMR /= nChargedMR;
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
HepPDT::ParticleDataTable ParticleDataTable
#define DEFINE_FWK_MODULE(type)
const edm::ESGetToken< ParticleDataTable, edm::DefaultRecord > pdtToken_
const edm::EDPutTokenT< edm::GenHIEvent > putToken_
const edm::EDGetTokenT< CrossingFrame< edm::HepMCProduct > > hepmcSrc_
bool getData(T &iHolder) const
bool get(ProductID const &oid, Handle< PROD > &result) const
HepPDT::ParticleData ParticleData
const T & getObject(unsigned int ip) const
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
const bool doParticleInfo_
T getParameter(std::string const &) const
GenHIEventProducer(const edm::ParameterSet &)