-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34568 from bsunanda/Run3-gex83K
Run3-gex83K New way of SD declaration for PPS detectors
- Loading branch information
Showing
10 changed files
with
102 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
SimG4CMS/PPS/plugins/CTPPSDiamondSensitiveDetectorBuilder.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// system include files | ||
#include <string> | ||
#include <vector> | ||
|
||
// user include files | ||
#include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorMakerBase.h" | ||
#include "SimG4Core/Notification/interface/SimActivityRegistryEnroller.h" | ||
#include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorPluginFactory.h" | ||
|
||
#include "SimG4CMS/PPS/interface/PPSDiamondSD.h" | ||
|
||
#include "FWCore/Framework/interface/ConsumesCollector.h" | ||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
#include "FWCore/Utilities/interface/ESGetToken.h" | ||
#include "FWCore/PluginManager/interface/ModuleDef.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
|
||
class CTPPSDiamondSensitiveDetectorBuilder : public SensitiveDetectorMakerBase { | ||
public: | ||
explicit CTPPSDiamondSensitiveDetectorBuilder(edm::ParameterSet const& p, edm::ConsumesCollector cc) {} | ||
std::unique_ptr<SensitiveDetector> make(const std::string& iname, | ||
const SensitiveDetectorCatalog& clg, | ||
const edm::ParameterSet& p, | ||
const SimTrackManager* man, | ||
SimActivityRegistry& reg) const final { | ||
auto sd = std::make_unique<PPSDiamondSD>(iname, clg, p, man); | ||
SimActivityRegistryEnroller::enroll(reg, sd.get()); | ||
return sd; | ||
} | ||
}; | ||
|
||
typedef PPSDiamondSD CTPPSDiamondSensitiveDetector; | ||
DEFINE_SENSITIVEDETECTORBUILDER(CTPPSDiamondSensitiveDetectorBuilder, CTPPSDiamondSensitiveDetector); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// system include files | ||
#include <string> | ||
#include <vector> | ||
|
||
// user include files | ||
#include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorMakerBase.h" | ||
#include "SimG4Core/Notification/interface/SimActivityRegistryEnroller.h" | ||
#include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorPluginFactory.h" | ||
|
||
#include "SimG4CMS/PPS/interface/PPSPixelSD.h" | ||
|
||
#include "FWCore/Framework/interface/ConsumesCollector.h" | ||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
#include "FWCore/Utilities/interface/ESGetToken.h" | ||
#include "FWCore/PluginManager/interface/ModuleDef.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
|
||
class CTPPSSensitiveDetectorBuilder : public SensitiveDetectorMakerBase { | ||
public: | ||
explicit CTPPSSensitiveDetectorBuilder(edm::ParameterSet const& p, edm::ConsumesCollector cc) {} | ||
std::unique_ptr<SensitiveDetector> make(const std::string& iname, | ||
const SensitiveDetectorCatalog& clg, | ||
const edm::ParameterSet& p, | ||
const SimTrackManager* man, | ||
SimActivityRegistry& reg) const final { | ||
auto sd = std::make_unique<PPSPixelSD>(iname, clg, p, man); | ||
SimActivityRegistryEnroller::enroll(reg, sd.get()); | ||
return sd; | ||
} | ||
}; | ||
|
||
typedef PPSPixelSD CTPPSSensitiveDetector; | ||
DEFINE_SENSITIVEDETECTORBUILDER(CTPPSSensitiveDetectorBuilder, CTPPSSensitiveDetector); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// system include files | ||
#include <string> | ||
#include <vector> | ||
|
||
// user include files | ||
#include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorMakerBase.h" | ||
#include "SimG4Core/Notification/interface/SimActivityRegistryEnroller.h" | ||
#include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorPluginFactory.h" | ||
|
||
#include "SimG4CMS/PPS/interface/TotemRPSD.h" | ||
|
||
#include "FWCore/Framework/interface/ConsumesCollector.h" | ||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
#include "FWCore/Utilities/interface/ESGetToken.h" | ||
#include "FWCore/PluginManager/interface/ModuleDef.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
|
||
class RomanPotSensitiveDetectorBuilder : public SensitiveDetectorMakerBase { | ||
public: | ||
explicit RomanPotSensitiveDetectorBuilder(edm::ParameterSet const& p, edm::ConsumesCollector cc) {} | ||
std::unique_ptr<SensitiveDetector> make(const std::string& iname, | ||
const SensitiveDetectorCatalog& clg, | ||
const edm::ParameterSet& p, | ||
const SimTrackManager* man, | ||
SimActivityRegistry& reg) const final { | ||
auto sd = std::make_unique<TotemRPSD>(iname, clg, p, man); | ||
SimActivityRegistryEnroller::enroll(reg, sd.get()); | ||
return sd; | ||
} | ||
}; | ||
|
||
typedef TotemRPSD RomanPotSensitiveDetector; | ||
DEFINE_SENSITIVEDETECTORBUILDER(RomanPotSensitiveDetectorBuilder, RomanPotSensitiveDetector); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +0,0 @@ | ||
#include "SimG4CMS/PPS/interface/TotemRPSD.h" | ||
#include "SimG4CMS/PPS/interface/PPSPixelSD.h" | ||
#include "SimG4CMS/PPS/interface/PPSDiamondSD.h" | ||
|
||
#include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorPluginFactory.h" | ||
#include "SimG4Core/Watcher/interface/SimWatcherFactory.h" | ||
#include "FWCore/PluginManager/interface/ModuleDef.h" | ||
|
||
typedef PPSPixelSD CTPPSSensitiveDetector; | ||
DEFINE_SENSITIVEDETECTOR(CTPPSSensitiveDetector); | ||
|
||
typedef TotemRPSD RomanPotSensitiveDetector; | ||
DEFINE_SENSITIVEDETECTOR(RomanPotSensitiveDetector); | ||
|
||
typedef PPSDiamondSD CTPPSDiamondSensitiveDetector; | ||
DEFINE_SENSITIVEDETECTOR(CTPPSDiamondSensitiveDetector); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters