55 virtual void endJob() ;
89 m_endOfBx(
false), m_currType(0), m_currEvt(0)
92 produces<RegionalMuonCandBxCollection>(
"BarrelTFMuons");
93 produces<RegionalMuonCandBxCollection>(
"OverlapTFMuons");
94 produces<RegionalMuonCandBxCollection>(
"ForwardTFMuons");
95 produces<GMTInputCaloSumBxCollection>(
"TriggerTowerSums");
146 for (
size_t cntr = 0; cntr < bitstr.size(); ++cntr) {
147 char c = bitstr[cntr];
171 std::vector<int> bar{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
172 std::vector<int> ovl_neg{0, 0, 0, 0, 0, 0};
173 std::vector<int> ovl_pos{0, 0, 0, 0, 0, 0};
174 std::vector<int> fwd_neg{0, 0, 0, 0, 0, 0};
175 std::vector<int> fwd_pos{0, 0, 0, 0, 0, 0};
182 if (lineID ==
"BAR" || lineID ==
"OVL-" || lineID ==
"FWD-" || lineID ==
"OVL+" || lineID ==
"FWD+") {
196 int globalPhi = int(tmp*0.560856864654333
f);
197 int globalWedgePhi = (globalPhi+24)%576;
198 int globalSectorPhi = (globalPhi-24);
199 if (globalSectorPhi < 0) {
200 globalSectorPhi += 576;
206 if (lineID ==
"BAR") {
207 int processor = globalWedgePhi / 48 + 1;
208 int localPhi = globalWedgePhi%48;
210 mu.setHwPhi(localPhi);
212 if (bar[processor-1] > 3) skip =
true;
214 if (lineID ==
"OVL-") {
215 int processor = globalSectorPhi / 96 + 1;
216 int localPhi = globalSectorPhi%96;
218 mu.setHwPhi(localPhi);
219 ovl_neg[processor-1]++;
220 if (ovl_neg[processor-1] > 3) skip =
true;
222 if (lineID ==
"OVL+") {
223 int processor = globalSectorPhi / 96 + 1;
224 int localPhi = globalSectorPhi%96;
226 mu.setHwPhi(localPhi);
227 ovl_pos[processor-1]++;
228 if (ovl_pos[processor-1] > 3) skip =
true;
230 if (lineID ==
"FWD-") {
231 int processor = globalSectorPhi / 96 + 1;
232 int localPhi = globalSectorPhi%96;
234 mu.setHwPhi(localPhi);
235 fwd_neg[processor-1]++;
236 if (fwd_neg[processor-1] > 3) skip =
true;
238 if (lineID ==
"FWD+") {
239 int processor = globalSectorPhi / 96 + 1;
240 int localPhi = globalSectorPhi%96;
242 mu.setHwPhi(localPhi);
243 fwd_pos[processor-1]++;
244 if (fwd_pos[processor-1] > 3) skip =
true;
248 tmp = int(tmp*0.9090909090f);
257 mu.setHwSignValid(tmp);
268 if (
m_currType == 0 && !skip) barrelMuons->push_back(0,
mu);
275 }
else if (lineID ==
"EVT") {
279 if (lineID ==
"CALO") {
280 for (
int i = 0;
i < 28; ++
i) {
282 int iphi = caloCounter;
287 tSum.setEtaBits(ieta);
288 tSum.setPhiBits(iphi);
289 tSum.setIndex(caloCounter*28+
i);
290 towerSums->push_back(0, tSum);
303 iEvent.
put(barrelMuons,
"BarrelTFMuons");
304 iEvent.
put(overlapMuons,
"OverlapTFMuons");
305 iEvent.
put(endcapMuons,
"ForwardTFMuons");
306 iEvent.
put(towerSums,
"TriggerTowerSums");
T getParameter(std::string const &) const
BXVector< RegionalMuonCand > RegionalMuonCandBxCollection
#define DEFINE_FWK_MODULE(type)
void addDefault(ParameterSetDescription const &psetDescription)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
BXVector< GMTInputCaloSum > GMTInputCaloSumBxCollection
const int processor() const
Get processor ID on which the candidate was found (1..6 for OMTF/EMTF; 1..12 for BMTF) ...
std::vector< std::vector< double > > tmp
volatile std::atomic< bool > shutdown_flag false