70 const static int m_maxMuons = 108;
86 : m_currEvt(0), m_rnd(0) {
90 produces<RegionalMuonCandBxCollection>(
"BarrelTFMuons");
91 produces<RegionalMuonCandBxCollection>(
"OverlapTFMuons");
92 produces<RegionalMuonCandBxCollection>(
"ForwardTFMuons");
93 produces<MuonCaloSumBxCollection>(
"TriggerTowerSums");
118 std::vector<RegionalMuonCand> bmMuons;
119 std::vector<RegionalMuonCand> omMuons;
120 std::vector<RegionalMuonCand> emMuons;
122 std::vector<int> muIndices;
130 muIndices.push_back(cntr);
134 LogTrace(
"GlobalMuon") <<
" GenParticleCollection not found." << std::endl;
140 const float phiToInt = 91.67324722093171f;
142 const float etaToInt = 90.9090909090f;
143 const int maxPt = (1 << 9) - 1;
148 for (
auto it = muIndices.begin(); it != muIndices.end(); ++it) {
155 double eta = mcMuon.
eta();
156 if (fabs(
eta) > 2.45)
161 double phi = mcMuon.
phi();
172 int globalWedgePhi = (
hwPhi + 24) % 576;
173 int localPhi = globalWedgePhi % 48;
174 int processor = globalWedgePhi / 48 + 1;
175 int globalSectorPhi = (
hwPhi - 24);
176 if (globalSectorPhi < 0) {
177 globalSectorPhi += 576;
180 if (fabs(
eta) > 0.8) {
181 if (fabs(
eta) < 1.2) {
183 processor = globalSectorPhi / 96 + 1;
184 localPhi = globalSectorPhi % 96;
187 processor = globalSectorPhi / 96 + 1;
188 localPhi = globalSectorPhi % 96;
191 mu.setHwPhi(localPhi);
192 mu.setTFIdentifiers(processor, tf);
199 if (fabs(
eta) < 0.8 && bmMuons.size() < 36) {
200 bmMuons.push_back(
mu);
202 }
else if (fabs(
eta) < 1.2 && omMuons.size() < 36) {
203 omMuons.push_back(
mu);
205 }
else if (emMuons.size() < 36) {
206 emMuons.push_back(
mu);
215 for (
const auto&
mu : bmMuons) {
216 barrelMuons->push_back(0,
mu);
219 for (
const auto&
mu : omMuons) {
220 overlapMuons->push_back(0,
mu);
223 for (
const auto&
mu : emMuons) {
224 endcapMuons->push_back(0,
mu);
227 for (
int i = 0;
i < 1008; ++
i) {
235 towerSums->push_back(0, sum);
BXVector< RegionalMuonCand > RegionalMuonCandBxCollection
virtual double pt() const =0
transverse momentum
BXVector< MuonCaloSum > MuonCaloSumBxCollection
virtual int status() const =0
status word
const int processor() const
Get processor ID on which the candidate was found (0..5 for OMTF/EMTF; 0..11 for BMTF) ...
void addDefault(ParameterSetDescription const &psetDescription)
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
virtual int charge() const =0
electric charge
virtual int pdgId() const =0
PDG identifier.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual double phi() const =0
momentum azimuthal angle
virtual double eta() const =0
momentum pseudorapidity