CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Private Attributes
HFNoseSensitiveDetectorBuilder Class Reference
Inheritance diagram for HFNoseSensitiveDetectorBuilder:
SensitiveDetectorMakerBase

Public Member Functions

void beginRun (const edm::EventSetup &es) final
 
 HFNoseSensitiveDetectorBuilder (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 HFNoseSensitiveDetectorBuilder.cc.

Constructor & Destructor Documentation

◆ HFNoseSensitiveDetectorBuilder()

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

Definition at line 24 of file HFNoseSensitiveDetectorBuilder.cc.

References edm::BeginRun, and gpuPixelDoublets::cc.

25  : hgcToken_{cc.esConsumes<edm::Transition::BeginRun>(edm::ESInputTag{"", "HGCalHFNoseSensitive"})},
26  hgcons_{nullptr} {}
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > hgcToken_
edm::ESHandle< HGCalDDDConstants > hgcons_

Member Function Documentation

◆ beginRun()

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

Reimplemented from SensitiveDetectorMakerBase.

Definition at line 28 of file HFNoseSensitiveDetectorBuilder.cc.

References hgcons_, and hgcToken_.

28 { hgcons_ = es.getHandle(hgcToken_); }
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > hgcToken_
edm::ESHandle< HGCalDDDConstants > hgcons_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130

◆ make()

std::unique_ptr<SensitiveDetector> HFNoseSensitiveDetectorBuilder::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 30 of file HFNoseSensitiveDetectorBuilder.cc.

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

34  {
35  auto hgc = ((iname.find("HFNoseHits") != std::string::npos) && hgcons_.isValid()) ? hgcons_.product() : nullptr;
36  auto sd = std::make_unique<HFNoseSD>(iname, hgc, clg, p, man);
38  return sd;
39  }
static void enroll(SimActivityRegistry &iReg, T *iObj)
T const * product() const
Definition: ESHandle.h:86
edm::ESHandle< HGCalDDDConstants > hgcons_
bool isValid() const
Definition: ESHandle.h:44

Member Data Documentation

◆ hgcons_

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

Definition at line 43 of file HFNoseSensitiveDetectorBuilder.cc.

Referenced by beginRun(), and make().

◆ hgcToken_

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

Definition at line 42 of file HFNoseSensitiveDetectorBuilder.cc.

Referenced by beginRun().