37 unsigned int iProcessor,
42 unsigned int aSector = 99;
47 edm::LogError(
"Critical OMTFinputMaker") <<
"PROBLEM: hit in unknown Det, detID: "<<detId.
det()<<std::endl;
131 if(aMax>aMin && aSector>=aMin && aSector<=aMax)
return true;
132 if(aMax<aMin && (aSector>=aMin || aSector<=aMax))
return true;
139 unsigned int iProcessor,
142 unsigned int iInput = 99;
143 unsigned int aSector = 99;
146 int nInputsPerSector = 2;
154 nInputsPerSector = 4;
158 if(iProcessor==5 && aSector<3) aMin = -1;
167 nInputsPerSector = 2;
177 if(iProcessor==5 && aSector<5) aMin = -4;
186 if(iProcessor==5 && aSector<3) aMin = -1;
195 if(iProcessor==5 && aSector<5) aMin = -4;
202 if(iProcessor==5 && aSector<3) aMin = -2;
209 iInput = (aSector - aMin)*nInputsPerSector;
219 unsigned int iProcessor,
224 if(!dtPhDigis)
return result;
228 DTChamberId detid(digiIt.whNum(),digiIt.stNum(),digiIt.scNum()+1);
240 if (digiIt.bxNum()!= 0)
continue;
242 if (digiIt.code() != 4 && digiIt.code() != 5 && digiIt.code() != 6)
continue;
248 unsigned int iLayer = iter->second;
253 result.
addLayerHit(iLayer+1,iInput,digiIt.phiB(),iEta);
263 unsigned int iProcessor,
267 if(!cscDigis)
return result;
269 auto chamber = cscDigis->begin();
270 auto chend = cscDigis->end();
271 for( ; chamber != chend; ++chamber ) {
273 unsigned int rawid = (*chamber).first;
275 if(!
acceptDigi(rawid, iProcessor, type))
continue;
276 auto digi = (*chamber).second.first;
277 auto dend = (*chamber).second.second;
278 for( ; digi != dend; ++digi ) {
282 if (
abs(digi->getBX()- 6)>0)
continue;
294 if (
abs(iEta) > 115)
continue;
307 unsigned int iProcessor,
311 if(!rpcDigis)
return result;
312 std::stringstream str;
315 for (
auto rollDigis : rpcDigiCollection) {
317 unsigned int rawid = roll.
rawId();
318 if(!
acceptDigi(rawid, iProcessor, type))
continue;
322 std::vector<RPCDigi> digisCopy;
323 std::copy_if(rollDigis.second.first, rollDigis.second.second, std::back_inserter(digisCopy), [](
const RPCDigi & aDigi){
return (aDigi.
bx()==0);});
325 typedef std::pair<unsigned int, unsigned int> Cluster;
327 for(
auto & digi: digisCopy) {
328 if(clusters.empty()) clusters.push_back(Cluster(digi.strip(),digi.strip()));
329 else if (digi.strip() - clusters.back().second == 1) clusters.back().second = digi.strip();
330 else if (digi.strip() - clusters.back().second > 1) clusters.push_back(Cluster(digi.strip(),digi.strip()));
333 for (
auto & cluster: clusters) {
336 int iPhi = (iPhiHalfStrip1+iPhiHalfStrip2)/2;
343 str<<
" RPC halfDigi "
344 <<
" begin: "<<cluster.first<<
" end: "<<cluster.second
347 <<
" hwNumber: "<<hwNumber
348 <<
" iInput: "<<iInput
349 <<
" iLayer: "<<iLayer
363 unsigned int iProcessor,
366 result +=
processDT(dtPhDigis, dtThDigis, iProcessor, type);
367 result +=
processCSC(cscDigis, iProcessor, type);
368 result +=
processRPC(rpcDigis, iProcessor, type);
const std::vector< unsigned int > & getBarrelMax() const
const std::map< int, int > & getHwToLogicLayer() const
int getGlobalEta(unsigned int rawid, const L1MuDTChambPhDigi &aDigi, const L1MuDTChambThContainer *dtThDigis)
Convert local eta coordinate to global digital microGMT scale.
const std::vector< unsigned int > & getEndcap10DegMin() const
unsigned int nPhiBins() const
uint32_t rawId() const
get the raw id
int getProcessorPhi(unsigned int iProcessor, l1t::tftype part, const L1MuDTChambPhDigi &digi) const
const std::vector< unsigned int > & getEndcap20DegMax() const
Abs< T >::type abs(const T &t)
const std::vector< unsigned int > & getEndcap10DegMax() const
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
uint32_t getLayerNumber(uint32_t rawId) const
const std::vector< unsigned int > & getBarrelMin() const
Phi_Container const * getContainer() const
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
return(e1-e2)*(e1-e2)+dp *dp
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
void checkAndUpdateGeometry(const edm::EventSetup &, unsigned int)
Update the Geometry with current Event Setup.
const std::vector< unsigned int > & getEndcap20DegMin() const
Detector det() const
get the detector field from this detid
int wheel() const
Return the wheel number.
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.