-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33446 from dildick/from-CMSSW_11_3_X_2021-04-14-2…
…300-muon-shower-dataformat Data formats for showers in the muon system in Run-3 (HadronicShowerTrigger-4)
- Loading branch information
Showing
8 changed files
with
190 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#ifndef DataFormats_L1Trigger_RegionalMuonShower_h | ||
#define DataFormats_L1Trigger_RegionalMuonShower_h | ||
|
||
#include "DataFormats/Common/interface/Ref.h" | ||
#include "DataFormats/L1Trigger/interface/BXVector.h" | ||
#include "DataFormats/L1Trigger/interface/L1TObjComparison.h" | ||
|
||
namespace l1t { | ||
|
||
class RegionalMuonShower; | ||
typedef BXVector<RegionalMuonShower> RegionalMuonShowerBxCollection; | ||
typedef ObjectRefBxCollection<RegionalMuonShower> RegionalMuonShowerRefBxCollection; | ||
typedef ObjectRefPair<RegionalMuonShower> RegionalMuonShowerRefPair; | ||
typedef ObjectRefPairBxCollection<RegionalMuonShower> RegionalMuonShowerRefPairBxCollection; | ||
|
||
class RegionalMuonShower { | ||
public: | ||
RegionalMuonShower(bool oneNominalInTime = false, | ||
bool oneNominalOutOfTime = false, | ||
bool twoLooseInTime = false, | ||
bool twoLooseOutOfTime = false); | ||
|
||
~RegionalMuonShower(); | ||
|
||
void setOneNominalInTime(const bool bit) { isOneNominalInTime_ = bit; } | ||
void setOneNominalOutOfTime(const bool bit) { isOneNominalOutOfTime_ = bit; } | ||
void setTwoLooseOutOfTime(const bool bit) { isTwoLooseOutOfTime_ = bit; } | ||
void setTwoLooseInTime(const bool bit) { isTwoLooseInTime_ = bit; } | ||
|
||
void setEndcap(const int endcap) { endcap_ = endcap; } | ||
void setSector(const unsigned sector) { sector_ = sector; } | ||
void setLink(const int link) { link_ = link; }; | ||
|
||
bool isValid() const; | ||
bool isOneNominalInTime() const { return isOneNominalInTime_; } | ||
bool isOneNominalOutOfTime() const { return isOneNominalOutOfTime_; } | ||
bool isTwoLooseInTime() const { return isTwoLooseInTime_; } | ||
bool isTwoLooseOutOfTime() const { return isTwoLooseOutOfTime_; } | ||
|
||
int endcap() const { return endcap_; } | ||
int sector() const { return sector_; } | ||
/// Get link on which the MicroGMT receives the candidate | ||
int link() const { return link_; } | ||
|
||
bool operator==(const l1t::RegionalMuonShower& rhs) const; | ||
inline bool operator!=(const l1t::RegionalMuonShower& rhs) const { return !(operator==(rhs)); }; | ||
|
||
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_; | ||
int endcap_; // +/-1. For ME+ and ME-. | ||
unsigned sector_; // 1 - 6. | ||
int link_; | ||
}; | ||
|
||
} // namespace l1t | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "DataFormats/L1TMuon/interface/RegionalMuonShower.h" | ||
|
||
l1t::RegionalMuonShower::RegionalMuonShower(bool oneNominalInTime, | ||
bool oneNominalOutOfTime, | ||
bool twoLooseInTime, | ||
bool twoLooseOutOfTime) | ||
: isOneNominalInTime_(oneNominalInTime), | ||
isOneNominalOutOfTime_(oneNominalOutOfTime), | ||
isTwoLooseInTime_(twoLooseInTime), | ||
isTwoLooseOutOfTime_(twoLooseOutOfTime), | ||
endcap_(0), | ||
sector_(0), | ||
link_(0) {} | ||
|
||
l1t::RegionalMuonShower::~RegionalMuonShower() {} | ||
|
||
bool l1t::RegionalMuonShower::isValid() const { | ||
return isTwoLooseInTime_ or isTwoLooseOutOfTime_ or isTwoLooseOutOfTime_ or isOneNominalOutOfTime_; | ||
} | ||
|
||
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()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#ifndef DataFormats_L1Trigger_MuonShower_h | ||
#define DataFormats_L1Trigger_MuonShower_h | ||
|
||
/* | ||
This class is derived from the L1Candidate primarily to interface easily | ||
with the Global Muon Trigger. In the trigger system the MuonShower object | ||
carries only up to 4 bits of information, 2 for in-time showers, | ||
2 for out-of-time showers. | ||
*/ | ||
|
||
#include "DataFormats/Common/interface/Ref.h" | ||
#include "DataFormats/L1Trigger/interface/L1Candidate.h" | ||
#include "DataFormats/L1Trigger/interface/BXVector.h" | ||
#include "DataFormats/L1Trigger/interface/L1TObjComparison.h" | ||
|
||
namespace l1t { | ||
|
||
class MuonShower; | ||
typedef BXVector<MuonShower> MuonShowerBxCollection; | ||
typedef edm::Ref<MuonShowerBxCollection> MuonShowerRef; | ||
typedef edm::RefVector<MuonShowerBxCollection> MuonShowerRefVector; | ||
typedef std::vector<MuonShowerRef> MuonShowerVectorRef; | ||
|
||
typedef ObjectRefBxCollection<MuonShower> MuonShowerRefBxCollection; | ||
typedef ObjectRefPair<MuonShower> MuonShowerRefPair; | ||
typedef ObjectRefPairBxCollection<MuonShower> MuonShowerRefPairBxCollection; | ||
|
||
class MuonShower : public L1Candidate { | ||
public: | ||
MuonShower(bool oneNominalInTime = false, | ||
bool oneNominalOutOfTime = false, | ||
bool twoLooseInTime = false, | ||
bool twoLooseOutOfTime = 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; } | ||
|
||
bool isValid() const; | ||
bool isOneNominalInTime() const { return isOneNominalInTime_; } | ||
bool isOneNominalOutOfTime() const { return isOneNominalOutOfTime_; } | ||
bool isTwoLooseInTime() const { return isTwoLooseInTime_; } | ||
bool isTwoLooseOutOfTime() const { return isTwoLooseOutOfTime_; } | ||
|
||
virtual bool operator==(const l1t::MuonShower& rhs) const; | ||
virtual inline bool operator!=(const l1t::MuonShower& rhs) const { return !(operator==(rhs)); }; | ||
|
||
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_; | ||
}; | ||
|
||
} // namespace l1t | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "DataFormats/L1Trigger/interface/MuonShower.h" | ||
|
||
l1t::MuonShower::MuonShower(bool oneNominalInTime, bool oneNominalOutOfTime, bool twoLooseInTime, bool twoLooseOutOfTime) | ||
: L1Candidate(math::PtEtaPhiMLorentzVector{0., 0., 0., 0.}, 0., 0., 0., 0, 0), | ||
isOneNominalInTime_(oneNominalInTime), | ||
isOneNominalOutOfTime_(oneNominalOutOfTime), | ||
isTwoLooseInTime_(twoLooseInTime), | ||
isTwoLooseOutOfTime_(twoLooseOutOfTime) {} | ||
|
||
l1t::MuonShower::~MuonShower() {} | ||
|
||
bool l1t::MuonShower::isValid() const { | ||
return isTwoLooseInTime_ or isTwoLooseOutOfTime_ or isTwoLooseOutOfTime_ or isOneNominalOutOfTime_; | ||
} | ||
|
||
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()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters