40 #include "HepMC/HeavyIon.h"
77 produces<edm::GenHIEvent>();
78 hepmcSrc_ = iConfig.
getParameter<std::vector<std::string> >(
"generators");
105 if(!(pdt.isValid())) iSetup.
getData(pdt);
116 int nChargedPtCut = 0;
117 int nChargedPtCutMR = 0;
122 double TotEnergy = 0;
124 for(
size_t ihep = 0; ihep < hepmcSrc_.size(); ++ihep){
128 const HepMC::GenEvent* evt = hepmc->GetEvent();
130 HepMC::GenEvent::particle_const_iterator
begin = evt->particles_begin();
131 HepMC::GenEvent::particle_const_iterator
end = evt->particles_end();
132 for(HepMC::GenEvent::particle_const_iterator it = begin; it !=
end; ++it){
133 if((*it)->status() != 1)
continue;
134 int pdg_id = (*it)->pdg_id();
136 int charge =
static_cast<int>(part->charge());
138 if(charge == 0)
continue;
139 float pt = (*it)->momentum().perp();
140 float eta = (*it)->momentum().eta();
141 float energy = (*it)->momentum().e();
157 if(fabs(eta) > 0.5)
continue;
162 const HepMC::HeavyIon* hi = evt->heavy_ion();
165 ncoll = ncoll + hi->Ncoll();
166 nhard = nhard + hi->Ncoll_hard();
167 int np = hi->Npart_proj() + hi->Npart_targ();
170 b = hi->impact_parameter();
171 phi = hi->event_plane_angle();
172 ecc = hi->eccentricity();
182 meanPtMR /= nChargedMR;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
#define DEFINE_FWK_MODULE(type)
edm::ESHandle< ParticleDataTable > pdt
void getData(T &iHolder) const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< std::string > hepmcSrc_
HepPDT::ParticleData ParticleData
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void produce(edm::Event &, const edm::EventSetup &)
unsigned int nCharged(const GenJet &jet)
GenHIEventProducer(const edm::ParameterSet &)