Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef SimG4CMS_HGCNumberingScheme_h
0002 #define SimG4CMS_HGCNumberingScheme_h
0003 ///////////////////////////////////////////////////////////////////////////////
0004 // File: HGCNumberingScheme.h
0005 // Description: Definition of sensitive unit numbering schema for HGC
0006 ///////////////////////////////////////////////////////////////////////////////
0007 
0008 #include "DataFormats/ForwardDetId/interface/ForwardSubdetector.h"
0009 #include "Geometry/HGCalTBCommonData/interface/HGCalTBDDDConstants.h"
0010 
0011 #include "G4ThreeVector.hh"
0012 
0013 class HGCNumberingScheme {
0014 public:
0015   enum HGCNumberingParameters { HGCCellSize };
0016 
0017   HGCNumberingScheme(const HGCalTBDDDConstants& hgc, std::string& name);
0018   HGCNumberingScheme() = delete;
0019 
0020   ~HGCNumberingScheme();
0021 
0022   /**
0023      @short assigns the det id to a hit
0024    */
0025   uint32_t getUnitID(ForwardSubdetector subdet, int layer, int module, int cell, int iz, const G4ThreeVector& pos);
0026 
0027   /**
0028      @short maps a hit position to a sequential cell in a trapezoid surface defined by h,b,t
0029    */
0030   int assignCell(float x, float y, int layer);
0031 
0032   /**
0033      @short inverts the cell number in a trapezoid surface to local coordinates
0034    */
0035   std::pair<float, float> getLocalCoords(int cell, int layer);
0036 
0037 private:
0038   const HGCalTBDDDConstants& hgcons_;
0039 };
0040 
0041 #endif