Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // Package:    CaloTowerConstituentsMapBuilder
0004 // Class:      CaloTowerConstituentsMapBuilder
0005 //
0006 /**\class CaloTowerConstituentsMapBuilder CaloTowerConstituentsMapBuilder.h tmp/CaloTowerConstituentsMapBuilder/interface/CaloTowerConstituentsMapBuilder.h
0007 
0008  Description: <one line class summary>
0009 
0010  Implementation:
0011      <Notes on implementation>
0012 */
0013 //
0014 // Original Author:  Jeremiah Mans
0015 //         Created:  Mon Oct  3 11:35:27 CDT 2005
0016 //
0017 //
0018 
0019 // system include files
0020 #include <memory>
0021 
0022 // user include files
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 // class decleration
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 };