File indexing completed on 2024-04-06 12:14:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include <memory>
0021
0022
0023 #include "FWCore/Framework/interface/ESProducer.h"
0024
0025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0026 #include "FWCore/Utilities/interface/ESGetToken.h"
0027 #include "Geometry/Records/interface/CaloGeometryRecord.h"
0028 #include "Geometry/Records/interface/HcalRecNumberingRecord.h"
0029 #include "Geometry/CaloTopology/interface/HcalTopology.h"
0030 #include "Geometry/CaloTopology/interface/CaloTowerConstituentsMap.h"
0031 #include "Geometry/CaloTopology/interface/CaloTowerTopology.h"
0032 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0033
0034 namespace edm {
0035 class ConfigurationDescriptions;
0036 }
0037
0038
0039
0040
0041
0042 class CaloTowerConstituentsMapBuilder : public edm::ESProducer {
0043 public:
0044 CaloTowerConstituentsMapBuilder(const edm::ParameterSet&);
0045 ~CaloTowerConstituentsMapBuilder() override;
0046
0047 typedef std::unique_ptr<CaloTowerConstituentsMap> ReturnType;
0048
0049 ReturnType produce(const CaloGeometryRecord&);
0050 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0051
0052 private:
0053 void parseTextMap(const std::string& filename, CaloTowerConstituentsMap& theMap);
0054 void assignEEtoHE(const CaloGeometry* geometry, CaloTowerConstituentsMap& theMap, const CaloTowerTopology* cttopo);
0055 edm::ESGetToken<HcalTopology, HcalRecNumberingRecord> hcaltopoToken_;
0056 edm::ESGetToken<CaloTowerTopology, HcalRecNumberingRecord> cttopoToken_;
0057 edm::ESGetToken<CaloGeometry, CaloGeometryRecord> geometryToken_;
0058 std::string mapFile_;
0059 bool mapAuto_, skipHE_;
0060 };