Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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   bool 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> indices_;
0042   std::vector<int> dumpDets_;
0043   std::vector<int> dumpCassette_;
0044 };
0045 
0046 #endif