Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:38

0001 #ifndef RBCID_H
0002 #define RBCID_H 1
0003 
0004 // Include files
0005 #include <iostream>
0006 
0007 /** @class RBCId RBCId.h
0008  *  
0009  *
0010  *  @author Andres Osorio
0011  *
0012  *  email: aosorio@uniandes.edu.co
0013  *
0014  *  @date   2008-10-12
0015  */
0016 class RBCId {
0017 public:
0018   /// Standard constructor
0019   RBCId();
0020 
0021   RBCId(int, int *);
0022 
0023   RBCId(const RBCId &) = default;
0024   RBCId(RBCId &&) = default;
0025   RBCId &operator=(RBCId const &) = default;
0026   RBCId &operator=(RBCId &&) = default;
0027 
0028   int wheel() const { return m_wheel; };
0029 
0030   int wheelIdx() const { return (m_wheel + 2); };  // wheel index starts from 0
0031 
0032   int sector(int _sec) const { return m_sector[_sec]; };
0033 
0034   void setid(int _wh, int *_sec) {
0035     m_wheel = _wh;
0036     m_sector[0] = _sec[0];
0037     m_sector[1] = _sec[1];
0038   };
0039 
0040   void printinfo() const;
0041 
0042 protected:
0043 private:
0044   int m_wheel;
0045   int m_sector[2];
0046 };
0047 #endif  // RBCID_H