CMS 3D CMS Logo

FiberSensitiveDetectorBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SimG4CMS/ShowerLibraryProducer
4 // Class : FiberSensitiveDetectorBuilder
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Sunanda Banerjee
10 // Created: Tue, 13 Jun 2021 15:18:17 GMT
11 //
12 
13 // system include files
14 #include <string>
15 
16 // user include files
20 
25 
31 
33 public:
35  : cspsToken_{cc.esConsumes<edm::Transition::BeginRun>()},
36  cdcToken_{cc.esConsumes<edm::Transition::BeginRun>()},
37  hcalSimCons_{nullptr},
38  hcalDDCons_{nullptr} {}
39 
40  void beginRun(const edm::EventSetup& es) final {
41  hcalSimCons_ = &es.getData(cspsToken_);
42  hcalDDCons_ = &es.getData(cdcToken_);
43  }
44 
45  std::unique_ptr<SensitiveDetector> make(const std::string& iname,
46  const SensitiveDetectorCatalog& clg,
47  const edm::ParameterSet& p,
48  const SimTrackManager* man,
49  SimActivityRegistry& reg) const final {
50  auto sd = std::make_unique<FiberSD>(iname, hcalSimCons_, hcalDDCons_, clg, p, man);
52  return sd;
53  }
54 
55 private:
60 };
61 
FiberSensitiveDetector
FiberSD FiberSensitiveDetector
Definition: FiberSensitiveDetectorBuilder.cc:62
SimTrackManager
Definition: SimTrackManager.h:35
FiberSD
Definition: FiberSD.h:29
HcalSimNumberingRecord.h
FiberSensitiveDetectorBuilder
Definition: FiberSensitiveDetectorBuilder.cc:32
ESGetToken.h
FiberSensitiveDetectorBuilder::cdcToken_
const edm::ESGetToken< HcalDDDSimConstants, HcalSimNumberingRecord > cdcToken_
Definition: FiberSensitiveDetectorBuilder.cc:57
HcalDDDSimConstants
Definition: HcalDDDSimConstants.h:24
FiberSensitiveDetectorBuilder::beginRun
void beginRun(const edm::EventSetup &es) final
Definition: FiberSensitiveDetectorBuilder.cc:40
HcalSimulationConstants
Definition: HcalSimulationConstants.h:15
FiberSensitiveDetectorBuilder::hcalSimCons_
const HcalSimulationConstants * hcalSimCons_
Definition: FiberSensitiveDetectorBuilder.cc:58
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
FiberSensitiveDetectorBuilder::hcalDDCons_
const HcalDDDSimConstants * hcalDDCons_
Definition: FiberSensitiveDetectorBuilder.cc:59
SensitiveDetectorMakerBase
Definition: SensitiveDetectorMakerBase.h:28
ModuleDef.h
SimActivityRegistryEnroller::enroll
static void enroll(SimActivityRegistry &iReg, T *iObj)
Definition: SimActivityRegistryEnroller.h:50
FiberSensitiveDetectorBuilder::cspsToken_
const edm::ESGetToken< HcalSimulationConstants, HcalSimNumberingRecord > cspsToken_
Definition: FiberSensitiveDetectorBuilder.cc:56
edm::EventSetup
Definition: EventSetup.h:58
cc
edm::ESGetToken< HcalSimulationConstants, HcalSimNumberingRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SimActivityRegistryEnroller.h
FiberSD.h
SimActivityRegistry
Definition: SimActivityRegistry.h:39
FiberSensitiveDetectorBuilder::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: FiberSensitiveDetectorBuilder.cc:45
DEFINE_SENSITIVEDETECTORBUILDER
#define DEFINE_SENSITIVEDETECTORBUILDER(type, name)
Definition: SensitiveDetectorPluginFactory.h:21
edm::Transition::BeginRun
FiberSensitiveDetectorBuilder::FiberSensitiveDetectorBuilder
FiberSensitiveDetectorBuilder(const edm::ParameterSet &p, edm::ConsumesCollector cc)
Definition: FiberSensitiveDetectorBuilder.cc:34
HcalSimulationConstants.h
EventSetup.h
sd
double sd
Definition: CascadeWrapper.h:113
ConsumesCollector.h
SensitiveDetectorPluginFactory.h
ParameterSet.h
SensitiveDetectorMakerBase.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
HcalDDDSimConstants.h