diff --git a/DataFormats/L1TGlobal/interface/GlobalObject.h b/DataFormats/L1TGlobal/interface/GlobalObject.h
index 8156c367ffbbd..7a930329ad066 100644
--- a/DataFormats/L1TGlobal/interface/GlobalObject.h
+++ b/DataFormats/L1TGlobal/interface/GlobalObject.h
@@ -15,6 +15,7 @@ namespace l1t {
/// ObjNull catch all errors
enum GlobalObject {
gtMu,
+ gtMuShower,
gtEG,
gtJet,
gtTau,
diff --git a/DataFormats/L1TGlobal/src/GlobalObject.cc b/DataFormats/L1TGlobal/src/GlobalObject.cc
index 0d1803c353b60..00341eaf49746 100644
--- a/DataFormats/L1TGlobal/src/GlobalObject.cc
+++ b/DataFormats/L1TGlobal/src/GlobalObject.cc
@@ -25,6 +25,7 @@ using namespace l1t;
l1t::GlobalObject l1TGtObjectStringToEnum(const std::string& label) {
static const l1t::L1TGtObjectStringToEnum l1TGtObjectStringToEnumMap[] = {{"Mu", gtMu},
+ {"MuShower", gtMuShower},
{"EG", gtEG},
{"Tau", gtTau},
{"Jet", gtJet},
@@ -87,6 +88,10 @@ std::string l1t::l1TGtObjectEnumToString(const GlobalObject& gtObject) {
gtObjectString = "Mu";
} break;
+ case gtMuShower: {
+ gtObjectString = "MuShower";
+ } break;
+
case gtEG: {
gtObjectString = "EG";
} break;
diff --git a/DataFormats/L1TMuon/interface/RegionalMuonShower.h b/DataFormats/L1TMuon/interface/RegionalMuonShower.h
index a81ccd95e5057..230dc49d12664 100644
--- a/DataFormats/L1TMuon/interface/RegionalMuonShower.h
+++ b/DataFormats/L1TMuon/interface/RegionalMuonShower.h
@@ -18,12 +18,16 @@ namespace l1t {
RegionalMuonShower(bool oneNominalInTime = false,
bool oneNominalOutOfTime = false,
bool twoLooseInTime = false,
- bool twoLooseOutOfTime = false);
+ bool twoLooseOutOfTime = false,
+ bool oneTightInTime = false,
+ bool oneTightOutOfTime = false);
~RegionalMuonShower();
void setOneNominalInTime(const bool bit) { isOneNominalInTime_ = bit; }
void setOneNominalOutOfTime(const bool bit) { isOneNominalOutOfTime_ = bit; }
+ void setOneTightInTime(const bool bit) { isOneTightInTime_ = bit; }
+ void setOneTightOutOfTime(const bool bit) { isOneTightOutOfTime_ = bit; }
void setTwoLooseOutOfTime(const bool bit) { isTwoLooseOutOfTime_ = bit; }
void setTwoLooseInTime(const bool bit) { isTwoLooseInTime_ = bit; }
@@ -34,6 +38,8 @@ namespace l1t {
bool isValid() const;
bool isOneNominalInTime() const { return isOneNominalInTime_; }
bool isOneNominalOutOfTime() const { return isOneNominalOutOfTime_; }
+ bool isOneTightInTime() const { return isOneTightInTime_; }
+ bool isOneTightOutOfTime() const { return isOneTightOutOfTime_; }
bool isTwoLooseInTime() const { return isTwoLooseInTime_; }
bool isTwoLooseOutOfTime() const { return isTwoLooseOutOfTime_; }
@@ -50,6 +56,8 @@ namespace l1t {
// in time and out-of-time qualities. only 2 bits each.
bool isOneNominalInTime_;
bool isOneNominalOutOfTime_;
+ bool isOneTightInTime_;
+ bool isOneTightOutOfTime_;
bool isTwoLooseInTime_;
bool isTwoLooseOutOfTime_;
int endcap_; // +/-1. For ME+ and ME-.
diff --git a/DataFormats/L1TMuon/src/RegionalMuonShower.cc b/DataFormats/L1TMuon/src/RegionalMuonShower.cc
index fb03609dac59c..ce73da8584331 100644
--- a/DataFormats/L1TMuon/src/RegionalMuonShower.cc
+++ b/DataFormats/L1TMuon/src/RegionalMuonShower.cc
@@ -3,9 +3,13 @@
l1t::RegionalMuonShower::RegionalMuonShower(bool oneNominalInTime,
bool oneNominalOutOfTime,
bool twoLooseInTime,
- bool twoLooseOutOfTime)
+ bool twoLooseOutOfTime,
+ bool oneTightInTime,
+ bool oneTightOutOfTime)
: isOneNominalInTime_(oneNominalInTime),
isOneNominalOutOfTime_(oneNominalOutOfTime),
+ isOneTightInTime_(oneTightInTime),
+ isOneTightOutOfTime_(oneTightOutOfTime),
isTwoLooseInTime_(twoLooseInTime),
isTwoLooseOutOfTime_(twoLooseOutOfTime),
endcap_(0),
@@ -15,10 +19,10 @@ l1t::RegionalMuonShower::RegionalMuonShower(bool oneNominalInTime,
l1t::RegionalMuonShower::~RegionalMuonShower() {}
bool l1t::RegionalMuonShower::isValid() const {
- return isOneNominalInTime_ or isTwoLooseInTime_ or isOneNominalOutOfTime_ or isTwoLooseOutOfTime_;
+ return (isOneNominalInTime_ or isTwoLooseInTime_ or isOneTightInTime_);
}
bool l1t::RegionalMuonShower::operator==(const l1t::RegionalMuonShower& rhs) const {
return (isTwoLooseInTime_ == rhs.isTwoLooseInTime() and isOneNominalInTime_ == rhs.isOneNominalInTime() and
- isTwoLooseOutOfTime_ == rhs.isTwoLooseOutOfTime() and isOneNominalOutOfTime_ == rhs.isOneNominalOutOfTime());
+ isOneTightInTime_ == rhs.isOneTightInTime());
}
diff --git a/DataFormats/L1TMuon/src/classes_def.xml b/DataFormats/L1TMuon/src/classes_def.xml
index 5f8365cead888..d045b4388ab55 100644
--- a/DataFormats/L1TMuon/src/classes_def.xml
+++ b/DataFormats/L1TMuon/src/classes_def.xml
@@ -13,7 +13,8 @@
-
+
+
diff --git a/DataFormats/L1Trigger/interface/MuonShower.h b/DataFormats/L1Trigger/interface/MuonShower.h
index a5684377f224d..15125d77bc548 100644
--- a/DataFormats/L1Trigger/interface/MuonShower.h
+++ b/DataFormats/L1Trigger/interface/MuonShower.h
@@ -30,20 +30,53 @@ namespace l1t {
MuonShower(bool oneNominalInTime = false,
bool oneNominalOutOfTime = false,
bool twoLooseInTime = false,
- bool twoLooseOutOfTime = false);
+ bool twoLooseOutOfTime = false,
+ bool oneTightInTime = false,
+ bool oneTightOutOfTime = false);
~MuonShower() override;
- void setOneNominalInTime(const bool bit) { isOneNominalInTime_ = bit; }
- void setOneNominalOutOfTime(const bool bit) { isOneNominalOutOfTime_ = bit; }
- void setTwoLooseInTime(const bool bit) { isTwoLooseInTime_ = bit; }
- void setTwoLooseOutOfTime(const bool bit) { isTwoLooseOutOfTime_ = bit; }
+ /*
+ In CMSSW we consider 3 valid cases:
+ - 1 nominal shower (baseline trigger for physics at Run-3)
+ - 1 tight shower (backup trigger)
+ - 2 loose showers (to extend the physics reach)
+ In the uGT and UTM library, the hadronic shower trigger data is split
+ over 4 bits: 2 for in-time trigger data, 2 for out-of-time trigger data
+ - mus0, mus1 for in-time
+ - musOutOfTime0, musOutOfTime1 for out-of-time
+
+ The mapping for Run-3 startup is as follows:
+ - 1 nominal shower -> 0b01 (mus0)
+ - 1 tight shower -> 0b10 (mus1)
+
+ The 2 loose showers case would be mapped onto musOutOfTime0 and musOutOfTime1 later during Run-3
+ */
+
+ void setMus0(const bool bit) { mus0_ = bit; }
+ void setMus1(const bool bit) { mus1_ = bit; }
+ void setMusOutOfTime0(const bool bit) { musOutOfTime0_ = bit; }
+ void setMusOutOfTime1(const bool bit) { musOutOfTime1_ = bit; }
+
+ bool mus0() const { return mus0_; }
+ bool mus1() const { return mus1_; }
+ bool musOutOfTime0() const { return musOutOfTime0_; }
+ bool musOutOfTime1() const { return musOutOfTime1_; }
+
+ // at least one bit must be valid
bool isValid() const;
- bool isOneNominalInTime() const { return isOneNominalInTime_; }
- bool isOneNominalOutOfTime() const { return isOneNominalOutOfTime_; }
- bool isTwoLooseInTime() const { return isTwoLooseInTime_; }
- bool isTwoLooseOutOfTime() const { return isTwoLooseOutOfTime_; }
+
+ // useful members for trigger performance studies
+ // needed at startup Run-3
+ bool isOneNominalInTime() const { return mus0_; }
+ bool isOneTightInTime() const { return mus1_; }
+ // to be developed during Run-3
+ bool isTwoLooseInTime() const { return false; }
+ // these options require more study
+ bool isOneNominalOutOfTime() const { return false; }
+ bool isTwoLooseOutOfTime() const { return false; }
+ bool isOneTightOutOfTime() const { return false; }
virtual bool operator==(const l1t::MuonShower& rhs) const;
virtual inline bool operator!=(const l1t::MuonShower& rhs) const { return !(operator==(rhs)); };
@@ -51,10 +84,10 @@ namespace l1t {
private:
// Run-3 definitions as provided in DN-20-033
// in time and out-of-time qualities. only 2 bits each.
- bool isOneNominalInTime_;
- bool isOneNominalOutOfTime_;
- bool isTwoLooseInTime_;
- bool isTwoLooseOutOfTime_;
+ bool mus0_;
+ bool mus1_;
+ bool musOutOfTime0_;
+ bool musOutOfTime1_;
};
} // namespace l1t
diff --git a/DataFormats/L1Trigger/src/MuonShower.cc b/DataFormats/L1Trigger/src/MuonShower.cc
index dec1dc893a54e..123363221b79e 100644
--- a/DataFormats/L1Trigger/src/MuonShower.cc
+++ b/DataFormats/L1Trigger/src/MuonShower.cc
@@ -1,19 +1,24 @@
#include "DataFormats/L1Trigger/interface/MuonShower.h"
-l1t::MuonShower::MuonShower(bool oneNominalInTime, bool oneNominalOutOfTime, bool twoLooseInTime, bool twoLooseOutOfTime)
+l1t::MuonShower::MuonShower(bool oneNominalInTime,
+ bool oneNominalOutOfTime,
+ bool twoLooseInTime,
+ bool twoLooseOutOfTime,
+ bool oneTightInTime,
+ bool oneTightOutOfTime)
: L1Candidate(math::PtEtaPhiMLorentzVector{0., 0., 0., 0.}, 0., 0., 0., 0, 0),
- isOneNominalInTime_(oneNominalInTime),
- isOneNominalOutOfTime_(oneNominalOutOfTime),
- isTwoLooseInTime_(twoLooseInTime),
- isTwoLooseOutOfTime_(twoLooseOutOfTime) {}
+ // in this object it makes more sense to the different shower types to
+ // the 4 bits, so that the object easily interfaces with the uGT emulator
+ mus0_(oneNominalInTime),
+ mus1_(oneTightInTime),
+ musOutOfTime0_(false),
+ musOutOfTime1_(false) {}
l1t::MuonShower::~MuonShower() {}
-bool l1t::MuonShower::isValid() const {
- return isOneNominalInTime_ or isTwoLooseInTime_ or isOneNominalOutOfTime_ or isTwoLooseOutOfTime_;
-}
+bool l1t::MuonShower::isValid() const { return mus0_ or mus1_ or musOutOfTime0_ or musOutOfTime1_; }
bool l1t::MuonShower::operator==(const l1t::MuonShower& rhs) const {
- return (isTwoLooseInTime_ == rhs.isTwoLooseInTime() and isOneNominalInTime_ == rhs.isOneNominalInTime() and
- isTwoLooseOutOfTime_ == rhs.isTwoLooseOutOfTime() and isOneNominalOutOfTime_ == rhs.isOneNominalOutOfTime());
+ return (mus0_ == rhs.mus0() and mus1_ == rhs.mus1() and musOutOfTime0_ == rhs.musOutOfTime0() and
+ musOutOfTime1_ == rhs.musOutOfTime1());
}
diff --git a/DataFormats/L1Trigger/src/classes_def.xml b/DataFormats/L1Trigger/src/classes_def.xml
index 0bd493b85b81b..b639135a3e1f6 100644
--- a/DataFormats/L1Trigger/src/classes_def.xml
+++ b/DataFormats/L1Trigger/src/classes_def.xml
@@ -103,7 +103,8 @@
-
+
+
diff --git a/L1Trigger/CSCTriggerPrimitives/interface/CSCAnodeLCTProcessor.h b/L1Trigger/CSCTriggerPrimitives/interface/CSCAnodeLCTProcessor.h
index 699171e1ef331..aa1f26807b8fd 100644
--- a/L1Trigger/CSCTriggerPrimitives/interface/CSCAnodeLCTProcessor.h
+++ b/L1Trigger/CSCTriggerPrimitives/interface/CSCAnodeLCTProcessor.h
@@ -136,6 +136,7 @@ class CSCAnodeLCTProcessor : public CSCBaseboard {
unsigned showerMaxInTBin_;
unsigned showerMinOutTBin_;
unsigned showerMaxOutTBin_;
+ unsigned minLayersCentralTBin_;
/** Configuration parameters. */
unsigned int fifo_tbins, fifo_pretrig, drift_delay;
diff --git a/L1Trigger/CSCTriggerPrimitives/interface/CSCCathodeLCTProcessor.h b/L1Trigger/CSCTriggerPrimitives/interface/CSCCathodeLCTProcessor.h
index 5607f048e4427..cdc318e0a43bb 100644
--- a/L1Trigger/CSCTriggerPrimitives/interface/CSCCathodeLCTProcessor.h
+++ b/L1Trigger/CSCTriggerPrimitives/interface/CSCCathodeLCTProcessor.h
@@ -190,6 +190,7 @@ class CSCCathodeLCTProcessor : public CSCBaseboard {
unsigned showerMaxInTBin_;
unsigned showerMinOutTBin_;
unsigned showerMaxOutTBin_;
+ unsigned minLayersCentralTBin_;
/** Configuration parameters. */
unsigned int fifo_tbins, fifo_pretrig; // only for test beam mode.
diff --git a/L1Trigger/CSCTriggerPrimitives/python/params/showerParams.py b/L1Trigger/CSCTriggerPrimitives/python/params/showerParams.py
index 8903fbf5c5deb..a45b9fb6e1137 100644
--- a/L1Trigger/CSCTriggerPrimitives/python/params/showerParams.py
+++ b/L1Trigger/CSCTriggerPrimitives/python/params/showerParams.py
@@ -9,7 +9,11 @@
## loose -> 'loose anode or loose cathode'
## nominal -> 'nominal anode or nominal cathode'
## tight -> 'tight anode or tight cathode'
- source = cms.uint32(0),
+ ## 3: cathode and anode showers
+ ## loose -> 'loose anode and loose cathode'
+ ## nominal -> 'nominal anode and nominal cathode'
+ ## tight -> 'tight anode and tight cathode'
+ source = cms.uint32(3),
## settings for cathode showers (counting CSCComparatorDigi)
cathodeShower = cms.PSet(
@@ -21,53 +25,55 @@
# ME1/1
100, 100, 100,
# ME1/2
- 54, 55, 61,
+ 19, 38, 42,
# ME1/3
- 20, 20, 30,
+ 8, 11, 15,
# ME2/1
- 35, 35, 35,
+ 17, 33, 35,
# ME2/2
- 29, 29, 35,
+ 10, 20, 24,
# ME3/1
- 35, 35, 40,
+ 15, 31, 33,
# ME3/2
- 24, 25, 30,
+ 9, 18, 22,
# ME4/1
- 36, 40, 40,
+ 17, 34, 36,
# ME4/2
- 26, 30, 30
+ 11, 22, 26
),
showerMinInTBin = cms.uint32(6),
showerMaxInTBin = cms.uint32(8),
showerMinOutTBin = cms.uint32(2),
showerMaxOutTBin = cms.uint32(5),
+ minLayersCentralTBin = cms.uint32(5),
),
## settings for anode showers (counting CSCWireDigi)
anodeShower = cms.PSet(
## {loose, nominal, tight} thresholds for hit counters
showerThresholds = cms.vuint32(
# ME1/1
- 104, 105, 107,
+ 140, 140, 140,
# ME1/2
- 92, 100, 102,
+ 20, 41, 45,
# ME1/3
- 32, 33, 48,
+ 8, 12, 16,
# ME2/1
- 133, 134, 136,
+ 28, 56, 58,
# ME2/2
- 83, 84, 86,
+ 9, 18, 22,
# ME3/1
- 130, 131, 133,
+ 26, 55, 57,
# ME3/2
- 74, 80, 87,
+ 8, 16, 20,
# ME4/1
- 127, 128, 130,
+ 31, 62, 64,
# ME4/2
- 88, 89, 94
+ 13, 27, 31
),
showerMinInTBin = cms.uint32(8),
- showerMaxInTBin = cms.uint32(10),
+ showerMaxInTBin = cms.uint32(8),
showerMinOutTBin = cms.uint32(4),
showerMaxOutTBin = cms.uint32(7),
+ minLayersCentralTBin = cms.uint32(5),
)
)
diff --git a/L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc b/L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc
index 4c978fbbeecf4..05166b8607aa9 100644
--- a/L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc
+++ b/L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc
@@ -88,6 +88,7 @@ CSCAnodeLCTProcessor::CSCAnodeLCTProcessor(unsigned endcap,
showerMaxInTBin_ = shower.getParameter("showerMaxInTBin");
showerMinOutTBin_ = shower.getParameter("showerMinOutTBin");
showerMaxOutTBin_ = shower.getParameter("showerMaxOutTBin");
+ minLayersCentralTBin_ = shower.getParameter("minLayersCentralTBin");
}
void CSCAnodeLCTProcessor::loadPatternMask() {
@@ -179,7 +180,6 @@ void CSCAnodeLCTProcessor::clear() {
}
lct_list.clear();
inTimeHMT_ = 0;
- outTimeHMT_ = 0;
}
void CSCAnodeLCTProcessor::clear(const int wire, const int pattern) {
@@ -1339,20 +1339,45 @@ void CSCAnodeLCTProcessor::setWireContainer(CSCALCTDigi& alct, CSCALCTDigi::Wire
void CSCAnodeLCTProcessor::encodeHighMultiplicityBits(
const std::vector wires[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_WIREGROUPS]) {
inTimeHMT_ = 0;
- outTimeHMT_ = 0;
+
+ auto layerTime = [=](unsigned time) { return time == CSCConstants::LCT_CENTRAL_BX; };
+
+ // Calculate layers with hits
+ unsigned nLayersWithHits = 0;
+ for (int i_layer = 0; i_layer < CSCConstants::NUM_LAYERS; i_layer++) {
+ bool atLeastOneWGHit = false;
+ for (int i_wire = 0; i_wire < CSCConstants::MAX_NUM_WIREGROUPS; i_wire++) {
+ // there is at least one wiregroup...
+ if (!wires[i_layer][i_wire].empty()) {
+ auto times = wires[i_layer][i_wire];
+ int nLayerTime = std::count_if(times.begin(), times.end(), layerTime);
+ // ...for which at least one time bin was on for the central BX
+ if (nLayerTime > 0) {
+ atLeastOneWGHit = true;
+ break;
+ }
+ }
+ }
+ // add this layer to the number of layers hit
+ if (atLeastOneWGHit) {
+ nLayersWithHits++;
+ }
+ }
+
+ // require at least nLayersWithHits for the central time bin
+ // do nothing if there are not enough layers with hits
+ if (nLayersWithHits < minLayersCentralTBin_)
+ return;
// functions for in-time and out-of-time
auto inTime = [=](unsigned time) { return time >= showerMinInTBin_ and time <= showerMaxInTBin_; };
- auto outTime = [=](unsigned time) { return time >= showerMinOutTBin_ and time <= showerMaxOutTBin_; };
// count the wires in-time and out-time
unsigned hitsInTime = 0;
- unsigned hitsOutTime = 0;
for (int i_layer = 0; i_layer < CSCConstants::NUM_LAYERS; i_layer++) {
for (int i_wire = 0; i_wire < CSCConstants::MAX_NUM_WIREGROUPS; i_wire++) {
auto times = wires[i_layer][i_wire];
hitsInTime += std::count_if(times.begin(), times.end(), inTime);
- hitsOutTime += std::count_if(times.begin(), times.end(), outTime);
}
}
@@ -1369,11 +1394,8 @@ void CSCAnodeLCTProcessor::encodeHighMultiplicityBits(
if (hitsInTime >= station_thresholds[i]) {
inTimeHMT_ = i + 1;
}
- if (hitsOutTime >= station_thresholds[i]) {
- outTimeHMT_ = i + 1;
- }
}
// create a new object
- shower_ = CSCShowerDigi(inTimeHMT_, outTimeHMT_, theTrigChamber);
+ shower_ = CSCShowerDigi(inTimeHMT_, false, theTrigChamber);
}
diff --git a/L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc b/L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc
index 76475348ce879..63175d7d524dd 100644
--- a/L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc
+++ b/L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc
@@ -99,7 +99,7 @@ CSCCathodeLCTProcessor::CSCCathodeLCTProcessor(unsigned endcap,
showerMaxInTBin_ = shower.getParameter("showerMaxInTBin");
showerMinOutTBin_ = shower.getParameter("showerMinOutTBin");
showerMaxOutTBin_ = shower.getParameter("showerMaxOutTBin");
-
+ minLayersCentralTBin_ = shower.getParameter("minLayersCentralTBin");
thePreTriggerDigis.clear();
// quality control of stubs
@@ -178,7 +178,6 @@ void CSCCathodeLCTProcessor::clear() {
secondCLCT[bx].clear();
}
inTimeHMT_ = 0;
- outTimeHMT_ = 0;
}
std::vector CSCCathodeLCTProcessor::run(const CSCComparatorDigiCollection* compdc) {
@@ -1174,11 +1173,37 @@ CSCCLCTDigi CSCCathodeLCTProcessor::getSecondCLCT(int bx) const {
void CSCCathodeLCTProcessor::encodeHighMultiplicityBits(
const std::vector halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::MAX_NUM_HALF_STRIPS_RUN2_TRIGGER]) {
inTimeHMT_ = 0;
- outTimeHMT_ = 0;
+
+ auto layerTime = [=](unsigned time) { return time == CSCConstants::CLCT_CENTRAL_BX; };
+ // Calculate layers with hits
+ unsigned nLayersWithHits = 0;
+ for (int i_layer = 0; i_layer < CSCConstants::NUM_LAYERS; i_layer++) {
+ bool atLeastOneWGHit = false;
+ for (int i_hstrip = 0; i_hstrip < CSCConstants::MAX_NUM_HALF_STRIPS_RUN2_TRIGGER; i_hstrip++) {
+ // there is at least one halfstrip...
+ if (!halfstrip[i_layer][i_hstrip].empty()) {
+ auto times = halfstrip[i_layer][i_hstrip];
+ int nLayerTime = std::count_if(times.begin(), times.end(), layerTime);
+ // ...for which at least one time bin was on for the central BX
+ if (nLayerTime > 0) {
+ atLeastOneWGHit = true;
+ break;
+ }
+ }
+ }
+ // add this layer to the number of layers hit
+ if (atLeastOneWGHit) {
+ nLayersWithHits++;
+ }
+ }
+
+ // require at least nLayersWithHits for the central time bin
+ // do nothing if there are not enough layers with hits
+ if (nLayersWithHits < minLayersCentralTBin_)
+ return;
// functions for in-time and out-of-time
auto inTime = [=](unsigned time) { return time >= showerMinInTBin_ and time <= showerMaxInTBin_; };
- auto outTime = [=](unsigned time) { return time >= showerMinOutTBin_ and time <= showerMaxOutTBin_; };
// count the half-strips in-time and out-time
unsigned hitsInTime = 0;
@@ -1187,7 +1212,6 @@ void CSCCathodeLCTProcessor::encodeHighMultiplicityBits(
for (int i_hstrip = 0; i_hstrip < CSCConstants::MAX_NUM_HALF_STRIPS_RUN2_TRIGGER; i_hstrip++) {
auto times = halfstrip[i_layer][i_hstrip];
hitsInTime += std::count_if(times.begin(), times.end(), inTime);
- hitsOutTime += std::count_if(times.begin(), times.end(), outTime);
}
}
@@ -1204,12 +1228,9 @@ void CSCCathodeLCTProcessor::encodeHighMultiplicityBits(
if (hitsInTime >= station_thresholds[i]) {
inTimeHMT_ = i + 1;
}
- if (hitsOutTime >= station_thresholds[i]) {
- outTimeHMT_ = i + 1;
- }
}
// no shower object is created here. that is done at a later stage
- // in the motherboar, where potentially the trigger decisions from
+ // in the motherboard, where the trigger decisions from
// anode hit counters and cathode hit counters are combined
}
diff --git a/L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.cc b/L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.cc
index 67a7548908179..7821e8cea4525 100644
--- a/L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.cc
+++ b/L1Trigger/CSCTriggerPrimitives/src/CSCMotherboard.cc
@@ -550,34 +550,30 @@ void CSCMotherboard::encodeHighMultiplicityBits() {
// get the high multiplicity
// for anode this reflects what is already in the anode CSCShowerDigi object
unsigned cathodeInTime = clctProc->getInTimeHMT();
- unsigned cathodeOutTime = clctProc->getOutTimeHMT();
unsigned anodeInTime = alctProc->getInTimeHMT();
- unsigned anodeOutTime = alctProc->getOutTimeHMT();
// assign the bits
unsigned inTimeHMT_;
- unsigned outTimeHMT_;
// set the value according to source
switch (showerSource_) {
case 0:
inTimeHMT_ = cathodeInTime;
- outTimeHMT_ = cathodeOutTime;
break;
case 1:
inTimeHMT_ = anodeInTime;
- outTimeHMT_ = anodeOutTime;
break;
case 2:
inTimeHMT_ = anodeInTime | cathodeInTime;
- outTimeHMT_ = anodeOutTime | cathodeOutTime;
+ break;
+ case 3:
+ inTimeHMT_ = anodeInTime & cathodeInTime;
break;
default:
inTimeHMT_ = cathodeInTime;
- outTimeHMT_ = cathodeOutTime;
break;
};
// create a new object
- shower_ = CSCShowerDigi(inTimeHMT_, outTimeHMT_, theTrigChamber);
+ shower_ = CSCShowerDigi(inTimeHMT_, false, theTrigChamber);
}
diff --git a/L1Trigger/L1TGlobal/interface/GlobalBoard.h b/L1Trigger/L1TGlobal/interface/GlobalBoard.h
index 90d2089ee5774..cd49c041f3f59 100644
--- a/L1Trigger/L1TGlobal/interface/GlobalBoard.h
+++ b/L1Trigger/L1TGlobal/interface/GlobalBoard.h
@@ -25,6 +25,7 @@
// Trigger Objects
#include "DataFormats/L1Trigger/interface/EGamma.h"
#include "DataFormats/L1Trigger/interface/Muon.h"
+#include "DataFormats/L1Trigger/interface/MuonShower.h"
#include "DataFormats/L1Trigger/interface/Tau.h"
#include "DataFormats/L1Trigger/interface/Jet.h"
#include "DataFormats/L1Trigger/interface/EtSum.h"
@@ -77,11 +78,17 @@ namespace l1t {
const bool receiveMu,
const int nrL1Mu);
+ void receiveMuonShowerObjectData(edm::Event&,
+ const edm::EDGetTokenT>&,
+ const bool receiveMuShower,
+ const int nrL1MuShower);
+
void receiveExternalData(edm::Event&, const edm::EDGetTokenT>&, const bool receiveExt);
/// initialize the class (mainly reserve)
void init(const int numberPhysTriggers,
const int nrL1Mu,
+ const int nrL1MuShower,
const int nrL1EG,
const int nrL1Tau,
const int nrL1Jet,
@@ -97,6 +104,7 @@ namespace l1t {
std::unique_ptr& gtObjectMapRecord, //GTO
const unsigned int numberPhysTriggers,
const int nrL1Mu,
+ const int nrL1MuShower,
const int nrL1EG,
const int nrL1Tau,
const int nrL1Jet);
@@ -122,6 +130,7 @@ namespace l1t {
/// clear uGT
void reset();
void resetMu();
+ void resetMuonShower();
void resetCalo();
void resetExternal();
@@ -137,6 +146,9 @@ namespace l1t {
/// return global muon trigger candidate
inline const BXVector* getCandL1Mu() const { return m_candL1Mu; }
+ /// return global muon trigger candidate
+ inline const BXVector* getCandL1MuShower() const { return m_candL1MuShower; }
+
/// pointer to EG data list
inline const BXVector* getCandL1EG() const { return m_candL1EG; }
@@ -203,6 +215,7 @@ namespace l1t {
private:
BXVector* m_candL1Mu;
+ BXVector* m_candL1MuShower;
BXVector* m_candL1EG;
BXVector* m_candL1Tau;
BXVector* m_candL1Jet;
diff --git a/L1Trigger/L1TGlobal/interface/GlobalDefinitions.h b/L1Trigger/L1TGlobal/interface/GlobalDefinitions.h
index 16b13af902d7b..fd6323da6408f 100644
--- a/L1Trigger/L1TGlobal/interface/GlobalDefinitions.h
+++ b/L1Trigger/L1TGlobal/interface/GlobalDefinitions.h
@@ -98,7 +98,8 @@ namespace l1t {
CondCorrelation,
CondExternal,
CondCorrelationWithOverlapRemoval,
- CondCorrelationThreeBody
+ CondCorrelationThreeBody,
+ CondMuonShower,
};
struct GtConditionCategoryStringToEnum {
diff --git a/L1Trigger/L1TGlobal/interface/MuonShowerCondition.h b/L1Trigger/L1TGlobal/interface/MuonShowerCondition.h
new file mode 100644
index 0000000000000..03a2f232de338
--- /dev/null
+++ b/L1Trigger/L1TGlobal/interface/MuonShowerCondition.h
@@ -0,0 +1,81 @@
+#ifndef L1Trigger_L1TGlobal_MuonShowerCondition_h
+#define L1Trigger_L1TGlobal_MuonShowerCondition_h
+
+/**
+ * \class MuonShowerCondition
+ *
+ * Description: evaluation of a CondMuonShower condition.
+ */
+
+// system include files
+#include
+#include
+
+// user include files
+// base classes
+#include "L1Trigger/L1TGlobal/interface/ConditionEvaluation.h"
+
+#include "DataFormats/L1Trigger/interface/MuonShower.h"
+
+// forward declarations
+class GlobalCondition;
+class MuonShowerTemplate;
+
+namespace l1t {
+
+ class GlobalBoard;
+
+ // class declaration
+ class MuonShowerCondition : public ConditionEvaluation {
+ public:
+ /// constructors
+ /// default
+ MuonShowerCondition();
+
+ /// from base template condition (from event setup usually)
+ MuonShowerCondition(const GlobalCondition*, const GlobalBoard*, const int nrL1MuShower);
+
+ // copy constructor
+ MuonShowerCondition(const MuonShowerCondition&);
+
+ // destructor
+ ~MuonShowerCondition() override;
+
+ // assign operator
+ MuonShowerCondition& operator=(const MuonShowerCondition&);
+
+ /// the core function to check if the condition matches
+ const bool evaluateCondition(const int bxEval) const override;
+
+ /// print condition
+ void print(std::ostream& myCout) const override;
+
+ /// get / set the pointer to a Condition
+ inline const MuonShowerTemplate* gtMuonShowerTemplate() const { return m_gtMuonShowerTemplate; }
+
+ void setGtMuonShowerTemplate(const MuonShowerTemplate*);
+
+ /// get / set the pointer to GTL
+ inline const GlobalBoard* gtGTL() const { return m_gtGTL; }
+
+ void setGtGTL(const GlobalBoard*);
+
+ private:
+ /// copy function for copy constructor and operator=
+ void copy(const MuonShowerCondition& cp);
+
+ /// load muon candidates
+ const l1t::MuonShower* getCandidate(const int bx, const int indexCand) const;
+
+ /// function to check a single object if it matches a condition
+ const bool checkObjectParameter(const int iCondition, const l1t::MuonShower& cand, const unsigned int index) const;
+
+ /// pointer to a MuonShowerTemplate
+ const MuonShowerTemplate* m_gtMuonShowerTemplate;
+
+ /// pointer to GTL, to be able to get the trigger objects
+ const GlobalBoard* m_gtGTL;
+ };
+
+} // namespace l1t
+#endif
diff --git a/L1Trigger/L1TGlobal/interface/MuonShowerTemplate.h b/L1Trigger/L1TGlobal/interface/MuonShowerTemplate.h
new file mode 100644
index 0000000000000..fbaacc6ffa2c7
--- /dev/null
+++ b/L1Trigger/L1TGlobal/interface/MuonShowerTemplate.h
@@ -0,0 +1,74 @@
+#ifndef L1Trigger_L1TGlobal_MuonShowerTemplate_h
+#define L1Trigger_L1TGlobal_MuonShowerTemplate_h
+
+/**
+ * \class MuonShowerTemplate
+ *
+ *
+ * Description: L1 Global Trigger muon shower template.
+ *
+ * \author: Sven Dildick (Rice University)
+ *
+ */
+
+// system include files
+#include
+#include
+
+// user include files
+
+// base class
+#include "L1Trigger/L1TGlobal/interface/GlobalCondition.h"
+
+// forward declarations
+
+// class declaration
+class MuonShowerTemplate : public GlobalCondition {
+public:
+ // constructor
+ MuonShowerTemplate();
+
+ // constructor
+ MuonShowerTemplate(const std::string&);
+
+ // constructor
+ MuonShowerTemplate(const std::string&, const l1t::GtConditionType&);
+
+ // copy constructor
+ MuonShowerTemplate(const MuonShowerTemplate&);
+
+ // destructor
+ ~MuonShowerTemplate() override;
+
+ // assign operator
+ MuonShowerTemplate& operator=(const MuonShowerTemplate&);
+
+ // typedef for a single object template
+ struct ObjectParameter {
+ bool MuonShower0;
+ bool MuonShower1;
+ bool MuonShowerOutOfTime0;
+ bool MuonShowerOutOfTime1;
+ };
+
+public:
+ inline const std::vector* objectParameter() const { return &m_objectParameter; }
+
+ /// set functions
+ void setConditionParameter(const std::vector& objParameter);
+
+ /// print the condition
+ void print(std::ostream& myCout) const override;
+
+ /// output stream operator
+ friend std::ostream& operator<<(std::ostream&, const MuonShowerTemplate&);
+
+private:
+ /// copy function for copy constructor and operator=
+ void copy(const MuonShowerTemplate& cp);
+
+ /// variables containing the parameters
+ std::vector m_objectParameter;
+};
+
+#endif
diff --git a/L1Trigger/L1TGlobal/interface/TriggerMenu.h b/L1Trigger/L1TGlobal/interface/TriggerMenu.h
index 6ab26ec8d79b4..2a02bb0220c6f 100644
--- a/L1Trigger/L1TGlobal/interface/TriggerMenu.h
+++ b/L1Trigger/L1TGlobal/interface/TriggerMenu.h
@@ -32,6 +32,7 @@
#include "L1Trigger/L1TGlobal/interface/GlobalScales.h"
#include "L1Trigger/L1TGlobal/interface/MuonTemplate.h"
+#include "L1Trigger/L1TGlobal/interface/MuonShowerTemplate.h"
#include "L1Trigger/L1TGlobal/interface/CaloTemplate.h"
#include "L1Trigger/L1TGlobal/interface/EnergySumTemplate.h"
#include "L1Trigger/L1TGlobal/interface/ExternalTemplate.h"
@@ -53,6 +54,7 @@ class TriggerMenu {
TriggerMenu(const std::string&,
const unsigned int numberConditionChips,
const std::vector >&,
+ const std::vector >&,
const std::vector >&,
const std::vector >&,
const std::vector >&,
@@ -109,6 +111,13 @@ class TriggerMenu {
void setVecMuonTemplate(const std::vector >&);
+ //
+ inline const std::vector >& vecMuonShowerTemplate() const {
+ return m_vecMuonShowerTemplate;
+ }
+
+ void setVecMuonShowerTemplate(const std::vector >&);
+
//
inline const std::vector >& vecCaloTemplate() const { return m_vecCaloTemplate; }
@@ -218,6 +227,7 @@ class TriggerMenu {
/// vectors containing the conditions
/// explicit, due to persistency...
std::vector > m_vecMuonTemplate;
+ std::vector > m_vecMuonShowerTemplate;
std::vector > m_vecCaloTemplate;
std::vector > m_vecEnergySumTemplate;
diff --git a/L1Trigger/L1TGlobal/plugins/BXVectorInputProducer.cc b/L1Trigger/L1TGlobal/plugins/BXVectorInputProducer.cc
index 231be47fd5c19..b3ae33d16c0ea 100644
--- a/L1Trigger/L1TGlobal/plugins/BXVectorInputProducer.cc
+++ b/L1Trigger/L1TGlobal/plugins/BXVectorInputProducer.cc
@@ -31,6 +31,7 @@
#include "DataFormats/L1Trigger/interface/EGamma.h"
#include "DataFormats/L1Trigger/interface/Muon.h"
+#include "DataFormats/L1Trigger/interface/MuonShower.h"
#include "DataFormats/L1Trigger/interface/Tau.h"
#include "DataFormats/L1Trigger/interface/Jet.h"
#include "DataFormats/L1Trigger/interface/EtSum.h"
@@ -84,6 +85,7 @@ namespace l1t {
int bxLast_;
unsigned int maxNumMuCands_;
+ unsigned int maxNumMuShowerCands_;
unsigned int maxNumJetCands_;
unsigned int maxNumEGCands_;
unsigned int maxNumTauCands_;
@@ -101,6 +103,7 @@ namespace l1t {
// Tokens for inputs from other parts of the L1 system
edm::EDGetToken egToken;
edm::EDGetToken muToken;
+ edm::EDGetToken muShowerToken;
edm::EDGetToken tauToken;
edm::EDGetToken jetToken;
edm::EDGetToken etsumToken;
@@ -112,6 +115,11 @@ namespace l1t {
std::vector muonVec_bx0;
std::vector muonVec_bxp1;
+ std::vector muonShowerVec_bxm2;
+ std::vector muonShowerVec_bxm1;
+ std::vector muonShowerVec_bx0;
+ std::vector muonShowerVec_bxp1;
+
std::vector egammaVec_bxm2;
std::vector egammaVec_bxm1;
std::vector egammaVec_bx0;
@@ -139,6 +147,7 @@ namespace l1t {
BXVectorInputProducer::BXVectorInputProducer(const ParameterSet& iConfig) {
egToken = consumes>(iConfig.getParameter("egInputTag"));
muToken = consumes>(iConfig.getParameter("muInputTag"));
+ muShowerToken = consumes>(iConfig.getParameter("muShowerInputTag"));
tauToken = consumes>(iConfig.getParameter("tauInputTag"));
jetToken = consumes>(iConfig.getParameter("jetInputTag"));
etsumToken = consumes>(iConfig.getParameter("etsumInputTag"));
@@ -146,6 +155,7 @@ namespace l1t {
// register what you produce
produces>();
produces>();
+ produces>();
produces>();
produces>();
produces>();
@@ -155,6 +165,7 @@ namespace l1t {
bxLast_ = iConfig.getParameter("bxLast");
maxNumMuCands_ = iConfig.getParameter("maxMuCand");
+ maxNumMuShowerCands_ = iConfig.getParameter("maxMuShowerCand");
maxNumJetCands_ = iConfig.getParameter("maxJetCand");
maxNumEGCands_ = iConfig.getParameter("maxEGCand");
maxNumTauCands_ = iConfig.getParameter("maxTauCand");
@@ -186,6 +197,7 @@ namespace l1t {
// Setup vectors
std::vector muonVec;
+ std::vector muonShowerVec;
std::vector egammaVec;
std::vector tauVec;
std::vector jetVec;
@@ -198,6 +210,7 @@ namespace l1t {
//outputs
std::unique_ptr egammas(new l1t::EGammaBxCollection(0, bxFirst, bxLast));
std::unique_ptr muons(new l1t::MuonBxCollection(0, bxFirst, bxLast));
+ std::unique_ptr muonShowers(new l1t::MuonShowerBxCollection(0, bxFirst, bxLast));
std::unique_ptr taus(new l1t::TauBxCollection(0, bxFirst, bxLast));
std::unique_ptr jets(new l1t::JetBxCollection(0, bxFirst, bxLast));
std::unique_ptr etsums(new l1t::EtSumBxCollection(0, bxFirst, bxLast));
@@ -233,6 +246,20 @@ namespace l1t {
LogTrace("l1t|Global") << ">>> input Mu collection not found!" << std::endl;
}
+ // Make sure that you can get input Muon Showers
+ Handle> inputMuonShowers;
+ if (iEvent.getByToken(muToken, inputMuonShowers)) {
+ for (std::vector::const_iterator mu = inputMuonShowers->begin(bx);
+ mu != inputMuonShowers->end(bx);
+ ++mu) {
+ if (mu->isValid() && muonShowerVec.size() < maxNumMuCands_) {
+ muonShowerVec.push_back((*mu));
+ }
+ }
+ } else {
+ LogTrace("l1t|Global") << ">>> input Mu collection not found!" << std::endl;
+ }
+
// Make sure that you can get input Tau
Handle> inputTaus;
if (iEvent.getByToken(tauToken, inputTaus)) {
@@ -294,6 +321,28 @@ namespace l1t {
muonVec.clear();
}
+ // Fill MuonShowers
+ for (int iMuShower = 0; iMuShower < int(muonShowerVec_bxm2.size()); iMuShower++) {
+ muonShowers->push_back(-2, muonShowerVec_bxm2[iMuShower]);
+ }
+ for (int iMuShower = 0; iMuShower < int(muonShowerVec_bxm1.size()); iMuShower++) {
+ muonShowers->push_back(-1, muonShowerVec_bxm1[iMuShower]);
+ }
+ for (int iMuShower = 0; iMuShower < int(muonShowerVec_bx0.size()); iMuShower++) {
+ muonShowers->push_back(0, muonShowerVec_bx0[iMuShower]);
+ }
+ for (int iMuShower = 0; iMuShower < int(muonShowerVec_bxp1.size()); iMuShower++) {
+ muonShowers->push_back(1, muonShowerVec_bxp1[iMuShower]);
+ }
+ if (emptyBxTrailer_ <= (emptyBxEvt_ - eventCnt_)) {
+ for (int iMuShower = 0; iMuShower < int(muonShowerVec.size()); iMuShower++) {
+ muonShowers->push_back(2, muonShowerVec[iMuShower]);
+ }
+ } else {
+ // this event is part of empty trailer...clear out data
+ muonShowerVec.clear();
+ }
+
// Fill Egammas
for (int iEG = 0; iEG < int(egammaVec_bxm2.size()); iEG++) {
egammas->push_back(-2, egammaVec_bxm2[iEG]);
@@ -384,30 +433,35 @@ namespace l1t {
iEvent.put(std::move(egammas));
iEvent.put(std::move(muons));
+ iEvent.put(std::move(muonShowers));
iEvent.put(std::move(taus));
iEvent.put(std::move(jets));
iEvent.put(std::move(etsums));
// Now shift the bx data by one to prepare for next event.
muonVec_bxm2 = muonVec_bxm1;
+ muonShowerVec_bxm2 = muonShowerVec_bxm1;
egammaVec_bxm2 = egammaVec_bxm1;
tauVec_bxm2 = tauVec_bxm1;
jetVec_bxm2 = jetVec_bxm1;
etsumVec_bxm2 = etsumVec_bxm1;
muonVec_bxm1 = muonVec_bx0;
+ muonShowerVec_bxm1 = muonShowerVec_bx0;
egammaVec_bxm1 = egammaVec_bx0;
tauVec_bxm1 = tauVec_bx0;
jetVec_bxm1 = jetVec_bx0;
etsumVec_bxm1 = etsumVec_bx0;
muonVec_bx0 = muonVec_bxp1;
+ muonShowerVec_bx0 = muonShowerVec_bxp1;
egammaVec_bx0 = egammaVec_bxp1;
tauVec_bx0 = tauVec_bxp1;
jetVec_bx0 = jetVec_bxp1;
etsumVec_bx0 = etsumVec_bxp1;
muonVec_bxp1 = muonVec;
+ muonShowerVec_bxp1 = muonShowerVec;
egammaVec_bxp1 = egammaVec;
tauVec_bxp1 = tauVec;
jetVec_bxp1 = jetVec;
diff --git a/L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.cc b/L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.cc
index 34e6a526ea58d..7c1b3c80350b5 100644
--- a/L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.cc
+++ b/L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.cc
@@ -39,6 +39,8 @@ void L1TGlobalProducer::fillDescriptions(edm::ConfigurationDescriptions& descrip
// These parameters are part of the L1T/HLT interface, avoid changing if possible::
desc.add("MuonInputTag", edm::InputTag(""))
->setComment("InputTag for Global Muon Trigger (required parameter: default value is invalid)");
+ desc.add("MuonShowerInputTag", edm::InputTag(""))
+ ->setComment("InputTag for Global Muon Shower Trigger (required parameter: default value is invalid)");
desc.add("EGammaInputTag", edm::InputTag(""))
->setComment("InputTag for Calo Trigger EGamma (required parameter: default value is invalid)");
desc.add("TauInputTag", edm::InputTag(""))
@@ -47,6 +49,7 @@ void L1TGlobalProducer::fillDescriptions(edm::ConfigurationDescriptions& descrip
->setComment("InputTag for Calo Trigger Jet (required parameter: default value is invalid)");
desc.add("EtSumInputTag", edm::InputTag(""))
->setComment("InputTag for Calo Trigger EtSum (required parameter: default value is invalid)");
+
desc.add("ExtInputTag", edm::InputTag(""))
->setComment("InputTag for external conditions (not required, but recommend to specify explicitly in config)");
desc.add("AlgoBlkInputTag", edm::InputTag("hltGtStage2Digis"))
@@ -63,6 +66,10 @@ void L1TGlobalProducer::fillDescriptions(edm::ConfigurationDescriptions& descrip
"true when used by the HLT to produce the object map");
desc.add("AlgorithmTriggersUnmasked", false)
->setComment("not required, but recommend to specify explicitly in config");
+
+ // switch for muon showers in Run-3
+ desc.add("useMuonShowers", false);
+
// These parameters have well defined default values and are not currently
// part of the L1T/HLT interface. They can be cleaned up or updated at will:
desc.add("ProduceL1GtDaqRecord", true);
@@ -76,13 +83,15 @@ void L1TGlobalProducer::fillDescriptions(edm::ConfigurationDescriptions& descrip
desc.addUntracked("PrintL1Menu", false);
desc.add("TriggerMenuLuminosity", "startup");
desc.add("PrescaleCSVFile", "prescale_L1TGlobal.csv");
- descriptions.add("L1TGlobalProducer", desc);
+
+ descriptions.add("simGtStage2DigisDef", desc);
}
// constructors
L1TGlobalProducer::L1TGlobalProducer(const edm::ParameterSet& parSet)
: m_muInputTag(parSet.getParameter("MuonInputTag")),
+ m_muShowerInputTag(parSet.getParameter("MuonShowerInputTag")),
m_egInputTag(parSet.getParameter("EGammaInputTag")),
m_tauInputTag(parSet.getParameter("TauInputTag")),
m_jetInputTag(parSet.getParameter("JetInputTag")),
@@ -108,12 +117,15 @@ L1TGlobalProducer::L1TGlobalProducer(const edm::ParameterSet& parSet)
m_isDebugEnabled(edm::isDebugEnabled()),
m_getPrescaleColumnFromData(parSet.getParameter("GetPrescaleColumnFromData")),
m_requireMenuToMatchAlgoBlkInput(parSet.getParameter("RequireMenuToMatchAlgoBlkInput")),
- m_algoblkInputTag(parSet.getParameter("AlgoBlkInputTag")) {
+ m_algoblkInputTag(parSet.getParameter("AlgoBlkInputTag")),
+ m_useMuonShowers(parSet.getParameter("useMuonShowers")) {
m_egInputToken = consumes>(m_egInputTag);
m_tauInputToken = consumes>(m_tauInputTag);
m_jetInputToken = consumes>(m_jetInputTag);
m_sumInputToken = consumes>(m_sumInputTag);
m_muInputToken = consumes>(m_muInputTag);
+ if (m_useMuonShowers)
+ m_muShowerInputToken = consumes>(m_muShowerInputTag);
m_extInputToken = consumes>(m_extInputTag);
m_l1GtStableParToken = esConsumes();
m_l1GtMenuToken = esConsumes();
@@ -197,6 +209,7 @@ L1TGlobalProducer::L1TGlobalProducer(const edm::ParameterSet& parSet)
m_numberDaqPartitions = 0;
m_nrL1Mu = 0;
+ m_nrL1MuShower = 0;
m_nrL1EG = 0;
m_nrL1Tau = 0;
@@ -259,6 +272,12 @@ void L1TGlobalProducer::produce(edm::Event& iEvent, const edm::EventSetup& evSet
// number of objects of each type
m_nrL1Mu = data->numberL1Mu();
+ // There should be at most 1 muon shower object per BX
+ // This object contains information for the in-time
+ // showers and out-of-time showers
+ if (m_useMuonShowers)
+ m_nrL1MuShower = 1;
+
// EG
m_nrL1EG = data->numberL1EG();
@@ -274,8 +293,14 @@ void L1TGlobalProducer::produce(edm::Event& iEvent, const edm::EventSetup& evSet
int maxL1DataBxInEvent = (m_L1DataBxInEvent + 1) / 2 - 1;
// Initialize Board
- m_uGtBrd->init(
- m_numberPhysTriggers, m_nrL1Mu, m_nrL1EG, m_nrL1Tau, m_nrL1Jet, minL1DataBxInEvent, maxL1DataBxInEvent);
+ m_uGtBrd->init(m_numberPhysTriggers,
+ m_nrL1Mu,
+ m_nrL1MuShower,
+ m_nrL1EG,
+ m_nrL1Tau,
+ m_nrL1Jet,
+ minL1DataBxInEvent,
+ maxL1DataBxInEvent);
//
m_l1GtParCacheID = l1GtParCacheID;
@@ -330,6 +355,7 @@ void L1TGlobalProducer::produce(edm::Event& iEvent, const edm::EventSetup& evSet
m_l1GtMenu = std::make_unique(gtParser.gtTriggerMenuName(),
data->numberChips(),
gtParser.vecMuonTemplate(),
+ gtParser.vecMuonShowerTemplate(),
gtParser.vecCaloTemplate(),
gtParser.vecEnergySumTemplate(),
gtParser.vecExternalTemplate(),
@@ -377,7 +403,7 @@ void L1TGlobalProducer::produce(edm::Event& iEvent, const edm::EventSetup& evSet
m_l1GtBMCacheID = l1GtBMCacheID;
}
-
+
// TODO need changes in CondFormats to cache the maps
const std::vector& boardMaps = m_l1GtBM->gtBoardMaps();
@@ -471,6 +497,7 @@ void L1TGlobalProducer::produce(edm::Event& iEvent, const edm::EventSetup& evSet
//
bool receiveMu = true;
+ bool receiveMuShower = false;
bool receiveEG = true;
bool receiveTau = true;
bool receiveJet = true;
@@ -574,6 +601,9 @@ void L1TGlobalProducer::produce(edm::Event& iEvent, const edm::EventSetup& evSet
m_uGtBrd->receiveMuonObjectData(iEvent, m_muInputToken, receiveMu, m_nrL1Mu);
+ if (m_useMuonShowers)
+ m_uGtBrd->receiveMuonShowerObjectData(iEvent, m_muShowerInputToken, receiveMuShower, m_nrL1MuShower);
+
m_uGtBrd->receiveExternalData(iEvent, m_extInputToken, receiveExt);
// loop over BxInEvent
@@ -590,6 +620,7 @@ void L1TGlobalProducer::produce(edm::Event& iEvent, const edm::EventSetup& evSet
gtObjectMapRecord,
m_numberPhysTriggers,
m_nrL1Mu,
+ m_nrL1MuShower,
m_nrL1EG,
m_nrL1Tau,
m_nrL1Jet);
diff --git a/L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.h b/L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.h
index b8e58777dba81..c8127a1f6b7fd 100644
--- a/L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.h
+++ b/L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.h
@@ -68,6 +68,7 @@ class L1TGlobalProducer : public edm::stream::EDProducer<> {
// number of objects of each type
int m_nrL1Mu;
+ int m_nrL1MuShower;
int m_nrL1EG;
int m_nrL1Tau;
@@ -119,7 +120,9 @@ class L1TGlobalProducer : public edm::stream::EDProducer<> {
/// input tag for muon collection from GMT
edm::InputTag m_muInputTag;
+ edm::InputTag m_muShowerInputTag;
edm::EDGetTokenT> m_muInputToken;
+ edm::EDGetTokenT> m_muShowerInputToken;
/// input tag for calorimeter collections from GCT
edm::InputTag m_egInputTag;
@@ -185,6 +188,9 @@ class L1TGlobalProducer : public edm::stream::EDProducer<> {
edm::ESGetToken m_l1GtStableParToken;
edm::ESGetToken m_l1GtMenuToken;
edm::ESGetToken m_l1GtPrescaleVetosToken;
+
+ // switch to load muon showers in the global board
+ bool m_useMuonShowers;
};
#endif /*L1TGlobalProducer_h*/
diff --git a/L1Trigger/L1TGlobal/plugins/TriggerMenuParser.cc b/L1Trigger/L1TGlobal/plugins/TriggerMenuParser.cc
index d7a33924800e4..4d0e36fbcb2be 100644
--- a/L1Trigger/L1TGlobal/plugins/TriggerMenuParser.cc
+++ b/L1Trigger/L1TGlobal/plugins/TriggerMenuParser.cc
@@ -14,9 +14,9 @@
* - correlations with overlap object removal
* - displaced muons by R.Cavanaugh
*
- * \new features: Elisa Fontanesi
- * - extended for three-body correlation conditions
- *
+ * \new features: Elisa Fontanesi
+ * - extended for three-body correlation conditions
+ *
* $Date$
* $Revision$
*
@@ -111,6 +111,11 @@ void l1t::TriggerMenuParser::setVecMuonTemplate(const std::vector >& vecMuonShowerTempl) {
+ m_vecMuonShowerTemplate = vecMuonShowerTempl;
+}
+
void l1t::TriggerMenuParser::setVecCaloTemplate(const std::vector >& vecCaloTempl) {
m_vecCaloTemplate = vecCaloTempl;
}
@@ -202,6 +207,7 @@ void l1t::TriggerMenuParser::parseCondFormats(const L1TUtmTriggerMenu* utmMenu)
m_conditionMap.resize(m_numberConditionChips);
m_vecMuonTemplate.resize(m_numberConditionChips);
+ m_vecMuonShowerTemplate.resize(m_numberConditionChips);
m_vecCaloTemplate.resize(m_numberConditionChips);
m_vecEnergySumTemplate.resize(m_numberConditionChips);
m_vecExternalTemplate.resize(m_numberConditionChips);
@@ -300,6 +306,12 @@ void l1t::TriggerMenuParser::parseCondFormats(const L1TUtmTriggerMenu* utmMenu)
condition.getType() == esConditionType::QuadMuon) {
parseMuon(condition, chipNr, false);
+ } else if (condition.getType() == esConditionType::MuonShower0 ||
+ condition.getType() == esConditionType::MuonShower1 ||
+ condition.getType() == esConditionType::MuonShowerOutOfTime0 ||
+ condition.getType() == esConditionType::MuonShowerOutOfTime1) {
+ parseMuonShower(condition, chipNr, false);
+
//parse Correlation Conditions
} else if (condition.getType() == esConditionType::MuonMuonCorrelation ||
condition.getType() == esConditionType::MuonEsumCorrelation ||
@@ -1519,6 +1531,89 @@ bool l1t::TriggerMenuParser::parseMuonCorr(const tmeventsetup::esObject* corrMu,
return true;
}
+/**
+ * parseMuonShower Parse a muonShower condition and insert an entry to the conditions map
+ *
+ * @param node The corresponding node.
+ * @param name The name of the condition.
+ * @param chipNr The number of the chip this condition is located.
+ *
+ * @return "true" if succeeded, "false" if an error occurred.
+ *
+ */
+
+bool l1t::TriggerMenuParser::parseMuonShower(tmeventsetup::esCondition condMu,
+ unsigned int chipNr,
+ const bool corrFlag) {
+ using namespace tmeventsetup;
+
+ // get condition, particle name (must be muon) and type name
+ std::string condition = "muonShower";
+ std::string particle = "muonShower"; //l1t2string( condMu.objectType() );
+ std::string type = l1t2string(condMu.getType());
+ std::string name = l1t2string(condMu.getName());
+ // the number of muon shower objects is always 1
+ int nrObj = 1;
+
+ // condition type is always 1 particle, thus Type1s
+ GtConditionType cType = l1t::Type1s;
+
+ // edm::LogWarning("TriggerMenuParser") << "\n ****************************************** "
+ // << "\n parseMuonShower "
+ // << "\n condition = " << condition << "\n particle = " << particle
+ // << "\n type = " << type << "\n name = " << name << std::endl;
+
+ // temporary storage of the parameters
+ std::vector objParameter(nrObj);
+
+ if (int(condMu.getObjects().size()) != nrObj) {
+ edm::LogError("TriggerMenuParser") << " condMu objects: nrObj = " << nrObj
+ << "condMu.getObjects().size() = " << condMu.getObjects().size() << std::endl;
+ return false;
+ }
+
+ // Get the muon shower object
+ esObject object = condMu.getObjects().at(0);
+ int relativeBx = object.getBxOffset();
+
+ if (condMu.getType() == esConditionType::MuonShower0) {
+ objParameter[0].MuonShower0 = true;
+ } else if (condMu.getType() == esConditionType::MuonShower1) {
+ objParameter[0].MuonShower1 = true;
+ } else if (condMu.getType() == esConditionType::MuonShowerOutOfTime0) {
+ objParameter[0].MuonShowerOutOfTime0 = true;
+ } else if (condMu.getType() == esConditionType::MuonShowerOutOfTime1) {
+ objParameter[0].MuonShowerOutOfTime1 = true;
+ }
+
+ // object types - all muons
+ std::vector objType(nrObj, gtMuShower);
+
+ // now create a new CondMuonition
+ MuonShowerTemplate muonShowerCond(name);
+ muonShowerCond.setCondType(cType);
+ muonShowerCond.setObjectType(objType);
+ muonShowerCond.setCondChipNr(chipNr);
+ muonShowerCond.setCondRelativeBx(relativeBx);
+
+ muonShowerCond.setConditionParameter(objParameter);
+
+ if (edm::isDebugEnabled()) {
+ std::ostringstream myCoutStream;
+ muonShowerCond.print(myCoutStream);
+ }
+
+ // insert condition into the map and into muon template vector
+ if (!insertConditionIntoMap(muonShowerCond, chipNr)) {
+ edm::LogError("TriggerMenuParser") << " Error: duplicate condition (" << name << ")" << std::endl;
+ return false;
+ } else {
+ (m_vecMuonShowerTemplate[chipNr]).push_back(muonShowerCond);
+ }
+
+ return true;
+}
+
/**
* parseCalo Parse a calo condition and insert an entry to the conditions map
*
diff --git a/L1Trigger/L1TGlobal/plugins/TriggerMenuParser.h b/L1Trigger/L1TGlobal/plugins/TriggerMenuParser.h
index 85111e1a0f4bd..dffd73347978a 100644
--- a/L1Trigger/L1TGlobal/plugins/TriggerMenuParser.h
+++ b/L1Trigger/L1TGlobal/plugins/TriggerMenuParser.h
@@ -17,9 +17,9 @@
* - correlations with overlap object removal
* \author R. Cavanaugh
* - displaced muons
- * \author Elisa Fontanesi
- * - extended for three-body correlation conditions
- *
+ * \author Elisa Fontanesi
+ * - extended for three-body correlation conditions
+ *
*
* $Date$
* $Revision$
@@ -33,6 +33,7 @@
#include "L1Trigger/L1TGlobal/interface/TriggerMenuFwd.h"
#include "L1Trigger/L1TGlobal/interface/MuonTemplate.h"
+#include "L1Trigger/L1TGlobal/interface/MuonShowerTemplate.h"
#include "L1Trigger/L1TGlobal/interface/CaloTemplate.h"
#include "L1Trigger/L1TGlobal/interface/EnergySumTemplate.h"
#include "L1Trigger/L1TGlobal/interface/CorrelationTemplate.h"
@@ -124,6 +125,12 @@ namespace l1t {
inline const std::vector >& vecMuonTemplate() const { return m_vecMuonTemplate; }
void setVecMuonTemplate(const std::vector >&);
+ //
+ inline const std::vector >& vecMuonShowerTemplate() const {
+ return m_vecMuonShowerTemplate;
+ }
+ void setVecMuonShowerTemplate(const std::vector >&);
+
//
inline const std::vector >& vecCaloTemplate() const { return m_vecCaloTemplate; }
@@ -266,6 +273,9 @@ namespace l1t {
bool parseMuonCorr(const tmeventsetup::esObject* condMu, unsigned int chipNr = 0);
+ /// parse a muon shower condition
+ bool parseMuonShower(tmeventsetup::esCondition condMu, unsigned int chipNr = 0, const bool corrFlag = false);
+
/// parse a calorimeter condition
/* bool parseCalo(XERCES_CPP_NAMESPACE::DOMNode* node, */
/* const std::string& name, unsigned int chipNr = 0, */
@@ -383,6 +393,7 @@ namespace l1t {
/// vectors containing the conditions
/// explicit, due to persistency...
std::vector > m_vecMuonTemplate;
+ std::vector > m_vecMuonShowerTemplate;
std::vector > m_vecCaloTemplate;
std::vector > m_vecEnergySumTemplate;
std::vector > m_vecExternalTemplate;
diff --git a/L1Trigger/L1TGlobal/python/simGtStage2Digis_cfi.py b/L1Trigger/L1TGlobal/python/simGtStage2Digis_cfi.py
index 19e7f2b8998bd..0880d2b295d3f 100644
--- a/L1Trigger/L1TGlobal/python/simGtStage2Digis_cfi.py
+++ b/L1Trigger/L1TGlobal/python/simGtStage2Digis_cfi.py
@@ -4,32 +4,22 @@
# All changes must be explicitly discussed with the L1T offline coordinator.
#
import FWCore.ParameterSet.Config as cms
-
-# cfi uGT emulator
-
-simGtStage2Digis = cms.EDProducer("L1TGlobalProducer",
- MuonInputTag = cms.InputTag("simGmtStage2Digis"),
- ExtInputTag = cms.InputTag("simGtExtFakeStage2Digis"),
- EGammaInputTag = cms.InputTag("simCaloStage2Digis"),
- TauInputTag = cms.InputTag("simCaloStage2Digis"),
- JetInputTag = cms.InputTag("simCaloStage2Digis"),
- EtSumInputTag = cms.InputTag("simCaloStage2Digis"),
- AlgorithmTriggersUnmasked = cms.bool(True),
- AlgorithmTriggersUnprescaled = cms.bool(True),
- GetPrescaleColumnFromData = cms.bool(False),
- RequireMenuToMatchAlgoBlkInput = cms.bool(False),
- AlgoBlkInputTag = cms.InputTag("gtStage2Digis")
- # deprecated in Mike's version of producer:
- #ProduceL1GtDaqRecord = cms.bool(True),
- #GmtInputTag = cms.InputTag("gtInput"),
- #extInputTag = cms.InputTag("gtInput"),
- #caloInputTag = cms.InputTag("gtInput"),
- #AlternativeNrBxBoardDaq = cms.uint32(0),
- #WritePsbL1GtDaqRecord = cms.bool(True),
- #TriggerMenuLuminosity = cms.string('startup'),
- #PrescaleCSVFile = cms.string('prescale_L1TGlobal.csv'),
- #PrescaleSet = cms.uint32(1),
- #BstLengthBytes = cms.int32(-1),
- #Verbosity = cms.untracked.int32(0)
+from L1Trigger.L1TGlobal.simGtStage2DigisDef_cfi import simGtStage2DigisDef
+simGtStage2Digis = simGtStage2DigisDef.clone(
+ MuonInputTag = "simGmtStage2Digis",
+ MuonShowerInputTag = "simGmtShowerDigis",
+ EGammaInputTag = "simCaloStage2Digis",
+ TauInputTag = "simCaloStage2Digis",
+ JetInputTag = "simCaloStage2Digis",
+ EtSumInputTag = "simCaloStage2Digis",
+ ExtInputTag = "simGtExtFakeStage2Digis",
+ AlgoBlkInputTag = "gtStage2Digis",
+ AlgorithmTriggersUnmasked = True,
+ AlgorithmTriggersUnprescaled = True,
+ GetPrescaleColumnFromData = False,
+ RequireMenuToMatchAlgoBlkInput = False,
)
+from Configuration.Eras.Modifier_run3_common_cff import run3_common
+run3_common.toModify(simGtStage2Digis,
+ useMuonShowers = cms.bool(True))
diff --git a/L1Trigger/L1TGlobal/src/AlgorithmEvaluation.cc b/L1Trigger/L1TGlobal/src/AlgorithmEvaluation.cc
index 1ce0458b7e7c2..45ff98c719a58 100644
--- a/L1Trigger/L1TGlobal/src/AlgorithmEvaluation.cc
+++ b/L1Trigger/L1TGlobal/src/AlgorithmEvaluation.cc
@@ -1,14 +1,14 @@
/**
* \class AlgorithmEvaluation
- *
- *
+ *
+ *
* Description: Evaluation of a L1 Global Trigger algorithm.
- *
+ *
* Implementation:
*
- *
- * \author: Vasile Mihai Ghete - HEPHY Vienna
- *
+ *
+ * \author: Vasile Mihai Ghete - HEPHY Vienna
+ *
*
*/
diff --git a/L1Trigger/L1TGlobal/src/GlobalBoard.cc b/L1Trigger/L1TGlobal/src/GlobalBoard.cc
index eff9a910d533e..4cec9b2178483 100644
--- a/L1Trigger/L1TGlobal/src/GlobalBoard.cc
+++ b/L1Trigger/L1TGlobal/src/GlobalBoard.cc
@@ -27,6 +27,7 @@
#include "L1Trigger/L1TGlobal/interface/GlobalAlgorithm.h"
#include "L1Trigger/L1TGlobal/interface/MuonTemplate.h"
+#include "L1Trigger/L1TGlobal/interface/MuonShowerTemplate.h"
#include "L1Trigger/L1TGlobal/interface/CaloTemplate.h"
#include "L1Trigger/L1TGlobal/interface/EnergySumTemplate.h"
#include "L1Trigger/L1TGlobal/interface/ExternalTemplate.h"
@@ -42,6 +43,7 @@
// Conditions for uGt
#include "L1Trigger/L1TGlobal/interface/MuCondition.h"
+#include "L1Trigger/L1TGlobal/interface/MuonShowerCondition.h"
#include "L1Trigger/L1TGlobal/interface/CaloCondition.h"
#include "L1Trigger/L1TGlobal/interface/EnergySumCondition.h"
#include "L1Trigger/L1TGlobal/interface/ExternalCondition.h"
@@ -60,6 +62,7 @@
// constructor
l1t::GlobalBoard::GlobalBoard()
: m_candL1Mu(new BXVector),
+ m_candL1MuShower(new BXVector),
m_candL1EG(new BXVector),
m_candL1Tau(new BXVector),
m_candL1Jet(new BXVector),
@@ -91,6 +94,7 @@ l1t::GlobalBoard::GlobalBoard()
l1t::GlobalBoard::~GlobalBoard() {
//reset(); //why would we need a reset?
delete m_candL1Mu;
+ delete m_candL1MuShower;
delete m_candL1EG;
delete m_candL1Tau;
delete m_candL1Jet;
@@ -107,6 +111,7 @@ void l1t::GlobalBoard::setBxLast(int bx) { m_bxLast_ = bx; }
void l1t::GlobalBoard::init(const int numberPhysTriggers,
const int nrL1Mu,
+ const int nrL1MuShower,
const int nrL1EG,
const int nrL1Tau,
const int nrL1Jet,
@@ -116,6 +121,7 @@ void l1t::GlobalBoard::init(const int numberPhysTriggers,
setBxLast(bxLast);
m_candL1Mu->setBXRange(m_bxFirst_, m_bxLast_);
+ m_candL1MuShower->setBXRange(m_bxFirst_, m_bxLast_);
m_candL1EG->setBXRange(m_bxFirst_, m_bxLast_);
m_candL1Tau->setBXRange(m_bxFirst_, m_bxLast_);
m_candL1Jet->setBXRange(m_bxFirst_, m_bxLast_);
@@ -293,19 +299,19 @@ void l1t::GlobalBoard::receiveCaloObjectData(edm::Event& iEvent,
//(*m_candETM).push_back(i,&(*etsum));
LogDebug("L1TGlobal") << "ETM: Pt " << etsum->hwPt() << " Phi " << etsum->hwPhi() << std::endl;
}
- break;
+ break;
case l1t::EtSum::EtSumType::kMissingHt:
{
//(*m_candHTM).push_back(i,&(*etsum));
LogDebug("L1TGlobal") << "HTM: Pt " << etsum->hwPt() << " Phi " << etsum->hwPhi() << std::endl;
}
- break;
+ break;
case l1t::EtSum::EtSumType::kTotalEt:
{
//(*m_candETT).push_back(i,&(*etsum));
LogDebug("L1TGlobal") << "ETT: Pt " << etsum->hwPt() << std::endl;
}
- break;
+ break;
case l1t::EtSum::EtSumType::kTotalHt:
{
//(*m_candHTT).push_back(i,&(*etsum));
@@ -384,6 +390,54 @@ void l1t::GlobalBoard::receiveMuonObjectData(edm::Event& iEvent,
} //end if ReveiveMuon data
}
+// receive muon shower data from Global Muon Trigger
+void l1t::GlobalBoard::receiveMuonShowerObjectData(edm::Event& iEvent,
+ const edm::EDGetTokenT>& muShowerInputToken,
+ const bool receiveMuShower,
+ const int nrL1MuShower) {
+ // get data from Global Muon Trigger
+ if (receiveMuShower) {
+ edm::Handle> muonData;
+ iEvent.getByToken(muShowerInputToken, muonData);
+
+ if (!muonData.isValid()) {
+ if (m_verbosity) {
+ edm::LogWarning("L1TGlobal") << "\nWarning: BXVector with input tag "
+ << "\nrequested in configuration, but not found in the event.\n"
+ << std::endl;
+ }
+ } else {
+ //Loop over Muon Showers in this bx
+ int nObj = 0;
+ for (auto mu = muonData->begin(0); mu != muonData->end(0); ++mu) {
+ if (nObj < nrL1MuShower) {
+ /* Important here to split up the single object into 4 separate MuonShower
+ bits for the global board. This is because the UTM library considers those bits separate as well
+ */
+ l1t::MuonShower mus0;
+ l1t::MuonShower mus1;
+ l1t::MuonShower musOutOfTime0;
+ l1t::MuonShower musOutOfTime1;
+
+ mus0.setMus0(mu->mus0());
+ mus1.setMus1(mu->mus1());
+ musOutOfTime0.setMusOutOfTime0(mu->musOutOfTime0());
+ musOutOfTime1.setMusOutOfTime1(mu->musOutOfTime1());
+
+ (*m_candL1MuShower).push_back(0, &mus0);
+ (*m_candL1MuShower).push_back(0, &mus1);
+ (*m_candL1MuShower).push_back(0, &musOutOfTime0);
+ (*m_candL1MuShower).push_back(0, &musOutOfTime1);
+ } else {
+ edm::LogWarning("L1TGlobal") << " Too many Muon Showers (" << nObj
+ << ") for uGT Configuration maxMuShower =" << nrL1MuShower << std::endl;
+ }
+ nObj++;
+ } //end loop over muon showers in bx
+ } //end if over valid muon shower data
+ } //end if ReveiveMuonShower data
+}
+
// receive data from Global External Conditions
void l1t::GlobalBoard::receiveExternalData(edm::Event& iEvent,
const edm::EDGetTokenT>& extInputToken,
@@ -435,6 +489,7 @@ void l1t::GlobalBoard::runGTL(edm::Event& iEvent,
std::unique_ptr& gtObjectMapRecord,
const unsigned int numberPhysTriggers,
const int nrL1Mu,
+ const int nrL1MuShower,
const int nrL1EG,
const int nrL1Tau,
const int nrL1Jet) {
@@ -505,6 +560,24 @@ void l1t::GlobalBoard::runGTL(edm::Event& iEvent,
}
//delete muCondition;
+ } break;
+ case CondMuonShower: {
+ MuonShowerCondition* muShowerCondition = new MuonShowerCondition(itCond->second, this, nrL1MuShower);
+
+ muShowerCondition->setVerbosity(m_verbosity);
+
+ muShowerCondition->evaluateConditionStoreResult(iBxInEvent);
+
+ cMapResults[itCond->first] = muShowerCondition;
+
+ if (m_verbosity && m_isDebugEnabled) {
+ std::ostringstream myCout;
+ muShowerCondition->print(myCout);
+
+ edm::LogWarning("L1TGlobal") << "MuonShowerCondition " << myCout.str() << std::endl;
+ }
+ //delete muShowerCondition;
+
} break;
case CondCalo: {
// BLW Not sure w hat to do with this for now
@@ -1039,6 +1112,7 @@ void l1t::GlobalBoard::fillAlgRecord(int iBxInEvent,
// clear GTL
void l1t::GlobalBoard::reset() {
resetMu();
+ resetMuonShower();
resetCalo();
resetExternal();
@@ -1054,6 +1128,12 @@ void l1t::GlobalBoard::resetMu() {
m_candL1Mu->setBXRange(m_bxFirst_, m_bxLast_);
}
+// clear muon shower
+void l1t::GlobalBoard::resetMuonShower() {
+ m_candL1MuShower->clear();
+ m_candL1MuShower->setBXRange(m_bxFirst_, m_bxLast_);
+}
+
// clear calo
void l1t::GlobalBoard::resetCalo() {
m_candL1EG->clear();
diff --git a/L1Trigger/L1TGlobal/src/GlobalCondition.cc b/L1Trigger/L1TGlobal/src/GlobalCondition.cc
index 05b28bdde1549..3bb8aa22c58aa 100644
--- a/L1Trigger/L1TGlobal/src/GlobalCondition.cc
+++ b/L1Trigger/L1TGlobal/src/GlobalCondition.cc
@@ -179,6 +179,12 @@ void GlobalCondition::print(std::ostream& myCout) const {
<< "l1t::CondMuon" << std::endl;
}
+ break;
+ case l1t::CondMuonShower: {
+ myCout << " Condition category: "
+ << "l1t::CondMuonShower" << std::endl;
+ }
+
break;
case l1t::CondCalo: {
myCout << " Condition category: "
@@ -431,6 +437,11 @@ void GlobalCondition::print(std::ostream& myCout) const {
myCout << " Mu ";
}
+ break;
+ case l1t::gtMuShower: {
+ myCout << " MuShower ";
+ }
+
break;
case l1t::gtEG: {
myCout << " EG ";
diff --git a/L1Trigger/L1TGlobal/src/MuonShowerCondition.cc b/L1Trigger/L1TGlobal/src/MuonShowerCondition.cc
new file mode 100644
index 0000000000000..a3bf27dc82ad2
--- /dev/null
+++ b/L1Trigger/L1TGlobal/src/MuonShowerCondition.cc
@@ -0,0 +1,188 @@
+// this class header
+#include "L1Trigger/L1TGlobal/interface/MuonShowerCondition.h"
+
+// system include files
+#include
+#include
+
+#include
+#include
+#include
+
+// user include files
+// base classes
+#include "L1Trigger/L1TGlobal/interface/MuonShowerTemplate.h"
+#include "L1Trigger/L1TGlobal/interface/ConditionEvaluation.h"
+
+#include "DataFormats/L1Trigger/interface/MuonShower.h"
+
+#include "L1Trigger/L1TGlobal/interface/GlobalBoard.h"
+
+#include "FWCore/MessageLogger/interface/MessageLogger.h"
+#include "FWCore/MessageLogger/interface/MessageDrop.h"
+
+// constructors
+// default
+l1t::MuonShowerCondition::MuonShowerCondition() : ConditionEvaluation() {
+ // empty
+}
+
+// from base template condition (from event setup usually)
+l1t::MuonShowerCondition::MuonShowerCondition(const GlobalCondition* muonShowerTemplate,
+ const GlobalBoard* ptrGTL,
+ const int nrL1MuShower)
+ : ConditionEvaluation(),
+ m_gtMuonShowerTemplate(static_cast(muonShowerTemplate)),
+ m_gtGTL(ptrGTL) {
+ m_condMaxNumberObjects = nrL1MuShower;
+}
+
+// copy constructor
+void l1t::MuonShowerCondition::copy(const l1t::MuonShowerCondition& cp) {
+ m_gtMuonShowerTemplate = cp.gtMuonShowerTemplate();
+ m_gtGTL = cp.gtGTL();
+
+ m_condMaxNumberObjects = cp.condMaxNumberObjects();
+ m_condLastResult = cp.condLastResult();
+ m_combinationsInCond = cp.getCombinationsInCond();
+
+ m_verbosity = cp.m_verbosity;
+}
+
+l1t::MuonShowerCondition::MuonShowerCondition(const l1t::MuonShowerCondition& cp) : ConditionEvaluation() { copy(cp); }
+
+// destructor
+l1t::MuonShowerCondition::~MuonShowerCondition() {
+ // empty
+}
+
+// equal operator
+l1t::MuonShowerCondition& l1t::MuonShowerCondition::operator=(const l1t::MuonShowerCondition& cp) {
+ copy(cp);
+ return *this;
+}
+
+// methods
+void l1t::MuonShowerCondition::setGtMuonShowerTemplate(const MuonShowerTemplate* muonTempl) {
+ m_gtMuonShowerTemplate = muonTempl;
+}
+
+/// set the pointer to GTL
+void l1t::MuonShowerCondition::setGtGTL(const GlobalBoard* ptrGTL) { m_gtGTL = ptrGTL; }
+
+// try all object permutations and check spatial correlations, if required
+const bool l1t::MuonShowerCondition::evaluateCondition(const int bxEval) const {
+ // number of trigger objects in the condition
+ int nObjInCond = m_gtMuonShowerTemplate->nrObjects();
+
+ // the candidates
+ const BXVector* candVec = m_gtGTL->getCandL1MuShower();
+
+ // Look at objects in bx = bx + relativeBx
+ int useBx = bxEval + m_gtMuonShowerTemplate->condRelativeBx();
+
+ // Fail condition if attempting to get Bx outside of range
+ if ((useBx < candVec->getFirstBX()) || (useBx > candVec->getLastBX())) {
+ return false;
+ }
+
+ // store the indices of the shower objects
+ // from the combination evaluated in the condition
+ SingleCombInCond objectsInComb;
+ objectsInComb.reserve(nObjInCond);
+
+ // clear the m_combinationsInCond vector
+ (combinationsInCond()).clear();
+
+ // clear the indices in the combination
+ objectsInComb.clear();
+
+ // If no candidates, no use looking any further.
+ int numberObjects = candVec->size(useBx);
+ if (numberObjects < 1) {
+ return false;
+ }
+
+ std::vector index(numberObjects);
+
+ for (int i = 0; i < numberObjects; ++i) {
+ index[i] = i;
+ }
+
+ bool condResult = false;
+
+ // index is always zero, as they are global quantities (there is only one object)
+ int indexObj = 0;
+
+ objectsInComb.push_back(indexObj);
+ (combinationsInCond()).push_back(objectsInComb);
+
+ // if we get here all checks were successfull for this combination
+ // set the general result for evaluateCondition to "true"
+
+ condResult = true;
+ return condResult;
+}
+
+// load muon candidates
+const l1t::MuonShower* l1t::MuonShowerCondition::getCandidate(const int bx, const int indexCand) const {
+ return (m_gtGTL->getCandL1MuShower())->at(bx, indexCand); //BLW Change for BXVector
+}
+
+/**
+ * checkObjectParameter - Compare a single particle with a numbered condition.
+ *
+ * @param iCondition The number of the condition.
+ * @param cand The candidate to compare.
+ *
+ * @return The result of the comparison (false if a condition does not exist).
+ */
+
+const bool l1t::MuonShowerCondition::checkObjectParameter(const int iCondition,
+ const l1t::MuonShower& cand,
+ const unsigned int index) const {
+ // number of objects in condition
+ int nObjInCond = m_gtMuonShowerTemplate->nrObjects();
+
+ if (iCondition >= nObjInCond || iCondition < 0) {
+ return false;
+ }
+
+ const MuonShowerTemplate::ObjectParameter objPar = (*(m_gtMuonShowerTemplate->objectParameter()))[iCondition];
+
+ LogDebug("L1TGlobal") << "\n MuonShowerTemplate::ObjectParameter : " << std::hex << "\n\t MuonShower0 = 0x "
+ << objPar.MuonShower0 << "\n\t MuonShower1 = 0x " << objPar.MuonShower1
+ << "\n\t MuonShowerOutOfTime0 = 0x " << objPar.MuonShowerOutOfTime0
+ << "\n\t MuonShowerOutOfTime1 = 0x " << objPar.MuonShowerOutOfTime1 << std::endl;
+
+ LogDebug("L1TGlobal") << "\n l1t::MuonShower : "
+ << "\n\t MuonShower0 = 0x " << cand.mus0() << "\n\t MuonShower1 = 0x " << cand.mus1()
+ << "\n\t MuonShowerOutOfTime0 = 0x " << cand.musOutOfTime0()
+ << "\n\t MuonShowerOutOfTime1 = 0x " << cand.musOutOfTime1() << std::dec << std::endl;
+
+ // check oneNominalInTime
+ if (cand.mus0() != objPar.MuonShower0) {
+ LogDebug("L1TGlobal") << "\t\t MuonShower failed MuonShower0 requirement" << std::endl;
+ return false;
+ }
+ if (cand.mus1() != objPar.MuonShower1) {
+ LogDebug("L1TGlobal") << "\t\t MuonShower failed MuonShower1 requirement" << std::endl;
+ return false;
+ }
+ if (cand.musOutOfTime0() != objPar.MuonShowerOutOfTime0) {
+ LogDebug("L1TGlobal") << "\t\t MuonShower failed MuonShowerOutOfTime0 requirement" << std::endl;
+ return false;
+ }
+ if (cand.musOutOfTime1() != objPar.MuonShowerOutOfTime1) {
+ LogDebug("L1TGlobal") << "\t\t MuonShower failed MuonShowerOutOfTime1 requirement" << std::endl;
+ return false;
+ }
+
+ return true;
+}
+
+void l1t::MuonShowerCondition::print(std::ostream& myCout) const {
+ m_gtMuonShowerTemplate->print(myCout);
+
+ ConditionEvaluation::print(myCout);
+}
diff --git a/L1Trigger/L1TGlobal/src/MuonShowerTemplate.cc b/L1Trigger/L1TGlobal/src/MuonShowerTemplate.cc
new file mode 100644
index 0000000000000..11c323d81e0ee
--- /dev/null
+++ b/L1Trigger/L1TGlobal/src/MuonShowerTemplate.cc
@@ -0,0 +1,81 @@
+// this class header
+#include "L1Trigger/L1TGlobal/interface/MuonShowerTemplate.h"
+
+// system include files
+#include
+#include
+
+MuonShowerTemplate::MuonShowerTemplate() : GlobalCondition() { m_condCategory = l1t::CondMuonShower; }
+
+MuonShowerTemplate::MuonShowerTemplate(const std::string& cName) : GlobalCondition(cName) {
+ m_condCategory = l1t::CondMuonShower;
+}
+
+MuonShowerTemplate::MuonShowerTemplate(const std::string& cName, const l1t::GtConditionType& cType)
+ : GlobalCondition(cName, l1t::CondMuonShower, cType) {
+ int nObjects = nrObjects();
+
+ if (nObjects > 0) {
+ m_objectParameter.reserve(nObjects);
+
+ m_objectType.reserve(nObjects);
+ m_objectType.assign(nObjects, l1t::gtMuShower);
+ }
+}
+
+// copy constructor
+MuonShowerTemplate::MuonShowerTemplate(const MuonShowerTemplate& cp) : GlobalCondition(cp.m_condName) { copy(cp); }
+
+// destructor
+MuonShowerTemplate::~MuonShowerTemplate() {
+ // empty now
+}
+
+// assign operator
+MuonShowerTemplate& MuonShowerTemplate::operator=(const MuonShowerTemplate& cp) {
+ copy(cp);
+ return *this;
+}
+
+// setConditionParameter - set the parameters of the condition
+void MuonShowerTemplate::setConditionParameter(const std::vector& objParameter) {
+ m_objectParameter = objParameter;
+}
+
+void MuonShowerTemplate::print(std::ostream& myCout) const {
+ myCout << "\n MuonShowerTemplate print..." << std::endl;
+
+ GlobalCondition::print(myCout);
+
+ int nObjects = nrObjects();
+
+ for (int i = 0; i < nObjects; i++) {
+ myCout << std::endl;
+ myCout << " Template for object " << i << " [ hex ]" << std::endl;
+ myCout << " MuonShower0 = " << std::hex << m_objectParameter[i].MuonShower0 << std::endl;
+ myCout << " MuonShower1 = " << std::hex << m_objectParameter[i].MuonShower1 << std::endl;
+ myCout << " MuonShowerOutOfTime0 = " << std::hex << m_objectParameter[i].MuonShowerOutOfTime0 << std::endl;
+ myCout << " MuonShowerOutOfTime1 = " << std::hex << m_objectParameter[i].MuonShowerOutOfTime1 << std::endl;
+ }
+
+ // reset to decimal output
+ myCout << std::dec << std::endl;
+}
+
+void MuonShowerTemplate::copy(const MuonShowerTemplate& cp) {
+ m_condName = cp.condName();
+ m_condCategory = cp.condCategory();
+ m_condType = cp.condType();
+ m_objectType = cp.objectType();
+ m_condGEq = cp.condGEq();
+ m_condChipNr = cp.condChipNr();
+ m_condRelativeBx = cp.condRelativeBx();
+
+ m_objectParameter = *(cp.objectParameter());
+}
+
+// output stream operator
+std::ostream& operator<<(std::ostream& os, const MuonShowerTemplate& result) {
+ result.print(os);
+ return os;
+}
diff --git a/L1Trigger/L1TGlobal/src/TriggerMenu.cc b/L1Trigger/L1TGlobal/src/TriggerMenu.cc
index 74e6d5ff7eff2..bb2cac90174a6 100644
--- a/L1Trigger/L1TGlobal/src/TriggerMenu.cc
+++ b/L1Trigger/L1TGlobal/src/TriggerMenu.cc
@@ -41,6 +41,7 @@ TriggerMenu::TriggerMenu(
const std::string& triggerMenuNameVal,
const unsigned int numberConditionChips,
const std::vector >& vecMuonTemplateVal,
+ const std::vector >& vecMuonShowerTemplateVal,
const std::vector >& vecCaloTemplateVal,
const std::vector >& vecEnergySumTemplateVal,
const std::vector >& vecExternalTemplateVal,
@@ -57,6 +58,7 @@ TriggerMenu::TriggerMenu(
m_triggerMenuImplementation(0x0),
m_scaleDbKey("NULL"),
m_vecMuonTemplate(vecMuonTemplateVal),
+ m_vecMuonShowerTemplate(vecMuonShowerTemplateVal),
m_vecCaloTemplate(vecCaloTemplateVal),
m_vecEnergySumTemplate(vecEnergySumTemplateVal),
m_vecExternalTemplate(vecExternalTemplateVal),
@@ -81,6 +83,7 @@ TriggerMenu::TriggerMenu(const TriggerMenu& rhs) {
// copy physics conditions
m_vecMuonTemplate = rhs.m_vecMuonTemplate;
+ m_vecMuonShowerTemplate = rhs.m_vecMuonShowerTemplate;
m_vecCaloTemplate = rhs.m_vecCaloTemplate;
m_vecEnergySumTemplate = rhs.m_vecEnergySumTemplate;
m_vecExternalTemplate = rhs.m_vecExternalTemplate;
@@ -128,6 +131,7 @@ TriggerMenu& TriggerMenu::operator=(const TriggerMenu& rhs) {
m_triggerMenuUUID = rhs.m_triggerMenuUUID;
m_vecMuonTemplate = rhs.m_vecMuonTemplate;
+ m_vecMuonShowerTemplate = rhs.m_vecMuonShowerTemplate;
m_vecCaloTemplate = rhs.m_vecCaloTemplate;
m_vecEnergySumTemplate = rhs.m_vecEnergySumTemplate;
m_vecExternalTemplate = rhs.m_vecExternalTemplate;
@@ -189,6 +193,26 @@ void TriggerMenu::buildGtConditionMap() {
}
}
+ //
+ size_t vecMuonShowerSize = m_vecMuonShowerTemplate.size();
+ if (condMapSize < vecMuonShowerSize) {
+ m_conditionMap.resize(vecMuonShowerSize);
+ condMapSize = m_conditionMap.size();
+ }
+
+ chipNr = -1;
+
+ for (std::vector >::iterator itCondOnChip = m_vecMuonShowerTemplate.begin();
+ itCondOnChip != m_vecMuonShowerTemplate.end();
+ itCondOnChip++) {
+ chipNr++;
+
+ for (std::vector::iterator itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
+ itCond++) {
+ (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
+ }
+ }
+
//
size_t vecCaloSize = m_vecCaloTemplate.size();
if (condMapSize < vecCaloSize) {
diff --git a/L1Trigger/L1TGlobal/src/classes.h b/L1Trigger/L1TGlobal/src/classes.h
index 6a935d541760f..b8e6e6237c40a 100644
--- a/L1Trigger/L1TGlobal/src/classes.h
+++ b/L1Trigger/L1TGlobal/src/classes.h
@@ -8,5 +8,6 @@ namespace L1Trigger_L1TGlobal {
std::vector dummy3;
std::vector dummy4;
std::vector dummy5;
+ std::vector dummy6;
};
} // namespace L1Trigger_L1TGlobal
diff --git a/L1Trigger/L1TGlobal/src/classes_def.xml b/L1Trigger/L1TGlobal/src/classes_def.xml
index 39b771b22d5ae..9b34135ffdfab 100644
--- a/L1Trigger/L1TGlobal/src/classes_def.xml
+++ b/L1Trigger/L1TGlobal/src/classes_def.xml
@@ -31,17 +31,25 @@
+
-
+
+
-
+
+
+
+
+
+
+
diff --git a/L1Trigger/L1TMuon/plugins/L1TMuonShowerProducer.cc b/L1Trigger/L1TMuon/plugins/L1TMuonShowerProducer.cc
index 0f853b4af3209..4aacf4d31d299 100644
--- a/L1Trigger/L1TMuon/plugins/L1TMuonShowerProducer.cc
+++ b/L1Trigger/L1TMuon/plugins/L1TMuonShowerProducer.cc
@@ -56,33 +56,34 @@ void L1TMuonShowerProducer::produce(edm::Event& iEvent, const edm::EventSetup& i
/*
Check each sector for a valid EMTF shower. A valid EMTF shower
- can either be in-time or out-of-time. The minimal implementation
- only considers the "at least 1-nominal shower" case.
+ for startup Run-3 can either be "one nominal shower" or "one tight shower".
+ The case "two loose showers" is under consideration but needs more study.
+ Showers that arrive out-of-time are also under consideration, but are not
+ going be to enabled at startup Run-3. So all showers should be in-time.
*/
bool isOneNominalInTime = false;
- bool isOneNominalOutOfTime = false;
bool isTwoLooseInTime = false;
- bool isTwoLooseOutOfTime = false;
+ bool isOneTightInTime = false;
for (size_t i = 0; i < emtfShowers->size(0); ++i) {
auto shower = emtfShowers->at(0, i);
if (shower.isValid()) {
// nominal
if (shower.isOneNominalInTime())
isOneNominalInTime = true;
- if (shower.isOneNominalOutOfTime())
- isOneNominalOutOfTime = true;
// two loose
if (shower.isTwoLooseInTime())
isTwoLooseInTime = true;
- if (shower.isTwoLooseOutOfTime())
- isTwoLooseOutOfTime = true;
+ // tight
+ if (shower.isOneTightInTime())
+ isOneTightInTime = true;
}
}
// Check for at least one nominal shower
- const bool acceptCondition(isOneNominalInTime or isOneNominalOutOfTime or isTwoLooseInTime or isTwoLooseOutOfTime);
+ const bool acceptCondition(isOneNominalInTime or isTwoLooseInTime or isOneTightInTime);
+
if (acceptCondition) {
- MuonShower outShower(isOneNominalInTime, isOneNominalOutOfTime, isTwoLooseInTime, isTwoLooseOutOfTime);
+ MuonShower outShower(isOneNominalInTime, false, isTwoLooseInTime, false, isOneTightInTime, false);
outShowers->push_back(0, outShower);
}
iEvent.put(std::move(outShowers));
@@ -94,8 +95,6 @@ void L1TMuonShowerProducer::fillDescriptions(edm::ConfigurationDescriptions& des
desc.add("showerInput", edm::InputTag("simEmtfShowers", "EMTF"));
desc.add("bxMin", 0);
desc.add("bxMax", 0);
- desc.add("minNominalShowers", 1);
- desc.add("minTwoLooseShowers", 0);
descriptions.add("simGmtShowerDigisDef", desc);
}
diff --git a/L1Trigger/L1TMuonEndCap/interface/SectorProcessorShower.h b/L1Trigger/L1TMuonEndCap/interface/SectorProcessorShower.h
index b5c76daedf305..f48f93ef154e0 100644
--- a/L1Trigger/L1TMuonEndCap/interface/SectorProcessorShower.h
+++ b/L1Trigger/L1TMuonEndCap/interface/SectorProcessorShower.h
@@ -32,9 +32,14 @@ class SectorProcessorShower {
bool is_in_sector_csc(int tp_endcap, int tp_sector) const;
int verbose_, endcap_, sector_;
+ // nominal trigger for physics
bool enableOneNominalShower_;
+ // backup trigger
+ bool enableOneTightShower_;
+ // trigger to extend the physics reach
bool enableTwoLooseShowers_;
unsigned nNominalShowers_;
+ unsigned nTightShowers_;
unsigned nLooseShowers_;
};
diff --git a/L1Trigger/L1TMuonEndCap/plugins/L1TMuonEndCapShowerProducer.cc b/L1Trigger/L1TMuonEndCap/plugins/L1TMuonEndCapShowerProducer.cc
index 63f987a3e8d1b..62e63e5a87f5e 100644
--- a/L1Trigger/L1TMuonEndCap/plugins/L1TMuonEndCapShowerProducer.cc
+++ b/L1Trigger/L1TMuonEndCap/plugins/L1TMuonEndCapShowerProducer.cc
@@ -42,9 +42,11 @@ void L1TMuonEndCapShowerProducer::fillDescriptions(edm::ConfigurationDescription
edm::ParameterSetDescription desc;
// these are different shower selections that can be enabled
desc.add("enableOneNominalShowers", true);
+ desc.add("enableOneTightShowers", true);
desc.add("enableTwoLooseShowers", false);
desc.add("nLooseShowers", 2);
desc.add("nNominalShowers", 1);
+ desc.add("nTightShowers", 1);
desc.add("CSCShowerInput", edm::InputTag("simCscTriggerPrimitiveDigis"));
descriptions.add("simEmtfShowersDef", desc);
descriptions.setComment("This is the generic cfi file for the EMTF shower producer");
diff --git a/L1Trigger/L1TMuonEndCap/src/SectorProcessorShower.cc b/L1Trigger/L1TMuonEndCap/src/SectorProcessorShower.cc
index 12995249f03bc..1a2cc925cd066 100644
--- a/L1Trigger/L1TMuonEndCap/src/SectorProcessorShower.cc
+++ b/L1Trigger/L1TMuonEndCap/src/SectorProcessorShower.cc
@@ -10,8 +10,10 @@ void SectorProcessorShower::configure(const edm::ParameterSet& pset, int endcap,
enableTwoLooseShowers_ = pset.getParameter("enableTwoLooseShowers");
enableOneNominalShower_ = pset.getParameter("enableOneNominalShowers");
+ enableOneTightShower_ = pset.getParameter("enableOneTightShowers");
nLooseShowers_ = pset.getParameter("nLooseShowers");
nNominalShowers_ = pset.getParameter("nNominalShowers");
+ nTightShowers_ = pset.getParameter("nTightShowers");
}
void SectorProcessorShower::process(const CSCShowerDigiCollection& in_showers,
@@ -47,26 +49,26 @@ void SectorProcessorShower::process(const CSCShowerDigiCollection& in_showers,
selected_showers.begin(), selected_showers.end(), [](CSCShowerDigi p) { return p.isLooseInTime(); }));
const unsigned nNominalInTime(std::count_if(
selected_showers.begin(), selected_showers.end(), [](CSCShowerDigi p) { return p.isNominalInTime(); }));
- const unsigned nLooseOutOfTime(std::count_if(
- selected_showers.begin(), selected_showers.end(), [](CSCShowerDigi p) { return p.isLooseOutOfTime(); }));
- const unsigned nNominalOutOfTime(std::count_if(
- selected_showers.begin(), selected_showers.end(), [](CSCShowerDigi p) { return p.isNominalOutOfTime(); }));
+ const unsigned nTightInTime(std::count_if(
+ selected_showers.begin(), selected_showers.end(), [](CSCShowerDigi p) { return p.isTightInTime(); }));
const bool hasTwoLooseInTime(nLooseInTime >= nLooseShowers_);
const bool hasOneNominalInTime(nNominalInTime >= nNominalShowers_);
- const bool hasTwoLooseOutOfTime(nLooseOutOfTime >= nLooseShowers_);
- const bool hasOneNominalOutOfTime(nNominalOutOfTime >= nNominalShowers_);
+ const bool hasOneTightInTime(nTightInTime >= nTightShowers_);
+
+ const bool acceptLoose(enableTwoLooseShowers_ and hasTwoLooseInTime);
+ const bool acceptNominal(enableOneNominalShower_ and hasOneNominalInTime);
+ const bool acceptTight(enableOneTightShower_ and hasOneTightInTime);
- const bool acceptLoose(enableTwoLooseShowers_ and (hasTwoLooseInTime or hasTwoLooseOutOfTime));
- const bool acceptNominal(enableOneNominalShower_ and (hasOneNominalInTime or hasOneNominalOutOfTime));
// trigger condition
- const bool accept(acceptLoose or acceptNominal);
+ const bool accept(acceptLoose or acceptNominal or acceptTight);
if (accept) {
// shower output
- l1t::RegionalMuonShower out_shower(
- hasOneNominalInTime, hasOneNominalOutOfTime, hasTwoLooseInTime, hasTwoLooseOutOfTime);
- out_shower.setEndcap(endcap_);
+ l1t::RegionalMuonShower out_shower(hasOneNominalInTime, false, hasTwoLooseInTime, false, hasOneTightInTime, false);
+ // convert [1,2] to [1, -1]
+ const int endcap(endcap_ == 1 ? 1 : -1);
+ out_shower.setEndcap(endcap);
out_shower.setSector(sector_);
out_showers.push_back(0, out_shower);
}
diff --git a/L1Trigger/L1TNtuples/interface/L1AnalysisL1Upgrade.h b/L1Trigger/L1TNtuples/interface/L1AnalysisL1Upgrade.h
index 21fdfba49510c..882c6727f5d38 100644
--- a/L1Trigger/L1TNtuples/interface/L1AnalysisL1Upgrade.h
+++ b/L1Trigger/L1TNtuples/interface/L1AnalysisL1Upgrade.h
@@ -12,6 +12,7 @@
#include "DataFormats/L1Trigger/interface/Tau.h"
#include "DataFormats/L1Trigger/interface/Jet.h"
#include "DataFormats/L1Trigger/interface/Muon.h"
+#include "DataFormats/L1Trigger/interface/MuonShower.h"
#include "DataFormats/L1Trigger/interface/EtSum.h"
#include "L1AnalysisL1UpgradeDataFormat.h"
@@ -30,6 +31,7 @@ namespace L1Analysis {
void SetJet(const edm::Handle jet, unsigned maxL1Upgrade);
void SetSum(const edm::Handle sums, unsigned maxL1Upgrade);
void SetMuon(const edm::Handle muon, unsigned maxL1Upgrade);
+ void SetMuonShower(const edm::Handle muonShower, unsigned maxL1Upgrade);
L1AnalysisL1UpgradeDataFormat* getData() { return &l1upgrade_; }
private:
diff --git a/L1Trigger/L1TNtuples/interface/L1AnalysisL1UpgradeDataFormat.h b/L1Trigger/L1TNtuples/interface/L1AnalysisL1UpgradeDataFormat.h
index 82168330c0e31..7f01488b42283 100644
--- a/L1Trigger/L1TNtuples/interface/L1AnalysisL1UpgradeDataFormat.h
+++ b/L1Trigger/L1TNtuples/interface/L1AnalysisL1UpgradeDataFormat.h
@@ -125,6 +125,12 @@ namespace L1Analysis {
muonTfMuonIdx.clear();
muonBx.clear();
+ nMuonShowers = 0;
+ muonShowerBx.clear();
+ muonShowerOneNominal.clear();
+ muonShowerOneTight.clear();
+ muonShowerTwoLoose.clear();
+
nSums = 0;
sumType.clear();
sumEt.clear();
@@ -211,6 +217,12 @@ namespace L1Analysis {
std::vector muonTfMuonIdx;
std::vector muonBx;
+ unsigned short int nMuonShowers;
+ std::vector muonShowerBx;
+ std::vector muonShowerOneNominal;
+ std::vector muonShowerOneTight;
+ std::vector muonShowerTwoLoose;
+
unsigned short int nSums;
std::vector sumType;
std::vector sumEt;
diff --git a/L1Trigger/L1TNtuples/interface/L1AnalysisL1UpgradeTfMuonShower.h b/L1Trigger/L1TNtuples/interface/L1AnalysisL1UpgradeTfMuonShower.h
new file mode 100644
index 0000000000000..5f04e64a86909
--- /dev/null
+++ b/L1Trigger/L1TNtuples/interface/L1AnalysisL1UpgradeTfMuonShower.h
@@ -0,0 +1,23 @@
+#ifndef __L1Analysis_L1AnalysisL1UpgradeTfMuonShower_H__
+#define __L1Analysis_L1AnalysisL1UpgradeTfMuonShower_H__
+
+#include "DataFormats/L1TMuon/interface/RegionalMuonShower.h"
+
+#include "L1Trigger/L1TNtuples/interface/L1AnalysisL1UpgradeTfMuonShowerDataFormat.h"
+namespace L1Analysis {
+ class L1AnalysisL1UpgradeTfMuonShower {
+ public:
+ enum { TEST = 0 };
+ L1AnalysisL1UpgradeTfMuonShower();
+ ~L1AnalysisL1UpgradeTfMuonShower();
+ void Reset() {
+ l1upgradetfmuonshower_.Reset();
+ }
+ void SetTfMuonShower(const l1t::RegionalMuonShowerBxCollection& muon, unsigned maxL1UpgradeTfMuonShower);
+ L1AnalysisL1UpgradeTfMuonShowerDataFormat* getData() { return &l1upgradetfmuonshower_; }
+
+ private:
+ L1AnalysisL1UpgradeTfMuonShowerDataFormat l1upgradetfmuonshower_;
+ };
+} // namespace L1Analysis
+#endif
diff --git a/L1Trigger/L1TNtuples/interface/L1AnalysisL1UpgradeTfMuonShowerDataFormat.h b/L1Trigger/L1TNtuples/interface/L1AnalysisL1UpgradeTfMuonShowerDataFormat.h
new file mode 100644
index 0000000000000..b129049d828eb
--- /dev/null
+++ b/L1Trigger/L1TNtuples/interface/L1AnalysisL1UpgradeTfMuonShowerDataFormat.h
@@ -0,0 +1,33 @@
+#ifndef __L1Analysis_L1AnalysisL1UpgradeTfMuonShowerDataFormat_H__
+#define __L1Analysis_L1AnalysisL1UpgradeTfMuonShowerDataFormat_H__
+
+#include
+#include