CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
geantRefit_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 
5 
6 
8 
9 from SimG4Core.Application.g4SimHits_cfi import g4SimHits as _g4SimHits
10 
11 
12 
13 geopro = cms.EDProducer("GeometryProducer",
14  GeoFromDD4hep = cms.bool(False),
15  UseMagneticField = cms.bool(True),
16  UseSensitiveDetectors = cms.bool(False),
17  MagneticField = _g4SimHits.MagneticField.clone()
18 )
19 
20 from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
21 dd4hep.toModify(geopro, GeoFromDD4hep = True )
22 
23 
24 # load this to do a track refit
28 
29 G4eFitter = RKTrajectoryFitter.clone (
30  ComponentName = cms.string('G4eFitter'),
31  Propagator = cms.string('Geant4ePropagator')
32 )
33 
34 G4eSmoother = RKTrajectorySmoother.clone (
35  ComponentName = cms.string('G4eSmoother'),
36  Propagator = cms.string('Geant4ePropagator'),
37 
38 
39  errorRescaling = cms.double(2.0)
40 )
41 
42 G4eFitterSmoother = KFFittingSmootherWithOutliersRejectionAndRK.clone(
43  ComponentName = cms.string('G4eFitterSmoother'),
44  Fitter = cms.string('G4eFitter'),
45  Smoother = cms.string('G4eSmoother'),
46 
47  EstimateCut = cms.double(-1.0)
48 )
49 
50 
52 
53 # configure the refitter with the G4e
54 # automatically uses the generalTracks collection as input
55 Geant4eTrackRefitter = TrackRefitter.clone()
56 Geant4eTrackRefitter.Fitter = cms.string('G4eFitterSmoother')
57 Geant4eTrackRefitter.Propagator = cms.string('Geant4ePropagator')
58 
59 geant4eTrackRefit = cms.Sequence(geopro*Geant4eTrackRefitter)
Load propagator.