40 #include "HepMC/HeavyIon.h"
78 produces<edm::GenHIEvent>();
108 if(!(pdt.isValid())) iSetup.
getData(pdt);
119 int nChargedPtCut = 0;
120 int nChargedPtCutMR = 0;
125 double TotEnergy = 0;
134 <<
"Mixing has "<<
mix.size()<<
" sub-events, should have been at least 1"
140 const HepMC::GenEvent* evt = hievt.GetEvent();
142 HepMC::GenEvent::particle_const_iterator
begin = evt->particles_begin();
143 HepMC::GenEvent::particle_const_iterator
end = evt->particles_end();
144 for(HepMC::GenEvent::particle_const_iterator it = begin; it !=
end; ++it){
145 if((*it)->status() != 1)
continue;
146 int pdg_id = (*it)->pdg_id();
148 int charge =
static_cast<int>(part->charge());
150 if(charge == 0)
continue;
151 float pt = (*it)->momentum().perp();
152 float eta = (*it)->momentum().eta();
153 float energy = (*it)->momentum().e();
169 if(fabs(eta) > 0.5)
continue;
174 const HepMC::HeavyIon* hi = evt->heavy_ion();
177 ncoll = ncoll + hi->Ncoll();
178 nhard = nhard + hi->Ncoll_hard();
179 int np = hi->Npart_proj() + hi->Npart_targ();
182 b = hi->impact_parameter();
183 phi = hi->event_plane_angle();
184 ecc = hi->eccentricity();
194 meanPtMR /= nChargedMR;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< CrossingFrame< edm::HepMCProduct > > hepmcSrc_
#define DEFINE_FWK_MODULE(type)
edm::ESHandle< ParticleDataTable > pdt
void getData(T &iHolder) const
virtual void produce(edm::Event &, const edm::EventSetup &) override
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
HepPDT::ParticleData ParticleData
unsigned int nCharged(const GenJet &jet)
Geom::Phi< T > phi() const
GenHIEventProducer(const edm::ParameterSet &)