Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:33:01

0001 # The following comments couldn't be translated into the new config version:
0002 
0003 #
0004 # Modules for smearing 4-vector's angles of Objects
0005 #
0006 # Parameters:
0007 # - InputTag movedObject:
0008 #   Specify object to smear. 
0009 #   Object type should correspond to module (e.g. Electron in module ElectronSpatialResolution) 
0010 # - bool useDefaultInitialResolutions :
0011 #   Objects contain individual 4-vector resolutions (in terms of Et, theta/eta, phi).
0012 #   Set this to "true" if these should be used to compute initial resolutions for the smearing.
0013 # - bool usePolarTheta:
0014 #   Switch to specify, if eta or rather theta is used for the polar angle smearing.
0015 #   Set this to "true" to smear theta or to "false" to smear eta.
0016 # - double initialResolutionPolar:
0017 #   Initial resolution (in radiants for theta) to be used for the eta/theta smearing.
0018 #   Is given as absolute value only, since factors make no sense for angles.
0019 #   Overwritten, if 'useDefaultInitialResolution' is "true".
0020 # - double worsenResolutionPolar:
0021 #   Used to calculate the final resolution (after smearing) from the initial resolution.
0022 #   The angle is smeared with a Gaussion of
0023 #   mu    = angle and
0024 #   sigma = sqrt(finalRes^2-iniRes^2).
0025 # - bool worsenResolutionPolarByFactor:
0026 #   Flags the usage mode of 'worsenResolutionPolar' (how the final resolution is calculated from the initial one)
0027 # - double initialResolutionPhi, double worsenResolutionPhi and bool worsenResolutionPhiByFactor:
0028 #   Accordingly...
0029 #
0030 # Examples:
0031 #
0032 # Remarks:
0033 # - To switch off angular smearing, use (worsenResolutionPolar=0.) resp. (worsenResolutionPhi=0.)
0034 # - All numeric values are protected from "meaninglessness" by the usage of absolute values only.
0035 # - In the standard sequence at the bottom of this file, Taus are commented.
0036 # - Keep polar smearing switched off for MET objects!!! ;-)
0037 #
0038 # Contact: volker.adler@cern.ch
0039 #
0040 # initialize random number generator
0041 
0042 import FWCore.ParameterSet.Config as cms
0043 
0044 RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
0045     movedElectrons = cms.PSet(
0046         initialSeed = cms.untracked.uint32(897867),
0047         engineName = cms.untracked.string('HepJamesRandom')
0048     ),
0049     movedMuons = cms.PSet(
0050         initialSeed = cms.untracked.uint32(17987),
0051         engineName = cms.untracked.string('HepJamesRandom')
0052     ),
0053     theSource = cms.PSet(
0054         initialSeed = cms.untracked.uint32(7893456),
0055         engineName = cms.untracked.string('HepJamesRandom')
0056     ),
0057     movedTaus = cms.PSet(
0058         initialSeed = cms.untracked.uint32(38476),
0059         engineName = cms.untracked.string('HepJamesRandom')
0060     ),
0061     movedJets = cms.PSet(
0062         initialSeed = cms.untracked.uint32(61587),
0063         engineName = cms.untracked.string('HepJamesRandom')
0064     ),
0065     movedMETs = cms.PSet(
0066         initialSeed = cms.untracked.uint32(3489766),
0067         engineName = cms.untracked.string('HepJamesRandom')
0068     )
0069 )
0070 
0071 movedElectrons = cms.EDFilter("ElectronSpatialResolution",
0072     worsenResolutionPolar = cms.double(2.0),
0073     worsenResolutionPhi = cms.double(1.0),
0074     worsenResolutionPolarByFactor = cms.bool(True),
0075     usePolarTheta = cms.bool(True),
0076     movedObject = cms.InputTag("selectedPatElectrons"),
0077     useDefaultInitialResolutions = cms.bool(False),
0078     worsenResolutionPhiByFactor = cms.bool(True),
0079     initialResolutionPhi = cms.double(0.0),
0080     initialResolutionPolar = cms.double(0.005)
0081 )
0082 
0083 movedMuons = cms.EDFilter("MuonSpatialResolution",
0084     worsenResolutionPolar = cms.double(2.0),
0085     worsenResolutionPhi = cms.double(1.0),
0086     worsenResolutionPolarByFactor = cms.bool(True),
0087     usePolarTheta = cms.bool(False),
0088     movedObject = cms.InputTag("selectedPatMuons"),
0089     useDefaultInitialResolutions = cms.bool(False),
0090     worsenResolutionPhiByFactor = cms.bool(True),
0091     initialResolutionPhi = cms.double(0.0),
0092     initialResolutionPolar = cms.double(0.005)
0093 )
0094 
0095 movedTaus = cms.EDFilter("TauSpatialResolution",
0096     worsenResolutionPolar = cms.double(1.0),
0097     worsenResolutionPhi = cms.double(1.0),
0098     worsenResolutionPolarByFactor = cms.bool(True),
0099     usePolarTheta = cms.bool(True),
0100     movedObject = cms.InputTag("selectedPatTaus"),
0101     useDefaultInitialResolutions = cms.bool(False),
0102     worsenResolutionPhiByFactor = cms.bool(True),
0103     initialResolutionPhi = cms.double(0.0),
0104     initialResolutionPolar = cms.double(0.0)
0105 )
0106 
0107 movedJets = cms.EDFilter("JetSpatialResolution",
0108     worsenResolutionPolar = cms.double(0.25),
0109     worsenResolutionPhi = cms.double(1.0),
0110     worsenResolutionPolarByFactor = cms.bool(False),
0111     usePolarTheta = cms.bool(True),
0112     movedObject = cms.InputTag("selectedPatJets"),
0113     useDefaultInitialResolutions = cms.bool(False),
0114     worsenResolutionPhiByFactor = cms.bool(True),
0115     initialResolutionPhi = cms.double(0.0),
0116     initialResolutionPolar = cms.double(0.1)
0117 )
0118 
0119 movedMETs = cms.EDFilter("METSpatialResolution",
0120     worsenResolutionPolar = cms.double(1.0),
0121     worsenResolutionPhi = cms.double(1.6),
0122     worsenResolutionPolarByFactor = cms.bool(True),
0123     usePolarTheta = cms.bool(True),
0124     movedObject = cms.InputTag("selectedPatMETs"),
0125     useDefaultInitialResolutions = cms.bool(False),
0126     worsenResolutionPhiByFactor = cms.bool(False),
0127     initialResolutionPhi = cms.double(0.8),
0128     initialResolutionPolar = cms.double(0.0)
0129 )
0130 
0131 # Standard sequence for all objects
0132 movedObjects = cms.Sequence(
0133     movedElectrons + 
0134     movedMuons + 
0135     movedJets + 
0136 #   movedTaus +
0137     movedMETs
0138 )
0139