Skip to content

Commit 83fb71b

Browse files
committed
Add exception if P2GT eta regions not consistent with cuts
1 parent 3441a18 commit 83fb71b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

L1Trigger/Phase2L1GT/plugins/L1GTSingleCollectionCut.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,14 @@ namespace l1t {
9090
primVertex_(getOptionalParam<unsigned int>("primVertex", config)),
9191
minPtMultiplicityN_(config.getParameter<unsigned int>("minPtMultiplicityN")),
9292
minPtMultiplicityCut_(getOptionalParam<int, double>(
93-
"minPtMultiplicityCut", config, [&scales](double value) { return scales.to_hw_pT_floor(value); })) {}
93+
"minPtMultiplicityCut", config, [&scales](double value) { return scales.to_hw_pT_floor(value); })) {
94+
if (!regionsMinPt_.empty() && regionsAbsEtaLowerBounds_.size() != regionsMinPt_.size()) {
95+
throw cms::Exception("Configuration") << "\'regionsMinPt\' has " << regionsMinPt_.size() << " entries, but requires " << regionsAbsEtaLowerBounds_.size() << " in " << tag_ << " .";
96+
}
97+
if (!regionsMaxRelIsolationPt_.empty() && regionsAbsEtaLowerBounds_.size() != regionsMaxRelIsolationPt_.size()) {
98+
throw cms::Exception("Configuration") << "\'regionsMinPt\' has " << regionsMaxRelIsolationPt_.size() << " entries, but requires " << regionsAbsEtaLowerBounds_.size() << " in " << tag_ << " .";
99+
}
100+
}
94101

95102
bool checkObject(const P2GTCandidate& obj) const {
96103
bool result = true;

0 commit comments

Comments
 (0)