CMS 3D CMS Logo

DreamSensitiveDetectorBuilder.cc
Go to the documentation of this file.
1 // system include files
2 
3 // user include files
7 
12 
18 
20 public:
22  fromDD4Hep_ = p.getParameter<bool>("g4GeometryDD4hepSource");
23  if (fromDD4Hep_)
25  else
27  }
28 
29  void beginRun(const edm::EventSetup& es) final {
30  if (fromDD4Hep_) {
31  cpvDD4Hep_ = &es.getData(cpvTokenDD4Hep_);
32  } else {
33  cpvDDD_ = &es.getData(cpvTokenDDD_);
34  }
35  }
36 
37  std::unique_ptr<SensitiveDetector> make(const std::string& iname,
38  const SensitiveDetectorCatalog& clg,
39  const edm::ParameterSet& p,
40  const SimTrackManager* man,
41  SimActivityRegistry& reg) const final {
42  auto sd = std::make_unique<DreamSD>(iname, cpvDDD_, cpvDD4Hep_, clg, p, man);
44  return sd;
45  }
46 
47 private:
53 };
54 
SimTrackManager
Definition: SimTrackManager.h:35
DreamSD
Definition: DreamSD.h:22
DreamSensitiveDetectorBuilder::cpvDD4Hep_
const cms::DDCompactView * cpvDD4Hep_
Definition: DreamSensitiveDetectorBuilder.cc:52
ESGetToken.h
DDCompactView.h
DreamSensitiveDetectorBuilder::cpvTokenDDD_
edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
Definition: DreamSensitiveDetectorBuilder.cc:49
DreamSensitiveDetector
DreamSD DreamSensitiveDetector
Definition: DreamSensitiveDetectorBuilder.cc:55
DreamSensitiveDetectorBuilder
Definition: DreamSensitiveDetectorBuilder.cc:19
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
DreamSensitiveDetectorBuilder::fromDD4Hep_
bool fromDD4Hep_
Definition: DreamSensitiveDetectorBuilder.cc:48
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
DDCompactView.h
DreamSensitiveDetectorBuilder::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: DreamSensitiveDetectorBuilder.cc:37
DreamSensitiveDetectorBuilder::cpvTokenDD4Hep_
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4Hep_
Definition: DreamSensitiveDetectorBuilder.cc:50
DreamSensitiveDetectorBuilder::DreamSensitiveDetectorBuilder
DreamSensitiveDetectorBuilder(edm::ParameterSet const &p, edm::ConsumesCollector cc)
Definition: DreamSensitiveDetectorBuilder.cc:21
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
DreamSensitiveDetectorBuilder::beginRun
void beginRun(const edm::EventSetup &es) final
Definition: DreamSensitiveDetectorBuilder.cc:29
DreamSD.h
SensitiveDetectorMakerBase
Definition: SensitiveDetectorMakerBase.h:28
ModuleDef.h
SimActivityRegistryEnroller::enroll
static void enroll(SimActivityRegistry &iReg, T *iObj)
Definition: SimActivityRegistryEnroller.h:50
IdealGeometryRecord.h
edm::EventSetup
Definition: EventSetup.h:58
cc
edm::ESGetToken< DDCompactView, IdealGeometryRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SimActivityRegistryEnroller.h
DreamSensitiveDetectorBuilder::cpvDDD_
const DDCompactView * cpvDDD_
Definition: DreamSensitiveDetectorBuilder.cc:51
SimActivityRegistry
Definition: SimActivityRegistry.h:39
DEFINE_SENSITIVEDETECTORBUILDER
#define DEFINE_SENSITIVEDETECTORBUILDER(type, name)
Definition: SensitiveDetectorPluginFactory.h:21
edm::Transition::BeginRun
cms::DDCompactView
Definition: DDCompactView.h:31
EventSetup.h
sd
double sd
Definition: CascadeWrapper.h:113
ConsumesCollector.h
SensitiveDetectorPluginFactory.h
ParameterSet.h
SensitiveDetectorMakerBase.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45