CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HGCScintillatorSensitiveDetectorBuilder Class Reference
Inheritance diagram for HGCScintillatorSensitiveDetectorBuilder:
SensitiveDetectorMakerBase

Public Member Functions

void beginRun (const edm::EventSetup &es) final
 
 HGCScintillatorSensitiveDetectorBuilder (edm::ParameterSet const &p, edm::ConsumesCollector cc)
 
std::unique_ptr< SensitiveDetectormake (const std::string &iname, const SensitiveDetectorCatalog &clg, const edm::ParameterSet &p, const SimTrackManager *man, SimActivityRegistry &reg) const final
 
- Public Member Functions inherited from SensitiveDetectorMakerBase
virtual std::unique_ptr< SensitiveDetectormake (const std::string &iname, const edm::EventSetup &es, const SensitiveDetectorCatalog &clg, const edm::ParameterSet &p, const SimTrackManager *man, SimActivityRegistry &reg) const
 
const SensitiveDetectorMakerBaseoperator= (const SensitiveDetectorMakerBase &)=delete
 
 SensitiveDetectorMakerBase ()=default
 
 SensitiveDetectorMakerBase (const SensitiveDetectorMakerBase &)=delete
 
virtual ~SensitiveDetectorMakerBase ()
 

Private Attributes

edm::ESHandle< HGCalDDDConstantshgcons_
 
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecordhgcToken_
 

Detailed Description

Definition at line 22 of file HGCScintillatorSensitiveDetectorBuilder.cc.

Constructor & Destructor Documentation

◆ HGCScintillatorSensitiveDetectorBuilder()

HGCScintillatorSensitiveDetectorBuilder::HGCScintillatorSensitiveDetectorBuilder ( edm::ParameterSet const &  p,
edm::ConsumesCollector  cc 
)
inlineexplicit

Definition at line 24 of file HGCScintillatorSensitiveDetectorBuilder.cc.

25  : hgcToken_{cc.esConsumes<edm::Transition::BeginRun>(edm::ESInputTag{"", "HGCalHEScintillatorSensitive"})} {}

References edm::BeginRun.

Member Function Documentation

◆ beginRun()

void HGCScintillatorSensitiveDetectorBuilder::beginRun ( const edm::EventSetup es)
inlinefinalvirtual

Reimplemented from SensitiveDetectorMakerBase.

Definition at line 27 of file HGCScintillatorSensitiveDetectorBuilder.cc.

27 { hgcons_ = es.getHandle(hgcToken_); }

References hgcons_, and hgcToken_.

◆ make()

std::unique_ptr<SensitiveDetector> HGCScintillatorSensitiveDetectorBuilder::make ( const std::string &  iname,
const SensitiveDetectorCatalog clg,
const edm::ParameterSet p,
const SimTrackManager man,
SimActivityRegistry reg 
) const
inlinefinalvirtual

Reimplemented from SensitiveDetectorMakerBase.

Definition at line 29 of file HGCScintillatorSensitiveDetectorBuilder.cc.

33  {
34  auto hgc = ((iname.find("HitsHEback") != std::string::npos) && hgcons_.isValid()) ? hgcons_.product() : nullptr;
35  auto sd = std::make_unique<HGCScintSD>(iname, hgc, clg, p, man);
37  return sd;
38  }

References SimActivityRegistryEnroller::enroll(), hgcons_, edm::ESHandleBase::isValid(), AlCaHLTBitMon_ParallelJobs::p, edm::ESHandle< T >::product(), and sd.

Member Data Documentation

◆ hgcons_

edm::ESHandle<HGCalDDDConstants> HGCScintillatorSensitiveDetectorBuilder::hgcons_
private

Definition at line 42 of file HGCScintillatorSensitiveDetectorBuilder.cc.

Referenced by beginRun(), and make().

◆ hgcToken_

const edm::ESGetToken<HGCalDDDConstants, IdealGeometryRecord> HGCScintillatorSensitiveDetectorBuilder::hgcToken_
private

Definition at line 41 of file HGCScintillatorSensitiveDetectorBuilder.cc.

Referenced by beginRun().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
edm::ESInputTag
Definition: ESInputTag.h:87
hgc_digi
Definition: HGCDigitizerTypes.h:10
HGCScintillatorSensitiveDetectorBuilder::hgcToken_
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > hgcToken_
Definition: HGCScintillatorSensitiveDetectorBuilder.cc:41
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
SimActivityRegistryEnroller::enroll
static void enroll(SimActivityRegistry &iReg, T *iObj)
Definition: SimActivityRegistryEnroller.h:50
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
cc
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
HGCScintillatorSensitiveDetectorBuilder::hgcons_
edm::ESHandle< HGCalDDDConstants > hgcons_
Definition: HGCScintillatorSensitiveDetectorBuilder.cc:42
edm::Transition::BeginRun
sd
double sd
Definition: CascadeWrapper.h:113