Skip to content

Commit

Permalink
code checks
Browse files Browse the repository at this point in the history
  • Loading branch information
slava77devel committed May 19, 2020
1 parent a0e07bb commit 569cecc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions PhysicsTools/PatAlgos/plugins/PATIsolatedTrackProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ void pat::PATIsolatedTrackProducer::produce(edm::Event& iEvent, const edm::Event

// isolation cut
if (polarP4.pt() < pT_cut_noIso_ && prescaled <= 1 &&
!(isolationDR03.chargedHadronIso() < absIso_cut_ || isolationDR03.chargedHadronIso() / polarP4.pt() < relIso_cut_ ||
!(isolationDR03.chargedHadronIso() < absIso_cut_ ||
isolationDR03.chargedHadronIso() / polarP4.pt() < relIso_cut_ ||
miniIso.chargedHadronIso() / polarP4.pt() < miniRelIso_cut_))
continue;

Expand Down Expand Up @@ -459,9 +460,9 @@ void pat::PATIsolatedTrackProducer::produce(edm::Event& iEvent, const edm::Event
getIsolation(polarP4, pc, ipc, isolationDR03, miniIso);

// isolation cut
if (polarP4.pt() < pT_cut_noIso_ &&
!(isolationDR03.chargedHadronIso() < absIso_cut_ || isolationDR03.chargedHadronIso() / polarP4.pt() < relIso_cut_ ||
miniIso.chargedHadronIso() / polarP4.pt() < miniRelIso_cut_))
if (polarP4.pt() < pT_cut_noIso_ && !(isolationDR03.chargedHadronIso() < absIso_cut_ ||
isolationDR03.chargedHadronIso() / polarP4.pt() < relIso_cut_ ||
miniIso.chargedHadronIso() / polarP4.pt() < miniRelIso_cut_))
continue;

pdgId = pfCand.pdgId();
Expand Down
10 changes: 5 additions & 5 deletions PhysicsTools/PatUtils/src/MiniIsolation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@ namespace pat {
float drcut = miniIsoDr(p4, mindr, maxdr, kt_scale);
for (auto const &pc : *pfcands) {
float dr2 = deltaR2(p4, pc);
if (dr2 > drcut*drcut)
if (dr2 > drcut * drcut)
continue;
float pt = pc.p4().pt();
int id = pc.pdgId();
if (std::abs(id) == 211) {
bool fromPV = (pc.fromPV() > 1 || fabs(pc.dz()) < dZ_cut);
if (fromPV && dr2 > deadcone_ch*deadcone_ch) {
if (fromPV && dr2 > deadcone_ch * deadcone_ch) {
// if charged hadron and from primary vertex, add to charged hadron isolation
chiso += pt;
} else if (!fromPV && pt > ptthresh && dr2 > deadcone_pu*deadcone_pu) {
} else if (!fromPV && pt > ptthresh && dr2 > deadcone_pu * deadcone_pu) {
// if charged hadron and NOT from primary vertex, add to pileup isolation
puiso += pt;
}
}
// if neutral hadron, add to neutral hadron isolation
if (std::abs(id) == 130 && pt > ptthresh && dr2 > deadcone_nh*deadcone_nh)
if (std::abs(id) == 130 && pt > ptthresh && dr2 > deadcone_nh * deadcone_nh)
nhiso += pt;
// if photon, add to photon isolation
if (std::abs(id) == 22 && pt > ptthresh && dr2 > deadcone_ph*deadcone_ph)
if (std::abs(id) == 22 && pt > ptthresh && dr2 > deadcone_ph * deadcone_ph)
phiso += pt;
}

Expand Down

0 comments on commit 569cecc

Please sign in to comment.