Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-22 04:08:44

0001 // system include files
0002 #include <string>
0003 #include <vector>
0004 
0005 // user include files
0006 #include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorMakerBase.h"
0007 #include "SimG4Core/Notification/interface/SimActivityRegistryEnroller.h"
0008 #include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorPluginFactory.h"
0009 
0010 #include "SimG4CMS/PPS/interface/TotemRPSD.h"
0011 
0012 #include "FWCore/Framework/interface/ConsumesCollector.h"
0013 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0014 #include "FWCore/Utilities/interface/ESGetToken.h"
0015 #include "FWCore/PluginManager/interface/ModuleDef.h"
0016 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0017 
0018 class RomanPotSensitiveDetectorBuilder : public SensitiveDetectorMakerBase {
0019 public:
0020   explicit RomanPotSensitiveDetectorBuilder(edm::ParameterSet const& p, edm::ConsumesCollector cc) {}
0021   std::unique_ptr<SensitiveDetector> make(const std::string& iname,
0022                                           const SensitiveDetectorCatalog& clg,
0023                                           const edm::ParameterSet& p,
0024                                           const SimTrackManager* man,
0025                                           SimActivityRegistry& reg) const final {
0026     auto sd = std::make_unique<TotemRPSD>(iname, clg, p, man);
0027     SimActivityRegistryEnroller::enroll(reg, sd.get());
0028     return sd;
0029   }
0030 };
0031 
0032 typedef TotemRPSD RomanPotSensitiveDetector;
0033 DEFINE_SENSITIVEDETECTORBUILDER(RomanPotSensitiveDetectorBuilder, RomanPotSensitiveDetector);