CMS 3D CMS Logo

objectSpatialResolution_cfi.py
Go to the documentation of this file.
1 # The following comments couldn't be translated into the new config version:
2 
3 #
4 # Modules for smearing 4-vector's angles of Objects
5 #
6 # Parameters:
7 # - InputTag movedObject:
8 # Specify object to smear.
9 # Object type should correspond to module (e.g. Electron in module ElectronSpatialResolution)
10 # - bool useDefaultInitialResolutions :
11 # Objects contain individual 4-vector resolutions (in terms of Et, theta/eta, phi).
12 # Set this to "true" if these should be used to compute initial resolutions for the smearing.
13 # - bool usePolarTheta:
14 # Switch to specify, if eta or rather theta is used for the polar angle smearing.
15 # Set this to "true" to smear theta or to "false" to smear eta.
16 # - double initialResolutionPolar:
17 # Initial resolution (in radiants for theta) to be used for the eta/theta smearing.
18 # Is given as absolute value only, since factors make no sense for angles.
19 # Overwritten, if 'useDefaultInitialResolution' is "true".
20 # - double worsenResolutionPolar:
21 # Used to calculate the final resolution (after smearing) from the initial resolution.
22 # The angle is smeared with a Gaussion of
23 # mu = angle and
24 # sigma = sqrt(finalRes^2-iniRes^2).
25 # - bool worsenResolutionPolarByFactor:
26 # Flags the usage mode of 'worsenResolutionPolar' (how the final resolution is calculated from the initial one)
27 # - double initialResolutionPhi, double worsenResolutionPhi and bool worsenResolutionPhiByFactor:
28 # Accordingly...
29 #
30 # Examples:
31 #
32 # Remarks:
33 # - To switch off angular smearing, use (worsenResolutionPolar=0.) resp. (worsenResolutionPhi=0.)
34 # - All numeric values are protected from "meaninglessness" by the usage of absolute values only.
35 # - In the standard sequence at the bottom of this file, Taus are commented.
36 # - Keep polar smearing switched off for MET objects!!! ;-)
37 #
38 # Contact: volker.adler@cern.ch
39 #
40 # initialize random number generator
41 
42 import FWCore.ParameterSet.Config as cms
43 
44 RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
45  movedElectrons = cms.PSet(
46  initialSeed = cms.untracked.uint32(897867),
47  engineName = cms.untracked.string('HepJamesRandom')
48  ),
49  movedMuons = cms.PSet(
50  initialSeed = cms.untracked.uint32(17987),
51  engineName = cms.untracked.string('HepJamesRandom')
52  ),
53  theSource = cms.PSet(
54  initialSeed = cms.untracked.uint32(7893456),
55  engineName = cms.untracked.string('HepJamesRandom')
56  ),
57  movedTaus = cms.PSet(
58  initialSeed = cms.untracked.uint32(38476),
59  engineName = cms.untracked.string('HepJamesRandom')
60  ),
61  movedJets = cms.PSet(
62  initialSeed = cms.untracked.uint32(61587),
63  engineName = cms.untracked.string('HepJamesRandom')
64  ),
65  movedMETs = cms.PSet(
66  initialSeed = cms.untracked.uint32(3489766),
67  engineName = cms.untracked.string('HepJamesRandom')
68  )
69 )
70 
71 movedElectrons = cms.EDFilter("ElectronSpatialResolution",
72  worsenResolutionPolar = cms.double(2.0),
73  worsenResolutionPhi = cms.double(1.0),
74  worsenResolutionPolarByFactor = cms.bool(True),
75  usePolarTheta = cms.bool(True),
76  movedObject = cms.InputTag("selectedPatElectrons"),
77  useDefaultInitialResolutions = cms.bool(False),
78  worsenResolutionPhiByFactor = cms.bool(True),
79  initialResolutionPhi = cms.double(0.0),
80  initialResolutionPolar = cms.double(0.005)
81 )
82 
83 movedMuons = cms.EDFilter("MuonSpatialResolution",
84  worsenResolutionPolar = cms.double(2.0),
85  worsenResolutionPhi = cms.double(1.0),
86  worsenResolutionPolarByFactor = cms.bool(True),
87  usePolarTheta = cms.bool(False),
88  movedObject = cms.InputTag("selectedPatMuons"),
89  useDefaultInitialResolutions = cms.bool(False),
90  worsenResolutionPhiByFactor = cms.bool(True),
91  initialResolutionPhi = cms.double(0.0),
92  initialResolutionPolar = cms.double(0.005)
93 )
94 
95 movedTaus = cms.EDFilter("TauSpatialResolution",
96  worsenResolutionPolar = cms.double(1.0),
97  worsenResolutionPhi = cms.double(1.0),
98  worsenResolutionPolarByFactor = cms.bool(True),
99  usePolarTheta = cms.bool(True),
100  movedObject = cms.InputTag("selectedPatTaus"),
101  useDefaultInitialResolutions = cms.bool(False),
102  worsenResolutionPhiByFactor = cms.bool(True),
103  initialResolutionPhi = cms.double(0.0),
104  initialResolutionPolar = cms.double(0.0)
105 )
106 
107 movedJets = cms.EDFilter("JetSpatialResolution",
108  worsenResolutionPolar = cms.double(0.25),
109  worsenResolutionPhi = cms.double(1.0),
110  worsenResolutionPolarByFactor = cms.bool(False),
111  usePolarTheta = cms.bool(True),
112  movedObject = cms.InputTag("selectedPatJets"),
113  useDefaultInitialResolutions = cms.bool(False),
114  worsenResolutionPhiByFactor = cms.bool(True),
115  initialResolutionPhi = cms.double(0.0),
116  initialResolutionPolar = cms.double(0.1)
117 )
118 
119 movedMETs = cms.EDFilter("METSpatialResolution",
120  worsenResolutionPolar = cms.double(1.0),
121  worsenResolutionPhi = cms.double(1.6),
122  worsenResolutionPolarByFactor = cms.bool(True),
123  usePolarTheta = cms.bool(True),
124  movedObject = cms.InputTag("selectedPatMETs"),
125  useDefaultInitialResolutions = cms.bool(False),
126  worsenResolutionPhiByFactor = cms.bool(False),
127  initialResolutionPhi = cms.double(0.8),
128  initialResolutionPolar = cms.double(0.0)
129 )
130 
131 # Standard sequence for all objects
132 movedObjects = cms.Sequence(
133  movedElectrons +
134  movedMuons +
135  movedJets +
136 # movedTaus +
137  movedMETs
138 )
139