234 |
|
// Matched genParticle |
235 |
|
if (useMC_) |
236 |
|
{ |
237 |
+ |
// MC truth associator index |
238 |
+ |
if ((patJet->genParticleRef()).isNonnull()) { |
239 |
+ |
localJet.setGenParticleIndex((patJet->genParticleRef()).index()); |
240 |
+ |
} else { |
241 |
+ |
localJet.setGenParticleIndex(-1); |
242 |
+ |
} |
243 |
+ |
|
244 |
+ |
// Matched generated parton |
245 |
|
if ( patJet->genParton() != NULL ) |
246 |
|
{ |
247 |
|
localJet.setMomentumMCParton(TLorentzVector(patJet->genParton()->px(),patJet->genParton()->py(),patJet->genParton()->pz(),patJet->genParton()->energy())); |
249 |
|
localJet.setPdgIdMCParton(patJet->genParton()->pdgId()); |
250 |
|
} |
251 |
|
|
252 |
+ |
// Matched generated jet |
253 |
|
if ( patJet->genJet() != NULL ) |
254 |
|
{ |
255 |
|
localJet.setMomentumMCJet(TLorentzVector(patJet->genJet()->px(),patJet->genJet()->py(),patJet->genJet()->pz(),patJet->genJet()->energy())); |