Skip to content

Commit

Permalink
Code check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunanda committed Oct 19, 2020
1 parent aa3ab59 commit c717223
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 100 deletions.
22 changes: 11 additions & 11 deletions Calibration/HcalAlCaRecoProducers/plugins/AlCaHBHEMuonFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ AlCaHBHEMuonFilter::AlCaHBHEMuonFilter(edm::ParameterSet const& iConfig, const A
tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();

edm::LogVerbatim("HBHEMuon") << "Parameters read from config file \n"
<< "Process " << processName_ << " Prescale " << preScale_ << " Isolation Cuts "
<< trackIsoCut_ << ":" << caloIsoCut_ << "\n";
<< "Process " << processName_ << " Prescale " << preScale_ << " Isolation Cuts "
<< trackIsoCut_ << ":" << caloIsoCut_ << "\n";
for (unsigned int k = 0; k < trigNames_.size(); ++k)
edm::LogVerbatim("HBHEMuon") << "Trigger[" << k << "] " << trigNames_[k] << "\n";
} // AlCaHBHEMuonFilter::AlCaHBHEMuonFilter constructor
Expand All @@ -132,8 +132,8 @@ bool AlCaHBHEMuonFilter::filter(edm::Event& iEvent, edm::EventSetup const& iSetu
++nAll_;
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HBHEMuon") << "AlCaHBHEMuonFilter::Run " << iEvent.id().run() << " Event " << iEvent.id().event()
<< " Luminosity " << iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing()
<< std::endl;
<< " Luminosity " << iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing()
<< std::endl;
#endif
//Step1: Find if the event passes one of the chosen triggers
/////////////////////////////TriggerResults
Expand All @@ -152,8 +152,8 @@ bool AlCaHBHEMuonFilter::filter(edm::Event& iEvent, edm::EventSetup const& iSetu
ok = true;
}
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HBHEMuon") << "AlCaHBHEMuonFilter::Trigger " << triggerNames_[iHLT] << " Flag " << hlt << ":"
<< ok << std::endl;
edm::LogVerbatim("HBHEMuon") << "AlCaHBHEMuonFilter::Trigger " << triggerNames_[iHLT] << " Flag " << hlt
<< ":" << ok << std::endl;
#endif
}
}
Expand All @@ -173,17 +173,17 @@ bool AlCaHBHEMuonFilter::filter(edm::Event& iEvent, edm::EventSetup const& iSetu
for (reco::MuonCollection::const_iterator RecMuon = _Muon->begin(); RecMuon != _Muon->end(); ++RecMuon) {
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HBHEMuon") << "AlCaHBHEMuonFilter::Muon:Track " << RecMuon->track().isNonnull()
<< " innerTrack " << RecMuon->innerTrack().isNonnull() << " outerTrack "
<< RecMuon->outerTrack().isNonnull() << " globalTrack "
<< RecMuon->globalTrack().isNonnull() << std::endl;
<< " innerTrack " << RecMuon->innerTrack().isNonnull() << " outerTrack "
<< RecMuon->outerTrack().isNonnull() << " globalTrack "
<< RecMuon->globalTrack().isNonnull() << std::endl;
#endif
if ((RecMuon->track().isNonnull()) && (RecMuon->innerTrack().isNonnull()) &&
(RecMuon->outerTrack().isNonnull()) && (RecMuon->globalTrack().isNonnull())) {
const reco::Track* pTrack = (RecMuon->innerTrack()).get();
spr::propagatedTrackID trackID = spr::propagateCALO(pTrack, geo, bField, false);
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HBHEMuon") << "AlCaHBHEMuonFilter::Propagate: ECAL " << trackID.okECAL << " to HCAL "
<< trackID.okHCAL << std::endl;
<< trackID.okHCAL << std::endl;
#endif
double trackIso = RecMuon->isolationR03().sumPt;
double caloIso = RecMuon->isolationR03().emEt + RecMuon->isolationR03().hadEt;
Expand Down Expand Up @@ -225,7 +225,7 @@ void AlCaHBHEMuonFilter::endStream() {

void AlCaHBHEMuonFilter::globalEndJob(const AlCaHBHEMuons::Counters* count) {
edm::LogVerbatim("HBHEMuon") << "Selects " << count->nFinal_ << " out of " << count->nGood_ << " good events out of "
<< count->nAll_ << " total # of events\n";
<< count->nAll_ << " total # of events\n";
}

// ------------ method called when starting to processes a run ------------
Expand Down
24 changes: 12 additions & 12 deletions Calibration/HcalAlCaRecoProducers/plugins/AlCaHEMuonFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ AlCaHEMuonFilter::AlCaHEMuonFilter(edm::ParameterSet const& iConfig, const AlCaH
tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();

edm::LogVerbatim("HEMuon") << "Parameters read from config file \n"
<< "Process " << processName_ << " Prescale " << preScale_ << " Isolation Cuts "
<< trackIsoCut_ << ":" << caloIsoCut_ << "\n";
<< "Process " << processName_ << " Prescale " << preScale_ << " Isolation Cuts "
<< trackIsoCut_ << ":" << caloIsoCut_ << "\n";
for (unsigned int k = 0; k < trigNames_.size(); ++k)
edm::LogVerbatim("HEMuon") << "Trigger[" << k << "] " << trigNames_[k] << "\n";
} // AlCaHEMuonFilter::AlCaHEMuonFilter constructor
Expand All @@ -134,8 +134,8 @@ bool AlCaHEMuonFilter::filter(edm::Event& iEvent, edm::EventSetup const& iSetup)
++nAll_;
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HEMuon") << "AlCaHEMuonFilter::Run " << iEvent.id().run() << " Event " << iEvent.id().event()
<< " Luminosity " << iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing()
<< std::endl;
<< " Luminosity " << iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing()
<< std::endl;
#endif
//Step1: Find if the event passes one of the chosen triggers
/////////////////////////////TriggerResults
Expand All @@ -154,8 +154,8 @@ bool AlCaHEMuonFilter::filter(edm::Event& iEvent, edm::EventSetup const& iSetup)
ok = true;
}
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HEMuon") << "AlCaHEMuonFilter::Trigger " << triggerNames_[iHLT] << " Flag " << hlt << ":" << ok
<< std::endl;
edm::LogVerbatim("HEMuon") << "AlCaHEMuonFilter::Trigger " << triggerNames_[iHLT] << " Flag " << hlt << ":"
<< ok << std::endl;
#endif
}
}
Expand All @@ -175,10 +175,10 @@ bool AlCaHEMuonFilter::filter(edm::Event& iEvent, edm::EventSetup const& iSetup)
if (_Muon.isValid()) {
for (reco::MuonCollection::const_iterator RecMuon = _Muon->begin(); RecMuon != _Muon->end(); ++RecMuon) {
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HEMuon") << "AlCaHEMuonFilter::Muon:Track " << RecMuon->track().isNonnull() << " innerTrack "
<< RecMuon->innerTrack().isNonnull() << " outerTrack "
<< RecMuon->outerTrack().isNonnull() << " globalTrack "
<< RecMuon->globalTrack().isNonnull() << std::endl;
edm::LogVerbatim("HEMuon") << "AlCaHEMuonFilter::Muon:Track " << RecMuon->track().isNonnull()
<< " innerTrack " << RecMuon->innerTrack().isNonnull() << " outerTrack "
<< RecMuon->outerTrack().isNonnull() << " globalTrack "
<< RecMuon->globalTrack().isNonnull() << std::endl;
#endif
if ((RecMuon->track().isNonnull()) && (RecMuon->innerTrack().isNonnull()) &&
(RecMuon->outerTrack().isNonnull()) && (RecMuon->globalTrack().isNonnull())) {
Expand All @@ -191,7 +191,7 @@ bool AlCaHEMuonFilter::filter(edm::Event& iEvent, edm::EventSetup const& iSetup)
spr::propagatedTrackID trackID = spr::propagateCALO(pTrack, geo, bField, false);
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HEMuon") << "AlCaHEMuonFilter::Propagate: ECAL " << trackID.okECAL << " to HCAL "
<< trackID.okHCAL << std::endl;
<< trackID.okHCAL << std::endl;
#endif
double trackIso = RecMuon->isolationR03().sumPt;
double caloIso = RecMuon->isolationR03().emEt + RecMuon->isolationR03().hadEt;
Expand Down Expand Up @@ -233,7 +233,7 @@ void AlCaHEMuonFilter::endStream() {

void AlCaHEMuonFilter::globalEndJob(const AlCaHEMuons::Counters* count) {
edm::LogVerbatim("HEMuon") << "Selects " << count->nFinal_ << " out of " << count->nGood_ << " good events out of "
<< count->nAll_ << " total # of events\n";
<< count->nAll_ << " total # of events\n";
}

// ------------ method called when starting to processes a run ------------
Expand Down
35 changes: 18 additions & 17 deletions Calibration/HcalAlCaRecoProducers/plugins/AlCaIsoTracksFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,22 +196,23 @@ AlCaIsoTracksFilter::AlCaIsoTracksFilter(const edm::ParameterSet& iConfig, const
tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();

edm::LogVerbatim("HcalIsoTrack") << "Parameters read from config file \n"
<< "\t minPt " << selectionParameter_.minPt << "\t theTrackQuality " << theTrackQuality_
<< "\t minQuality " << selectionParameter_.minQuality << "\t maxDxyPV "
<< selectionParameter_.maxDxyPV << "\t maxDzPV " << selectionParameter_.maxDzPV
<< "\t maxChi2 " << selectionParameter_.maxChi2 << "\t maxDpOverP "
<< selectionParameter_.maxDpOverP << "\t minOuterHit " << selectionParameter_.minOuterHit
<< "\t minLayerCrossed " << selectionParameter_.minLayerCrossed << "\t maxInMiss "
<< selectionParameter_.maxInMiss << "\t maxOutMiss " << selectionParameter_.maxOutMiss
<< "\n"
<< "\t a_coneR " << a_coneR_ << "\t a_charIsoR " << a_charIsoR_ << "\t a_mipR "
<< a_mipR_ << "\t maxRestrictionP_ " << maxRestrictionP_ << "\t slopeRestrictionP_ "
<< slopeRestrictionP_ << "\t eIsolate_ " << eIsolate_ << "\n"
<< "\t Precale factor " << preScale_ << "\t in momentum range " << pTrackLow_ << ":"
<< pTrackHigh_ << " and prescale factor " << preScaleH_ << " for p > " << pTrackH_
<< " Threshold for EB " << hitEthrEB_ << " EE " << hitEthrEE0_ << ":" << hitEthrEE1_
<< ":" << hitEthrEE2_ << ":" << hitEthrEE3_ << ":" << hitEthrEELo_ << ":"
<< hitEthrEEHi_;
<< "\t minPt " << selectionParameter_.minPt << "\t theTrackQuality "
<< theTrackQuality_ << "\t minQuality " << selectionParameter_.minQuality
<< "\t maxDxyPV " << selectionParameter_.maxDxyPV << "\t maxDzPV "
<< selectionParameter_.maxDzPV << "\t maxChi2 " << selectionParameter_.maxChi2
<< "\t maxDpOverP " << selectionParameter_.maxDpOverP << "\t minOuterHit "
<< selectionParameter_.minOuterHit << "\t minLayerCrossed "
<< selectionParameter_.minLayerCrossed << "\t maxInMiss "
<< selectionParameter_.maxInMiss << "\t maxOutMiss "
<< selectionParameter_.maxOutMiss << "\n"
<< "\t a_coneR " << a_coneR_ << "\t a_charIsoR " << a_charIsoR_ << "\t a_mipR "
<< a_mipR_ << "\t maxRestrictionP_ " << maxRestrictionP_ << "\t slopeRestrictionP_ "
<< slopeRestrictionP_ << "\t eIsolate_ " << eIsolate_ << "\n"
<< "\t Precale factor " << preScale_ << "\t in momentum range " << pTrackLow_ << ":"
<< pTrackHigh_ << " and prescale factor " << preScaleH_ << " for p > " << pTrackH_
<< " Threshold for EB " << hitEthrEB_ << " EE " << hitEthrEE0_ << ":" << hitEthrEE1_
<< ":" << hitEthrEE2_ << ":" << hitEthrEE3_ << ":" << hitEthrEELo_ << ":"
<< hitEthrEEHi_;

for (unsigned int k = 0; k < trigNames_.size(); ++k)
edm::LogVerbatim("HcalIsoTrack") << "Trigger[" << k << "] " << trigNames_[k];
Expand Down Expand Up @@ -430,7 +431,7 @@ void AlCaIsoTracksFilter::globalEndJob(const AlCaIsoTracks::Counters* count) {
void AlCaIsoTracksFilter::beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup) {
bool changed(false);
edm::LogVerbatim("HcalIsoTrack") << "Run[" << nRun_ << "] " << iRun.run() << " hltconfig.init "
<< hltConfig_.init(iRun, iSetup, processName_, changed);
<< hltConfig_.init(iRun, iSetup, processName_, changed);
}

// ------------ method called when ending the processing of a run ------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ AlCaIsoTracksProducerFilter::AlCaIsoTracksProducerFilter(const edm::ParameterSet
tok_trigRes_ = consumes<edm::TriggerResults>(triggerResultsLabel_);

edm::LogVerbatim("HcalIsoTrack") << "Use process name " << processName_ << " Labels " << triggerResultsLabel_
<< " selecting " << trigNames_.size() << " triggers\n";
<< " selecting " << trigNames_.size() << " triggers\n";
for (unsigned int k = 0; k < trigNames_.size(); ++k) {
edm::LogVerbatim("HcalIsoTrack") << "Trigger[" << k << "] " << trigNames_[k] << std::endl;
}
Expand All @@ -85,7 +85,7 @@ AlCaIsoTracksProducerFilter::~AlCaIsoTracksProducerFilter() {}
bool AlCaIsoTracksProducerFilter::filter(edm::Event& iEvent, edm::EventSetup const& iSetup) {
++nAll_;
edm::LogVerbatim("HcalIsoTrack") << "Run " << iEvent.id().run() << " Event " << iEvent.id().event() << " Luminosity "
<< iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing() << std::endl;
<< iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing() << std::endl;

//Find if the event passes one of the chosen triggers
bool triggerSatisfied(false);
Expand All @@ -102,8 +102,8 @@ bool AlCaIsoTracksProducerFilter::filter(edm::Event& iEvent, edm::EventSetup con
int hlt = triggerResults->accept(iHLT);
for (unsigned int i = 0; i < trigNames_.size(); ++i) {
if (triggerNames_[iHLT].find(trigNames_[i]) != std::string::npos) {
edm::LogVerbatim("HcalIsoTrack") << triggerNames_[iHLT] << " has got HLT flag " << hlt << ":"
<< triggerSatisfied << std::endl;
edm::LogVerbatim("HcalIsoTrack")
<< triggerNames_[iHLT] << " has got HLT flag " << hlt << ":" << triggerSatisfied << std::endl;
if (hlt > 0) {
triggerSatisfied = true;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ AlCaIsolatedBunchFilter::AlCaIsolatedBunchFilter(const edm::ParameterSet& iConfi
tok_trigRes_ = consumes<edm::TriggerResults>(theTriggerResultsLabel_);

edm::LogVerbatim("AlCaIsoBunch") << "Input tag for trigger results " << theTriggerResultsLabel_ << " with "
<< trigIsoBunchNames_.size() << ":" << trigJetNames_.size() << " trigger names and"
<< " process " << processName_ << std::endl;
<< trigIsoBunchNames_.size() << ":" << trigJetNames_.size() << " trigger names and"
<< " process " << processName_ << std::endl;
for (unsigned int k = 0; k < trigIsoBunchNames_.size(); ++k)
edm::LogVerbatim("AlCaIsoBunch") << "Isolated Bunch[" << k << "] " << trigIsoBunchNames_[k] << std::endl;
for (unsigned int k = 0; k < trigJetNames_.size(); ++k)
Expand All @@ -98,7 +98,7 @@ bool AlCaIsolatedBunchFilter::filter(edm::Event& iEvent, edm::EventSetup const&
++nAll_;
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("AlCaIsoBunch") << "Run " << iEvent.id().run() << " Event " << iEvent.id().event() << " Luminosity "
<< iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing() << std::endl;
<< iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing() << std::endl;
#endif
//Step1: Find if the event passes one of the chosen triggers
if ((trigIsoBunchNames_.empty()) && (trigJetNames_.empty())) {
Expand Down Expand Up @@ -171,7 +171,7 @@ void AlCaIsolatedBunchFilter::globalEndJob(const AlCaIsolatedBunch::Counters* co
void AlCaIsolatedBunchFilter::beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup) {
bool changed(false);
edm::LogVerbatim("AlCaIsoBunch") << "Run[" << nRun_ << "] " << iRun.run() << " hltconfig.init "
<< hltConfig_.init(iRun, iSetup, processName_, changed) << std::endl;
<< hltConfig_.init(iRun, iSetup, processName_, changed) << std::endl;
}
// ------------ method called when ending the processing of a run ------------
void AlCaIsolatedBunchFilter::endRun(edm::Run const& iRun, edm::EventSetup const&) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ AlCaIsolatedBunchSelector::AlCaIsolatedBunchSelector(const edm::ParameterSet& iC
// define tokens for access
tok_trigRes_ = consumes<edm::TriggerResults>(theTriggerResultsLabel_);

edm::LogVerbatim("AlCaIsoBunch") << "Input tag for trigger results " << theTriggerResultsLabel_ << " with trigger name "
<< trigName_ << " and process " << processName_ << std::endl;
edm::LogVerbatim("AlCaIsoBunch") << "Input tag for trigger results " << theTriggerResultsLabel_
<< " with trigger name " << trigName_ << " and process " << processName_
<< std::endl;
}

AlCaIsolatedBunchSelector::~AlCaIsolatedBunchSelector() {}
Expand All @@ -92,7 +93,7 @@ bool AlCaIsolatedBunchSelector::filter(edm::Event& iEvent, edm::EventSetup const
++nAll_;
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("AlCaIsoBunch") << "Run " << iEvent.id().run() << " Event " << iEvent.id().event() << " Luminosity "
<< iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing() << std::endl;
<< iEvent.luminosityBlock() << " Bunch " << iEvent.bunchCrossing() << std::endl;
#endif
//Step1: Find if the event passes the chosen trigger
edm::Handle<edm::TriggerResults> triggerResults;
Expand All @@ -106,8 +107,8 @@ bool AlCaIsolatedBunchSelector::filter(edm::Event& iEvent, edm::EventSetup const
if (hlt > 0) {
accept = true;
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("AlCaIsoBunch") << triggerNames_[iHLT] << " has got HLT flag " << hlt << ":" << accept
<< std::endl;
edm::LogVerbatim("AlCaIsoBunch")
<< triggerNames_[iHLT] << " has got HLT flag " << hlt << ":" << accept << std::endl;
#endif
break;
}
Expand Down Expand Up @@ -135,7 +136,7 @@ void AlCaIsolatedBunchSelector::globalEndJob(const AlCaIsolatedBunch::Counters*
void AlCaIsolatedBunchSelector::beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup) {
bool changed(false);
edm::LogVerbatim("AlCaIsoBunch") << "Run[" << nRun_ << "] " << iRun.run() << " hltconfig.init "
<< hltConfig_.init(iRun, iSetup, processName_, changed) << std::endl;
<< hltConfig_.init(iRun, iSetup, processName_, changed) << std::endl;
}
// ------------ method called when ending the processing of a run ------------
void AlCaIsolatedBunchSelector::endRun(edm::Run const& iRun, edm::EventSetup const&) {
Expand Down
Loading

0 comments on commit c717223

Please sign in to comment.