From abc111623aca595e785c06ea10e1bfe5ea693271 Mon Sep 17 00:00:00 2001 From: Jaime Leon Date: Tue, 26 Apr 2022 09:13:24 +0200 Subject: [PATCH] More comments --- .../DTTriggerPhase2/interface/DTPattern.h | 2 +- .../DTTriggerPhase2/interface/HoughGrouping.h | 3 ++- .../interface/InitialGrouping.h | 2 +- .../interface/MPCleanHitsFilter.h | 4 +-- .../DTTriggerPhase2/interface/MPFilter.h | 2 +- .../interface/MPQualityEnhancerFilter.h | 4 +-- .../interface/MPQualityEnhancerFilterBayes.h | 4 +-- .../interface/MPRedundantFilter.h | 2 +- .../interface/MotherGrouping.h | 2 +- .../interface/MuonPathAnalyticAnalyzer.h | 2 +- .../interface/MuonPathAnalyzer.h | 2 +- .../interface/MuonPathAnalyzerInChamber.h | 2 +- .../interface/MuonPathAssociator.h | 2 +- .../interface/PseudoBayesGrouping.h | 2 +- .../DTTriggerPhase2/interface/RPCIntegrator.h | 7 +++-- .../DTTriggerPhase2/src/CandidateGroup.cc | 2 +- L1Trigger/DTTriggerPhase2/src/DTPattern.cc | 2 +- L1Trigger/DTTriggerPhase2/src/DTprimitive.cc | 2 +- .../DTTriggerPhase2/src/HoughGrouping.cc | 4 +-- .../DTTriggerPhase2/src/InitialGrouping.cc | 3 +-- .../DTTriggerPhase2/src/MPCleanHitsFilter.cc | 8 ++---- L1Trigger/DTTriggerPhase2/src/MPFilter.cc | 3 +-- .../src/MPQualityEnhancerFilter.cc | 8 ++---- .../src/MPQualityEnhancerFilterBayes.cc | 13 ++------- .../DTTriggerPhase2/src/MPRedundantFilter.cc | 6 ++--- .../DTTriggerPhase2/src/MotherGrouping.cc | 6 ++--- L1Trigger/DTTriggerPhase2/src/MuonPath.cc | 6 +---- .../src/MuonPathAnalyticAnalyzer.cc | 2 -- .../DTTriggerPhase2/src/MuonPathAnalyzer.cc | 6 ++--- .../DTTriggerPhase2/src/MuonPathAssociator.cc | 21 +++++++-------- .../src/PseudoBayesGrouping.cc | 27 +++++++++---------- .../DTTriggerPhase2/src/RPCIntegrator.cc | 12 ++++----- 32 files changed, 70 insertions(+), 103 deletions(-) diff --git a/L1Trigger/DTTriggerPhase2/interface/DTPattern.h b/L1Trigger/DTTriggerPhase2/interface/DTPattern.h index e6d1e75a3d8e4..cdcc31bc5e738 100644 --- a/L1Trigger/DTTriggerPhase2/interface/DTPattern.h +++ b/L1Trigger/DTTriggerPhase2/interface/DTPattern.h @@ -57,7 +57,7 @@ class DTPattern { //Generated seeds + hits translated to a given seed pair int recoseedUp_; int recoseedDown_; - bool debug_ = false; + const bool debug_ = false; }; #endif diff --git a/L1Trigger/DTTriggerPhase2/interface/HoughGrouping.h b/L1Trigger/DTTriggerPhase2/interface/HoughGrouping.h index 61d498d0d39ac..ab17def9dd2f3 100644 --- a/L1Trigger/DTTriggerPhase2/interface/HoughGrouping.h +++ b/L1Trigger/DTTriggerPhase2/interface/HoughGrouping.h @@ -75,7 +75,8 @@ class HoughGrouping : public MotherGrouping { bool areThereEnoughHits(const ProtoCand& tupl); // Private attributes - bool debug_, allowUncorrelatedPatterns_; + const bool debug_; + bool allowUncorrelatedPatterns_; unsigned short int minNLayerHits_, minSingleSLHitsMax_, minSingleSLHitsMin_, minUncorrelatedHits_, upperNumber_, lowerNumber_; double angletan_, anglebinwidth_, posbinwidth_, maxdeltaAngDeg_, maxdeltaPos_, maxDistanceToWire_; diff --git a/L1Trigger/DTTriggerPhase2/interface/InitialGrouping.h b/L1Trigger/DTTriggerPhase2/interface/InitialGrouping.h index 1a8bb034b83bb..a59d5cdd777cc 100644 --- a/L1Trigger/DTTriggerPhase2/interface/InitialGrouping.h +++ b/L1Trigger/DTTriggerPhase2/interface/InitialGrouping.h @@ -86,7 +86,7 @@ class InitialGrouping : public MotherGrouping { bool isEqualComb2Previous(DTPrimitives& ptr); // Private attributes - bool debug_; + const bool debug_; DTPrimitives muxInChannels_[cmsdt::NUM_CELLS_PER_BLOCK]; DTPrimitives channelIn_[cmsdt::NUM_LAYERS][cmsdt::NUM_CH_PER_LAYER]; diff --git a/L1Trigger/DTTriggerPhase2/interface/MPCleanHitsFilter.h b/L1Trigger/DTTriggerPhase2/interface/MPCleanHitsFilter.h index af89cae7dd05e..d458ccdce1cea 100644 --- a/L1Trigger/DTTriggerPhase2/interface/MPCleanHitsFilter.h +++ b/L1Trigger/DTTriggerPhase2/interface/MPCleanHitsFilter.h @@ -18,7 +18,7 @@ class MPCleanHitsFilter : public MPFilter { public: // Constructors and destructor MPCleanHitsFilter(const edm::ParameterSet& pset); - ~MPCleanHitsFilter() override; + ~MPCleanHitsFilter() override = default; // Main methods void initialise(const edm::EventSetup& iEventSetup) override{}; @@ -44,7 +44,7 @@ class MPCleanHitsFilter : public MPFilter { private: // Private attributes - bool debug_; + const bool debug_; int timeTolerance_; }; diff --git a/L1Trigger/DTTriggerPhase2/interface/MPFilter.h b/L1Trigger/DTTriggerPhase2/interface/MPFilter.h index 674a5a3489188..a75a1a74e6474 100644 --- a/L1Trigger/DTTriggerPhase2/interface/MPFilter.h +++ b/L1Trigger/DTTriggerPhase2/interface/MPFilter.h @@ -48,7 +48,7 @@ class MPFilter { private: // Private attributes - bool debug_; + const bool debug_; }; #endif diff --git a/L1Trigger/DTTriggerPhase2/interface/MPQualityEnhancerFilter.h b/L1Trigger/DTTriggerPhase2/interface/MPQualityEnhancerFilter.h index dc01a2a01877e..03f52b181db2d 100644 --- a/L1Trigger/DTTriggerPhase2/interface/MPQualityEnhancerFilter.h +++ b/L1Trigger/DTTriggerPhase2/interface/MPQualityEnhancerFilter.h @@ -18,7 +18,7 @@ class MPQualityEnhancerFilter : public MPFilter { public: // Constructors and destructor MPQualityEnhancerFilter(const edm::ParameterSet &pset); - ~MPQualityEnhancerFilter() override; + ~MPQualityEnhancerFilter() override = default; // Main methods void initialise(const edm::EventSetup &iEventSetup) override; @@ -48,7 +48,7 @@ class MPQualityEnhancerFilter : public MPFilter { void filterUnique(std::vector &inMPath, std::vector &outMPath); // Private attributes - bool debug_; + const bool debug_; }; #endif diff --git a/L1Trigger/DTTriggerPhase2/interface/MPQualityEnhancerFilterBayes.h b/L1Trigger/DTTriggerPhase2/interface/MPQualityEnhancerFilterBayes.h index 1d3bd4878df91..5db4357905d5a 100644 --- a/L1Trigger/DTTriggerPhase2/interface/MPQualityEnhancerFilterBayes.h +++ b/L1Trigger/DTTriggerPhase2/interface/MPQualityEnhancerFilterBayes.h @@ -19,7 +19,7 @@ class MPQualityEnhancerFilterBayes : public MPFilter { public: // Constructors and destructor MPQualityEnhancerFilterBayes(const edm::ParameterSet &pset); - ~MPQualityEnhancerFilterBayes() override; + ~MPQualityEnhancerFilterBayes() override = default; // Main methods void initialise(const edm::EventSetup &iEventSetup) override; @@ -49,7 +49,7 @@ class MPQualityEnhancerFilterBayes : public MPFilter { void filterCousins(std::vector &inMPath, std::vector &outMPath); // Private attributes - bool debug_; + const bool debug_; }; #endif diff --git a/L1Trigger/DTTriggerPhase2/interface/MPRedundantFilter.h b/L1Trigger/DTTriggerPhase2/interface/MPRedundantFilter.h index 4ba9d7eab92e4..fbab5c18cb517 100644 --- a/L1Trigger/DTTriggerPhase2/interface/MPRedundantFilter.h +++ b/L1Trigger/DTTriggerPhase2/interface/MPRedundantFilter.h @@ -40,7 +40,7 @@ class MPRedundantFilter : public MPFilter { bool isInBuffer(MuonPathPtr& mpath); // Private attributes - bool debug_; + const bool debug_; unsigned int maxBufferSize_; std::deque buffer_; }; diff --git a/L1Trigger/DTTriggerPhase2/interface/MotherGrouping.h b/L1Trigger/DTTriggerPhase2/interface/MotherGrouping.h index e68622b43312c..0478a047e7004 100644 --- a/L1Trigger/DTTriggerPhase2/interface/MotherGrouping.h +++ b/L1Trigger/DTTriggerPhase2/interface/MotherGrouping.h @@ -47,7 +47,7 @@ class MotherGrouping { // Private methods // Private attributes - bool debug_; + const bool debug_; }; #endif diff --git a/L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyticAnalyzer.h b/L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyticAnalyzer.h index b90c69a5ddde2..9b4f8dd0e32e3 100644 --- a/L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyticAnalyzer.h +++ b/L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyticAnalyzer.h @@ -98,7 +98,7 @@ class MuonPathAnalyticAnalyzer : public MuonPathAnalyzer { // Private attributes - bool debug_; + const bool debug_; double chi2Th_; double tanPhiTh_; double tanPhiThw2max_; diff --git a/L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyzer.h b/L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyzer.h index 7a42509b4b9ae..e6cc4e0b58cf0 100644 --- a/L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyzer.h +++ b/L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyzer.h @@ -61,7 +61,7 @@ class MuonPathAnalyzer { // Private methods // Private attributes - bool debug_; + const bool debug_; }; #endif diff --git a/L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyzerInChamber.h b/L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyzerInChamber.h index ab008812786c8..9f2983b9d0c08 100644 --- a/L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyzerInChamber.h +++ b/L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyzerInChamber.h @@ -74,7 +74,7 @@ class MuonPathAnalyzerInChamber : public MuonPathAnalyzer { std::vector lateralities_; std::vector latQuality_; - bool debug_; + const bool debug_; double chi2Th_; edm::FileInPath shift_filename_; int bxTolerance_; diff --git a/L1Trigger/DTTriggerPhase2/interface/MuonPathAssociator.h b/L1Trigger/DTTriggerPhase2/interface/MuonPathAssociator.h index 08dec738a34f4..f920c48a860f7 100644 --- a/L1Trigger/DTTriggerPhase2/interface/MuonPathAssociator.h +++ b/L1Trigger/DTTriggerPhase2/interface/MuonPathAssociator.h @@ -74,7 +74,7 @@ class MuonPathAssociator { bool hasPosRF(int wh, int sec) { return wh > 0 || (wh == 0 && sec % 4 > 1); } // Private attributes - bool debug_; + const bool debug_; bool clean_chi2_correlation_; bool useBX_correlation_; bool allow_confirmation_; diff --git a/L1Trigger/DTTriggerPhase2/interface/PseudoBayesGrouping.h b/L1Trigger/DTTriggerPhase2/interface/PseudoBayesGrouping.h index 3b8ab8a9e9982..bcc29b4e04ff7 100644 --- a/L1Trigger/DTTriggerPhase2/interface/PseudoBayesGrouping.h +++ b/L1Trigger/DTTriggerPhase2/interface/PseudoBayesGrouping.h @@ -47,7 +47,7 @@ class PseudoBayesGrouping : public MotherGrouping { // Private attributes // Config variables - bool debug_; + const bool debug_; std::string pattern_filename_; int pidx_; int minNLayerHits_; diff --git a/L1Trigger/DTTriggerPhase2/interface/RPCIntegrator.h b/L1Trigger/DTTriggerPhase2/interface/RPCIntegrator.h index c2f1d7931a9cf..e08b0166f9a58 100644 --- a/L1Trigger/DTTriggerPhase2/interface/RPCIntegrator.h +++ b/L1Trigger/DTTriggerPhase2/interface/RPCIntegrator.h @@ -80,17 +80,16 @@ class RPCIntegrator { std::vector RPCMetaprimitives_; private: - //RPCRecHitCollection m_rpcRecHits; - bool m_debug_; + const bool m_debug_; int m_max_quality_to_overwrite_t0_; int m_bx_window_; double m_phi_window_; bool m_storeAllRPCHits_; + edm::ESGetToken dtGeomH_; + edm::ESGetToken rpcGeomH_; DTGeometry const* dtGeo_; RPCGeometry const* rpcGeo_; - edm::ESGetToken dtGeomH_; - edm::ESGetToken rpcGeomH_; // Constant geometry values //R[stat][layer] - radius of rpc station/layer from center of CMS diff --git a/L1Trigger/DTTriggerPhase2/src/CandidateGroup.cc b/L1Trigger/DTTriggerPhase2/src/CandidateGroup.cc index 9988c3ca8e1f9..34c25fb77ef22 100644 --- a/L1Trigger/DTTriggerPhase2/src/CandidateGroup.cc +++ b/L1Trigger/DTTriggerPhase2/src/CandidateGroup.cc @@ -6,7 +6,7 @@ using namespace dtbayesam; //------------------------------------------------------------------ -//--- Constructores y destructores +//--- Constructors and destructor //------------------------------------------------------------------ CandidateGroup::CandidateGroup(DTPatternPtr p) { nhits_ = 0; diff --git a/L1Trigger/DTTriggerPhase2/src/DTPattern.cc b/L1Trigger/DTTriggerPhase2/src/DTPattern.cc index 1a7250af0b840..e386b971f7648 100644 --- a/L1Trigger/DTTriggerPhase2/src/DTPattern.cc +++ b/L1Trigger/DTTriggerPhase2/src/DTPattern.cc @@ -5,7 +5,7 @@ #include //------------------------------------------------------------------ -//--- Constructores y destructores +//--- Constructors and destructor //------------------------------------------------------------------ DTPattern::DTPattern() {} diff --git a/L1Trigger/DTTriggerPhase2/src/DTprimitive.cc b/L1Trigger/DTTriggerPhase2/src/DTprimitive.cc index 173f692562461..17789a4d63905 100644 --- a/L1Trigger/DTTriggerPhase2/src/DTprimitive.cc +++ b/L1Trigger/DTTriggerPhase2/src/DTprimitive.cc @@ -5,7 +5,7 @@ using namespace cmsdt; //------------------------------------------------------------------ -//--- Constructores y destructores +//--- Constructors and destructor //------------------------------------------------------------------ DTPrimitive::DTPrimitive() { cameraId_ = -1; diff --git a/L1Trigger/DTTriggerPhase2/src/HoughGrouping.cc b/L1Trigger/DTTriggerPhase2/src/HoughGrouping.cc index bf2df212ab569..fbee1a6ec94ad 100644 --- a/L1Trigger/DTTriggerPhase2/src/HoughGrouping.cc +++ b/L1Trigger/DTTriggerPhase2/src/HoughGrouping.cc @@ -51,9 +51,9 @@ namespace { // ============================================================================ // Constructors and destructor // ============================================================================ -HoughGrouping::HoughGrouping(const ParameterSet& pset, edm::ConsumesCollector& iC) : MotherGrouping(pset, iC) { +HoughGrouping::HoughGrouping(const ParameterSet& pset, edm::ConsumesCollector& iC) + : MotherGrouping(pset, iC), debug_(pset.getUntrackedParameter("debug")) { // Obtention of parameters - debug_ = pset.getUntrackedParameter("debug"); if (debug_) LogDebug("HoughGrouping") << "HoughGrouping: constructor"; diff --git a/L1Trigger/DTTriggerPhase2/src/InitialGrouping.cc b/L1Trigger/DTTriggerPhase2/src/InitialGrouping.cc index 9f45dde0550dc..9cc0984922c04 100644 --- a/L1Trigger/DTTriggerPhase2/src/InitialGrouping.cc +++ b/L1Trigger/DTTriggerPhase2/src/InitialGrouping.cc @@ -12,9 +12,8 @@ using namespace dtamgrouping; // Constructors and destructor // ============================================================================ InitialGrouping::InitialGrouping(const ParameterSet &pset, edm::ConsumesCollector &iC) - : MotherGrouping(pset, iC), currentBaseChannel_(-1) { + : MotherGrouping(pset, iC), debug_(pset.getUntrackedParameter("debug")), currentBaseChannel_(-1) { // Obtention of parameters - debug_ = pset.getUntrackedParameter("debug"); if (debug_) LogDebug("InitialGrouping") << "InitialGrouping: constructor"; diff --git a/L1Trigger/DTTriggerPhase2/src/MPCleanHitsFilter.cc b/L1Trigger/DTTriggerPhase2/src/MPCleanHitsFilter.cc index 06eb72fbb67ab..dc4a8b9179629 100644 --- a/L1Trigger/DTTriggerPhase2/src/MPCleanHitsFilter.cc +++ b/L1Trigger/DTTriggerPhase2/src/MPCleanHitsFilter.cc @@ -6,10 +6,8 @@ using namespace std; // ============================================================================ // Constructors and destructor // ============================================================================ -MPCleanHitsFilter::MPCleanHitsFilter(const ParameterSet &pset) : MPFilter(pset) { - // Obtention of parameters - debug_ = pset.getUntrackedParameter("debug"); - +MPCleanHitsFilter::MPCleanHitsFilter(const ParameterSet &pset) + : MPFilter(pset), debug_(pset.getUntrackedParameter("debug")) { timeTolerance_ = pset.getParameter("timeTolerance"); // probably something close to the max time drift (400ns/2) is a reasonable value } @@ -50,5 +48,3 @@ double MPCleanHitsFilter::getMeanTime(MuonPathPtr &mpath) { } return meantime / count; } - -MPCleanHitsFilter::~MPCleanHitsFilter() {} diff --git a/L1Trigger/DTTriggerPhase2/src/MPFilter.cc b/L1Trigger/DTTriggerPhase2/src/MPFilter.cc index 8cae5a7884a88..c098972be4e89 100644 --- a/L1Trigger/DTTriggerPhase2/src/MPFilter.cc +++ b/L1Trigger/DTTriggerPhase2/src/MPFilter.cc @@ -6,9 +6,8 @@ using namespace std; // ============================================================================ // Constructors and destructor // ============================================================================ -MPFilter::MPFilter(const ParameterSet& pset) { +MPFilter::MPFilter(const ParameterSet& pset) : debug_(pset.getUntrackedParameter("debug")) { // Obtention of parameters - debug_ = pset.getUntrackedParameter("debug"); } MPFilter::~MPFilter() {} diff --git a/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilter.cc b/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilter.cc index 1619cadaebd1c..0a76fa7cffa6f 100644 --- a/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilter.cc +++ b/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilter.cc @@ -9,12 +9,8 @@ using namespace cmsdt; // ============================================================================ // Constructors and destructor // ============================================================================ -MPQualityEnhancerFilter::MPQualityEnhancerFilter(const ParameterSet &pset) : MPFilter(pset) { - // Obtention of parameters - debug_ = pset.getUntrackedParameter("debug"); -} - -MPQualityEnhancerFilter::~MPQualityEnhancerFilter() {} +MPQualityEnhancerFilter::MPQualityEnhancerFilter(const ParameterSet &pset) + : MPFilter(pset), debug_(pset.getUntrackedParameter("debug")) {} // ============================================================================ // Main methods (initialise, run, finish) diff --git a/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilterBayes.cc b/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilterBayes.cc index 3713e26e0c4c1..541063e53bcb7 100644 --- a/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilterBayes.cc +++ b/L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilterBayes.cc @@ -9,12 +9,8 @@ using namespace cmsdt; // ============================================================================ // Constructors and destructor // ============================================================================ -MPQualityEnhancerFilterBayes::MPQualityEnhancerFilterBayes(const ParameterSet &pset) : MPFilter(pset) { - // Obtention of parameters - debug_ = pset.getUntrackedParameter("debug"); -} - -MPQualityEnhancerFilterBayes::~MPQualityEnhancerFilterBayes() {} +MPQualityEnhancerFilterBayes::MPQualityEnhancerFilterBayes(const ParameterSet &pset) + : MPFilter(pset), debug_(pset.getUntrackedParameter("debug")) {} // ============================================================================ // Main methods (initialise, run, finish) @@ -46,7 +42,6 @@ int MPQualityEnhancerFilterBayes::areCousins(metaPrimitive mp, metaPrimitive sec int output = 0; if (mpId.wheel() != second_mpId.wheel() || mpId.station() != second_mpId.station() || mpId.sector() != second_mpId.sector()) { - cout << "Not in the same chamber" << endl; return output; } @@ -67,7 +62,6 @@ int MPQualityEnhancerFilterBayes::areCousins(metaPrimitive mp, metaPrimitive sec if (mp.wi8 == second_mp.wi8 and mp.tdc8 == second_mp.tdc8 and mp.wi8 != -1 and mp.tdc8 != -1) output = 8; - cout << output << endl; return output; } @@ -214,11 +208,8 @@ void MPQualityEnhancerFilterBayes::filterCousins(std::vector &inM keep_this[i] = false; // Case they are cousins, keep the best one if (areCousins(inMPaths[i], inMPaths[j]) != 0) { - cout << "They are cousins" << endl; - // In case both are correlated, they have to share a full SL if (inMPaths[i].quality > 5 && inMPaths[j].quality > 5 && shareSL(inMPaths[i], inMPaths[j]) == 0) { - cout << "But don't share a whole SL" << endl; continue; } diff --git a/L1Trigger/DTTriggerPhase2/src/MPRedundantFilter.cc b/L1Trigger/DTTriggerPhase2/src/MPRedundantFilter.cc index 5fde33e50630e..973311a3e6123 100644 --- a/L1Trigger/DTTriggerPhase2/src/MPRedundantFilter.cc +++ b/L1Trigger/DTTriggerPhase2/src/MPRedundantFilter.cc @@ -8,10 +8,8 @@ using namespace cmsdt; // ============================================================================ // Constructors and destructor // ============================================================================ -MPRedundantFilter::MPRedundantFilter(const ParameterSet& pset) : MPFilter(pset), maxBufferSize_(8) { - // Obtention of parameters - debug_ = pset.getUntrackedParameter("debug"); -} +MPRedundantFilter::MPRedundantFilter(const ParameterSet& pset) + : MPFilter(pset), debug_(pset.getUntrackedParameter("debug")), maxBufferSize_(8) {} MPRedundantFilter::~MPRedundantFilter() {} diff --git a/L1Trigger/DTTriggerPhase2/src/MotherGrouping.cc b/L1Trigger/DTTriggerPhase2/src/MotherGrouping.cc index 9eba4d08be667..a873cde41c9ed 100644 --- a/L1Trigger/DTTriggerPhase2/src/MotherGrouping.cc +++ b/L1Trigger/DTTriggerPhase2/src/MotherGrouping.cc @@ -7,10 +7,8 @@ using namespace std; // ============================================================================ // Constructors and destructor // ============================================================================ -MotherGrouping::MotherGrouping(const ParameterSet& pset, edm::ConsumesCollector& iC) { - // Obtention of parameters - debug_ = pset.getUntrackedParameter("debug"); -} +MotherGrouping::MotherGrouping(const ParameterSet& pset, edm::ConsumesCollector& iC) + : debug_(pset.getUntrackedParameter("debug")) {} MotherGrouping::~MotherGrouping() {} diff --git a/L1Trigger/DTTriggerPhase2/src/MuonPath.cc b/L1Trigger/DTTriggerPhase2/src/MuonPath.cc index 775f253d6a395..c609fa2d6fec6 100644 --- a/L1Trigger/DTTriggerPhase2/src/MuonPath.cc +++ b/L1Trigger/DTTriggerPhase2/src/MuonPath.cc @@ -124,11 +124,7 @@ MuonPath::MuonPath(MuonPathPtr &ptr) { //------------------------------------------------------------------ //--- Public //------------------------------------------------------------------ -void MuonPath::setPrimitive(DTPrimitivePtr &ptr, int layer) { - if (ptr == nullptr) - std::cout << "NULL 'Primitive'." << std::endl; - prim_[layer] = std::move(ptr); -} +void MuonPath::setPrimitive(DTPrimitivePtr &ptr, int layer) { prim_[layer] = std::move(ptr); } void MuonPath::setCellHorizontalLayout(int layout[4]) { for (int i = 0; i < NUM_LAYERS; i++) diff --git a/L1Trigger/DTTriggerPhase2/src/MuonPathAnalyticAnalyzer.cc b/L1Trigger/DTTriggerPhase2/src/MuonPathAnalyticAnalyzer.cc index 2e41a054f9bd7..dab1037090d9a 100644 --- a/L1Trigger/DTTriggerPhase2/src/MuonPathAnalyticAnalyzer.cc +++ b/L1Trigger/DTTriggerPhase2/src/MuonPathAnalyticAnalyzer.cc @@ -194,8 +194,6 @@ void MuonPathAnalyticAnalyzer::analyze(MuonPathPtr &inMPath, std::vector= 2) return; int coarse_offset = max_coarse_time - 1; diff --git a/L1Trigger/DTTriggerPhase2/src/MuonPathAnalyzer.cc b/L1Trigger/DTTriggerPhase2/src/MuonPathAnalyzer.cc index 744ee7f8b7438..2e88d0d4a6563 100644 --- a/L1Trigger/DTTriggerPhase2/src/MuonPathAnalyzer.cc +++ b/L1Trigger/DTTriggerPhase2/src/MuonPathAnalyzer.cc @@ -6,10 +6,8 @@ using namespace std; // ============================================================================ // Constructors and destructor // ============================================================================ -MuonPathAnalyzer::MuonPathAnalyzer(const ParameterSet& pset, edm::ConsumesCollector& iC) { - // Obtention of parameters - debug_ = pset.getUntrackedParameter("debug"); -} +MuonPathAnalyzer::MuonPathAnalyzer(const ParameterSet& pset, edm::ConsumesCollector& iC) + : debug_(pset.getUntrackedParameter("debug")) {} MuonPathAnalyzer::~MuonPathAnalyzer() {} diff --git a/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc b/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc index cfa568c61006a..7c4e3560aeb9a 100644 --- a/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc +++ b/L1Trigger/DTTriggerPhase2/src/MuonPathAssociator.cc @@ -12,17 +12,17 @@ using namespace cmsdt; // ============================================================================ MuonPathAssociator::MuonPathAssociator(const ParameterSet &pset, edm::ConsumesCollector &iC, - std::shared_ptr &globalcoordsobtainer) { + std::shared_ptr &globalcoordsobtainer) + : debug_(pset.getUntrackedParameter("debug")), + clean_chi2_correlation_(pset.getParameter("clean_chi2_correlation")), + useBX_correlation_(pset.getParameter("useBX_correlation")), + allow_confirmation_(pset.getParameter("allow_confirmation")), + dT0_correlate_TP_(pset.getParameter("dT0_correlate_TP")), + dBX_correlate_TP_(pset.getParameter("dBX_correlate_TP")), + dTanPsi_correlate_TP_(pset.getParameter("dTanPsi_correlate_TP")), + minx_match_2digis_(pset.getParameter("minx_match_2digis")), + chi2corTh_(pset.getParameter("chi2corTh")) { // Obtention of parameters - debug_ = pset.getUntrackedParameter("debug"); - clean_chi2_correlation_ = pset.getParameter("clean_chi2_correlation"); - useBX_correlation_ = pset.getParameter("useBX_correlation"); - allow_confirmation_ = pset.getParameter("allow_confirmation"); - dT0_correlate_TP_ = pset.getParameter("dT0_correlate_TP"); - dBX_correlate_TP_ = pset.getParameter("dBX_correlate_TP"); - dTanPsi_correlate_TP_ = pset.getParameter("dTanPsi_correlate_TP"); - minx_match_2digis_ = pset.getParameter("minx_match_2digis"); - chi2corTh_ = pset.getParameter("chi2corTh"); if (debug_) LogDebug("MuonPathAssociator") << "MuonPathAssociator: constructor"; @@ -939,7 +939,6 @@ void MuonPathAssociator::correlateMPaths(edm::Handle dtdigis, for (auto metaprimitiveIt = inMPaths.begin(); metaprimitiveIt != inMPaths.end(); ++metaprimitiveIt) if (metaprimitiveIt->rawId == sl2Id.rawId()) { SL2metaPrimitives.push_back(*metaprimitiveIt); - //std::cout<<"pushing back eta metaprimitive: "; printmPC(*metaprimitiveIt); outMPaths.push_back(*metaprimitiveIt); } diff --git a/L1Trigger/DTTriggerPhase2/src/PseudoBayesGrouping.cc b/L1Trigger/DTTriggerPhase2/src/PseudoBayesGrouping.cc index 59674a5a1f085..725bd560b6347 100644 --- a/L1Trigger/DTTriggerPhase2/src/PseudoBayesGrouping.cc +++ b/L1Trigger/DTTriggerPhase2/src/PseudoBayesGrouping.cc @@ -16,20 +16,19 @@ using namespace dtbayesam; // Constructors and destructor // ============================================================================ PseudoBayesGrouping::PseudoBayesGrouping(const ParameterSet& pset, edm::ConsumesCollector& iC) - : MotherGrouping(pset, iC) { - // Obtention of parameters - debug_ = pset.getUntrackedParameter("debug"); - pattern_filename_ = pset.getParameter("pattern_filename").fullPath(); - minNLayerHits_ = pset.getParameter("minNLayerHits"); - minSingleSLHitsMax_ = pset.getParameter("minSingleSLHitsMax"); - minSingleSLHitsMin_ = pset.getParameter("minSingleSLHitsMin"); - allowedVariance_ = pset.getParameter("allowedVariance"); - allowDuplicates_ = pset.getParameter("allowDuplicates"); - allowUncorrelatedPatterns_ = pset.getParameter("allowUncorrelatedPatterns"); - minUncorrelatedHits_ = pset.getParameter("minUncorrelatedHits"); - maxPathsPerMatch_ = pset.getParameter("maxPathsPerMatch"); - saveOnPlace_ = pset.getParameter("saveOnPlace"); - setLateralities_ = pset.getParameter("setLateralities"); + : MotherGrouping(pset, iC), + debug_(pset.getUntrackedParameter("debug")), + pattern_filename_(pset.getParameter("pattern_filename").fullPath()), + minNLayerHits_(pset.getParameter("minNLayerHits")), + allowedVariance_(pset.getParameter("allowedVariance")), + allowDuplicates_(pset.getParameter("allowDuplicates")), + allowUncorrelatedPatterns_(pset.getParameter("allowUncorrelatedPatterns")), + setLateralities_(pset.getParameter("setLateralities")), + saveOnPlace_(pset.getParameter("saveOnPlace")), + minSingleSLHitsMax_(pset.getParameter("minSingleSLHitsMax")), + minSingleSLHitsMin_(pset.getParameter("minSingleSLHitsMin")), + minUncorrelatedHits_(pset.getParameter("minUncorrelatedHits")), + maxPathsPerMatch_(pset.getParameter("maxPathsPerMatch")) { if (debug_) LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping:: constructor"; } diff --git a/L1Trigger/DTTriggerPhase2/src/RPCIntegrator.cc b/L1Trigger/DTTriggerPhase2/src/RPCIntegrator.cc index 9098a656b9223..dfefa7f332664 100644 --- a/L1Trigger/DTTriggerPhase2/src/RPCIntegrator.cc +++ b/L1Trigger/DTTriggerPhase2/src/RPCIntegrator.cc @@ -10,14 +10,14 @@ using namespace cmsdt; -RPCIntegrator::RPCIntegrator(const edm::ParameterSet& pset, edm::ConsumesCollector& iC) { - m_debug_ = pset.getUntrackedParameter("debug"); +RPCIntegrator::RPCIntegrator(const edm::ParameterSet& pset, edm::ConsumesCollector& iC) + : m_debug_(pset.getUntrackedParameter("debug")), + m_max_quality_to_overwrite_t0_(pset.getParameter("max_quality_to_overwrite_t0")), + m_bx_window_(pset.getParameter("bx_window")), + m_phi_window_(pset.getParameter("phi_window")), + m_storeAllRPCHits_(pset.getParameter("storeAllRPCHits")) { if (m_debug_) LogDebug("RPCIntegrator") << "RPCIntegrator constructor"; - m_max_quality_to_overwrite_t0_ = pset.getParameter("max_quality_to_overwrite_t0"); - m_bx_window_ = pset.getParameter("bx_window"); - m_phi_window_ = pset.getParameter("phi_window"); - m_storeAllRPCHits_ = pset.getParameter("storeAllRPCHits"); rpcGeomH_ = iC.esConsumes(); dtGeomH_ = iC.esConsumes();