Skip to content

Commit

Permalink
L1T: code-format
Browse files Browse the repository at this point in the history
  • Loading branch information
bundocka committed Jan 13, 2023
1 parent 65a510d commit 29bfe55
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 48 deletions.
4 changes: 2 additions & 2 deletions DQM/L1TMonitor/interface/L1TdeStage2CaloLayer2.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ class L1TdeStage2CaloLayer2 : public DQMEDAnalyzer {

enum jetVars { NJETS = 1, JETGOOD, JETPOSOFF, JETETOFF, JETQUALOFF };

enum egVars { NEGS = 1, EGGOOD, EGPOSOFF, EGETOFF, NISOEGS, ISOEGGOOD, ISOEGPOSOFF, ISOEGETOFF, EGISOOFF};
enum egVars { NEGS = 1, EGGOOD, EGPOSOFF, EGETOFF, NISOEGS, ISOEGGOOD, ISOEGPOSOFF, ISOEGETOFF, EGISOOFF };

enum tauVars { NTAUS = 1, TAUGOOD, TAUPOSOFF, TAUETOFF, NISOTAUS, ISOTAUGOOD, ISOTAUPOSOFF, ISOTAUETOFF, TAUISOOFF};
enum tauVars { NTAUS = 1, TAUGOOD, TAUPOSOFF, TAUETOFF, NISOTAUS, ISOTAUGOOD, ISOTAUPOSOFF, ISOTAUETOFF, TAUISOOFF };

enum sumVars {
NSUMS = 1,
Expand Down
80 changes: 40 additions & 40 deletions DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -454,23 +454,23 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle<l1t::JetBxCollection>&
if (etGood && !posGood) {
l1t::JetBxCollection::const_iterator emulItCheckSort;
for (emulItCheckSort = emulCol->begin(currBx); emulItCheckSort != emulCol->end(currBx); ++emulItCheckSort) {
if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() &&
dataIt->hwEta() == emulItCheckSort->hwEta()){
posGood = true;
if (dataIt->hwQual() == emulItCheckSort->hwQual())
qualGood = true;
else
qualGood = false;
}
}
if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() &&
dataIt->hwEta() == emulItCheckSort->hwEta()) {
posGood = true;
if (dataIt->hwQual() == emulItCheckSort->hwQual())
qualGood = true;
else
qualGood = false;
}
}
}

// if position, energy & qual agree, jet is good
if (etGood && posGood && qualGood) {
agreementSummary->Fill(JETGOOD_S);
jetSummary->Fill(JETGOOD);
} else {
eventGood = false;
eventGood = false;
jetEtData->Fill(dataIt->hwPt());
jetEtaData->Fill(dataIt->hwEta());
jetPhiData->Fill(dataIt->hwPhi());
Expand Down Expand Up @@ -565,7 +565,7 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::Handle<l1t::EGammaBxCollection
if (enable2DComp)
eg2DEtaPhiData->Fill(dataIt->eta(), dataIt->phi());
}
egIsoData->Fill(dataIt->hwIso());
egIsoData->Fill(dataIt->hwIso());

++dataIt;

Expand All @@ -591,7 +591,7 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::Handle<l1t::EGammaBxCollection
if (enable2DComp)
eg2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi());
}
egIsoEmul->Fill(emulIt->hwIso());
egIsoEmul->Fill(emulIt->hwIso());
++emulIt;

if (emulIt == emulCol->end(currBx))
Expand Down Expand Up @@ -635,15 +635,15 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::Handle<l1t::EGammaBxCollection
if (etGood && !posGood) {
l1t::EGammaBxCollection::const_iterator emulItCheckSort;
for (emulItCheckSort = emulCol->begin(currBx); emulItCheckSort != emulCol->end(currBx); ++emulItCheckSort) {
if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() &&
dataIt->hwEta() == emulItCheckSort->hwEta()){
posGood = true;
if (dataIt->hwIso() == emulItCheckSort->hwIso())
isoGood = true;
else
isoGood = false;
}
}
if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() &&
dataIt->hwEta() == emulItCheckSort->hwEta()) {
posGood = true;
if (dataIt->hwIso() == emulItCheckSort->hwIso())
isoGood = true;
else
isoGood = false;
}
}
}

// if position, energy and isolation agree, object is good
Expand All @@ -657,7 +657,7 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::Handle<l1t::EGammaBxCollection
}

} else {
eventGood = false;
eventGood = false;
if (hwIso) {
isoEgEtData->Fill(dataIt->hwPt());
isoEgEtaData->Fill(dataIt->hwEta());
Expand All @@ -683,8 +683,8 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::Handle<l1t::EGammaBxCollection
if (enable2DComp)
eg2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi());
}
egIsoData->Fill(dataIt->hwIso());
egIsoEmul->Fill(emulIt->hwIso());
egIsoData->Fill(dataIt->hwIso());
egIsoEmul->Fill(emulIt->hwIso());

