SimG4CMS
Tracker
plugins
TkAccumulatingSensitiveDetectorBuilder.cc
Go to the documentation of this file.
1
// system include files
2
3
// user include files
4
#include "
SimG4Core/SensitiveDetector/interface/SensitiveDetectorMakerBase.h
"
5
#include "
SimG4Core/Notification/interface/SimActivityRegistryEnroller.h
"
6
#include "
SimG4Core/SensitiveDetector/interface/SensitiveDetectorPluginFactory.h
"
7
8
#include "
Geometry/TrackerNumberingBuilder/interface/GeometricDet.h
"
9
#include "
Geometry/Records/interface/IdealGeometryRecord.h
"
10
11
#include "
SimG4CMS/Tracker/interface/TkAccumulatingSensitiveDetector.h
"
12
13
#include "
FWCore/Framework/interface/EventSetup.h
"
14
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
15
#include "
FWCore/Utilities/interface/ESGetToken.h
"
16
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
17
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
18
19
class
TkAccumulatingSensitiveDetectorBuilder
:
public
SensitiveDetectorMakerBase
{
20
public
:
21
explicit
TkAccumulatingSensitiveDetectorBuilder
(
edm::ParameterSet
const
&
p
,
edm::ConsumesCollector
cc
)
22
:
geomdet_
{
nullptr
},
geomdetToken_
{
cc
.esConsumes<
edm::Transition::BeginRun
>()} {}
23
24
void
beginRun
(
const
edm::EventSetup
& es)
final
{
geomdet_
= &es.getData(
geomdetToken_
); }
25
26
std::unique_ptr<SensitiveDetector>
make
(
const
std::string
& iname,
27
const
SensitiveDetectorCatalog
& clg,
28
const
edm::ParameterSet
&
p
,
29
const
SimTrackManager
* man,
30
SimActivityRegistry
& reg)
const
final
{
31
auto
sd
= std::make_unique<TkAccumulatingSensitiveDetector>(iname,
geomdet_
, clg,
p
, man);
32
SimActivityRegistryEnroller::enroll
(reg,
sd
.get());
33
return
sd
;
34
}
35
36
private
:
37
const
GeometricDet
*
geomdet_
;
38
const
edm::ESGetToken<GeometricDet, IdealGeometryRecord>
geomdetToken_
;
39
};
40
41
DEFINE_SENSITIVEDETECTORBUILDER
(
TkAccumulatingSensitiveDetectorBuilder
,
TkAccumulatingSensitiveDetector
);
TkAccumulatingSensitiveDetectorBuilder::make
std::unique_ptr< SensitiveDetector > make(const std::string &iname, const SensitiveDetectorCatalog &clg, const edm::ParameterSet &p, const SimTrackManager *man, SimActivityRegistry ®) const final
Definition:
TkAccumulatingSensitiveDetectorBuilder.cc:26
SimTrackManager
Definition:
SimTrackManager.h:35
TkAccumulatingSensitiveDetector
Definition:
TkAccumulatingSensitiveDetector.h:31
ESGetToken.h
TkAccumulatingSensitiveDetector.h
GeometricDet
Definition:
GeometricDet.h:31
SensitiveDetectorCatalog
Definition:
SensitiveDetectorCatalog.h:10
edm::ParameterSet
Definition:
ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
SensitiveDetectorMakerBase
Definition:
SensitiveDetectorMakerBase.h:28
ModuleDef.h
SimActivityRegistryEnroller::enroll
static void enroll(SimActivityRegistry &iReg, T *iObj)
Definition:
SimActivityRegistryEnroller.h:50
TkAccumulatingSensitiveDetectorBuilder
Definition:
TkAccumulatingSensitiveDetectorBuilder.cc:19
IdealGeometryRecord.h
edm::EventSetup
Definition:
EventSetup.h:58
GeometricDet.h
cc
edm::ESGetToken< GeometricDet, IdealGeometryRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
TkAccumulatingSensitiveDetectorBuilder::TkAccumulatingSensitiveDetectorBuilder
TkAccumulatingSensitiveDetectorBuilder(edm::ParameterSet const &p, edm::ConsumesCollector cc)
Definition:
TkAccumulatingSensitiveDetectorBuilder.cc:21
SimActivityRegistryEnroller.h
SimActivityRegistry
Definition:
SimActivityRegistry.h:39
DEFINE_SENSITIVEDETECTORBUILDER
#define DEFINE_SENSITIVEDETECTORBUILDER(type, name)
Definition:
SensitiveDetectorPluginFactory.h:21
edm::Transition::BeginRun
TkAccumulatingSensitiveDetectorBuilder::beginRun
void beginRun(const edm::EventSetup &es) final
Definition:
TkAccumulatingSensitiveDetectorBuilder.cc:24
EventSetup.h
TkAccumulatingSensitiveDetectorBuilder::geomdet_
const GeometricDet * geomdet_
Definition:
TkAccumulatingSensitiveDetectorBuilder.cc:37
TkAccumulatingSensitiveDetectorBuilder::geomdetToken_
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomdetToken_
Definition:
TkAccumulatingSensitiveDetectorBuilder.cc:38
sd
double sd
Definition:
CascadeWrapper.h:113
ConsumesCollector.h
SensitiveDetectorPluginFactory.h
ParameterSet.h
SensitiveDetectorMakerBase.h
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.16