Skip to content

Commit

Permalink
Merge pull request #34555 from bsunanda/Run3-gex83I
Browse files Browse the repository at this point in the history
Run3-gex83I Use new SD constructions for ECAL TB and FP420
  • Loading branch information
cmsbuild authored Jul 20, 2021
2 parents 21dd329 + 3126315 commit efadce3
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 19 deletions.
2 changes: 0 additions & 2 deletions SimG4CMS/EcalTestBeam/interface/EcalTBH4BeamSD.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@
#include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

//#include "G4String.hh"
#include <map>

class EcalBaseNumber;

class EcalTBH4BeamSD : public CaloSD {
public:
EcalTBH4BeamSD(const std::string &,
const edm::EventSetup &,
const SensitiveDetectorCatalog &,
edm::ParameterSet const &,
const SimTrackManager *);
Expand Down
33 changes: 33 additions & 0 deletions SimG4CMS/EcalTestBeam/plugins/EcalTBH4BeamDetectorBuilder.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// system include files
#include <string>

// user include files
#include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorMakerBase.h"
#include "SimG4Core/Notification/interface/SimActivityRegistryEnroller.h"
#include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorPluginFactory.h"

#include "SimG4CMS/EcalTestBeam/interface/EcalTBH4BeamSD.h"

#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/Utilities/interface/ESGetToken.h"
#include "FWCore/PluginManager/interface/ModuleDef.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

class EcalTBH4BeamDetectorBuilder : public SensitiveDetectorMakerBase {
public:
explicit EcalTBH4BeamDetectorBuilder(const edm::ParameterSet& 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<EcalTBH4BeamSD>(iname, clg, p, man);
SimActivityRegistryEnroller::enroll(reg, sd.get());
return sd;
}
};

typedef EcalTBH4BeamSD EcalTBH4BeamDetector;
DEFINE_SENSITIVEDETECTORBUILDER(EcalTBH4BeamDetectorBuilder, EcalTBH4BeamDetector);
5 changes: 0 additions & 5 deletions SimG4CMS/EcalTestBeam/plugins/SealModule.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/PluginManager/interface/ModuleDef.h"
#include "SimG4CMS/EcalTestBeam/interface/EcalTBH4BeamSD.h"
#include "SimG4CMS/EcalTestBeam/interface/EcalTBH4Trigger.h"
#include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorPluginFactory.h"
#include "SimG4Core/Watcher/interface/SimWatcherFactory.h"

#include "SimG4CMS/EcalTestBeam/interface/EcalTBMCInfoProducer.h"
Expand All @@ -17,7 +15,4 @@ DEFINE_FWK_MODULE(TBHodoActiveVolumeRawInfoProducer);
#include "SimG4CMS/EcalTestBeam/interface/FakeTBEventHeaderProducer.h"
DEFINE_FWK_MODULE(FakeTBEventHeaderProducer);

typedef EcalTBH4BeamSD EcalTBH4BeamDetector;
DEFINE_SENSITIVEDETECTOR(EcalTBH4BeamDetector);

DEFINE_SIMWATCHER(EcalTBH4Trigger);
1 change: 0 additions & 1 deletion SimG4CMS/EcalTestBeam/src/EcalTBH4BeamSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "G4SystemOfUnits.hh"

EcalTBH4BeamSD::EcalTBH4BeamSD(const std::string &name,
const edm::EventSetup &es,
const SensitiveDetectorCatalog &clg,
edm::ParameterSet const &p,
const SimTrackManager *manager)
Expand Down
6 changes: 1 addition & 5 deletions SimG4CMS/FP420/interface/FP420SD.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ class FP420SD : public SensitiveTkDetector,
public Observer<const BeginOfEvent*>,
public Observer<const EndOfEvent*> {
public:
FP420SD(const std::string&,
const edm::EventSetup&,
const SensitiveDetectorCatalog&,
edm::ParameterSet const&,
const SimTrackManager*);
FP420SD(const std::string&, const SensitiveDetectorCatalog&, edm::ParameterSet const&, const SimTrackManager*);

~FP420SD() override;

Expand Down
33 changes: 33 additions & 0 deletions SimG4CMS/FP420/plugins/FP420SensitiveDetectorBuilder.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// system include files
#include <string>

// user include files
#include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorMakerBase.h"
#include "SimG4Core/Notification/interface/SimActivityRegistryEnroller.h"
#include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorPluginFactory.h"

#include "SimG4CMS/FP420/interface/FP420SD.h"

#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/Utilities/interface/ESGetToken.h"
#include "FWCore/PluginManager/interface/ModuleDef.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

class FP420SensitiveDetectorBuilder : public SensitiveDetectorMakerBase {
public:
explicit FP420SensitiveDetectorBuilder(const edm::ParameterSet& 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<FP420SD>(iname, clg, p, man);
SimActivityRegistryEnroller::enroll(reg, sd.get());
return sd;
}
};

typedef FP420SD FP420SensitiveDetector;
DEFINE_SENSITIVEDETECTORBUILDER(FP420SensitiveDetectorBuilder, FP420SensitiveDetector);
5 changes: 0 additions & 5 deletions SimG4CMS/FP420/plugins/module.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#include "SimG4CMS/FP420/interface/FP420Test.h"
#include "SimG4CMS/FP420/interface/FP420SD.h"
#include "SimG4Core/SensitiveDetector/interface/SensitiveDetectorPluginFactory.h"
#include "SimG4Core/Watcher/interface/SimWatcherFactory.h"
#include "FWCore/PluginManager/interface/ModuleDef.h"
//#include "FWCore/Framework/interface/MakerMacros.h"

typedef FP420SD FP420SensitiveDetector;
DEFINE_SENSITIVEDETECTOR(FP420SensitiveDetector);
DEFINE_SIMWATCHER(FP420Test); //=
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
//#define debug
//-------------------------------------------------------------------
FP420SD::FP420SD(const std::string& name,
const edm::EventSetup& es,
const SensitiveDetectorCatalog& clg,
edm::ParameterSet const& p,
const SimTrackManager* manager)
Expand Down

0 comments on commit efadce3

Please sign in to comment.