31 katownik->checkAndUpdateGeometry(es);
43 unsigned int iProcessor,
48 unsigned int aSector = 99;
53 edm::LogError(
"Critical OMTFinputMaker") <<
"PROBLEM: hit in unknown Det, detID: "<<detId.
det()<<std::endl;
138 if(aMax>aMin && aSector>=aMin && aSector<=aMax)
return true;
139 if(aMax<aMin && (aSector>=aMin || aSector<=aMax))
return true;
146 unsigned int iProcessor,
149 unsigned int iInput = 99;
150 unsigned int aSector = 99;
153 int nInputsPerSector = 2;
157 edm::LogError(
"Critical OMTFinputMaker") <<
"PROBLEM: hit in unknown Det, detID: "<<detId.
det()<<std::endl;
162 nInputsPerSector = 4;
166 if(iProcessor==5 && aSector<3) aMin = 0;
172 if(rpc.
station()==3) iRoll = 1;
182 if(iProcessor==5 && aSector<5) aMin = -3;
191 if(iProcessor==5 && aSector<3) aMin = 0;
200 if(iProcessor==5 && aSector<5) aMin = -3;
207 if(iProcessor==5 && aSector<3) aMin = -1;
214 iInput = (aSector - aMin)*nInputsPerSector;
224 unsigned int iProcessor,
227 if(!dtPhDigis)
return;
231 DTChamberId detid(digiIt.whNum(),digiIt.stNum(),digiIt.scNum()+1);
239 if (digiIt.bxNum()!= 0 || digiIt.BxCnt()!= 0 || digiIt.Ts2Tag()!= 0 || digiIt.code()<4)
continue;
245 int iPhi =
katownik->getGlobalPhi(detid.rawId(), digiIt);
246 int iEta =
katownik->getGlobalEta(detid.rawId(), digiIt, dtThDigis);
257 unsigned int iProcessor,
260 if(!cscDigis)
return;
262 auto chamber = cscDigis->begin();
263 auto chend = cscDigis->end();
264 for( ; chamber != chend; ++chamber ) {
266 unsigned int rawid = (*chamber).first;
268 if(!
acceptDigi(rawid, iProcessor, type))
continue;
270 auto digi = (*chamber).second.first;
271 auto dend = (*chamber).second.second;
272 for( ; digi != dend; ++digi ) {
276 if (
abs(digi->getBX()- 6)>0)
continue;
282 int iPhi =
katownik->getGlobalPhi(rawid, *digi);
283 int iEta =
katownik->getGlobalEta(rawid, *digi);
287 if(
abs(iEta)>1.26/2.61*240)
continue;
300 unsigned int iProcessor,
303 if(!rpcDigis)
return;
305 std::ostringstream myStr;
307 typedef std::pair<RPCDigi *, RPCDigi *> halfDigi;
309 auto chamber = rpcDigis->begin();
310 auto chend = rpcDigis->end();
311 for( ; chamber != chend; ++chamber ) {
312 unsigned int rawid = (*chamber).first;
315 if(!
acceptDigi(rawid, iProcessor, type))
continue;
320 std::vector<RPCDigi> digisCopy;
321 std::copy_if((*chamber).second.first, (*chamber).second.second, std::back_inserter(digisCopy), [](
const RPCDigi & aDigi){
return (aDigi.
bx()==0);});
323 std::vector<halfDigi>
result;
324 for(
auto &stripIt: digisCopy) {
325 if(result.empty()) result.push_back(halfDigi(&stripIt,&stripIt));
326 else if (stripIt.strip() - result.back().second->strip() == 1) result.back().second = &stripIt;
327 else if (stripIt.strip() - result.back().second->strip() > 1) result.push_back(halfDigi(&stripIt,&stripIt));
329 for(
auto halfDigiIt:result){
337 float phi1 =
katownik->getGlobalPhi(rawid,*halfDigiIt.first);
338 float phi2 =
katownik->getGlobalPhi(rawid,*halfDigiIt.second);
339 float phi = (phi1+phi2)/2.0;
342 if(phi1*phi2<0 && fabs(phi1)>
M_PI/2.0) phi = (
M_PI-
phi)*(1 - 2*std::signbit(phi));
345 int iEta =
katownik->getGlobalEta(rawid,*halfDigiIt.first);
352 myStr<<
" RPC halfDigi "
353 <<
" begin: "<<halfDigiIt.first->strip()<<
" end: "<<halfDigiIt.second->strip()
356 <<
" hwNumber: "<<hwNumber
357 <<
" iInput: "<<iInput
358 <<
" iLayer: "<<iLayer
370 unsigned int iProcessor,
374 processDT(dtPhDigis, dtThDigis, iProcessor, type);
static std::vector< unsigned int > endcap20DegMax
static std::vector< unsigned int > endcap10DegMin
static std::vector< unsigned int > barrelMax
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static std::vector< unsigned int > barrelMin
Abs< T >::type abs(const T &t)
static unsigned int nPhiBins
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static std::map< int, int > hwToLogicLayer
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...
Detector det() const
get the detector field from this detid
int wheel() const
Return the wheel number.
static std::vector< unsigned int > endcap10DegMax
static std::vector< unsigned int > endcap20DegMin
static uint32_t getLayerNumber(uint32_t rawId)
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.