CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Attributes
MuonBaseNumber Class Reference

#include <MuonBaseNumber.h>

Public Member Functions

void addBase (const int level, const int super, const int base)
 
void addBase (const LevelBaseNumber &)
 
int getBaseNo (int level) const
 
int getLevels () const
 
int getSuperNo (int level) const
 
 MuonBaseNumber ()
 
 ~MuonBaseNumber ()
 

Protected Types

typedef std::vector
< LevelBaseNumber
basenumber_type
 

Protected Attributes

basenumber_type sortedBaseNumber
 

Detailed Description

the muon base number collects all significant copy numbers to uniquely identify a detector unit; the information is kept in a vector of all relevant LevelBaseNumber's needed to identify the detector unit; a packed version of the MuonBaseNumber may replace the current numbering scheme in future

Author
Arno Straessner, CERN arno..nosp@m.stra.nosp@m.essne.nosp@m.r@ce.nosp@m.rn.ch

Definition at line 21 of file MuonBaseNumber.h.

Member Typedef Documentation

typedef std::vector<LevelBaseNumber> MuonBaseNumber::basenumber_type
protected

Definition at line 34 of file MuonBaseNumber.h.

Constructor & Destructor Documentation

MuonBaseNumber::MuonBaseNumber ( )
inline

Definition at line 23 of file MuonBaseNumber.h.

23 {};
MuonBaseNumber::~MuonBaseNumber ( )
inline

Definition at line 24 of file MuonBaseNumber.h.

24 {};

Member Function Documentation

void MuonBaseNumber::addBase ( const int  level,
const int  super,
const int  base 
)

Definition at line 45 of file MuonBaseNumber.cc.

References pileupDistInMC::num.

Referenced by MuonGeometryNumbering::geoHistoryToBaseNumber(), cms::MuonNumbering::geoHistoryToBaseNumber(), and MuonG4Numbering::PhysicalVolumeToBaseNumber().

45  {
46  LevelBaseNumber num(level, super, base);
47  addBase(num);
48 }
tuple base
Main Program
Definition: newFWLiteAna.py:92
void addBase(const int level, const int super, const int base)
tuple level
Definition: testEve_cfg.py:47
void MuonBaseNumber::addBase ( const LevelBaseNumber num)

Definition at line 6 of file MuonBaseNumber.cc.

References LevelBaseNumber::base(), dataset::end, isotrackApplyRegressor::k, LevelBaseNumber::level(), sortedBaseNumber, and LevelBaseNumber::super().

6  {
7  basenumber_type::iterator cur = sortedBaseNumber.begin();
8  basenumber_type::iterator end = sortedBaseNumber.end();
9 
10  // do a small check if level is already occupied
11 
12  while (cur != end) {
13  if (num.level() == (*cur).level()) {
14 #ifdef EDM_ML_DEBUG
15  edm::LogVerbatim("MuonGeom") << "MuonBaseNumber::addBase was asked to add " << num.level() << " " << num.super()
16  << " " << num.base() << " to existing level " << (*cur).level() << " "
17  << (*cur).super() << " " << (*cur).base() << " but refused.";
18 #endif
19  return; // don't overwrite current volume stored
20  }
21  cur++;
22  }
23 
24  cur = sortedBaseNumber.begin();
25  while (cur != end) {
26  if (num.level() < (*cur).level())
27  break;
28  cur++;
29  }
30  sortedBaseNumber.insert(cur, num);
31 
32 #ifdef EDM_ML_DEBUG
33  cur = sortedBaseNumber.begin();
34  end = sortedBaseNumber.end();
35  edm::LogVerbatim("MuonGeom") << "MuonBaseNumber::AddBase ";
36  unsigned int k(0);
37  while (cur != end) {
38  edm::LogVerbatim("MuonGeom") << "[" << k << "] " << (*cur).level() << " " << (*cur).super() << " " << (*cur).base();
39  cur++;
40  ++k;
41  }
42 #endif
43 }
Log< level::Info, true > LogVerbatim
int level() const
int base() const
int super() const
basenumber_type sortedBaseNumber
string end
Definition: dataset.py:937
int MuonBaseNumber::getBaseNo ( int  level) const

Definition at line 64 of file MuonBaseNumber.cc.

References dataset::end, testEve_cfg::level, and sortedBaseNumber.

Referenced by GEMNumberingScheme::baseNumberToUnitNumber(), ME0NumberingScheme::baseNumberToUnitNumber(), CSCNumberingScheme::baseNumberToUnitNumber(), RPCNumberingScheme::baseNumberToUnitNumber(), DTNumberingScheme::baseNumberToUnitNumber(), DTNumberingScheme::decode(), MuonGeometryNumbering::geoHistoryToBaseNumber(), and MuonSensitiveDetector::setDetUnitId().

64  {
65  basenumber_type::const_iterator cur = sortedBaseNumber.begin();
66  basenumber_type::const_iterator end = sortedBaseNumber.end();
67  while (cur != end) {
68  if ((*cur).level() == level) {
69  return (*cur).base();
70  }
71  cur++;
72  }
73  return 0;
74 }
basenumber_type sortedBaseNumber
string end
Definition: dataset.py:937
tuple level
Definition: testEve_cfg.py:47
int MuonBaseNumber::getLevels ( ) const
int MuonBaseNumber::getSuperNo ( int  level) const

Definition at line 52 of file MuonBaseNumber.cc.

References dataset::end, testEve_cfg::level, and sortedBaseNumber.

Referenced by GEMNumberingScheme::baseNumberToUnitNumber(), ME0NumberingScheme::baseNumberToUnitNumber(), CSCNumberingScheme::baseNumberToUnitNumber(), RPCNumberingScheme::baseNumberToUnitNumber(), DTNumberingScheme::baseNumberToUnitNumber(), DTNumberingScheme::decode(), MuonGeometryNumbering::geoHistoryToBaseNumber(), MuonSensitiveDetector::setDetUnitId(), and MuonRPCFrameRotation::transformPoint().

52  {
53  basenumber_type::const_iterator cur = sortedBaseNumber.begin();
54  basenumber_type::const_iterator end = sortedBaseNumber.end();
55  while (cur != end) {
56  if ((*cur).level() == level) {
57  return (*cur).super();
58  }
59  cur++;
60  }
61  return 0;
62 }
basenumber_type sortedBaseNumber
string end
Definition: dataset.py:937
tuple level
Definition: testEve_cfg.py:47

Member Data Documentation

basenumber_type MuonBaseNumber::sortedBaseNumber
protected

Definition at line 35 of file MuonBaseNumber.h.

Referenced by addBase(), getBaseNo(), getLevels(), and getSuperNo().