CMS 3D CMS Logo

HcalTB02SensitiveDetectorBuilder.cc
Go to the documentation of this file.
1 // system include files
2 
3 // user include files
7 
10 #include "HcalTB02SD.h"
11 
16 
18 public:
21  edm::ESInputTag{"", "EcalHitsEB"})},
23  edm::ESInputTag{"", "HcalHits"})},
24  ebPar_{nullptr},
25  hcPar_{nullptr} {}
26 
27  void beginRun(const edm::EventSetup& es) final {
28  ebPar_ = &es.getData(ebParToken_);
29  hcPar_ = &es.getData(hcParToken_);
30  }
31 
32  std::unique_ptr<SensitiveDetector> make(const std::string& iname,
33  const SensitiveDetectorCatalog& clg,
34  const edm::ParameterSet& p,
35  const SimTrackManager* man,
36  SimActivityRegistry& reg) const final {
37  auto par = ((iname == "EcalHitsEB") ? ebPar_ : ((iname == "HcalHits") ? hcPar_ : nullptr));
38  auto sd = std::make_unique<HcalTB02SD>(iname, par, clg, p, man);
40  return sd;
41  }
42 
43 private:
48 };
49 
SimTrackManager
Definition: SimTrackManager.h:35
edm::ESInputTag
Definition: ESInputTag.h:87
HcalTB02SensitiveDetectorBuilder::ebPar_
const HcalTB02Parameters * ebPar_
Definition: HcalTB02SensitiveDetectorBuilder.cc:46
HcalTB02SensitiveDetectorBuilder::HcalTB02SensitiveDetectorBuilder
HcalTB02SensitiveDetectorBuilder(edm::ParameterSet const &p, edm::ConsumesCollector cc)
Definition: HcalTB02SensitiveDetectorBuilder.cc:19
ESGetToken.h
HcalTB02SensitiveDetectorBuilder::hcParToken_
const edm::ESGetToken< HcalTB02Parameters, IdealGeometryRecord > hcParToken_
Definition: HcalTB02SensitiveDetectorBuilder.cc:45
HcalTB02SensitiveDetectorBuilder::ebParToken_
const edm::ESGetToken< HcalTB02Parameters, IdealGeometryRecord > ebParToken_
Definition: HcalTB02SensitiveDetectorBuilder.cc:44
HcalTB02Parameters
Definition: HcalTB02Parameters.h:9
HcalTB02SensitiveDetectorBuilder::beginRun
void beginRun(const edm::EventSetup &es) final
Definition: HcalTB02SensitiveDetectorBuilder.cc:27
HcalTB02SensitiveDetectorBuilder::make
std::unique_ptr< SensitiveDetector > make(const std::string &iname, const SensitiveDetectorCatalog &clg, const edm::ParameterSet &p, const SimTrackManager *man, SimActivityRegistry &reg) const final
Definition: HcalTB02SensitiveDetectorBuilder.cc:32
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
HcalTB02SensitiveDetectorBuilder
Definition: HcalTB02SensitiveDetectorBuilder.cc:17
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
SensitiveDetectorMakerBase
Definition: SensitiveDetectorMakerBase.h:28
ModuleDef.h
SimActivityRegistryEnroller::enroll
static void enroll(SimActivityRegistry &iReg, T *iObj)
Definition: SimActivityRegistryEnroller.h:50
HcalTB02SD.h
HcalTB02SensitiveDetector
HcalTB02SD HcalTB02SensitiveDetector
Definition: HcalTB02SensitiveDetectorBuilder.cc:50
IdealGeometryRecord.h
edm::EventSetup
Definition: EventSetup.h:58
cc
edm::ESGetToken< HcalTB02Parameters, IdealGeometryRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalTB02SensitiveDetectorBuilder::hcPar_
const HcalTB02Parameters * hcPar_
Definition: HcalTB02SensitiveDetectorBuilder.cc:47
HcalTB02SD
Definition: HcalTB02SD.h:31
SimActivityRegistryEnroller.h
HcalTB02Parameters.h
SimActivityRegistry
Definition: SimActivityRegistry.h:39
DEFINE_SENSITIVEDETECTORBUILDER
#define DEFINE_SENSITIVEDETECTORBUILDER(type, name)
Definition: SensitiveDetectorPluginFactory.h:21
edm::Transition::BeginRun
sd
double sd
Definition: CascadeWrapper.h:113
ConsumesCollector.h
SensitiveDetectorPluginFactory.h
ParameterSet.h
SensitiveDetectorMakerBase.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25