|
| GenHIEventProducer (const edm::ParameterSet &) |
|
| ~GenHIEventProducer () |
|
| EDProducer () |
|
ModuleDescription const & | moduleDescription () const |
|
virtual | ~EDProducer () |
|
| ProducerBase () |
|
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
|
std::function< void(BranchDescription
const &)> | registrationCallback () const |
| used by the fwk to register list of products More...
|
|
virtual | ~ProducerBase () |
|
| EDConsumerBase () |
|
ProductHolderIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
|
std::vector
< ProductHolderIndexAndSkipBit >
const & | itemsToGetFromEvent () const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const |
|
bool | registeredToConsume (ProductHolderIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
void | updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &) |
|
virtual | ~EDConsumerBase () |
|
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 48 of file GenHIEventProducer.cc.
Implements edm::EDProducer.
Definition at line 100 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, RecoTauCleanerPlugins::pt, and edm::Event::put().
115 int nChargedPtCut = 0;
116 int nChargedPtCutMR = 0;
121 double TotEnergy = 0;
123 for(
size_t ihep = 0; ihep <
hepmcSrc_.size(); ++ihep){
127 const HepMC::GenEvent* evt = hepmc->GetEvent();
129 HepMC::GenEvent::particle_const_iterator
begin = evt->particles_begin();
130 HepMC::GenEvent::particle_const_iterator
end = evt->particles_end();
131 for(HepMC::GenEvent::particle_const_iterator it = begin; it !=
end; ++it){
132 if((*it)->status() != 1)
continue;
133 int pdg_id = (*it)->pdg_id();
135 int charge =
static_cast<int>(part->charge());
137 if(charge == 0)
continue;
138 float pt = (*it)->momentum().perp();
139 float eta = (*it)->momentum().eta();
140 float energy = (*it)->momentum().e();
156 if(fabs(eta) > 0.5)
continue;
161 const HepMC::HeavyIon* hi = evt->heavy_ion();
164 ncoll = ncoll + hi->Ncoll();
165 nhard = nhard + hi->Ncoll_hard();
166 int np = hi->Npart_proj() + hi->Npart_targ();
169 b = hi->impact_parameter();
170 phi = hi->event_plane_angle();
171 ecc = hi->eccentricity();
181 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)