Skip to content

Commit

Permalink
Merge pull request #1360 from ingabu/Adding-MC-PU-reweighting-v2
Browse files Browse the repository at this point in the history
Fixing muon double counting bug
  • Loading branch information
davidlt committed Nov 14, 2013
2 parents 5b8078c + 271df24 commit 46c7966
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions HLTrigger/HLTanalyzers/src/HLTMCtruth.cc
Expand Up @@ -98,7 +98,7 @@ void HLTMCtruth::analyze(const edm::Handle<reco::CandidateView> & mctruth,
int pdgid = simTracks->at(j).type();
if (abs(pdgid)!=13) continue;
double pt = simTracks->at(j).momentum().pt();
if (pt<2.5) continue;
if (pt<5.0) continue;
double eta = simTracks->at(j).momentum().eta();
if (abs(eta)>2.5) continue;
if (simTracks->at(j).noVertex()) continue;
Expand Down Expand Up @@ -164,8 +164,8 @@ void HLTMCtruth::analyze(const edm::Handle<reco::CandidateView> & mctruth,

// Set-up flags, based on Pythia-generator information, for avoiding double-counting events when
// using both pp->{e,mu}X AND QCD samples
// if (((mcpid[nmc]==13)||(mcpid[nmc]==-13))&&(mcpt[nmc]>2.5)) {mu3 += 1;} // Flag for muons with pT > 2.5 GeV/c
if (((mcpid[nmc]==11)||(mcpid[nmc]==-11))&&(mcpt[nmc]>2.5)) {el3 += 1;} // Flag for electrons with pT > 2.5 GeV/c
if (((mcpid[nmc]==13)||(mcpid[nmc]==-13))&&(mcpt[nmc]>5.0)) {mu3 += 1;} // Flag for muons with pT > 2.5 GeV/c
if (((mcpid[nmc]==11)||(mcpid[nmc]==-11))&&(mcpt[nmc]>5.0)) {el3 += 1;} // Flag for electrons with pT > 2.5 GeV/c

if (mcpid[nmc]==-5) {mab += 1;} // Flag for bbar
if (mcpid[nmc]==5) {mbb += 1;} // Flag for b
Expand Down

0 comments on commit 46c7966

Please sign in to comment.