Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 49 of file GenHIEventProducer.cc.
Implements edm::EDProducer.
Definition at line 101 of file GenHIEventProducer.cc.
References b, begin, DeDxDiscriminatorTools::charge(), end, relval_parameters_module::energy, eta(), edm::Event::getByLabel(), edm::EventSetup::getData(), reco::tau::helpers::nCharged(), np, npart, phi, and edm::Event::put().
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;
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
unsigned int nCharged(const GenJet &jet)