139 reco::GenJetCollection::const_iterator jetItr = genJets->begin();
140 reco::GenJetCollection::const_iterator jetEnd = genJets->end();
141 for( ; jetItr != jetEnd ; ++jetItr) {
143 l1GenData_->jetEta.push_back( jetItr->eta() );
144 l1GenData_->jetPhi.push_back( jetItr->phi() );
149 edm::LogWarning(
"MissingProduct") <<
"Gen jets not found. Branch will not be filled" << std::endl;
159 for(
size_t i = 0;
i < genParticles->size(); ++
i) {
164 int parentID = -10000;
166 for(
unsigned int i=0;
i<nMo;++
i){
167 int thisParentID = dynamic_cast
171 int hundredsIndex =
abs(thisParentID)/100;
172 int thousandsIndex =
abs(thisParentID)/1000;
173 if ( ((
abs(thisParentID) >= 23) &&
174 (
abs(thisParentID) <= 25)) ||
175 (
abs(thisParentID) == 6) ||
176 (hundredsIndex == 5) ||
177 (hundredsIndex == 4) ||
178 (thousandsIndex == 5) ||
179 (thousandsIndex == 4)
181 parentID = thisParentID;
183 if ((parentID == -10000) && (nMo > 0))
184 parentID = dynamic_cast
188 if ((parentID != p.
pdgId()) &&
218 if (!puInfoCollection.
isValid()) {
219 throw cms::Exception(
"ProductNotValid") <<
"pileupInfoSource not valid";
223 std::vector<PileupSummaryInfo>::const_iterator puItr = puInfoCollection->begin();
224 std::vector<PileupSummaryInfo>::const_iterator puEnd = puInfoCollection->end();
225 for( ; puItr != puEnd; ++puItr) {
226 int bx = puItr->getBunchCrossing();
228 l1GenData_->nMeanPU = puItr->getTrueNumInteractions();
229 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) ...