ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/src/JetAnalyzer.cc
(Generate patch)

Comparing UserCode/Morgan/src/JetAnalyzer.cc (file contents):
Revision 1.3 by lethuill, Mon Dec 15 19:08:52 2008 UTC vs.
Revision 1.4 by lethuill, Wed Dec 17 16:23:49 2008 UTC

# Line 234 | Line 234 | void JetAnalyzer::Process(const edm::Eve
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()));
# Line 241 | Line 249 | void JetAnalyzer::Process(const edm::Eve
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()));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines