CMS 3D CMS Logo

GenHIEvent.cc
Go to the documentation of this file.
1 
3 using namespace edm;
4 
6  subevents_.reserve(nhard_);
7  for (int i = 0; i < nhard_; ++i) {
8  std::vector<reco::GenParticleRef> refs;
9  subevents_.push_back(refs);
10  }
11 
12  for (unsigned int i = 0; i < input->size(); ++i) {
14  subevents_[ref->collisionId()].push_back(ref);
15  }
16 }
17 
18 const std::vector<reco::GenParticleRef> GenHIEvent::getSubEvent(unsigned int sub_id) const {
19  if (sub_id > subevents_.size()) { // sub_id >= 0, since sub_id is unsigned
20  }
21 
22  return subevents_[sub_id];
23 }
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
void setGenParticles(const reco::GenParticleCollection *)
Definition: GenHIEvent.cc:5
static std::string const input
Definition: EdmProvDump.cc:50
SubEventCollection subevents_
Definition: GenHIEvent.h:81
HLT enums.
const std::vector< reco::GenParticleRef > getSubEvent(unsigned int sub_id) const
Definition: GenHIEvent.cc:18