Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74621
b: "refs/heads/CMSSW_7_1_X"
c: 2158d5f
h: "refs/heads/CMSSW_7_1_X"
i:
  74619: 8ac629f
v: v3
  • Loading branch information
Robert John Bainbridge committed Oct 2, 2009
1 parent b6c43f9 commit 69b07cc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
"refs/heads/CMSSW_7_1_X": f65652c983510068edf92f7e6bafbcbe525707ea
"refs/heads/CMSSW_7_1_X": 2158d5f918db541342b2acf32150206cc5004a2d
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class JetPlusTrackCorrector : public JetCorrector {
P4 pionCorrection( const P4& jet, const jpt::MatchedTracks& pions ) const;

/// Calculates correction to be applied using muons
P4 muonCorrection( const P4& jet, const jpt::MatchedTracks& muons, bool ) const;
P4 muonCorrection( const P4& jet, const jpt::MatchedTracks& muons ) const;

/// Calculates correction to be applied using electrons
P4 elecCorrection( const P4& jet, const jpt::MatchedTracks& elecs ) const;
Expand Down
27 changes: 12 additions & 15 deletions trunk/JetMETCorrections/Algorithms/src/JetPlusTrackCorrector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ double JetPlusTrackCorrector::correction( const reco::Jet& fJet,
if ( usePions_ ) { corrected += pionCorrection( fJet.p4(), pions ); }

// Muon corrections (both scalar and vectorial)
if ( useMuons_ ) { corrected += muonCorrection( fJet.p4(), muons, !pions.inVertexOutOfCalo_.empty() ); }
if ( useMuons_ ) { corrected += muonCorrection( fJet.p4(), muons ); }

// Electrons corrections (both scalar and vectorial)
if ( useElecs_ ) { corrected += elecCorrection( fJet.p4(), elecs ); }
Expand Down Expand Up @@ -359,7 +359,7 @@ void JetPlusTrackCorrector::matchTracks( const JetTracks& jet_tracks,
else { pions.inVertexInCalo_.push_back(*it); }
} else {
if ( is_muon ) { muons.inVertexOutOfCalo_.push_back(*itrk); }
//else if ( is_ele ) { elecs.inVertexOutOfCalo_.push_back(*itrk); } //@@ bug?
else if ( is_ele ) { elecs.inVertexOutOfCalo_.push_back(*itrk); }
else { pions.inVertexOutOfCalo_.push_back(*itrk); }
}
}
Expand All @@ -380,10 +380,10 @@ void JetPlusTrackCorrector::matchTracks( const JetTracks& jet_tracks,
if ( !found ) {

bool is_muon = useMuons_ && matchMuons( itrk, reco_muons );
bool is_ele = false; //@@ bug? useElecs_ && matchElectrons( itrk, reco_elecs, reco_elec_ids );
bool is_ele = useElecs_ && matchElectrons( itrk, reco_elecs, reco_elec_ids );

if ( is_muon ) { muons.outOfVertexInCalo_.push_back(*itrk); }
else if ( is_ele ) { elecs.outOfVertexInCalo_.push_back(*itrk); } //@@ bug?
else if ( is_ele ) { elecs.outOfVertexInCalo_.push_back(*itrk); }
else { pions.outOfVertexInCalo_.push_back(*itrk); }

}
Expand Down Expand Up @@ -475,8 +475,8 @@ bool JetPlusTrackCorrector::findTrack( const MatchedTracks& pions,
elecs.inVertexInCalo_.end(),
*itrk );
if ( ip == pions.inVertexInCalo_.end() &&
im == muons.inVertexInCalo_.end() /* && */ ) {
/* ie == elecs.inVertexInCalo_.end() ) { */ return false; } //@@ bug?
im == muons.inVertexInCalo_.end() &&
ie == elecs.inVertexInCalo_.end() ) { return false; }
else { return true; }
}

Expand All @@ -485,9 +485,9 @@ bool JetPlusTrackCorrector::findTrack( const MatchedTracks& pions,
bool JetPlusTrackCorrector::tracksInCalo( const MatchedTracks& pions,
const MatchedTracks& muons,
const MatchedTracks& elecs ) const {
if ( !pions.inVertexInCalo_.empty() /* || */ ) {
/* !muons.inVertexInCalo_.empty() || */
/* !elecs.inVertexInCalo_.empty() ) { */ return true; } //@@ bug?
if ( !pions.inVertexInCalo_.empty() ||
!muons.inVertexInCalo_.empty() ||
!elecs.inVertexInCalo_.empty() ) { return true; }
else { return false; }
}

Expand Down Expand Up @@ -559,8 +559,7 @@ JetPlusTrackCorrector::P4 JetPlusTrackCorrector::pionCorrection( const P4& jet,
// -----------------------------------------------------------------------------
//
JetPlusTrackCorrector::P4 JetPlusTrackCorrector::muonCorrection( const P4& jet,
const MatchedTracks& muons,
bool size ) const {
const MatchedTracks& muons ) const {

P4 corr_muons;

Expand All @@ -574,10 +573,8 @@ JetPlusTrackCorrector::P4 JetPlusTrackCorrector::muonCorrection( const P4& jet,
}

if ( useOutOfConeTracks_ ) {
if ( size ) { //@@ bug?
corr_muons_out_of_cone = muonCorrection( jet, muons.inVertexOutOfCalo_, true, false );
corr_muons += corr_muons_out_of_cone;
}
corr_muons_out_of_cone = muonCorrection( jet, muons.inVertexOutOfCalo_, true, false );
corr_muons += corr_muons_out_of_cone;
}

if ( useOutOfVertexTracks_ ) {
Expand Down

0 comments on commit 69b07cc

Please sign in to comment.