SimG4CMS
HcalTestBeam
plugins
HcalTB06BeamDetectorBuilder.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/HcalTestBeamData/interface/HcalTB06BeamParameters.h
"
9
#include "
Geometry/Records/interface/IdealGeometryRecord.h
"
10
#include "
HcalTB06BeamSD.h
"
11
12
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
13
#include "
FWCore/Utilities/interface/ESGetToken.h
"
14
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
15
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
16
17
class
HcalTB06BeamDetectorBuilder
:
public
SensitiveDetectorMakerBase
{
18
public
:
19
explicit
HcalTB06BeamDetectorBuilder
(
edm::ParameterSet
const
&
p
,
edm::ConsumesCollector
cc
)
20
:
hcParToken_
{
cc
.esConsumes<
edm::Transition::BeginRun
>()},
hcPar_
{
nullptr
} {}
21
22
void
beginRun
(
const
edm::EventSetup
& es)
final
{
hcPar_
= &es.getData(
hcParToken_
); }
23
24
std::unique_ptr<SensitiveDetector>
make
(
const
std::string
& iname,
25
const
SensitiveDetectorCatalog
& clg,
26
const
edm::ParameterSet
&
p
,
27
const
SimTrackManager
* man,
28
SimActivityRegistry
& reg)
const
final
{
29
auto
sd
= std::make_unique<HcalTB06BeamSD>(iname,
hcPar_
, clg,
p
, man);
30
SimActivityRegistryEnroller::enroll
(reg,
sd
.get());
31
return
sd
;
32
}
33
34
private
:
35
const
edm::ESGetToken<HcalTB06BeamParameters, IdealGeometryRecord>
hcParToken_
;
36
const
HcalTB06BeamParameters
*
hcPar_
;
37
};
38
39
typedef
HcalTB06BeamSD
HcalTB06BeamDetector
;
40
DEFINE_SENSITIVEDETECTORBUILDER
(
HcalTB06BeamDetectorBuilder
,
HcalTB06BeamDetector
);
SimTrackManager
Definition:
SimTrackManager.h:35
HcalTB06BeamDetector
HcalTB06BeamSD HcalTB06BeamDetector
Definition:
HcalTB06BeamDetectorBuilder.cc:39
HcalTB06BeamDetectorBuilder::hcParToken_
const edm::ESGetToken< HcalTB06BeamParameters, IdealGeometryRecord > hcParToken_
Definition:
HcalTB06BeamDetectorBuilder.cc:35
ESGetToken.h
HcalTB06BeamDetectorBuilder::beginRun
void beginRun(const edm::EventSetup &es) final
Definition:
HcalTB06BeamDetectorBuilder.cc:22
HcalTB06BeamParameters
Definition:
HcalTB06BeamParameters.h:9
HcalTB06BeamParameters.h
HcalTB06BeamSD.h
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
HcalTB06BeamSD
Definition:
HcalTB06BeamSD.h:20
HcalTB06BeamDetectorBuilder::HcalTB06BeamDetectorBuilder
HcalTB06BeamDetectorBuilder(edm::ParameterSet const &p, edm::ConsumesCollector cc)
Definition:
HcalTB06BeamDetectorBuilder.cc:19
SimActivityRegistryEnroller::enroll
static void enroll(SimActivityRegistry &iReg, T *iObj)
Definition:
SimActivityRegistryEnroller.h:50
IdealGeometryRecord.h
edm::EventSetup
Definition:
EventSetup.h:58
cc
HcalTB06BeamDetectorBuilder::hcPar_
const HcalTB06BeamParameters * hcPar_
Definition:
HcalTB06BeamDetectorBuilder.cc:36
edm::ESGetToken< HcalTB06BeamParameters, IdealGeometryRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
HcalTB06BeamDetectorBuilder::make
std::unique_ptr< SensitiveDetector > make(const std::string &iname, const SensitiveDetectorCatalog &clg, const edm::ParameterSet &p, const SimTrackManager *man, SimActivityRegistry ®) const final
Definition:
HcalTB06BeamDetectorBuilder.cc:24
SimActivityRegistryEnroller.h
SimActivityRegistry
Definition:
SimActivityRegistry.h:39
DEFINE_SENSITIVEDETECTORBUILDER
#define DEFINE_SENSITIVEDETECTORBUILDER(type, name)
Definition:
SensitiveDetectorPluginFactory.h:21
edm::Transition::BeginRun
sd
double sd
Definition:
CascadeWrapper.h:113
HcalTB06BeamDetectorBuilder
Definition:
HcalTB06BeamDetectorBuilder.cc:17
ConsumesCollector.h
SensitiveDetectorPluginFactory.h
ParameterSet.h
SensitiveDetectorMakerBase.h
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.16