Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:38

0001 #ifndef HcalSimAlgos_HcalShapes_h
0002 #define HcalSimAlgos_HcalShapes_h
0003 
0004 /** A class which decides which shape to return,
0005    based on the DetId
0006 */
0007 
0008 #include "FWCore/Framework/interface/Frameworkfwd.h"
0009 #include "SimCalorimetry/CaloSimAlgos/interface/CaloShapes.h"
0010 #include "SimCalorimetry/HcalSimAlgos/interface/HcalShape.h"
0011 #include "SimCalorimetry/HcalSimAlgos/interface/ZDCShape.h"
0012 #include "CalibFormats/HcalObjects/interface/HcalDbService.h"
0013 #include <vector>
0014 #include <map>
0015 class CaloVShape;
0016 class DetId;
0017 
0018 class HcalShapes : public CaloShapes {
0019 public:
0020   enum { HPD = 101, LONG = 102, ZECOTEK = 201, HAMAMATSU = 202, HE2017 = 203, HE2018 = 206, HF = 301, ZDC = 401 };
0021   HcalShapes();
0022   ~HcalShapes() override;
0023 
0024   void setDbService(const HcalDbService* service) { theDbService = service; }
0025 
0026   const CaloVShape* shape(const DetId& detId, bool precise = false) const override;
0027 
0028 private:
0029   typedef std::map<int, const CaloVShape*> ShapeMap;
0030   // hardcoded, if we can't figure it out from the DB
0031   const CaloVShape* defaultShape(const DetId& detId, bool precise = false) const;
0032   const ShapeMap& getShapeMap(bool precise) const;
0033   const HcalDbService* theDbService;
0034   ShapeMap theShapes;
0035   ShapeMap theShapesPrecise;
0036   ZDCShape theZDCShape;
0037   //   list of vShapes.
0038   std::vector<HcalShape> theHcalShapes;
0039 };
0040 
0041 #endif