57 virtual void endJob()
override ;
91 m_endOfBx(
false), m_currType(0), m_currEvt(0)
94 produces<RegionalMuonCandBxCollection>(
"BarrelTFMuons");
95 produces<RegionalMuonCandBxCollection>(
"OverlapTFMuons");
96 produces<RegionalMuonCandBxCollection>(
"ForwardTFMuons");
97 produces<MuonCaloSumBxCollection>(
"TriggerTowerSums");
148 for (
size_t cntr = 0; cntr < bitstr.size(); ++cntr) {
149 char c = bitstr[cntr];
173 std::vector<int> bar{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
174 std::vector<int> ovl_neg{0, 0, 0, 0, 0, 0};
175 std::vector<int> ovl_pos{0, 0, 0, 0, 0, 0};
176 std::vector<int> fwd_neg{0, 0, 0, 0, 0, 0};
177 std::vector<int> fwd_pos{0, 0, 0, 0, 0, 0};
184 if (lineID ==
"BAR" || lineID ==
"OVL-" || lineID ==
"FWD-" || lineID ==
"OVL+" || lineID ==
"FWD+") {
198 int globalPhi = int(tmp*0.560856864654333
f);
199 int globalWedgePhi = (globalPhi+24)%576;
200 int globalSectorPhi = (globalPhi-24);
201 if (globalSectorPhi < 0) {
202 globalSectorPhi += 576;
208 if (lineID ==
"BAR") {
209 int processor = globalWedgePhi / 48 + 1;
210 int localPhi = globalWedgePhi%48;
212 mu.setHwPhi(localPhi);
214 if (bar[processor-1] > 3) skip =
true;
216 if (lineID ==
"OVL-") {
217 int processor = globalSectorPhi / 96 + 1;
218 int localPhi = globalSectorPhi%96;
220 mu.setHwPhi(localPhi);
221 ovl_neg[processor-1]++;
222 if (ovl_neg[processor-1] > 3) skip =
true;
224 if (lineID ==
"OVL+") {
225 int processor = globalSectorPhi / 96 + 1;
226 int localPhi = globalSectorPhi%96;
228 mu.setHwPhi(localPhi);
229 ovl_pos[processor-1]++;
230 if (ovl_pos[processor-1] > 3) skip =
true;
232 if (lineID ==
"FWD-") {
233 int processor = globalSectorPhi / 96 + 1;
234 int localPhi = globalSectorPhi%96;
236 mu.setHwPhi(localPhi);
237 fwd_neg[processor-1]++;
238 if (fwd_neg[processor-1] > 3) skip =
true;
240 if (lineID ==
"FWD+") {
241 int processor = globalSectorPhi / 96 + 1;
242 int localPhi = globalSectorPhi%96;
244 mu.setHwPhi(localPhi);
245 fwd_pos[processor-1]++;
246 if (fwd_pos[processor-1] > 3) skip =
true;
250 tmp = int(tmp*0.9090909090f);
259 mu.setHwSignValid(tmp);
270 if (
m_currType == 0 && !skip) barrelMuons->push_back(0,
mu);
277 }
else if (lineID ==
"EVT") {
281 if (lineID ==
"CALO") {
282 for (
int i = 0;
i < 28; ++
i) {
284 int iphi = caloCounter;
289 tSum.setEtaBits(ieta);
290 tSum.setPhiBits(iphi);
291 tSum.setIndex(caloCounter*28+
i);
292 towerSums->push_back(0, tSum);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
BXVector< RegionalMuonCand > RegionalMuonCandBxCollection
#define DEFINE_FWK_MODULE(type)
BXVector< MuonCaloSum > MuonCaloSumBxCollection
void addDefault(ParameterSetDescription const &psetDescription)
const int processor() const
Get processor ID on which the candidate was found (0..5 for OMTF/EMTF; 0..11 for BMTF) ...
std::vector< std::vector< double > > tmp
volatile std::atomic< bool > shutdown_flag false