35 template <
typename Record>
37 std::vector<std::string>& list,
42 if (
found != list.end()) {
58 auto caloList = iConfig.
getParameter<std::vector<std::string> >(
"SelectedCalos");
60 throw cms::Exception(
"Configuration") <<
"No calorimeter specified for geometry, aborting";
75 for (
auto iter = hgcBegin; iter != caloList.end(); ++iter) {
79 caloList.erase(hgcBegin, caloList.end());
82 if (not caloList.empty()) {
84 ex <<
"Reconstruction geometry requested for a not implemented sub-detectors:";
85 for (
auto const& elem : caloList) {
95 ReturnType pCalo = std::make_unique<CaloGeometry>();
100 edm::LogVerbatim(
"CaloGeometryBuilder") <<
"Building HCAL reconstruction geometry";
109 edm::LogVerbatim(
"CaloGeometryBuilder") <<
"Building ZDC reconstruction geometry";
114 edm::LogVerbatim(
"CaloGeometryBuilder") <<
"Building CASTOR reconstruction geometry";
121 edm::LogVerbatim(
"CaloGeometryBuilder") <<
"Building EcalBarrel reconstruction geometry";
127 edm::LogVerbatim(
"CaloGeometryBuilder") <<
"Building EcalEndcap reconstruction geometry";
133 edm::LogVerbatim(
"CaloGeometryBuilder") <<
"Building EcalPreshower reconstruction geometry";
140 edm::LogVerbatim(
"CaloGeometryBuilder") <<
"Building TOWER reconstruction geometry";
146 edm::LogVerbatim(
"CaloGeometryBuilder") <<
"Building " << hgcTokenLabel.second <<
" reconstruction geometry";
147 auto const& pHG = iRecord.
get(hgcTokenLabel.first);
148 const auto& topo = pHG.topology();
149 pCalo->setSubdetGeometry(topo.detector(), topo.subDetector(), &pHG);
Log< level::Info, true > LogVerbatim
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
T getParameter(std::string const &) const
static std::string producerTag()
static std::string producerTag()
static std::string producerTag()
edm::ESGetToken< CaloSubdetectorGeometry, CaloTowerGeometryRecord > caloTowerToken_
static std::string producerTag()
auto consumesFrom(ESInputTag const &tag)
edm::ESGetToken< CaloSubdetectorGeometry, HcalGeometryRecord > hcalToken_
CaloGeometryBuilder(const edm::ParameterSet &iConfig)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static std::string producerTag()
static std::string producerTag()
constexpr bool isInitialized() const noexcept
static const int SubdetectorId
std::vector< std::pair< edm::ESGetToken< HGCalGeometry, IdealGeometryRecord >, std::string > > hgcalTokens_
edm::ESGetToken< CaloSubdetectorGeometry, CastorGeometryRecord > castorToken_
static std::string producerTag()
edm::ESGetToken< CaloSubdetectorGeometry, EcalBarrelGeometryRecord > ecalBarrelToken_
static const int SubdetectorId
edm::ESGetToken< CaloSubdetectorGeometry, ZDCGeometryRecord > zdcToken_
static std::string producerTag()
std::unique_ptr< CaloGeometry > ReturnType
edm::ESGetToken< CaloSubdetectorGeometry, EcalPreshowerGeometryRecord > ecalPreshowerToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< CaloSubdetectorGeometry, EcalEndcapGeometryRecord > ecalEndcapToken_
ReturnType produceAligned(const CaloGeometryRecord &iRecord)