148 if (!theTagByRef->
empty()) {
154 std::unique_ptr<reco::JetFlavourMatchingCollection> jetFlavMatching(jfmc);
158 j != theTagByRef->
end();
168 int thePartonFlavour = 0;
176 thePartonLorentzVector = aPartPhy.
get()->p4();
177 thePartonVertex = aPartPhy.
get()->vertex();
178 thePartonFlavour = aPartPhy.
get()->pdgId();
186 thePartonLorentzVector = aPartAlg.
get()->p4();
187 thePartonVertex = aPartAlg.
get()->vertex();
188 thePartonFlavour = aPartAlg.
get()->pdgId();
196 thePartonLorentzVector = aPartN2.
get()->p4();
197 thePartonVertex = aPartN2.
get()->vertex();
198 thePartonFlavour = aPartN2.
get()->pdgId();
206 thePartonLorentzVector = aPartN3.
get()->p4();
207 thePartonVertex = aPartN3.
get()->vertex();
208 thePartonFlavour = aPartN3.
get()->pdgId();
216 thePartonLorentzVector = aPartHeaviest.
get()->p4();
217 thePartonVertex = aPartHeaviest.
get()->vertex();
218 thePartonFlavour = aPartHeaviest.
get()->pdgId();
228 thePartonLorentzVector = aPartPhy.
get()->p4();
229 thePartonVertex = aPartPhy.
get()->vertex();
230 thePartonFlavour = aPartPhy.
get()->pdgId();
236 thePartonLorentzVector = aPartAlg.
get()->p4();
237 thePartonVertex = aPartAlg.
get()->vertex();
238 thePartonFlavour = aPartAlg.
get()->pdgId();
248 if (thePartonFlavour == 0) {
252 thePartonLorentzVector = aPartPhy.
get()->p4();
253 thePartonVertex = aPartPhy.
get()->vertex();
254 thePartonFlavour = aPartPhy.
get()->pdgId();
260 thePartonLorentzVector = aPartAlg.
get()->p4();
261 thePartonVertex = aPartAlg.
get()->vertex();
262 thePartonFlavour = aPartAlg.
get()->pdgId();
275 (*jetFlavMatching)[(*j).first] =
JetFlavour(thePartonLorentzVector, thePartonVertex, thePartonFlavour, theLeptons);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool isNonnull() const
Checks for non-null.
transient_vector_type::const_iterator const_iterator
const GenParticleRef & nearest_status3() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const_iterator end() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
const GenParticleRef & algoDefinitionParton() const
JetFlavour::Leptons findLeptons(const GenParticleRef &) const
T const * get() const
Returns C++ pointer to the item.
const GenParticleRef & nearest_status2() const
const GenParticleRef heaviest() const
XYZPointD XYZPoint
point in space with cartesian internal representation
const GenParticleRef & physicsDefinitionParton() const
RefToBaseProd< T > makeRefToBaseProdFrom(RefToBase< T > const &iRef, Event const &iEvent)
EDGetTokenT< JetMatchedPartonsCollection > sourceByReferToken_
const_iterator begin() const