File indexing completed on 2024-04-06 12:30:07
0001
0002
0003
0004 #include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorMakerBase.h"
0005 #include "SimG4Core/Notification/interface/SimActivityRegistryEnroller.h"
0006 #include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorPluginFactory.h"
0007
0008 #include "SimG4CMS/HGCalTestBeam/interface/HGCalTB16SD01.h"
0009
0010 #include "FWCore/Framework/interface/ConsumesCollector.h"
0011 #include "FWCore/Framework/interface/EventSetup.h"
0012 #include "FWCore/Utilities/interface/ESGetToken.h"
0013 #include "FWCore/PluginManager/interface/ModuleDef.h"
0014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0015
0016 class HGCalTB16SensitiveDetector01Builder : public SensitiveDetectorMakerBase {
0017 public:
0018 explicit HGCalTB16SensitiveDetector01Builder(edm::ParameterSet const& p, edm::ConsumesCollector cc) {}
0019 std::unique_ptr<SensitiveDetector> make(const std::string& iname,
0020 const SensitiveDetectorCatalog& clg,
0021 const edm::ParameterSet& p,
0022 const SimTrackManager* man,
0023 SimActivityRegistry& reg) const final {
0024 auto sd = std::make_unique<HGCalTB16SD01>(iname, clg, p, man);
0025 SimActivityRegistryEnroller::enroll(reg, sd.get());
0026 return sd;
0027 }
0028 };
0029
0030 typedef HGCalTB16SD01 HGCalTB1601SensitiveDetector;
0031 DEFINE_SENSITIVEDETECTORBUILDER(HGCalTB16SensitiveDetector01Builder, HGCalTB1601SensitiveDetector);