if (verbose) {
edm::LogInfo("L1TdeStage2CaloLayer2") << "--- eg ---" << std::endl;
Expand Down Expand Up @@ -720,7 +720,7 @@ bool L1TdeStage2CaloLayer2::compareEGs(const edm::Handle<l1t::EGammaBxCollection

// if only isolation wrong
if (posGood && etGood && !isoGood) {
egSummary->Fill(EGISOOFF);
egSummary->Fill(EGISOOFF);
}

// keep track of number of objects
Expand Down Expand Up @@ -780,7 +780,7 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle<l1t::TauBxCollection>&
if (enable2DComp)
tau2DEtaPhiData->Fill(dataIt->eta(), dataIt->phi());
}
tauIsoData->Fill(dataIt->hwIso());
tauIsoData->Fill(dataIt->hwIso());

++dataIt;

Expand Down Expand Up @@ -809,7 +809,7 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle<l1t::TauBxCollection>&
if (enable2DComp)
tau2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi());
}
tauIsoEmul->Fill(emulIt->hwIso());
tauIsoEmul->Fill(emulIt->hwIso());

++emulIt;

Expand Down Expand Up @@ -854,15 +854,15 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle<l1t::TauBxCollection>&
if (etGood && !posGood) {
l1t::TauBxCollection::const_iterator emulItCheckSort;
for (emulItCheckSort = emulCol->begin(currBx); emulItCheckSort != emulCol->end(currBx); ++emulItCheckSort) {
if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() &&
dataIt->hwEta() == emulItCheckSort->hwEta()){
posGood = true;
if (dataIt->hwIso() == emulItCheckSort->hwIso())
isoGood = true;
else
isoGood = false;
}
}
if (dataIt->hwPt() == emulItCheckSort->hwPt() && dataIt->hwPhi() == emulItCheckSort->hwPhi() &&
dataIt->hwEta() == emulItCheckSort->hwEta()) {
posGood = true;
if (dataIt->hwIso() == emulItCheckSort->hwIso())
isoGood = true;
else
isoGood = false;
}
}
}

// if position, energy and isolation agree, object is good
Expand All @@ -875,7 +875,7 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle<l1t::TauBxCollection>&
tauSummary->Fill(TAUGOOD);
}
} else {
eventGood = false;
eventGood = false;
if (hwIso) {
isoTauEtData->Fill(dataIt->hwPt());
isoTauEtaData->Fill(dataIt->hwEta());
Expand All @@ -902,8 +902,8 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle<l1t::TauBxCollection>&
if (enable2DComp)
tau2DEtaPhiEmul->Fill(emulIt->eta(), emulIt->phi());
}
tauIsoData->Fill(dataIt->hwIso());
tauIsoEmul->Fill(emulIt->hwIso());
tauIsoData->Fill(dataIt->hwIso());
tauIsoEmul->Fill(emulIt->hwIso());

if (verbose) {
edm::LogInfo("L1TdeStage2CaloLayer2") << "--- tau ---" << std::endl;
Expand Down Expand Up @@ -939,7 +939,7 @@ bool L1TdeStage2CaloLayer2::compareTaus(const edm::Handle<l1t::TauBxCollection>&

// if only isolation is wrong
if (posGood && etGood && !isoGood) {
tauSummary->Fill(TAUISOOFF);
tauSummary->Fill(TAUISOOFF);
}

// keep track of number of objects
Expand Down
12 changes: 6 additions & 6 deletions DQM/L1TMonitorClient/src/L1TStage2CaloLayer2DEClientSummary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig

// by default show 0% agreement (for edge case when no objects are found)
double goodEgRatio = 0, egPosOffRatio = 0, egEtOffRatio = 0, goodIsoEgRatio = 0, isoEgPosOffRatio = 0,
isoEgEtOffRatio = 0, egIsoOffRatio = 0;
isoEgEtOffRatio = 0, egIsoOffRatio = 0;

// hist = egSummary_->getTH1F();
// newHist = egSummary->getTH1F();
Expand Down Expand Up @@ -214,8 +214,8 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig
isoEgEtOffRatio = isoEgEtOff / totalIsoEgs;
}

if((totalEgs + totalIsoEgs) > 0)
egIsoOffRatio = egIsoOff / (totalEgs+totalIsoEgs);
if ((totalEgs + totalIsoEgs) > 0)
egIsoOffRatio = egIsoOff / (totalEgs + totalIsoEgs);

egSummary->setBinContent(1, goodEgRatio);
egSummary->setBinContent(2, egPosOffRatio);
Expand All @@ -234,7 +234,7 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig

// by default show 0% agreement (for edge case when no objects are found)
double goodTauRatio = 0, tauPosOffRatio = 0, tauEtOffRatio = 0, goodIsoTauRatio = 0, isoTauPosOffRatio = 0,
isoTauEtOffRatio = 0, tauIsoOffRatio = 0;
isoTauEtOffRatio = 0, tauIsoOffRatio = 0;

// hist = tauSummary_->getTH1F();
// newHist = tauSummary->getTH1F();
Expand Down Expand Up @@ -263,8 +263,8 @@ void L1TStage2CaloLayer2DEClientSummary::processHistograms(DQMStore::IGetter &ig
isoTauEtOffRatio = isoTauEtOff / totalIsoTaus;
}

if((totalTaus + totalIsoTaus) > 0)
tauIsoOffRatio = tauIsoOff / (totalTaus+totalIsoTaus);
if ((totalTaus + totalIsoTaus) > 0)
tauIsoOffRatio = tauIsoOff / (totalTaus + totalIsoTaus);

tauSummary->setBinContent(1, goodTauRatio);
tauSummary->setBinContent(2, tauPosOffRatio);
Expand Down

0 comments on commit 29bfe55

Please sign in to comment.