Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:42

0001 #include <cstdint>
0002 #ifndef SimDataFormats_HcalTestBeamNumbering_h
0003 #define SimDataFormats_HcalTestBeamNumbering_h
0004 ///////////////////////////////////////////////////////////////////////////////
0005 // File: HcalTestBeamNumbering.h
0006 // Description: Numbering scheme for high granularity calorimeter (SIM step)
0007 ///////////////////////////////////////////////////////////////////////////////
0008 
0009 class HcalTestBeamNumbering {
0010 public:
0011   static const int kHcalBeamXValueOffset = 0;
0012   static const int kHcalBeamXValueMask = 0x1FF;
0013   static const int kHcalBeamXSignOffset = 9;
0014   static const int kHcalBeamXSignMask = 0x1;
0015   static const int kHcalBeamYValueOffset = 10;
0016   static const int kHcalBeamYValueMask = 0x1FF;
0017   static const int kHcalBeamYSignOffset = 19;
0018   static const int kHcalBeamYSignMask = 0x1;
0019   static const int kHcalBeamLayerOffset = 21;
0020   static const int kHcalBeamLayerMask = 0x7F;
0021   static const int kHcalBeamTypeOffset = 28;
0022   static const int kHcalBeamTypeMask = 0xF;
0023 
0024   enum HcalTestBeamDetector { HcalTBEmpty = 0, HcalTBScintillator = 1, HcalTBWireChamber = 2 };
0025 
0026   HcalTestBeamNumbering() {}
0027   static uint32_t packIndex(int det, int lay, int x, int y);
0028   static void unpackIndex(const uint32_t& idx, int& det, int& lay, int& x, int& y);
0029 };
0030 
0031 #endif