Skip to content

Commit

Permalink
Merge pull request #95 from jaimeleonh/AM_12_3_X_integration_com
Browse files Browse the repository at this point in the history
More comments
  • Loading branch information
jaimeleonh authored Apr 26, 2022
2 parents ce7cce1 + abc1116 commit 12af797
Show file tree
Hide file tree
Showing 32 changed files with 70 additions and 103 deletions.
2 changes: 1 addition & 1 deletion L1Trigger/DTTriggerPhase2/interface/DTPattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion L1Trigger/DTTriggerPhase2/interface/HoughGrouping.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/DTTriggerPhase2/interface/InitialGrouping.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions L1Trigger/DTTriggerPhase2/interface/MPCleanHitsFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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{};
Expand All @@ -44,7 +44,7 @@ class MPCleanHitsFilter : public MPFilter {

private:
// Private attributes
bool debug_;
const bool debug_;
int timeTolerance_;
};

Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/DTTriggerPhase2/interface/MPFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class MPFilter {

private:
// Private attributes
bool debug_;
const bool debug_;
};

#endif
4 changes: 2 additions & 2 deletions L1Trigger/DTTriggerPhase2/interface/MPQualityEnhancerFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -48,7 +48,7 @@ class MPQualityEnhancerFilter : public MPFilter {
void filterUnique(std::vector<cmsdt::metaPrimitive> &inMPath, std::vector<cmsdt::metaPrimitive> &outMPath);

// Private attributes
bool debug_;
const bool debug_;
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -49,7 +49,7 @@ class MPQualityEnhancerFilterBayes : public MPFilter {
void filterCousins(std::vector<cmsdt::metaPrimitive> &inMPath, std::vector<cmsdt::metaPrimitive> &outMPath);

// Private attributes
bool debug_;
const bool debug_;
};

#endif
2 changes: 1 addition & 1 deletion L1Trigger/DTTriggerPhase2/interface/MPRedundantFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class MPRedundantFilter : public MPFilter {
bool isInBuffer(MuonPathPtr& mpath);

// Private attributes
bool debug_;
const bool debug_;
unsigned int maxBufferSize_;
std::deque<MuonPathPtr> buffer_;
};
Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/DTTriggerPhase2/interface/MotherGrouping.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class MotherGrouping {
// Private methods

// Private attributes
bool debug_;
const bool debug_;
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class MuonPathAnalyticAnalyzer : public MuonPathAnalyzer {

// Private attributes

bool debug_;
const bool debug_;
double chi2Th_;
double tanPhiTh_;
double tanPhiThw2max_;
Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class MuonPathAnalyzer {
// Private methods

// Private attributes
bool debug_;
const bool debug_;
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class MuonPathAnalyzerInChamber : public MuonPathAnalyzer {
std::vector<TLateralities> lateralities_;
std::vector<cmsdt::LATQ_TYPE> latQuality_;

bool debug_;
const bool debug_;
double chi2Th_;
edm::FileInPath shift_filename_;
int bxTolerance_;
Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/DTTriggerPhase2/interface/MuonPathAssociator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/DTTriggerPhase2/interface/PseudoBayesGrouping.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down
7 changes: 3 additions & 4 deletions L1Trigger/DTTriggerPhase2/interface/RPCIntegrator.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,16 @@ class RPCIntegrator {
std::vector<RPCMetaprimitive> 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<DTGeometry, MuonGeometryRecord> dtGeomH_;
edm::ESGetToken<RPCGeometry, MuonGeometryRecord> rpcGeomH_;

DTGeometry const* dtGeo_;
RPCGeometry const* rpcGeo_;
edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomH_;
edm::ESGetToken<RPCGeometry, MuonGeometryRecord> rpcGeomH_;

// Constant geometry values
//R[stat][layer] - radius of rpc station/layer from center of CMS
Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/DTTriggerPhase2/src/CandidateGroup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using namespace dtbayesam;

//------------------------------------------------------------------
//--- Constructores y destructores
//--- Constructors and destructor
//------------------------------------------------------------------
CandidateGroup::CandidateGroup(DTPatternPtr p) {
nhits_ = 0;
Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/DTTriggerPhase2/src/DTPattern.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <iostream>

//------------------------------------------------------------------
//--- Constructores y destructores
//--- Constructors and destructor
//------------------------------------------------------------------
DTPattern::DTPattern() {}

Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/DTTriggerPhase2/src/DTprimitive.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

using namespace cmsdt;
//------------------------------------------------------------------
//--- Constructores y destructores
//--- Constructors and destructor
//------------------------------------------------------------------
DTPrimitive::DTPrimitive() {
cameraId_ = -1;
Expand Down
4 changes: 2 additions & 2 deletions L1Trigger/DTTriggerPhase2/src/HoughGrouping.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>("debug")) {
// Obtention of parameters
debug_ = pset.getUntrackedParameter<bool>("debug");
if (debug_)
LogDebug("HoughGrouping") << "HoughGrouping: constructor";

Expand Down
3 changes: 1 addition & 2 deletions L1Trigger/DTTriggerPhase2/src/InitialGrouping.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>("debug")), currentBaseChannel_(-1) {
// Obtention of parameters
debug_ = pset.getUntrackedParameter<bool>("debug");
if (debug_)
LogDebug("InitialGrouping") << "InitialGrouping: constructor";

Expand Down
8 changes: 2 additions & 6 deletions L1Trigger/DTTriggerPhase2/src/MPCleanHitsFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ using namespace std;
// ============================================================================
// Constructors and destructor
// ============================================================================
MPCleanHitsFilter::MPCleanHitsFilter(const ParameterSet &pset) : MPFilter(pset) {
// Obtention of parameters
debug_ = pset.getUntrackedParameter<bool>("debug");

MPCleanHitsFilter::MPCleanHitsFilter(const ParameterSet &pset)
: MPFilter(pset), debug_(pset.getUntrackedParameter<bool>("debug")) {
timeTolerance_ = pset.getParameter<int>("timeTolerance");
// probably something close to the max time drift (400ns/2) is a reasonable value
}
Expand Down Expand Up @@ -50,5 +48,3 @@ double MPCleanHitsFilter::getMeanTime(MuonPathPtr &mpath) {
}
return meantime / count;
}

MPCleanHitsFilter::~MPCleanHitsFilter() {}
3 changes: 1 addition & 2 deletions L1Trigger/DTTriggerPhase2/src/MPFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ using namespace std;
// ============================================================================
// Constructors and destructor
// ============================================================================
MPFilter::MPFilter(const ParameterSet& pset) {
MPFilter::MPFilter(const ParameterSet& pset) : debug_(pset.getUntrackedParameter<bool>("debug")) {
// Obtention of parameters
debug_ = pset.getUntrackedParameter<bool>("debug");
}

MPFilter::~MPFilter() {}
8 changes: 2 additions & 6 deletions L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ using namespace cmsdt;
// ============================================================================
// Constructors and destructor
// ============================================================================
MPQualityEnhancerFilter::MPQualityEnhancerFilter(const ParameterSet &pset) : MPFilter(pset) {
// Obtention of parameters
debug_ = pset.getUntrackedParameter<bool>("debug");
}

MPQualityEnhancerFilter::~MPQualityEnhancerFilter() {}
MPQualityEnhancerFilter::MPQualityEnhancerFilter(const ParameterSet &pset)
: MPFilter(pset), debug_(pset.getUntrackedParameter<bool>("debug")) {}

// ============================================================================
// Main methods (initialise, run, finish)
Expand Down
13 changes: 2 additions & 11 deletions L1Trigger/DTTriggerPhase2/src/MPQualityEnhancerFilterBayes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ using namespace cmsdt;
// ============================================================================
// Constructors and destructor
// ============================================================================
MPQualityEnhancerFilterBayes::MPQualityEnhancerFilterBayes(const ParameterSet &pset) : MPFilter(pset) {
// Obtention of parameters
debug_ = pset.getUntrackedParameter<bool>("debug");
}

MPQualityEnhancerFilterBayes::~MPQualityEnhancerFilterBayes() {}
MPQualityEnhancerFilterBayes::MPQualityEnhancerFilterBayes(const ParameterSet &pset)
: MPFilter(pset), debug_(pset.getUntrackedParameter<bool>("debug")) {}

// ============================================================================
// Main methods (initialise, run, finish)
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -214,11 +208,8 @@ void MPQualityEnhancerFilterBayes::filterCousins(std::vector<metaPrimitive> &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;
}

Expand Down
6 changes: 2 additions & 4 deletions L1Trigger/DTTriggerPhase2/src/MPRedundantFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>("debug");
}
MPRedundantFilter::MPRedundantFilter(const ParameterSet& pset)
: MPFilter(pset), debug_(pset.getUntrackedParameter<bool>("debug")), maxBufferSize_(8) {}

MPRedundantFilter::~MPRedundantFilter() {}

Expand Down
6 changes: 2 additions & 4 deletions L1Trigger/DTTriggerPhase2/src/MotherGrouping.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ using namespace std;
// ============================================================================
// Constructors and destructor
// ============================================================================
MotherGrouping::MotherGrouping(const ParameterSet& pset, edm::ConsumesCollector& iC) {
// Obtention of parameters
debug_ = pset.getUntrackedParameter<bool>("debug");
}
MotherGrouping::MotherGrouping(const ParameterSet& pset, edm::ConsumesCollector& iC)
: debug_(pset.getUntrackedParameter<bool>("debug")) {}

MotherGrouping::~MotherGrouping() {}

Expand Down
6 changes: 1 addition & 5 deletions L1Trigger/DTTriggerPhase2/src/MuonPath.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down
2 changes: 0 additions & 2 deletions L1Trigger/DTTriggerPhase2/src/MuonPathAnalyticAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ void MuonPathAnalyticAnalyzer::analyze(MuonPathPtr &inMPath, std::vector<metaPri
}
}

// if (!is_four_hit) cout << "Found a 3!" << endl;

if (max_coarse_time - min_coarse_time >= 2)
return;
int coarse_offset = max_coarse_time - 1;
Expand Down
6 changes: 2 additions & 4 deletions L1Trigger/DTTriggerPhase2/src/MuonPathAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ using namespace std;
// ============================================================================
// Constructors and destructor
// ============================================================================
MuonPathAnalyzer::MuonPathAnalyzer(const ParameterSet& pset, edm::ConsumesCollector& iC) {
// Obtention of parameters
debug_ = pset.getUntrackedParameter<bool>("debug");
}
MuonPathAnalyzer::MuonPathAnalyzer(const ParameterSet& pset, edm::ConsumesCollector& iC)
: debug_(pset.getUntrackedParameter<bool>("debug")) {}

MuonPathAnalyzer::~MuonPathAnalyzer() {}

Expand Down
Loading

0 comments on commit 12af797

Please sign in to comment.