40 #include "HepMC/HeavyIon.h" 77 produces<edm::GenHIEvent>();
105 if(!(pdt.isValid())) iSetup.
getData(pdt);
116 int nChargedPtCut = 0;
117 int nChargedPtCutMR = 0;
122 double TotEnergy = 0;
130 <<
"Mixing has "<<
mix.size()<<
" sub-events, should have been at least 1" 137 HepMC::GenEvent::particle_const_iterator
begin = evt->particles_begin();
138 HepMC::GenEvent::particle_const_iterator
end = evt->particles_end();
139 for(HepMC::GenEvent::particle_const_iterator it = begin; it !=
end; ++it){
140 if((*it)->status() != 1)
continue;
141 int pdg_id = (*it)->pdg_id();
143 int charge =
static_cast<int>(part->charge());
145 if(charge == 0)
continue;
146 float pt = (*it)->momentum().perp();
147 float eta = (*it)->momentum().eta();
148 float energy = (*it)->momentum().e();
164 if(fabs(eta) > 0.5)
continue;
169 const HepMC::HeavyIon*
hi = evt->heavy_ion();
172 ncoll = ncoll + hi->Ncoll();
173 nhard = nhard + hi->Ncoll_hard();
174 int np = hi->Npart_proj() + hi->Npart_targ();
177 b = hi->impact_parameter();
178 phi = hi->event_plane_angle();
179 ecc = hi->eccentricity();
189 meanPtMR /= nChargedMR;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< CrossingFrame< edm::HepMCProduct > > hepmcSrc_
edm::ESHandle< ParticleDataTable > pdt
bool getData(T &iHolder) const
#define DEFINE_FWK_MODULE(type)
void produce(edm::Event &, const edm::EventSetup &) override
HepPDT::ParticleData ParticleData
const HepMC::GenEvent * GetEvent() const
T const * product() const
~GenHIEventProducer() override
GenHIEventProducer(const edm::ParameterSet &)