34 unsigned int iProcessor,
39 unsigned int aSector = 99;
44 edm::LogError(
"Critical OMTFinputMaker") <<
"PROBLEM: hit in unknown Det, detID: "<<detId.
det()<<std::endl;
129 if(aMax>aMin && aSector>=aMin && aSector<=aMax)
return true;
130 if(aMax<aMin && (aSector>=aMin || aSector<=aMax))
return true;
137 unsigned int iProcessor,
140 unsigned int iInput = 99;
141 unsigned int aSector = 99;
144 int nInputsPerSector = 2;
152 nInputsPerSector = 4;
156 if(iProcessor==5 && aSector<3) aMin = -1;
165 nInputsPerSector = 2;
175 if(iProcessor==5 && aSector<5) aMin = -4;
184 if(iProcessor==5 && aSector<3) aMin = -1;
193 if(iProcessor==5 && aSector<5) aMin = -4;
200 if(iProcessor==5 && aSector<3) aMin = -2;
207 iInput = (aSector - aMin)*nInputsPerSector;
217 unsigned int iProcessor,
222 if(!dtPhDigis)
return result;
226 DTChamberId detid(digiIt.whNum(),digiIt.stNum(),digiIt.scNum()+1);
236 if (digiIt.bxNum()!= 0 || digiIt.BxCnt()!= 0 || digiIt.Ts2Tag()!= 0 || digiIt.code()<4)
continue;
243 unsigned int iLayer = iter->second;
249 result.
addLayerHit(iLayer+1,iInput,digiIt.phiB(),iEta);
258 unsigned int iProcessor,
262 if(!cscDigis)
return result;
264 auto chamber = cscDigis->begin();
265 auto chend = cscDigis->end();
266 for( ; chamber != chend; ++chamber ) {
268 unsigned int rawid = (*chamber).first;
270 if(!
acceptDigi(rawid, iProcessor, type))
continue;
271 auto digi = (*chamber).second.first;
272 auto dend = (*chamber).second.second;
273 for( ; digi != dend; ++digi ) {
277 if (
abs(digi->getBX()- 6)>0)
continue;
285 unsigned int iLayer = iter->second;
292 if(
abs(iEta)>1.26/2.61*240)
continue;
305 unsigned int iProcessor,
309 if(!rpcDigis)
return result;
310 std::stringstream str;
313 for (
auto rollDigis : rpcDigiCollection) {
315 unsigned int rawid = roll.
rawId();
316 if(!
acceptDigi(rawid, iProcessor, type))
continue;
320 std::vector<RPCDigi> digisCopy;
321 std::copy_if(rollDigis.second.first, rollDigis.second.second, std::back_inserter(digisCopy), [](
const RPCDigi & aDigi){
return (aDigi.
bx()==0);});
323 typedef std::pair<unsigned int, unsigned int> Cluster;
325 for(
auto & digi: digisCopy) {
326 if(clusters.empty()) clusters.push_back(Cluster(digi.strip(),digi.strip()));
327 else if (digi.strip() - clusters.back().second == 1) clusters.back().second = digi.strip();
328 else if (digi.strip() - clusters.back().second > 1) clusters.push_back(Cluster(digi.strip(),digi.strip()));
331 for (
auto & cluster: clusters) {
334 int iPhi = (iPhiHalfStrip1+iPhiHalfStrip2)/2;
339 unsigned int iLayer = iter->second;
344 str<<
" RPC halfDigi "
345 <<
" begin: "<<cluster.first<<
" end: "<<cluster.second
348 <<
" hwNumber: "<<hwNumber
349 <<
" iInput: "<<iInput
350 <<
" iLayer: "<<iLayer
364 unsigned int iProcessor,
368 result +=
processDT(dtPhDigis, dtThDigis, iProcessor, type);
369 result +=
processCSC(cscDigis, iProcessor, type);
370 result +=
processRPC(rpcDigis, iProcessor, type);
std::vector< unsigned int > endcap20DegMax
std::vector< unsigned int > endcap10DegMin
int getGlobalEta(unsigned int rawid, const L1MuDTChambPhDigi &aDigi, const L1MuDTChambThContainer *dtThDigis)
Convert local eta coordinate to global digital microGMT scale.
std::vector< unsigned int > endcap20DegMin
std::vector< unsigned int > endcap10DegMax
uint32_t rawId() const
get the raw id
int getProcessorPhi(unsigned int iProcessor, l1t::tftype part, const L1MuDTChambPhDigi &digi) const
Abs< T >::type abs(const T &t)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< unsigned int > barrelMin
uint32_t getLayerNumber(uint32_t rawId) const
Phi_Container const * getContainer() const
std::map< int, int > hwToLogicLayer
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...
Detector det() const
get the detector field from this detid
int wheel() const
Return the wheel number.
static const OMTFConfiguration * instance()
std::vector< unsigned int > barrelMax
void checkAndUpdateGeometry(const edm::EventSetup &)
Update the Geometry with current Event Setup.
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.