CMS 3D CMS Logo

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

Public Member Functions

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

bool agingFlagHB_
 
bool agingFlagHE_
 
bool forTBH2_
 
bool forTBHC_
 
const HBHEDarkeninghbDarkening_
 
const edm::ESGetToken< HBHEDarkening, HBHEDarkeningRecordhbdkToken_
 
const HcalDDDRecConstantshcalDDRec_
 
const HcalDDDSimConstantshcalDDSim_
 
const HcalSimulationConstantshcalSimConstants_
 
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecordhdrcToken_
 
const edm::ESGetToken< HcalDDDSimConstants, HcalSimNumberingRecordhdscToken_
 
const HBHEDarkeningheDarkening_
 
const edm::ESGetToken< HBHEDarkening, HBHEDarkeningRecordhedkToken_
 
const edm::ESGetToken< HcalSimulationConstants, HcalSimNumberingRecordhscsToken_
 

Detailed Description

Definition at line 27 of file HcalSensitiveDetectorBuilder.cc.

Constructor & Destructor Documentation

◆ HcalSensitiveDetectorBuilder()

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

Definition at line 29 of file HcalSensitiveDetectorBuilder.cc.

30  : hdscToken_{cc.esConsumes<edm::Transition::BeginRun>()},
33  hbdkToken_{
35  hedkToken_{
37  hcalDDSim_{nullptr},
38  hcalDDRec_{nullptr},
39  hcalSimConstants_{nullptr},
40  hbDarkening_{nullptr},
41  heDarkening_{nullptr} {
42  edm::ParameterSet m_HC = p.getParameter<edm::ParameterSet>("HCalSD");
43  agingFlagHB_ = m_HC.getParameter<bool>("HBDarkening");
44  agingFlagHE_ = m_HC.getParameter<bool>("HEDarkening");
45  forTBHC_ = m_HC.getUntrackedParameter<bool>("ForTBHCAL", false);
46  forTBH2_ = m_HC.getUntrackedParameter<bool>("ForTBH2", false);
47  }

References edm::BeginRun.

Member Function Documentation

◆ beginRun()

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

Reimplemented from SensitiveDetectorMakerBase.

Definition at line 49 of file HcalSensitiveDetectorBuilder.cc.

49  {
51  if ((!forTBHC_) && (!forTBH2_))
54  if (hscs.isValid())
55  hcalSimConstants_ = hscs.product();
56  else
57  edm::LogWarning("HcalSim") << "HcalSensitiveDetectorBuilder does not find record for HcalSimulationConstants";
58  if (agingFlagHB_) {
60  if (hbdark.isValid())
61  hbDarkening_ = hbdark.product();
62  else
63  edm::LogVerbatim("HcalSim") << "HcalSensitiveDetectorBuilder does not find record for HBDarkening";
64  }
65  if (agingFlagHE_) {
67  if (hedark.isValid())
68  heDarkening_ = hedark.product();
69  else
70  edm::LogVerbatim("HcalSim") << "HcalSensitiveDetectorBuilder does not find record for HEDarkening";
71  }
72  }

References agingFlagHB_, agingFlagHE_, forTBH2_, forTBHC_, hbDarkening_, hbdkToken_, hcalDDRec_, hcalDDSim_, hcalSimConstants_, hdrcToken_, hdscToken_, heDarkening_, hedkToken_, hscsToken_, edm::ESHandleBase::isValid(), and edm::ESHandle< T >::product().

◆ make()

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

78  {
79  auto sd = std::make_unique<HCalSD>(
82  return sd;
83  }

References SimActivityRegistryEnroller::enroll(), hbDarkening_, hcalDDRec_, hcalDDSim_, hcalSimConstants_, heDarkening_, AlCaHLTBitMon_ParallelJobs::p, and sd.

Member Data Documentation

◆ agingFlagHB_

bool HcalSensitiveDetectorBuilder::agingFlagHB_
private

Definition at line 96 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun().

◆ agingFlagHE_

bool HcalSensitiveDetectorBuilder::agingFlagHE_
private

Definition at line 96 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun().

◆ forTBH2_

bool HcalSensitiveDetectorBuilder::forTBH2_
private

Definition at line 97 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun().

◆ forTBHC_

bool HcalSensitiveDetectorBuilder::forTBHC_
private

Definition at line 97 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun().

◆ hbDarkening_

const HBHEDarkening* HcalSensitiveDetectorBuilder::hbDarkening_
private

Definition at line 94 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun(), and make().

◆ hbdkToken_

const edm::ESGetToken<HBHEDarkening, HBHEDarkeningRecord> HcalSensitiveDetectorBuilder::hbdkToken_
private

Definition at line 89 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun().

◆ hcalDDRec_

const HcalDDDRecConstants* HcalSensitiveDetectorBuilder::hcalDDRec_
private

Definition at line 92 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun(), and make().

◆ hcalDDSim_

const HcalDDDSimConstants* HcalSensitiveDetectorBuilder::hcalDDSim_
private

Definition at line 91 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun(), and make().

◆ hcalSimConstants_

const HcalSimulationConstants* HcalSensitiveDetectorBuilder::hcalSimConstants_
private

Definition at line 93 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun(), and make().

◆ hdrcToken_

const edm::ESGetToken<HcalDDDRecConstants, HcalRecNumberingRecord> HcalSensitiveDetectorBuilder::hdrcToken_
private

Definition at line 87 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun().

◆ hdscToken_

const edm::ESGetToken<HcalDDDSimConstants, HcalSimNumberingRecord> HcalSensitiveDetectorBuilder::hdscToken_
private

Definition at line 86 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun().

◆ heDarkening_

const HBHEDarkening* HcalSensitiveDetectorBuilder::heDarkening_
private

Definition at line 95 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun(), and make().

◆ hedkToken_

const edm::ESGetToken<HBHEDarkening, HBHEDarkeningRecord> HcalSensitiveDetectorBuilder::hedkToken_
private

Definition at line 90 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun().

◆ hscsToken_

const edm::ESGetToken<HcalSimulationConstants, HcalSimNumberingRecord> HcalSensitiveDetectorBuilder::hscsToken_
private

Definition at line 88 of file HcalSensitiveDetectorBuilder.cc.

Referenced by beginRun().

HBHEDarkeningRecord
Definition: HBHEDarkeningRecord.h:4
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
HcalSensitiveDetectorBuilder::hdscToken_
const edm::ESGetToken< HcalDDDSimConstants, HcalSimNumberingRecord > hdscToken_
Definition: HcalSensitiveDetectorBuilder.cc:86
edm::ESInputTag
Definition: ESInputTag.h:87
HcalSensitiveDetectorBuilder::forTBHC_
bool forTBHC_
Definition: HcalSensitiveDetectorBuilder.cc:97
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
HcalSensitiveDetectorBuilder::forTBH2_
bool forTBH2_
Definition: HcalSensitiveDetectorBuilder.cc:97
edm::ESHandle
Definition: DTSurvey.h:22
HcalSensitiveDetectorBuilder::hedkToken_
const edm::ESGetToken< HBHEDarkening, HBHEDarkeningRecord > hedkToken_
Definition: HcalSensitiveDetectorBuilder.cc:90
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HcalSensitiveDetectorBuilder::agingFlagHE_
bool agingFlagHE_
Definition: HcalSensitiveDetectorBuilder.cc:96
HcalSensitiveDetectorBuilder::hcalDDSim_
const HcalDDDSimConstants * hcalDDSim_
Definition: HcalSensitiveDetectorBuilder.cc:91
HBHEDarkening
Definition: HBHEDarkening.h:17
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
HcalSensitiveDetectorBuilder::agingFlagHB_
bool agingFlagHB_
Definition: HcalSensitiveDetectorBuilder.cc:96
HcalSensitiveDetectorBuilder::heDarkening_
const HBHEDarkening * heDarkening_
Definition: HcalSensitiveDetectorBuilder.cc:95
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
HcalSensitiveDetectorBuilder::hbdkToken_
const edm::ESGetToken< HBHEDarkening, HBHEDarkeningRecord > hbdkToken_
Definition: HcalSensitiveDetectorBuilder.cc:89
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
edm::Transition::BeginRun
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
sd
double sd
Definition: CascadeWrapper.h:113
HcalSensitiveDetectorBuilder::hcalSimConstants_
const HcalSimulationConstants * hcalSimConstants_
Definition: HcalSensitiveDetectorBuilder.cc:93
HcalSensitiveDetectorBuilder::hcalDDRec_
const HcalDDDRecConstants * hcalDDRec_
Definition: HcalSensitiveDetectorBuilder.cc:92
HcalSensitiveDetectorBuilder::hscsToken_
const edm::ESGetToken< HcalSimulationConstants, HcalSimNumberingRecord > hscsToken_
Definition: HcalSensitiveDetectorBuilder.cc:88
HcalSensitiveDetectorBuilder::hbDarkening_
const HBHEDarkening * hbDarkening_
Definition: HcalSensitiveDetectorBuilder.cc:94
HcalSensitiveDetectorBuilder::hdrcToken_
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > hdrcToken_
Definition: HcalSensitiveDetectorBuilder.cc:87