/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/DetectorDescription/Identifier/Identifier-00-02-17/Identifier/MucID.h

Go to the documentation of this file.
00001 #ifndef __MucID_h__
00002 #define __MucID_h__
00003 
00004 #include "Identifier/BesDetectorID.h"
00005 #include <string>
00006 #include <assert.h>
00007 
00008 class MucID : public BesDetectorID
00009 {
00010 public:
00011   typedef Identifier::size_type size_type; 
00012   typedef Identifier::value_type value_type; 
00013 
00015   MucID();
00016 
00018   ~MucID();
00019  
00021  static Identifier channel_id ( int barrel_ec,
00022                                 int segment,
00023                                 int layer,   
00024                                 int channel 
00025                               );
00026 
00027   static value_type getIntID ( int barrel_ec,
00028                               int segment,
00029                               int layer,
00030                               int channel
00031                               );
00032   static value_type getSEGMENT_BARREL_MAX();
00033   static value_type getSEGMENT_ENDCAP_MAX();
00034   static value_type getLAYER_BARREL_MAX();   
00035   static value_type getLAYER_ENDCAP_MAX();
00036   static value_type getCHANNEL_BARREL_MAX();
00037   static value_type getCHANNEL_ENDCAP_MAX();
00038   static value_type getBARREL_EC_MAX();
00039   static value_type getBARREL_EC_MIN();
00040 
00041   static value_type getPartNum();
00042   static value_type getSegNum(int part);
00043   static value_type getGapNum(int part);   
00044   static value_type getStripNum(int part, int seg, int gap);
00045   static value_type getSegMax();
00046   static value_type getGapMax();   
00047   static value_type getStripMax(); 
00048 
00049   static bool values_ok ( const unsigned int barrel_ec,
00050                           const unsigned int segment,  
00051                           const unsigned int layer,
00052                           const unsigned int channel               
00053                         ) ;
00054 
00056   static bool is_barrel (const Identifier& id) ;  
00057 
00059   static int barrel_ec       (const Identifier& id) ;
00060   static int segment         (const Identifier& id) ; 
00061   static int layer           (const Identifier& id) ; 
00062   static int channel         (const Identifier& id) ;  
00063 
00064   static int part            (const Identifier& id) ;
00065   static int seg             (const Identifier& id) ; 
00066   static int gap             (const Identifier& id) ; 
00067   static int strip           (const Identifier& id) ;  
00068 
00070   int segment_max  (const Identifier& id) ; 
00071   int layer_max    (const Identifier& id) ;
00072   int channel_max  (const Identifier& id) ;  
00073 
00074   int getSegNum       (const Identifier& id) ; 
00075   int getGapNum       (const Identifier& id) ;
00076   int getStripNum     (const Identifier& id) ;  
00077 
00078 private:
00079 
00080   typedef std::vector<Identifier>     id_vec;
00081   typedef id_vec::const_iterator      id_vec_it;
00082 
00083   static const unsigned int BARREL_EC_INDEX        = 16;
00084   static const unsigned int BARREL_EC_MASK         = 0x000F0000;
00085 
00086   static const unsigned int SEGMENT_INDEX          = 12;
00087   static const unsigned int SEGMENT_MASK           = 0x0000F000;
00088 
00089   static const unsigned int LAYER_INDEX            = 8;
00090   static const unsigned int LAYER_MASK             = 0x00000F00;
00091  
00092   static const unsigned int CHANNEL_INDEX          = 0;
00093   static const unsigned int CHANNEL_MASK           = 0x000000FF;
00094 
00095   static const unsigned int BARREL_EC_NUM          = 3;  
00096 
00097   static const unsigned int LAYER_BARREL_NUM       = 9; 
00098   static const unsigned int LAYER_ENDCAP_NUM       = 8;   
00099   
00100   static const unsigned int SEGMENT_BARREL_NUM     = 8; 
00101   static const unsigned int SEGMENT_ENDCAP_NUM     = 4;
00102 
00103   static const unsigned int CHANNEL_BARREL_NUM_MAX = 112; 
00104   static const unsigned int CHANNEL_ENDCAP_NUM_MAX = 64;
00105 
00106   static const unsigned int CHANNEL_BARREL_LAYER_NUM[LAYER_BARREL_NUM];
00107     
00108   static const unsigned int BARREL_EC_MAX          = 2;  
00109   static const unsigned int BARREL_EC_MIN          = 0;  
00110   
00111 };
00112 
00113 #endif

Generated on Tue Nov 29 22:58:00 2016 for BOSS_7.0.2 by  doxygen 1.4.7