Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:08:11

0001 ///////////////////////////////////////////////////////////////////////////////
0002 // File: HcalNumberingFromDDD.h
0003 // Description: Usage of DDD to get to numbering scheme for hadron calorimeter
0004 ///////////////////////////////////////////////////////////////////////////////
0005 #ifndef HcalNumberingFromDDD_h
0006 #define HcalNumberingFromDDD_h
0007 
0008 #include "Geometry/HcalCommonData/interface/HcalDDDSimConstants.h"
0009 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
0010 
0011 #include "DataFormats/Math/interface/Vector3D.h"
0012 
0013 #include <vector>
0014 #include <string>
0015 
0016 class HcalNumberingFromDDD {
0017 public:
0018   HcalNumberingFromDDD(const HcalDDDSimConstants* hcons);
0019   ~HcalNumberingFromDDD();
0020 
0021   struct HcalID {
0022     int subdet, zside, depth, etaR, phi, phis, lay;
0023     HcalID(int det = 0, int zs = 0, int d = 0, int et = 0, int fi = 0, int phiskip = 0, int ly = -1)
0024         : subdet(det), zside(zs), depth(d), etaR(et), phi(fi), phis(phiskip), lay(ly) {}
0025   };
0026 
0027   HcalID unitID(int det, const math::XYZVectorD& pos, int depth, int lay = -1) const;
0028   HcalID unitID(double eta, double phi, int depth = 1, int lay = -1) const;
0029   HcalID unitID(int det, double etaR, double phi, int depth, int lay = -1) const;
0030   HcalID unitID(int det, int zside, int depth, int etaR, int phi, int lay = -1) const;
0031 
0032 private:
0033   const HcalDDDSimConstants* hcalConstants;
0034 };
0035 
0036 #endif