Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-08-12 22:40:36

0001 #ifndef SimG4CMS_Calo_HGCalNumberingScheme_h
0002 #define SimG4CMS_Calo_HGCalNumberingScheme_h
0003 ///////////////////////////////////////////////////////////////////////////////
0004 // File: HGCalNumberingScheme.h
0005 // Description: Definition of sensitive unit numbering schema for HGC
0006 ///////////////////////////////////////////////////////////////////////////////
0007 
0008 #include "DataFormats/DetId/interface/DetId.h"
0009 #include "DataFormats/ForwardDetId/interface/HGCSiliconDetId.h"
0010 #include "DataFormats/ForwardDetId/interface/HGCScintillatorDetId.h"
0011 #include "Geometry/HGCalCommonData/interface/HGCalDDDConstants.h"
0012 #include "Geometry/HGCalCommonData/interface/HGCalGeometryMode.h"
0013 
0014 #include "G4ThreeVector.hh"
0015 
0016 #include <string>
0017 #include <vector>
0018 
0019 class HGCalNumberingScheme {
0020 public:
0021   HGCalNumberingScheme(const HGCalDDDConstants& hgc,
0022                        const DetId::Detector& det,
0023                        const std::string& name,
0024                        const std::string& fileName);
0025   HGCalNumberingScheme() = delete;
0026   ~HGCalNumberingScheme();
0027 
0028   /**
0029      @short assigns the det id to a hit
0030    */
0031   uint32_t getUnitID(int layer, int module, int cell, int iz, const G4ThreeVector& pos, double& wt);
0032 
0033 private:
0034   void checkPosition(uint32_t index, const G4ThreeVector& pos, bool matchOnly, bool debug) const;
0035 
0036   const HGCalDDDConstants& hgcons_;
0037   const HGCalGeometryMode::GeometryMode mode_;
0038   const DetId::Detector det_;
0039   const std::string name_;
0040   int firstLayer_;
0041   std::vector<int> wafers_;
0042 };
0043 
0044 #endif