Skip to content

Commit

Permalink
fix config for Run3
Browse files Browse the repository at this point in the history
  • Loading branch information
VinInn committed Jul 27, 2022
1 parent 2816210 commit 386cf0d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion SimG4Core/GeometryProducer/src/GeometryProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ GeometryProducer::GeometryProducer(edm::ParameterSet const &p)
m_firstRun(true),
m_pUseMagneticField(p.getParameter<bool>("UseMagneticField")),
m_pUseSensitiveDetectors(p.getParameter<bool>("UseSensitiveDetectors")),
m_pGeoFromDD4hep(false) {
m_pGeoFromDD4hep(p.getParameter<bool>("GeoFromDD4hep")) {
// Look for an outside SimActivityRegistry
// this is used by the visualization code

Expand Down
1 change: 1 addition & 0 deletions TrackPropagation/Geant4e/python/geantRefit_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

## Set up geometry
geopro = cms.EDProducer("GeometryProducer",
GeoFromDD4hep = cms.bool(True),
UseMagneticField = cms.bool(True),
UseSensitiveDetectors = cms.bool(False),
MagneticField = cms.PSet(
Expand Down
4 changes: 3 additions & 1 deletion TrackPropagation/Geant4e/test/Geant4ePropagatorAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ Geant4ePropagatorAnalyzer::Geant4ePropagatorAnalyzer(const edm::ParameterSet &iC
thePropagator(nullptr),
G4VtxSrc_(iConfig.getParameter<edm::InputTag>("G4VtxSrc")),
G4TrkSrc_(iConfig.getParameter<edm::InputTag>("G4TrkSrc")) {
auto token = consumes(G4TrkSrc_);

// debug_ = iConfig.getParameter<bool>("debug");
fStudyStation = iConfig.getParameter<int>("StudyStation");

Expand Down Expand Up @@ -331,7 +333,7 @@ void Geant4ePropagatorAnalyzer::analyze(const edm::Event &iEvent, const edm::Eve
///////////////////////////////////////
// Get the sim tracks & vertices
Handle<SimTrackContainer> simTracks;
iEvent.getByLabel<SimTrackContainer>("g4SimHits", "", simTracks);
iEvent.getByLabel<SimTrackContainer>(G4TrkSrc_, simTracks);
if (!simTracks.isValid()) {
LogWarning("Geant4e") << "No tracks found" << std::endl;
// return;
Expand Down
20 changes: 12 additions & 8 deletions TrackPropagation/Geant4e/test/Geant4e_example_cfg.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import FWCore.ParameterSet.Config as cms

process = cms.Process("G4eRefit")
from Configuration.Eras.Era_Run3_cff import Run3

process = cms.Process("G4eRefit",Run3)

# import of standard configurations
process.load('Configuration.StandardSequences.Services_cff')
process.load('Configuration.StandardSequences.GeometryDB_cff')
process.load("Configuration.EventContent.EventContent_cff")
process.load("Configuration.StandardSequences.Reconstruction_cff")
process.load('Configuration.StandardSequences.MagneticField_38T_cff')
process.load('Configuration.StandardSequences.EndOfProcess_cff')
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.EventContent.EventContent_cff')
process.load('SimGeneral.MixingModule.mixNoPU_cfi')
process.load('Configuration.StandardSequences.GeometrySimDB_cff')
process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
process.load('Configuration.StandardSequences.MagneticField_cff')
process.load('Configuration.StandardSequences.Reconstruction_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')


from Configuration.AlCa.GlobalTag import GlobalTag
Expand Down Expand Up @@ -41,7 +46,6 @@
fileName = cms.untracked.string( 'test.root' )
)

process.g4RefitPath = cms.Path( process.MeasurementTrackerEvent * process.geant4eTrackRefit )
process.e = cms.EndPath(process.out)
process.schedule = cms.Schedule( process.g4RefitPath, process.e )

Expand Down

0 comments on commit 386cf0d

Please sign in to comment.