Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:13

0001 #ifndef CondFormats_HcalObjects_HcalDetIdTransform_h
0002 #define CondFormats_HcalObjects_HcalDetIdTransform_h
0003 
0004 class HcalDetId;
0005 
0006 namespace HcalDetIdTransform {
0007   // When you add more transforms, add codes for them at the end
0008   // of the enum, just before "N_TRANSFORMS". Don't forget to adjust
0009   // the "transform" function accordingly.
0010   enum {
0011     RAWID = 0,     // Raw detector id
0012     IETA,          // ieta() + shift
0013     IETAABS,       // ietaAbs()
0014     SUBDET,        // subdetId()
0015     IETADEPTH,     // maps ieta() and depth() into a unique number
0016     IETAABSDEPTH,  // maps ietaAbs() and depth() into a unique number
0017     N_TRANSFORMS
0018   };
0019 
0020   // Transform the detector id
0021   unsigned transform(const HcalDetId& id, unsigned transformCode);
0022 
0023   // The following function will throw an exception
0024   // if the transform code is invalid
0025   void validateCode(unsigned transformCode);
0026 }  // namespace HcalDetIdTransform
0027 
0028 #endif  // CondFormats_HcalObjects_HcalDetIdTransform_h