CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CaloDetIdAssociatorMaker.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: TrackingTools/TrackAssociator
4 // Class : CaloDetIdAssociatorMaker
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Christopher Jones
10 // Created: Thu, 30 May 2019 15:05:57 GMT
11 //
12 
13 // system include files
14 
15 // user include files
21 #include "CaloDetIdAssociator.h"
22 
23 //
24 // constants, enums and typedefs
25 //
26 
27 //
28 // static data member definitions
29 //
30 
31 //
32 // constructors and destructor
33 //
36  : geomToken_{iCollector.consumesFrom<CaloGeometry, CaloGeometryRecord>()},
37  etaBinSize{pSet.getParameter<double>("etaBinSize")},
38  nPhi{pSet.getParameter<int>("nPhi")},
39  nEta{pSet.getParameter<int>("nEta")} {}
40 
41 std::unique_ptr<DetIdAssociator> CaloDetIdAssociatorMaker::make(const DetIdAssociatorRecord& iRecord) const {
42  return make(iRecord.get(geomToken_), nPhi, nEta, etaBinSize);
43 }
44 
45 std::unique_ptr<DetIdAssociator> CaloDetIdAssociatorMaker::make(CaloGeometry const& iGeom,
46  int nPhi,
47  int nEta,
48  double etaBinSize) const {
49  return std::unique_ptr<DetIdAssociator>(new CaloDetIdAssociator(nPhi, nEta, etaBinSize, &iGeom));
50 }
CaloDetIdAssociatorMaker(edm::ParameterSet const &, edm::ESConsumesCollectorT< DetIdAssociatorRecord > &&)
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geomToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
std::unique_ptr< DetIdAssociator > make(const DetIdAssociatorRecord &) const final
T getParameter(std::string const &) const
Definition: ParameterSet.h:303