Skip to content

Commit

Permalink
remove cout and switch to CaloJet
Browse files Browse the repository at this point in the history
  • Loading branch information
ccaillol committed May 13, 2021
1 parent 0f621c5 commit 196fa70
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 40 deletions.
2 changes: 1 addition & 1 deletion DataFormats/L1TParticleFlow/src/HPSPFTau.cc
Expand Up @@ -34,7 +34,7 @@ ostream& operator<<(ostream& os, const l1t::HPSPFTau& l1PFTau) {
if (l1PFTau.isChargedPFCandSeeded()) {
os << " chargedPFCand";
} else if (l1PFTau.isJetSeeded()) {
os << " PFJet";
os << " CaloJet";
} else {
cms::Exception ex("InconsistentTau");
ex.addContext("Calling HPSPFTau::operator <<");
Expand Down
34 changes: 0 additions & 34 deletions L1Trigger/Phase2L1Taus/plugins/HPSPFTauProducer.cc
Expand Up @@ -22,10 +22,6 @@ HPSPFTauProducer::HPSPFTauProducer(const edm::ParameterSet& cfg)
deltaRCleaning_(cfg.getParameter<double>("deltaRCleaning")),
applyPreselection_(cfg.getParameter<bool>("applyPreselection")),
debug_(cfg.getUntrackedParameter<bool>("debug", false)) {
if (debug_) {
std::cout << "<HPSPFTauProducer::HPSPFTauProducer (moduleLabel = " << moduleLabel_ << ")>:" << std::endl;
}

srcL1PFCands_ = cfg.getParameter<edm::InputTag>("srcL1PFCands");
tokenL1PFCands_ = consumes<l1t::PFCandidateCollection>(srcL1PFCands_);
srcL1Jets_ = cfg.getParameter<edm::InputTag>("srcL1Jets");
Expand Down Expand Up @@ -73,13 +69,6 @@ void HPSPFTauProducer::produce(edm::Event& evt, const edm::EventSetup& es) {
}
}

if (debug_) {
std::cout << "BEFORE selection:" << std::endl;
for (const auto& l1PFCand : *l1PFCands) {
printPFCand(std::cout, l1PFCand, primaryVertex_z);
}
}

// build collection of selected PFCandidates
std::vector<l1t::PFCandidateRef> selectedL1PFCandsSignalQualityCuts;
std::vector<l1t::PFCandidateRef> selectedL1PFCandsSignalOrIsolationQualityCuts;
Expand All @@ -102,13 +91,6 @@ void HPSPFTauProducer::produce(edm::Event& evt, const edm::EventSetup& es) {
selectedL1PFCandsSignalOrIsolationQualityCuts.end(),
isHigherPt_pfCandRef);

if (debug_) {
std::cout << "AFTER selection (signalQualityCuts):" << std::endl;
for (const auto& l1PFCand : selectedL1PFCandsSignalQualityCuts) {
printPFCand(std::cout, *l1PFCand, primaryVertex_z);
}
}

l1t::HPSPFTauCollection l1PFTauCollectionUncleaned;

if (useChargedPFCandSeeds_) {
Expand Down Expand Up @@ -165,14 +147,6 @@ void HPSPFTauProducer::produce(edm::Event& evt, const edm::EventSetup& es) {
// sort PFTau candidate collection by decreasing pT
std::sort(l1PFTauCollectionUncleaned.begin(), l1PFTauCollectionUncleaned.end(), isHigherPt_pfTau);

if (debug_) {
std::cout << "BEFORE cleaning:" << std::endl;
for (size_t idx = 0; idx < l1PFTauCollectionUncleaned.size(); ++idx) {
const l1t::HPSPFTau& l1PFTau = l1PFTauCollectionUncleaned.at(idx);
std::cout << "HPSPFTau #" << idx << ": " << l1PFTau;
}
}

for (const auto& l1PFTau : l1PFTauCollectionUncleaned) {
if (applyPreselection_ &&
!(l1PFTau.pt() > minPFTauPt_ && std::fabs(l1PFTau.eta()) < maxPFTauEta_ &&
Expand All @@ -198,14 +172,6 @@ void HPSPFTauProducer::produce(edm::Event& evt, const edm::EventSetup& es) {
}
}

if (debug_) {
std::cout << "AFTER cleaning:" << std::endl;
for (size_t idx = 0; idx < l1PFTauCollectionCleaned->size(); ++idx) {
const l1t::HPSPFTau& l1PFTau = l1PFTauCollectionCleaned->at(idx);
std::cout << "HPSPFTau #" << idx << ": " << l1PFTau;
}
}

evt.put(std::move(l1PFTauCollectionCleaned));
}

Expand Down
5 changes: 0 additions & 5 deletions L1Trigger/Phase2L1Taus/src/L1HPSPFTauQualityCut.cc
Expand Up @@ -31,11 +31,6 @@ L1HPSPFTauQualityCut::L1HPSPFTauQualityCut(const edm::ParameterSet& cfg)

minPt_ = cfg.getParameter<double>("minPt");
maxDz_ = (cfg.exists("maxDz")) ? cfg.getParameter<double>("maxDz") : 1.e+3;

if (debug_ && dzCut_ == kEnabledPrimary) {
std::cout << " applying pT > " << minPt_ << " GeV && dz < " << maxDz_ << " cm to PFCands of type = '"
<< pfCandTypeString << "'" << std::endl;
}
}

bool L1HPSPFTauQualityCut::operator()(const l1t::PFCandidate& pfCand, float_t primaryVertex_z) const {
Expand Down

0 comments on commit 196fa70

Please sign in to comment.