Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:09:11

0001 //#include <map>
0002 
0003 #include "DataFormats/DetId/interface/DetId.h"
0004 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
0005 #include "DPGAnalysis/SiStripTools/interface/SiStripTKNumbers.h"
0006 
0007 SiStripTKNumbers::SiStripTKNumbers() {
0008   DetId tk(DetId::Tracker, 0);
0009   _nmodules[tk.rawId()] = (3540 - 816) + 816 + 5208 + 6400;
0010   _nfibres[tk.rawId()] = (9192 - 2208) + 2208 + 12906 + 15104;
0011   _nmodules[tk.subdetId()] = _nmodules[tk.rawId()];
0012   _nfibres[tk.subdetId()] = _nfibres[tk.rawId()];
0013 
0014   DetId tib(DetId::Tracker, StripSubdetector::TIB);
0015   _nmodules[tib.rawId()] = 3540 - 816;
0016   _nfibres[tib.rawId()] = 9192 - 2208;
0017   _nmodules[tib.subdetId()] = _nmodules[tib.rawId()];
0018   _nfibres[tib.subdetId()] = _nfibres[tib.rawId()];
0019 
0020   DetId tid(DetId::Tracker, StripSubdetector::TID);
0021   _nmodules[tid.rawId()] = 816;
0022   _nfibres[tid.rawId()] = 2208;
0023   _nmodules[tid.subdetId()] = _nmodules[tid.rawId()];
0024   _nfibres[tid.subdetId()] = _nfibres[tid.rawId()];
0025 
0026   DetId tob(DetId::Tracker, StripSubdetector::TOB);
0027   _nmodules[tob.rawId()] = 5208;
0028   _nfibres[tob.rawId()] = 12906;
0029   _nmodules[tob.subdetId()] = _nmodules[tob.rawId()];
0030   _nfibres[tob.subdetId()] = _nfibres[tob.rawId()];
0031 
0032   DetId tec(DetId::Tracker, StripSubdetector::TEC);
0033   _nmodules[tec.rawId()] = 6400;
0034   _nfibres[tec.rawId()] = 15104;
0035   _nmodules[tec.subdetId()] = _nmodules[tec.rawId()];
0036   _nfibres[tec.subdetId()] = _nfibres[tec.rawId()];
0037 
0038   DetId tecp(DetId(DetId::Tracker, StripSubdetector::TEC).rawId() | ((1 & 0x3) << 18));
0039   _nmodules[tecp.rawId()] = 3200;
0040   _nfibres[tecp.rawId()] = 7552;
0041 
0042   DetId tecm(DetId(DetId::Tracker, StripSubdetector::TEC).rawId() | ((2 & 0x3) << 18));
0043   _nmodules[tecm.rawId()] = 3200;
0044   _nfibres[tecm.rawId()] = 7552;
0045 }
0046 
0047 int SiStripTKNumbers::nmodules(const DetId& detid) const {
0048   int subd = detid.subdetId();
0049   if (_nmodules.find(subd) != _nmodules.end())
0050     return _nmodules.find(subd)->second;
0051 
0052   return 0;
0053 }
0054 
0055 int SiStripTKNumbers::nmodules(const int id) const {
0056   if (_nmodules.find(id) != _nmodules.end())
0057     return _nmodules.find(id)->second;
0058 
0059   return 0;
0060 }
0061 
0062 int SiStripTKNumbers::nfibres(const DetId& detid) const {
0063   int subd = detid.subdetId();
0064   if (_nfibres.find(subd) != _nfibres.end())
0065     return _nfibres.find(subd)->second;
0066 
0067   return 0;
0068 }
0069 
0070 int SiStripTKNumbers::nfibres(const int id) const {
0071   if (_nfibres.find(id) != _nfibres.end())
0072     return _nfibres.find(id)->second;
0073 
0074   return 0;
0075 }
0076 
0077 int SiStripTKNumbers::napvs(const DetId& detid) const { return nfibres(detid) * _apvsperfibre; }
0078 
0079 int SiStripTKNumbers::napvs(const int id) const { return nfibres(id) * _apvsperfibre; }
0080 
0081 int SiStripTKNumbers::nstrips(const DetId& detid) const { return nfibres(detid) * _apvsperfibre * _stripsperapv; }
0082 
0083 int SiStripTKNumbers::nstrips(const int id) const { return nfibres(id) * _apvsperfibre * _stripsperapv; }