Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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 "
SimG4CMS/HcalTestBeam/interface/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
);
HcalTB06BeamSD
Definition:
HcalTB06BeamSD.h:20
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition:
ConsumesCollector.h:97
HcalTB06BeamSD.h
SensitiveDetectorMakerBase
Definition:
SensitiveDetectorMakerBase.h:28
HcalTB06BeamDetector
HcalTB06BeamSD HcalTB06BeamDetector
Definition:
HcalTB06BeamDetectorBuilder.cc:39
HcalTB06BeamDetectorBuilder::beginRun
void beginRun(const edm::EventSetup &es) final
Definition:
HcalTB06BeamDetectorBuilder.cc:22
HcalTB06BeamDetectorBuilder
Definition:
HcalTB06BeamDetectorBuilder.cc:17
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
HcalTB06BeamDetectorBuilder::hcPar_
const HcalTB06BeamParameters * hcPar_
Definition:
HcalTB06BeamDetectorBuilder.cc:36
ParameterSet.h
SimActivityRegistryEnroller::enroll
static void enroll(SimActivityRegistry &iReg, T *iObj)
Definition:
SimActivityRegistryEnroller.h:50
edm::ESGetToken< HcalTB06BeamParameters, IdealGeometryRecord >
DEFINE_SENSITIVEDETECTORBUILDER
#define DEFINE_SENSITIVEDETECTORBUILDER(type, name)
Definition:
SensitiveDetectorPluginFactory.h:21
ESGetToken.h
SensitiveDetectorPluginFactory.h
edm::EventSetup
Definition:
EventSetup.h:59
SensitiveDetectorCatalog
Definition:
SensitiveDetectorCatalog.h:10
HcalTB06BeamParameters
Definition:
HcalTB06BeamParameters.h:9
edm::Transition::BeginRun
SimActivityRegistryEnroller.h
sd
double sd
Definition:
CascadeWrapper.h:113
HcalTB06BeamDetectorBuilder::hcParToken_
const edm::ESGetToken< HcalTB06BeamParameters, IdealGeometryRecord > hcParToken_
Definition:
HcalTB06BeamDetectorBuilder.cc:35
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
IdealGeometryRecord.h
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
HcalTB06BeamDetectorBuilder::HcalTB06BeamDetectorBuilder
HcalTB06BeamDetectorBuilder(edm::ParameterSet const &p, edm::ConsumesCollector cc)
Definition:
HcalTB06BeamDetectorBuilder.cc:19
edm::ParameterSet
Definition:
ParameterSet.h:47
SimActivityRegistry
Definition:
SimActivityRegistry.h:39
HcalTB06BeamParameters.h
ModuleDef.h
ConsumesCollector.h
SensitiveDetectorMakerBase.h
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
SimTrackManager
Definition:
SimTrackManager.h:35
Generated for CMSSW Reference Manual by
1.8.5