CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/PhysicsTools/PatAlgos/python/selectionLayer1/objectSpatialResolution_cfi.py

Go to the documentation of this file.
00001 # The following comments couldn't be translated into the new config version:
00002 
00003 #
00004 # Modules for smearing 4-vector's angles of Objects
00005 #
00006 # Parameters:
00007 # - InputTag movedObject:
00008 #   Specify object to smear. 
00009 #   Object type should correspond to module (e.g. Electron in module ElectronSpatialResolution) 
00010 # - bool useDefaultInitialResolutions :
00011 #   Objects contain individual 4-vector resolutions (in terms of Et, theta/eta, phi).
00012 #   Set this to "true" if these should be used to compute initial resolutions for the smearing.
00013 # - bool usePolarTheta:
00014 #   Switch to specify, if eta or rather theta is used for the polar angle smearing.
00015 #   Set this to "true" to smear theta or to "false" to smear eta.
00016 # - double initialResolutionPolar:
00017 #   Initial resolution (in radiants for theta) to be used for the eta/theta smearing.
00018 #   Is given as absolute value only, since factors make no sense for angles.
00019 #   Overwritten, if 'useDefaultInitialResolution' is "true".
00020 # - double worsenResolutionPolar:
00021 #   Used to calculate the final resolution (after smearing) from the initial resolution.
00022 #   The angle is smeared with a Gaussion of
00023 #   mu    = angle and
00024 #   sigma = sqrt(finalRes^2-iniRes^2).
00025 # - bool worsenResolutionPolarByFactor:
00026 #   Flags the usage mode of 'worsenResolutionPolar' (how the final resolution is calculated from the initial one)
00027 # - double initialResolutionPhi, double worsenResolutionPhi and bool worsenResolutionPhiByFactor:
00028 #   Accordingly...
00029 #
00030 # Examples:
00031 #
00032 # Remarks:
00033 # - To switch off angular smearing, use (worsenResolutionPolar=0.) resp. (worsenResolutionPhi=0.)
00034 # - All numeric values are protected from "meaninglessness" by the usage of absolute values only.
00035 # - In the standard sequence at the bottom of this file, Taus are commented.
00036 # - Keep polar smearing switched off for MET objects!!! ;-)
00037 #
00038 # Contact: volker.adler@cern.ch
00039 #
00040 # initialize random number generator
00041 
00042 import FWCore.ParameterSet.Config as cms
00043 
00044 RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
00045     movedElectrons = cms.PSet(
00046         initialSeed = cms.untracked.uint32(897867),
00047         engineName = cms.untracked.string('HepJamesRandom')
00048     ),
00049     movedMuons = cms.PSet(
00050         initialSeed = cms.untracked.uint32(17987),
00051         engineName = cms.untracked.string('HepJamesRandom')
00052     ),
00053     theSource = cms.PSet(
00054         initialSeed = cms.untracked.uint32(7893456),
00055         engineName = cms.untracked.string('HepJamesRandom')
00056     ),
00057     movedTaus = cms.PSet(
00058         initialSeed = cms.untracked.uint32(38476),
00059         engineName = cms.untracked.string('HepJamesRandom')
00060     ),
00061     movedJets = cms.PSet(
00062         initialSeed = cms.untracked.uint32(61587),
00063         engineName = cms.untracked.string('HepJamesRandom')
00064     ),
00065     movedMETs = cms.PSet(
00066         initialSeed = cms.untracked.uint32(3489766),
00067         engineName = cms.untracked.string('HepJamesRandom')
00068     )
00069 )
00070 
00071 movedElectrons = cms.EDFilter("ElectronSpatialResolution",
00072     worsenResolutionPolar = cms.double(2.0),
00073     worsenResolutionPhi = cms.double(1.0),
00074     worsenResolutionPolarByFactor = cms.bool(True),
00075     usePolarTheta = cms.bool(True),
00076     movedObject = cms.InputTag("selectedPatElectrons"),
00077     useDefaultInitialResolutions = cms.bool(False),
00078     worsenResolutionPhiByFactor = cms.bool(True),
00079     initialResolutionPhi = cms.double(0.0),
00080     initialResolutionPolar = cms.double(0.005)
00081 )
00082 
00083 movedMuons = cms.EDFilter("MuonSpatialResolution",
00084     worsenResolutionPolar = cms.double(2.0),
00085     worsenResolutionPhi = cms.double(1.0),
00086     worsenResolutionPolarByFactor = cms.bool(True),
00087     usePolarTheta = cms.bool(False),
00088     movedObject = cms.InputTag("selectedPatMuons"),
00089     useDefaultInitialResolutions = cms.bool(False),
00090     worsenResolutionPhiByFactor = cms.bool(True),
00091     initialResolutionPhi = cms.double(0.0),
00092     initialResolutionPolar = cms.double(0.005)
00093 )
00094 
00095 movedTaus = cms.EDFilter("TauSpatialResolution",
00096     worsenResolutionPolar = cms.double(1.0),
00097     worsenResolutionPhi = cms.double(1.0),
00098     worsenResolutionPolarByFactor = cms.bool(True),
00099     usePolarTheta = cms.bool(True),
00100     movedObject = cms.InputTag("selectedPatTaus"),
00101     useDefaultInitialResolutions = cms.bool(False),
00102     worsenResolutionPhiByFactor = cms.bool(True),
00103     initialResolutionPhi = cms.double(0.0),
00104     initialResolutionPolar = cms.double(0.0)
00105 )
00106 
00107 movedJets = cms.EDFilter("JetSpatialResolution",
00108     worsenResolutionPolar = cms.double(0.25),
00109     worsenResolutionPhi = cms.double(1.0),
00110     worsenResolutionPolarByFactor = cms.bool(False),
00111     usePolarTheta = cms.bool(True),
00112     movedObject = cms.InputTag("selectedPatJets"),
00113     useDefaultInitialResolutions = cms.bool(False),
00114     worsenResolutionPhiByFactor = cms.bool(True),
00115     initialResolutionPhi = cms.double(0.0),
00116     initialResolutionPolar = cms.double(0.1)
00117 )
00118 
00119 movedMETs = cms.EDFilter("METSpatialResolution",
00120     worsenResolutionPolar = cms.double(1.0),
00121     worsenResolutionPhi = cms.double(1.6),
00122     worsenResolutionPolarByFactor = cms.bool(True),
00123     usePolarTheta = cms.bool(True),
00124     movedObject = cms.InputTag("selectedPatMETs"),
00125     useDefaultInitialResolutions = cms.bool(False),
00126     worsenResolutionPhiByFactor = cms.bool(False),
00127     initialResolutionPhi = cms.double(0.8),
00128     initialResolutionPolar = cms.double(0.0)
00129 )
00130 
00131 # Standard sequence for all objects
00132 movedObjects = cms.Sequence(
00133     movedElectrons + 
00134     movedMuons + 
00135     movedJets + 
00136 #   movedTaus +
00137     movedMETs
00138 )
00139