123 reco::GenJetCollection::const_iterator jetItr = genJets->begin();
124 reco::GenJetCollection::const_iterator jetEnd = genJets->end();
125 for (; jetItr != jetEnd; ++jetItr) {
133 edm::LogWarning(
"MissingProduct") <<
"Gen jets not found. Branch will not be filled" << std::endl;
142 for (
size_t i = 0;
i < genParticles->size(); ++
i) {
147 int parentID = -10000;
149 for (
unsigned int i = 0;
i < nMo; ++
i) {
153 int hundredsIndex =
abs(thisParentID) / 100;
154 int thousandsIndex =
abs(thisParentID) / 1000;
155 if (((
abs(thisParentID) >= 23) && (
abs(thisParentID) <= 25)) || (
abs(thisParentID) == 6) ||
156 (hundredsIndex == 5) || (hundredsIndex == 4) || (thousandsIndex == 5) || (thousandsIndex == 4))
157 parentID = thisParentID;
159 if ((parentID == -10000) && (nMo > 0))
163 if ((parentID != p.
pdgId()) &&
164 ((parentID > -9999) || (
abs(
id) == 11) || (
abs(
id) == 13) || (
abs(
id) == 23) || (
abs(
id) == 24) ||
165 (
abs(
id) == 25) || (
abs(
id) == 4) || (
abs(
id) == 5) || (
abs(
id) == 6))) {
183 if (!puInfoCollection.
isValid()) {
184 throw cms::Exception(
"ProductNotValid") <<
"pileupInfoSource not valid";
188 std::vector<PileupSummaryInfo>::const_iterator puItr = puInfoCollection->begin();
189 std::vector<PileupSummaryInfo>::const_iterator puEnd = puInfoCollection->end();
190 for (; puItr != puEnd; ++puItr) {
191 int bx = puItr->getBunchCrossing();
193 l1GenData_->nMeanPU = puItr->getTrueNumInteractions();
194 l1GenData_->nVtx = puItr->getPU_NumInteractions();
int pdgId() const final
PDG identifier.
double eta() const final
momentum pseudorapidity
const std::vector< double > & binningValues() const
bool hasBinningValues() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupInfoToken_
size_t numberOfMothers() const override
number of mothers
double pt() const final
transverse momentum
edm::EDGetTokenT< GenEventInfoProduct > genInfoToken_
int charge() const final
electric charge
edm::EDGetTokenT< reco::GenJetCollection > genJetToken_
edm::EDGetTokenT< reco::GenParticleCollection > genParticleToken_
double energy() const final
energy
Abs< T >::type abs(const T &t)
TString nPart(Int_t part, TString string, TString delimit=";", Bool_t removerest=true)
std::unique_ptr< L1Analysis::L1AnalysisGeneratorDataFormat > l1GenData_
int status() const final
status word
double phi() const final
momentum azimuthal angle
const Candidate * mother(size_type=0) const override
return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode) ...