Skip to content

Commit

Permalink
Merge pull request #93 from jaimeleonh/AM_12_3_X_integration_com
Browse files Browse the repository at this point in the history
Comments from PR
  • Loading branch information
jaimeleonh authored Apr 21, 2022
2 parents 2fc5e78 + 2331c89 commit b185cff
Show file tree
Hide file tree
Showing 25 changed files with 153 additions and 220 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class MPQualityEnhancerFilter : public MPFilter {

// Private attributes
bool debug_;
bool filter_cousins_;
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ class MPQualityEnhancerFilterBayes : public MPFilter {
private:
// Private methods
void filterCousins(std::vector<cmsdt::metaPrimitive> &inMPath, std::vector<cmsdt::metaPrimitive> &outMPath);
/* void refilteringCousins(std::vector<cmsdt::metaPrimitive> &inMPath, std::vector<cmsdt::metaPrimitive> &outMPath); */
/* void filterTanPhi(std::vector<cmsdt::metaPrimitive> &inMPath, std::vector<cmsdt::metaPrimitive> &outMPath); */
/* void filterUnique(std::vector<cmsdt::metaPrimitive> &inMPath, std::vector<cmsdt::metaPrimitive> &outMPath); */

// Private attributes
bool debug_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ class MuonPathAnalyticAnalyzer : public MuonPathAnalyzer {
double tanPhiThw1min_;
double tanPhiThw0_;
int cellLayout_[cmsdt::NUM_LAYERS];
std::string geometry_tag_;
std::vector<CELL_VALID_LAYOUT_CONSTANTS> LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER;

// global coordinates
Expand Down
1 change: 0 additions & 1 deletion L1Trigger/DTTriggerPhase2/interface/MuonPathAssociator.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ class MuonPathAssociator {
double dTanPsi_correlate_TP_;
double minx_match_2digis_;
double chi2corTh_;
std::string geometry_tag_;

//shift
edm::FileInPath shift_filename_;
Expand Down
6 changes: 3 additions & 3 deletions L1Trigger/DTTriggerPhase2/plugins/CalibratedDigis.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// -*- C++ -*-
//
// Package: UserCode/CalibratedDigis
// Package: L1Trigger/DTTriggerPhase2
// Class: CalibratedDigis
//
/**\class CalibratedDigis CalibratedDigis.cc UserCode/CalibratedDigis/plugins/CalibratedDigis.cc
/**\class CalibratedDigis CalibratedDigis.cc L1Trigger/DTTriggerPhase2/plugins/CalibratedDigis.cc
Description: [one line class summary]
Expand Down Expand Up @@ -96,7 +96,7 @@ CalibratedDigis::CalibratedDigis(const edm::ParameterSet& iConfig) {
flat_calib_ = iConfig.getParameter<int>("flat_calib");
timeOffset_ = iConfig.getParameter<int>("timeOffset");

scenario = iConfig.getUntrackedParameter<int>("scenario");
scenario = iConfig.getParameter<int>("scenario");

produces<DTDigiCollection>();
//now do what ever other initialization is needed
Expand Down
97 changes: 46 additions & 51 deletions L1Trigger/DTTriggerPhase2/plugins/DTTrigPhase2Prod.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ class DTTrigPhase2Prod : public edm::stream::EDProducer<> {
bool debug_;
bool dump_;
double dT0_correlate_TP_;
bool do_correlation_;
int scenario_;
int df_extended_;
int max_index_;
Expand Down Expand Up @@ -180,7 +179,6 @@ DTTrigPhase2Prod::DTTrigPhase2Prod(const ParameterSet& pset)
debug_ = pset.getUntrackedParameter<bool>("debug");
dump_ = pset.getUntrackedParameter<bool>("dump");

do_correlation_ = pset.getParameter<bool>("do_correlation");
scenario_ = pset.getParameter<int>("scenario");

df_extended_ = pset.getParameter<int>("df_extended");
Expand Down Expand Up @@ -882,28 +880,25 @@ void DTTrigPhase2Prod::fillDescriptions(edm::ConfigurationDescriptions& descript
// dtTriggerPhase2PrimitiveDigis
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("digiTag", edm::InputTag("CalibratedDigis"));
desc.add<int>("trigger_with_sl", 4);
desc.add<int>("timeTolerance", 999999);
desc.addUntracked<std::string>("geometry_tag", "");
desc.addUntracked<int>("trigger_with_sl", 4);
desc.addUntracked<double>("tanPhiTh", 1.0);
desc.addUntracked<double>("tanPhiThw2max", 1.3);
desc.addUntracked<double>("tanPhiThw2min", 0.5);
desc.addUntracked<double>("tanPhiThw1max", 0.9);
desc.addUntracked<double>("tanPhiThw1min", 0.2);
desc.addUntracked<double>("tanPhiThw0", 0.5);
desc.addUntracked<double>("chi2Th", 0.01);
desc.addUntracked<double>("chi2corTh", 0.1);
desc.add<bool>("do_correlation", true);
desc.addUntracked<bool>("useBX_correlation", false);
desc.addUntracked<double>("dT0_correlate_TP", 25.0);
desc.addUntracked<int>("dBX_correlate_TP", 0);
desc.addUntracked<double>("dTanPsi_correlate_TP", 99999.0);
desc.addUntracked<bool>("clean_chi2_correlation", true);
desc.addUntracked<bool>("allow_confirmation", true);
desc.addUntracked<double>("minx_match_2digis", 1.0);
desc.add<double>("tanPhiTh", 1.0);
desc.add<double>("tanPhiThw2max", 1.3);
desc.add<double>("tanPhiThw2min", 0.5);
desc.add<double>("tanPhiThw1max", 0.9);
desc.add<double>("tanPhiThw1min", 0.2);
desc.add<double>("tanPhiThw0", 0.5);
desc.add<double>("chi2Th", 0.01);
desc.add<double>("chi2corTh", 0.1);
desc.add<bool>("useBX_correlation", false);
desc.add<double>("dT0_correlate_TP", 25.0);
desc.add<int>("dBX_correlate_TP", 0);
desc.add<double>("dTanPsi_correlate_TP", 99999.0);
desc.add<bool>("clean_chi2_correlation", true);
desc.add<bool>("allow_confirmation", true);
desc.add<double>("minx_match_2digis", 1.0);
desc.add<int>("scenario", 0);
desc.add<int>("df_extended", 0);
desc.addUntracked<bool>("filter_cousins", true);
desc.add<int>("max_primitives", 999);
desc.add<edm::FileInPath>("ttrig_filename", edm::FileInPath("L1Trigger/DTTriggerPhase2/data/wire_rawId_ttrig.txt"));
desc.add<edm::FileInPath>("z_filename", edm::FileInPath("L1Trigger/DTTriggerPhase2/data/wire_rawId_z.txt"));
Expand All @@ -912,52 +907,52 @@ void DTTrigPhase2Prod::fillDescriptions(edm::ConfigurationDescriptions& descript
desc.add<edm::FileInPath>("global_coords_filename",
edm::FileInPath("L1Trigger/DTTriggerPhase2/data/global_coord_perp_x_phi0.txt"));
desc.add<int>("algo", 0);
desc.addUntracked<int>("minHits4Fit", 3);
desc.addUntracked<bool>("splitPathPerSL", true);
desc.add<int>("minHits4Fit", 3);
desc.add<bool>("splitPathPerSL", true);
desc.addUntracked<bool>("debug", false);
desc.addUntracked<bool>("dump", false);
desc.add<edm::InputTag>("rpcRecHits", edm::InputTag("rpcRecHits"));
desc.add<bool>("useRPC", false);
desc.addUntracked<int>("bx_window", 1);
desc.addUntracked<double>("phi_window", 50.0);
desc.addUntracked<int>("max_quality_to_overwrite_t0", 9);
desc.addUntracked<bool>("storeAllRPCHits", false);
desc.add<int>("bx_window", 1);
desc.add<double>("phi_window", 50.0);
desc.add<int>("max_quality_to_overwrite_t0", 9);
desc.add<bool>("storeAllRPCHits", false);
desc.add<bool>("activateBuffer", false);
desc.add<double>("superCelltimewidth", 400);
desc.add<int>("superCellspacewidth", 20);
{
edm::ParameterSetDescription psd0;
psd0.addUntracked<bool>("debug", false);
psd0.addUntracked<double>("angletan", 0.3);
psd0.addUntracked<double>("anglebinwidth", 1.0);
psd0.addUntracked<double>("posbinwidth", 2.1);
psd0.addUntracked<double>("maxdeltaAngDeg", 10);
psd0.addUntracked<double>("maxdeltaPos", 10);
psd0.addUntracked<int>("UpperNumber", 6);
psd0.addUntracked<int>("LowerNumber", 4);
psd0.addUntracked<double>("MaxDistanceToWire", 0.03);
psd0.addUntracked<int>("minNLayerHits", 6);
psd0.addUntracked<int>("minSingleSLHitsMax", 3);
psd0.addUntracked<int>("minSingleSLHitsMin", 3);
psd0.addUntracked<bool>("allowUncorrelatedPatterns", true);
psd0.addUntracked<int>("minUncorrelatedHits", 3);
psd0.add<double>("angletan", 0.3);
psd0.add<double>("anglebinwidth", 1.0);
psd0.add<double>("posbinwidth", 2.1);
psd0.add<double>("maxdeltaAngDeg", 10);
psd0.add<double>("maxdeltaPos", 10);
psd0.add<int>("UpperNumber", 6);
psd0.add<int>("LowerNumber", 4);
psd0.add<double>("MaxDistanceToWire", 0.03);
psd0.add<int>("minNLayerHits", 6);
psd0.add<int>("minSingleSLHitsMax", 3);
psd0.add<int>("minSingleSLHitsMin", 3);
psd0.add<bool>("allowUncorrelatedPatterns", true);
psd0.add<int>("minUncorrelatedHits", 3);
desc.add<edm::ParameterSetDescription>("HoughGrouping", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.addUntracked<edm::FileInPath>(
psd0.add<edm::FileInPath>(
"pattern_filename", edm::FileInPath("L1Trigger/DTTriggerPhase2/data/PseudoBayesPatterns_uncorrelated_v0.root"));
psd0.addUntracked<bool>("debug", false);
psd0.addUntracked<int>("minNLayerHits", 3);
psd0.addUntracked<int>("minSingleSLHitsMax", 3);
psd0.addUntracked<int>("minSingleSLHitsMin", 0);
psd0.addUntracked<int>("allowedVariance", 1);
psd0.addUntracked<bool>("allowDuplicates", false);
psd0.addUntracked<bool>("setLateralities", true);
psd0.addUntracked<bool>("allowUncorrelatedPatterns", true);
psd0.addUntracked<int>("minUncorrelatedHits", 3);
psd0.addUntracked<bool>("saveOnPlace", true);
psd0.addUntracked<int>("maxPathsPerMatch", 256);
psd0.add<int>("minNLayerHits", 3);
psd0.add<int>("minSingleSLHitsMax", 3);
psd0.add<int>("minSingleSLHitsMin", 0);
psd0.add<int>("allowedVariance", 1);
psd0.add<bool>("allowDuplicates", false);
psd0.add<bool>("setLateralities", true);
psd0.add<bool>("allowUncorrelatedPatterns", true);
psd0.add<int>("minUncorrelatedHits", 3);
psd0.add<bool>("saveOnPlace", true);
psd0.add<int>("maxPathsPerMatch", 256);
desc.add<edm::ParameterSetDescription>("PseudoBayesPattern", psd0);
}
descriptions.add("dtTriggerPhase2PrimitiveDigis", desc);
Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/DTTriggerPhase2/python/CalibratedDigis_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
tTrigMode = cms.string('DTTTrigSyncFromDB'),
timeOffset = cms.int32(0),
flat_calib = cms.int32(0),
scenario = cms.untracked.int32(0),
scenario = cms.int32(0),
dtDigiTag = cms.InputTag("muonDTDigis")
)

Expand Down
26 changes: 13 additions & 13 deletions L1Trigger/DTTriggerPhase2/python/HoughGrouping_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,38 @@
# Tangent of the angle that puts a limit to the maximum inclination of a
# muon. Then, the maximum number of radians of inclination of the muon
# is derived as pi/2 - arctan(angletan).
angletan = cms.untracked.double(0.3),
angletan = cms.double(0.3),
# Width (in sexageseimal degrees) of the angle bins of the line space.
anglebinwidth = cms.untracked.double(1.0),
anglebinwidth = cms.double(1.0),
# Width (in centimetres) of the position bins of the line space.
posbinwidth = cms.untracked.double(2.1),
posbinwidth = cms.double(2.1),

# MAXIMA SEARCH CONFIGURATION
# Maximum distance (in sexageseimal degrees) used to derive maxima.
maxdeltaAngDeg = cms.untracked.double(10),
maxdeltaAngDeg = cms.double(10),
# Maximum distance (in centimetres) used to derive maxima.
maxdeltaPos = cms.untracked.double(10),
maxdeltaPos = cms.double(10),
# Upper number of entries of a line space bin that are needed to be
# considered for maxima search.
UpperNumber = cms.untracked.int32(6),
UpperNumber = cms.int32(6),
# Lower number of entries of a line space bin that are needed to be
# considered for maxima search.
LowerNumber = cms.untracked.int32(4),
LowerNumber = cms.int32(4),

# HITS ASSOCIATION CONFIGURATION
# Distance to the wire (in centimetres) from a candidate line below
# which no laterality is assumed.
MaxDistanceToWire = cms.untracked.double(0.03),
MaxDistanceToWire = cms.double(0.03),

# CANDIDATE QUALITY CONFIGURATION
# Minimum number of layers on which the candidate has a hit (maximum 8).
minNLayerHits = cms.untracked.int32(6),
minNLayerHits = cms.int32(6),
# Minimum number of hits in the superlayer with more hits.
minSingleSLHitsMax = cms.untracked.int32(3),
minSingleSLHitsMax = cms.int32(3),
# Minimum number of hits in the superlayer with less hits.
minSingleSLHitsMin = cms.untracked.int32(3),
minSingleSLHitsMin = cms.int32(3),
# Allow the algorithm to give you back uncorrelated candidates.
allowUncorrelatedPatterns = cms.untracked.bool(True),
allowUncorrelatedPatterns = cms.bool(True),
# Minimum number of hits that uncorrelated candidates can have.
minUncorrelatedHits = cms.untracked.int32(3),
minUncorrelatedHits = cms.int32(3),
)
22 changes: 11 additions & 11 deletions L1Trigger/DTTriggerPhase2/python/PseudoBayesGrouping_cfi.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import FWCore.ParameterSet.Config as cms

PseudoBayesPattern = cms.PSet(pattern_filename = cms.untracked.FileInPath("L1Trigger/DTTriggerPhase2/data/PseudoBayesPatterns_uncorrelated_v0.root"),
PseudoBayesPattern = cms.PSet(pattern_filename = cms.FileInPath("L1Trigger/DTTriggerPhase2/data/PseudoBayesPatterns_uncorrelated_v0.root"),
debug = cms.untracked.bool(False),
#Minimum number of layers hit (total). Together with the two parameters under this it means 4+4, 4+3 or 3+3
minNLayerHits = cms.untracked.int32(3),
minNLayerHits = cms.int32(3),
#Minimum number of hits in the most hit superlayer
minSingleSLHitsMax = cms.untracked.int32(3),
minSingleSLHitsMax = cms.int32(3),
#Minimum number of hits in the less hit superlayer
minSingleSLHitsMin = cms.untracked.int32(0),
minSingleSLHitsMin = cms.int32(0),
#By default pattern width is 1, 0 can be considered (harder fits but, lower efficiency of high quality), 2 is the absolute limit unless we have extremely bent muons somehow
allowedVariance = cms.untracked.int32(1),
allowedVariance = cms.int32(1),
#If true, it will provide all candidate sets with the same hits of the same quality (with lateralities defined). If false only the leading one (with its lateralities).
allowDuplicates = cms.untracked.bool(False),
allowDuplicates = cms.bool(False),
#Also provide best estimates for the lateralities
setLateralities = cms.untracked.bool(True),
setLateralities = cms.bool(True),
#Allow for uncorrelated patterns searching
allowUncorrelatedPatterns = cms.untracked.bool(True),
allowUncorrelatedPatterns = cms.bool(True),
#If uncorrelated, minimum hits
minUncorrelatedHits = cms.untracked.int32(3),
minUncorrelatedHits = cms.int32(3),
#DTPrimitives are saved in the appropriate element of the muonPath array
saveOnPlace = cms.untracked.bool(True),
saveOnPlace = cms.bool(True),
#Maximum number of muonpaths created per final match
maxPathsPerMatch = cms.untracked.int32(256),
maxPathsPerMatch = cms.int32(256),
)
Loading

0 comments on commit b185cff

Please sign in to comment.