CMS 3D CMS Logo

HGCScintillatorSensitiveDetectorBuilder.cc
Go to the documentation of this file.
1 
2 // system include files
3 #include <string>
4 #include <vector>
5 
6 // user include files
10 
14 
21 
23 public:
25  : hgcToken_{cc.esConsumes<edm::Transition::BeginRun>(edm::ESInputTag{"", "HGCalHEScintillatorSensitive"})} {}
26 
27  void beginRun(const edm::EventSetup& es) final { hgcons_ = es.getHandle(hgcToken_); }
28 
29  std::unique_ptr<SensitiveDetector> make(const std::string& iname,
30  const SensitiveDetectorCatalog& clg,
31  const edm::ParameterSet& p,
32  const SimTrackManager* man,
33  SimActivityRegistry& reg) const final {
34  auto hgc = ((iname.find("HitsHEback") != std::string::npos) && hgcons_.isValid()) ? hgcons_.product() : nullptr;
35  auto sd = std::make_unique<HGCScintSD>(iname, hgc, clg, p, man);
37  return sd;
38  }
39 
40 private:
43 };
44 
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
SimTrackManager
Definition: SimTrackManager.h:35
edm::ESInputTag
Definition: ESInputTag.h:87
MessageLogger.h
ESHandle.h
ESGetToken.h
hgc_digi
Definition: HGCDigitizerTypes.h:10
HGCScintillatorSensitiveDetector
HGCScintSD HGCScintillatorSensitiveDetector
Definition: HGCScintillatorSensitiveDetectorBuilder.cc:45
edm::ESHandle< HGCalDDDConstants >
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
HGCScintillatorSensitiveDetectorBuilder::hgcToken_
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > hgcToken_
Definition: HGCScintillatorSensitiveDetectorBuilder.cc:41
HGCScintillatorSensitiveDetectorBuilder::beginRun
void beginRun(const edm::EventSetup &es) final
Definition: HGCScintillatorSensitiveDetectorBuilder.cc:27
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
HGCScintSD
Definition: HGCScintSD.h:19
HGCScintillatorSensitiveDetectorBuilder::HGCScintillatorSensitiveDetectorBuilder
HGCScintillatorSensitiveDetectorBuilder(edm::ParameterSet const &p, edm::ConsumesCollector cc)
Definition: HGCScintillatorSensitiveDetectorBuilder.cc:24
IdealGeometryRecord.h
edm::EventSetup
Definition: EventSetup.h:58
cc
HGCScintillatorSensitiveDetectorBuilder
Definition: HGCScintillatorSensitiveDetectorBuilder.cc:22
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HGCScintillatorSensitiveDetectorBuilder::hgcons_
edm::ESHandle< HGCalDDDConstants > hgcons_
Definition: HGCScintillatorSensitiveDetectorBuilder.cc:42
SimActivityRegistryEnroller.h
SimActivityRegistry
Definition: SimActivityRegistry.h:39
DEFINE_SENSITIVEDETECTORBUILDER
#define DEFINE_SENSITIVEDETECTORBUILDER(type, name)
Definition: SensitiveDetectorPluginFactory.h:21
HGCScintillatorSensitiveDetectorBuilder::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: HGCScintillatorSensitiveDetectorBuilder.cc:29
edm::Transition::BeginRun
HGCScintSD.h
sd
double sd
Definition: CascadeWrapper.h:113
ConsumesCollector.h
SensitiveDetectorPluginFactory.h
HGCalDDDConstants.h
ParameterSet.h
SensitiveDetectorMakerBase.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45