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.

References edm::BeginRun, and gpuPixelDoublets::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  }
const edm::ESGetToken< HBHEDarkening, HBHEDarkeningRecord > hedkToken_
const HcalDDDSimConstants * hcalDDSim_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
const edm::ESGetToken< HBHEDarkening, HBHEDarkeningRecord > hbdkToken_
T getUntrackedParameter(std::string const &, T const &) const
const edm::ESGetToken< HcalSimulationConstants, HcalSimNumberingRecord > hscsToken_
const HcalDDDRecConstants * hcalDDRec_
const HcalSimulationConstants * hcalSimConstants_
const edm::ESGetToken< HcalDDDSimConstants, HcalSimNumberingRecord > hdscToken_
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > hdrcToken_

Member Function Documentation

◆ beginRun()

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

Reimplemented from SensitiveDetectorMakerBase.

Definition at line 49 of file HcalSensitiveDetectorBuilder.cc.

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

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  }
Log< level::Info, true > LogVerbatim
const edm::ESGetToken< HBHEDarkening, HBHEDarkeningRecord > hedkToken_
const HcalDDDSimConstants * hcalDDSim_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
const edm::ESGetToken< HBHEDarkening, HBHEDarkeningRecord > hbdkToken_
const edm::ESGetToken< HcalSimulationConstants, HcalSimNumberingRecord > hscsToken_
T const * product() const
Definition: ESHandle.h:86
const HcalDDDRecConstants * hcalDDRec_
const HcalSimulationConstants * hcalSimConstants_
const edm::ESGetToken< HcalDDDSimConstants, HcalSimNumberingRecord > hdscToken_
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > hdrcToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
bool isValid() const
Definition: ESHandle.h:44
Log< level::Warning, false > LogWarning

◆ 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.

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

78  {
79  auto sd = std::make_unique<HCalSD>(
82  return sd;
83  }
const HcalDDDSimConstants * hcalDDSim_
static void enroll(SimActivityRegistry &iReg, T *iObj)
const HcalDDDRecConstants * hcalDDRec_
const HcalSimulationConstants * hcalSimConstants_

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().