Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
TrackingTools
TrackAssociator
plugins
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
16
#include "
CaloDetIdAssociatorMaker.h
"
17
#include "
Geometry/Records/interface/CaloGeometryRecord.h
"
18
#include "
FWCore/Framework/interface/ESHandle.h
"
19
#include "
TrackingTools/Records/interface/DetIdAssociatorRecord.h
"
20
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
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
//
34
CaloDetIdAssociatorMaker::CaloDetIdAssociatorMaker
(
edm::ParameterSet
const
& pSet,
35
edm::ESConsumesCollectorT<DetIdAssociatorRecord>
&& iCollector)
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::CaloDetIdAssociatorMaker
CaloDetIdAssociatorMaker(edm::ParameterSet const &, edm::ESConsumesCollectorT< DetIdAssociatorRecord > &&)
Definition:
CaloDetIdAssociatorMaker.cc:34
CaloDetIdAssociatorMaker::geomToken_
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geomToken_
Definition:
CaloDetIdAssociatorMaker.h:45
CaloDetIdAssociatorMaker::etaBinSize
const double etaBinSize
Definition:
CaloDetIdAssociatorMaker.h:46
CaloGeometryRecord
Definition:
CaloGeometryRecord.h:30
CaloDetIdAssociator
Definition:
CaloDetIdAssociator.h:27
ParameterSet.h
CaloDetIdAssociatorMaker::nPhi
const int nPhi
Definition:
CaloDetIdAssociatorMaker.h:47
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:109
CaloGeometryRecord.h
edm::ESConsumesCollectorT
Definition:
ESConsumesCollector.h:125
CaloDetIdAssociatorMaker::make
std::unique_ptr< DetIdAssociator > make(const DetIdAssociatorRecord &) const final
Definition:
CaloDetIdAssociatorMaker.cc:41
ESHandle.h
CaloGeometry
Definition:
CaloGeometry.h:21
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
DetIdAssociatorRecord
Definition:
DetIdAssociatorRecord.h:13
edm::ParameterSet
Definition:
ParameterSet.h:47
DetIdAssociatorRecord.h
CaloDetIdAssociatorMaker::nEta
const int nEta
Definition:
CaloDetIdAssociatorMaker.h:48
CaloDetIdAssociator.h
CaloDetIdAssociatorMaker.h
Generated for CMSSW Reference Manual by
1.8.5