Skip to content

Commit

Permalink
code checks and format
Browse files Browse the repository at this point in the history
  • Loading branch information
sroychow committed Sep 28, 2021
1 parent beab45d commit 633adb2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
11 changes: 4 additions & 7 deletions EgammaAnalysis/ElectronTools/plugins/PhotonIsoProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,10 @@ bool PhotonIsoProducer::filter(edm::Event& iEvent, const edm::EventSetup& iSetup
isolator.fGetIsolation(&*aPho, &thePfColl, myVtxRef, vertexCollection);

if (verbose_) {
edm::LogPrint("PhotonIsoProducer") << " run " << iEvent.id().run()
<< " lumi " << iEvent.id().luminosityBlock()
<< " event " << iEvent.id().event();
edm::LogPrint("PhotonIsoProducer") << " pt " << aPho->pt()
<< " eta " << aPho->eta()
<< " phi " << aPho->phi()
<< " charge " << aPho->charge() << " : ";
edm::LogPrint("PhotonIsoProducer") << " run " << iEvent.id().run() << " lumi " << iEvent.id().luminosityBlock()
<< " event " << iEvent.id().event();
edm::LogPrint("PhotonIsoProducer") << " pt " << aPho->pt() << " eta " << aPho->eta() << " phi " << aPho->phi()
<< " charge " << aPho->charge() << " : ";

edm::LogPrint("PhotonIsoProducer") << " ChargedIso " << isolator.getIsolationCharged();
edm::LogPrint("PhotonIsoProducer") << " PhotonIso " << isolator.getIsolationPhoton();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ RegressionEnergyPatElectronProducer::RegressionEnergyPatElectronProducer(const e
}

if (inputCollectionType_ == 0 && !produceValueMaps_) {
edm::LogPrint("RegressionEnergyPatElectronProducer") << " You are running on GsfElectrons and the producer is not configured to produce ValueMaps with the results. In that case, it does not nothing !! ";
edm::LogPrint("RegressionEnergyPatElectronProducer")
<< " You are running on GsfElectrons and the producer is not configured to produce ValueMaps with the results. "
"In that case, it does not nothing !! ";
}

if (inputCollectionType_ == 0) {
Expand All @@ -52,7 +54,7 @@ RegressionEnergyPatElectronProducer::RegressionEnergyPatElectronProducer(const e
produces<pat::ElectronCollection>();
} else {
throw cms::Exception("InconsistentParameters")
<< " inputCollectionType should be either 0 (GsfElectrons) or 1 (pat::Electrons) " ;
<< " inputCollectionType should be either 0 (GsfElectrons) or 1 (pat::Electrons) ";
}

//set regression type
Expand All @@ -79,7 +81,7 @@ RegressionEnergyPatElectronProducer::RegressionEnergyPatElectronProducer(const e

geomInitialized_ = false;

edm::LogPrint("RegressionEnergyPatElectronProducer") << " Finished initialization " ;
edm::LogPrint("RegressionEnergyPatElectronProducer") << " Finished initialization ";
}

RegressionEnergyPatElectronProducer::~RegressionEnergyPatElectronProducer() { delete regressionEvaluator_; }
Expand Down Expand Up @@ -157,10 +159,13 @@ void RegressionEnergyPatElectronProducer::produce(edm::Event& event, const edm::
for (unsigned iele = 0; iele < nElectrons_; ++iele) {
const reco::GsfElectron* ele = (inputCollectionType_ == 0) ? &(*gsfCollectionH)[iele] : &(*patCollectionH)[iele];
if (debug_) {
edm::LogPrint("RegressionEnergyPatElectronProducer") << "***********************************************************************\n";
edm::LogPrint("RegressionEnergyPatElectronProducer") << "Run Lumi Event: " << event.id().run() << " " << event.luminosityBlock() << " " << event.id().event()
<< "\n";
edm::LogPrint("RegressionEnergyPatElectronProducer") << "Pat Electron : " << ele->pt() << " " << ele->eta() << " " << ele->phi() << "\n";
edm::LogPrint("RegressionEnergyPatElectronProducer")
<< "***********************************************************************\n";
edm::LogPrint("RegressionEnergyPatElectronProducer")
<< "Run Lumi Event: " << event.id().run() << " " << event.luminosityBlock() << " " << event.id().event()
<< "\n";
edm::LogPrint("RegressionEnergyPatElectronProducer")
<< "Pat Electron : " << ele->pt() << " " << ele->eta() << " " << ele->phi() << "\n";
}

pat::Electron* myPatElectron = (inputCollectionType_ == 0) ? nullptr : new pat::Electron((*patCollectionH)[iele]);
Expand Down Expand Up @@ -511,7 +516,8 @@ void RegressionEnergyPatElectronProducer::produce(edm::Event& event, const edm::
energyValues.push_back(RegressionMomentum);
energyErrorValues.push_back(RegressionMomentumError);
} else {
edm::LogPrint("RegressionEnergyPatElectronProducer") << "Error: RegressionType = " << energyRegressionType_ << " is not supported.\n";
edm::LogPrint("RegressionEnergyPatElectronProducer")
<< "Error: RegressionType = " << energyRegressionType_ << " is not supported.\n";
}

if (inputCollectionType_ == 1) {
Expand Down

0 comments on commit 633adb2

Please sign in to comment.