CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Static Private Attributes
SiStripTKNumbers Class Reference

#include <SiStripTKNumbers.h>

Public Member Functions

int napvs (const DetId &detid) const
 
int napvs (const int id) const
 
int nfibres (const DetId &detid) const
 
int nfibres (const int id) const
 
int nmodules (const DetId &detid) const
 
int nmodules (const int id) const
 
int nstrips (const DetId &detid) const
 
int nstrips (const int id) const
 
 SiStripTKNumbers ()
 

Private Attributes

std::map< int, int > _nfibres
 
std::map< int, int > _nmodules
 

Static Private Attributes

static const int _apvsperfibre = 2
 
static const int _stripsperapv = 128
 

Detailed Description

Definition at line 8 of file SiStripTKNumbers.h.

Constructor & Destructor Documentation

◆ SiStripTKNumbers()

SiStripTKNumbers::SiStripTKNumbers ( )

Definition at line 7 of file SiStripTKNumbers.cc.

References _nfibres, _nmodules, DetId::rawId(), nano_mu_digi_cff::rawId, DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, and DetId::Tracker.

7  {
8  DetId tk(DetId::Tracker, 0);
9  _nmodules[tk.rawId()] = (3540 - 816) + 816 + 5208 + 6400;
10  _nfibres[tk.rawId()] = (9192 - 2208) + 2208 + 12906 + 15104;
11  _nmodules[tk.subdetId()] = _nmodules[tk.rawId()];
12  _nfibres[tk.subdetId()] = _nfibres[tk.rawId()];
13 
15  _nmodules[tib.rawId()] = 3540 - 816;
16  _nfibres[tib.rawId()] = 9192 - 2208;
17  _nmodules[tib.subdetId()] = _nmodules[tib.rawId()];
18  _nfibres[tib.subdetId()] = _nfibres[tib.rawId()];
19 
21  _nmodules[tid.rawId()] = 816;
22  _nfibres[tid.rawId()] = 2208;
23  _nmodules[tid.subdetId()] = _nmodules[tid.rawId()];
24  _nfibres[tid.subdetId()] = _nfibres[tid.rawId()];
25 
27  _nmodules[tob.rawId()] = 5208;
28  _nfibres[tob.rawId()] = 12906;
29  _nmodules[tob.subdetId()] = _nmodules[tob.rawId()];
30  _nfibres[tob.subdetId()] = _nfibres[tob.rawId()];
31 
33  _nmodules[tec.rawId()] = 6400;
34  _nfibres[tec.rawId()] = 15104;
35  _nmodules[tec.subdetId()] = _nmodules[tec.rawId()];
36  _nfibres[tec.subdetId()] = _nfibres[tec.rawId()];
37 
38  DetId tecp(DetId(DetId::Tracker, StripSubdetector::TEC).rawId() | ((1 & 0x3) << 18));
39  _nmodules[tecp.rawId()] = 3200;
40  _nfibres[tecp.rawId()] = 7552;
41 
42  DetId tecm(DetId(DetId::Tracker, StripSubdetector::TEC).rawId() | ((2 & 0x3) << 18));
43  _nmodules[tecm.rawId()] = 3200;
44  _nfibres[tecm.rawId()] = 7552;
45 }
static constexpr auto TEC
static constexpr auto TOB
std::map< int, int > _nmodules
Definition: DetId.h:17
static constexpr auto TIB
static constexpr auto TID
std::map< int, int > _nfibres

Member Function Documentation

◆ napvs() [1/2]

int SiStripTKNumbers::napvs ( const DetId detid) const

◆ napvs() [2/2]

int SiStripTKNumbers::napvs ( const int  id) const

Definition at line 79 of file SiStripTKNumbers.cc.

References _apvsperfibre, and nfibres().

79 { return nfibres(id) * _apvsperfibre; }
static const int _apvsperfibre
int nfibres(const DetId &detid) const

◆ nfibres() [1/2]

int SiStripTKNumbers::nfibres ( const DetId detid) const

Definition at line 62 of file SiStripTKNumbers.cc.

References _nfibres, and ALCARECOPPSCalTrackBasedSel_cff::detid.

Referenced by napvs(), and nstrips().

62  {
63  int subd = detid.subdetId();
64  if (_nfibres.find(subd) != _nfibres.end())
65  return _nfibres.find(subd)->second;
66 
67  return 0;
68 }
std::map< int, int > _nfibres

◆ nfibres() [2/2]

int SiStripTKNumbers::nfibres ( const int  id) const

Definition at line 70 of file SiStripTKNumbers.cc.

References _nfibres.

70  {
71  if (_nfibres.find(id) != _nfibres.end())
72  return _nfibres.find(id)->second;
73 
74  return 0;
75 }
std::map< int, int > _nfibres

◆ nmodules() [1/2]

int SiStripTKNumbers::nmodules ( const DetId detid) const

Definition at line 47 of file SiStripTKNumbers.cc.

References _nmodules, and ALCARECOPPSCalTrackBasedSel_cff::detid.

47  {
48  int subd = detid.subdetId();
49  if (_nmodules.find(subd) != _nmodules.end())
50  return _nmodules.find(subd)->second;
51 
52  return 0;
53 }
std::map< int, int > _nmodules

◆ nmodules() [2/2]

int SiStripTKNumbers::nmodules ( const int  id) const

Definition at line 55 of file SiStripTKNumbers.cc.

References _nmodules.

55  {
56  if (_nmodules.find(id) != _nmodules.end())
57  return _nmodules.find(id)->second;
58 
59  return 0;
60 }
std::map< int, int > _nmodules

◆ nstrips() [1/2]

int SiStripTKNumbers::nstrips ( const DetId detid) const

◆ nstrips() [2/2]

int SiStripTKNumbers::nstrips ( const int  id) const

Definition at line 83 of file SiStripTKNumbers.cc.

References _apvsperfibre, _stripsperapv, and nfibres().

83 { return nfibres(id) * _apvsperfibre * _stripsperapv; }
static const int _apvsperfibre
static const int _stripsperapv
int nfibres(const DetId &detid) const

Member Data Documentation

◆ _apvsperfibre

const int SiStripTKNumbers::_apvsperfibre = 2
staticprivate

Definition at line 28 of file SiStripTKNumbers.h.

Referenced by napvs(), and nstrips().

◆ _nfibres

std::map<int, int> SiStripTKNumbers::_nfibres
private

Definition at line 26 of file SiStripTKNumbers.h.

Referenced by nfibres(), and SiStripTKNumbers().

◆ _nmodules

std::map<int, int> SiStripTKNumbers::_nmodules
private

Definition at line 25 of file SiStripTKNumbers.h.

Referenced by nmodules(), and SiStripTKNumbers().

◆ _stripsperapv

const int SiStripTKNumbers::_stripsperapv = 128
staticprivate

Definition at line 29 of file SiStripTKNumbers.h.

Referenced by nstrips().