Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:45

0001 #ifndef HcalCommonData_HcalSimParametersFromDD_h
0002 #define HcalCommonData_HcalSimParametersFromDD_h
0003 
0004 #include "DetectorDescription/Core/interface/DDsvalues.h"
0005 #include "DetectorDescription/Core/interface/DDCompactView.h"
0006 #include "DetectorDescription/Core/interface/DDFilteredView.h"
0007 #include "DetectorDescription/DDCMS/interface/DDCompactView.h"
0008 #include "DetectorDescription/DDCMS/interface/DDFilteredView.h"
0009 #include <string>
0010 
0011 class HcalSimulationParameters;
0012 
0013 class HcalSimParametersFromDD {
0014 public:
0015   HcalSimParametersFromDD() = default;
0016 
0017   bool build(const DDCompactView*, HcalSimulationParameters&);
0018   bool build(const cms::DDCompactView&, HcalSimulationParameters&);
0019 
0020 private:
0021   bool buildParameters(const HcalSimulationParameters&);
0022   void fillNameVector(const DDCompactView*, const std::string&, const std::string&, std::vector<std::string>&);
0023   void fillNameVector(const cms::DDCompactView&, const std::string&, std::vector<std::string>&);
0024   void fillPMTs(const std::vector<double>&, bool, HcalSimulationParameters&);
0025   bool isItHF(const std::string&, const HcalSimulationParameters&);
0026   std::vector<std::string> getNames(DDFilteredView& fv);
0027   std::vector<std::string> getNames(cms::DDFilteredView& fv);
0028   std::vector<double> getDDDArray(const std::string& str, const DDsvalues_type& sv, int& nmin);
0029 
0030   static constexpr double k_ScaleFromDD4hep = (1.0 / dd4hep::mm);
0031   static constexpr double k_ScaleFromDD4hepInv = dd4hep::mm;
0032 };
0033 
0034 #endif