Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-18 00:39:59

0001 #ifndef GEOMETRY_FWRECO_GEOMETRY_ES_PRODUCER_H
0002 #define GEOMETRY_FWRECO_GEOMETRY_ES_PRODUCER_H
0003 
0004 #include <memory>
0005 
0006 #include "FWCore/Framework/interface/ESProducer.h"
0007 #include "FWCore/Utilities/interface/ESGetToken.h"
0008 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0009 
0010 namespace edm {
0011   class ParameterSet;
0012 }
0013 
0014 class CaloGeometry;
0015 class CaloGeometryRecord;
0016 class GlobalTrackingGeometry;
0017 class GlobalTrackingGeometryRecord;
0018 class TrackerGeometry;
0019 class FastTimeGeometry;
0020 class IdealGeometryRecord;
0021 class FWRecoGeometry;
0022 class FWRecoGeometryRecord;
0023 class GeomDet;
0024 
0025 class FWRecoGeometryESProducer : public edm::ESProducer {
0026 public:
0027   FWRecoGeometryESProducer(const edm::ParameterSet&);
0028   ~FWRecoGeometryESProducer(void) override;
0029 
0030   std::unique_ptr<FWRecoGeometry> produce(const FWRecoGeometryRecord&);
0031 
0032   FWRecoGeometryESProducer(const FWRecoGeometryESProducer&) = delete;
0033   const FWRecoGeometryESProducer& operator=(const FWRecoGeometryESProducer&) = delete;
0034 
0035 private:
0036   void addCSCGeometry(FWRecoGeometry&);
0037   void addDTGeometry(FWRecoGeometry&);
0038   void addRPCGeometry(FWRecoGeometry&);
0039   void addGEMGeometry(FWRecoGeometry&);
0040   void addME0Geometry(FWRecoGeometry&);
0041   void addPixelBarrelGeometry(FWRecoGeometry&);
0042   void addPixelForwardGeometry(FWRecoGeometry&);
0043   void addTIBGeometry(FWRecoGeometry&);
0044   void addTOBGeometry(FWRecoGeometry&);
0045   void addTIDGeometry(FWRecoGeometry&);
0046   void addTECGeometry(FWRecoGeometry&);
0047   void addCaloGeometry(FWRecoGeometry&);
0048 
0049   void addFTLGeometry(FWRecoGeometry&);
0050 
0051   void ADD_PIXEL_TOPOLOGY(unsigned int rawid, const GeomDet* detUnit, FWRecoGeometry&);
0052 
0053   unsigned int insert_id(unsigned int id, FWRecoGeometry&);
0054   void fillPoints(unsigned int id,
0055                   std::vector<GlobalPoint>::const_iterator begin,
0056                   std::vector<GlobalPoint>::const_iterator end,
0057                   FWRecoGeometry&);
0058   void fillShapeAndPlacement(unsigned int id, const GeomDet* det, FWRecoGeometry&);
0059   void writeTrackerParametersXML(FWRecoGeometry&);
0060 
0061   edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> m_trackingGeomToken;
0062   edm::ESGetToken<FastTimeGeometry, IdealGeometryRecord> m_ftlBarrelGeomToken;
0063   edm::ESGetToken<FastTimeGeometry, IdealGeometryRecord> m_ftlEndcapGeomToken;
0064   edm::ESGetToken<CaloGeometry, CaloGeometryRecord> m_caloGeomToken;
0065   const GlobalTrackingGeometry* m_trackingGeom = nullptr;
0066   const CaloGeometry* m_caloGeom = nullptr;
0067   const FastTimeGeometry* m_ftlBarrelGeom = nullptr;
0068   const FastTimeGeometry* m_ftlEndcapGeom = nullptr;
0069   const TrackerGeometry* m_trackerGeom = nullptr;
0070 
0071   unsigned int m_current;
0072   bool m_tracker;
0073   bool m_muon;
0074   bool m_gem;
0075   bool m_calo;
0076   bool m_timing;
0077 };
0078 
0079 #endif  // GEOMETRY_FWRECO_GEOMETRY_ES_PRODUCER_H