Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:43

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 ## Load propagator
0004 from TrackPropagation.Geant4e.Geant4ePropagator_cfi import *
0005 
0006 
0007 from TrackingTools.TrackRefitter.TracksToTrajectories_cff import *
0008 
0009 from SimG4Core.Application.g4SimHits_cfi import g4SimHits as _g4SimHits
0010 
0011 
0012 ## Set up geometry
0013 geopro = cms.EDProducer("GeometryProducer",
0014      GeoFromDD4hep = cms.bool(False),
0015      UseMagneticField = cms.bool(True),
0016      UseSensitiveDetectors = cms.bool(False),
0017      MagneticField =  _g4SimHits.MagneticField.clone()
0018 )
0019 
0020 from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
0021 dd4hep.toModify(geopro, GeoFromDD4hep = True )
0022 
0023 
0024 # load this to do a track refit
0025 from RecoTracker.TrackProducer.TrackRefitters_cff import *
0026 from RecoVertex.V0Producer.generalV0Candidates_cff import *
0027 from TrackPropagation.Geant4e.Geant4ePropagator_cfi import *
0028 
0029 G4eFitter = RKTrajectoryFitter.clone ( 
0030     ComponentName = cms.string('G4eFitter'),
0031     Propagator = cms.string('Geant4ePropagator') 
0032 )
0033 
0034 G4eSmoother = RKTrajectorySmoother.clone (
0035      ComponentName = cms.string('G4eSmoother'),
0036      Propagator = cms.string('Geant4ePropagator'),
0037  
0038      ## modify rescaling to have a more stable fit during the backward propagation
0039      errorRescaling = cms.double(2.0)
0040 )
0041 
0042 G4eFitterSmoother = KFFittingSmootherWithOutliersRejectionAndRK.clone(
0043     ComponentName = cms.string('G4eFitterSmoother'),
0044     Fitter = cms.string('G4eFitter'),
0045     Smoother = cms.string('G4eSmoother'),
0046     ## will reject no hits
0047     EstimateCut = cms.double(-1.0)
0048 )
0049 
0050 ## Different versions have different refitter cffs
0051 from RecoTracker.TrackProducer.TrackRefitters_cff import *
0052 
0053 # configure the refitter with the G4e
0054 # automatically uses the generalTracks collection as input
0055 Geant4eTrackRefitter = TrackRefitter.clone()
0056 Geant4eTrackRefitter.Fitter = cms.string('G4eFitterSmoother')
0057 Geant4eTrackRefitter.Propagator = cms.string('Geant4ePropagator')
0058 
0059 geant4eTrackRefit = cms.Sequence(geopro*Geant4eTrackRefitter)