CMS 3D CMS Logo

Variables

objectEnergyScale_cfi Namespace Reference

Variables

tuple RandomNumberGeneratorService
 Modules for shifting and smearing 4-vectors' energies of Objects.
tuple scaledElectrons
 Electrons.
tuple scaledJets
 Jets.
tuple scaledMETs
 METs.
tuple scaledMuons
 Muons.
tuple scaledObjects
 Standard sequence for all Objects.
tuple scaledTaus
 Taus.

Variable Documentation

Initial value:
00001 cms.Service("RandomNumberGeneratorService",
00002     scaledElectrons = cms.PSet(
00003         initialSeed = cms.untracked.uint32(897867),
00004         engineName = cms.untracked.string('HepJamesRandom')
00005     ),
00006     scaledMuons = cms.PSet(
00007         initialSeed = cms.untracked.uint32(17987),
00008         engineName = cms.untracked.string('HepJamesRandom')
00009     ),
00010     theSource = cms.PSet(
00011         initialSeed = cms.untracked.uint32(7893456),
00012         engineName = cms.untracked.string('HepJamesRandom')
00013     ),
00014     scaledTaus = cms.PSet(
00015         initialSeed = cms.untracked.uint32(38476),
00016         engineName = cms.untracked.string('HepJamesRandom')
00017     ),
00018     scaledJets = cms.PSet(
00019         initialSeed = cms.untracked.uint32(61587),
00020         engineName = cms.untracked.string('HepJamesRandom')
00021     ),
00022     scaledMETs = cms.PSet(
00023         initialSeed = cms.untracked.uint32(3489766),
00024         engineName = cms.untracked.string('HepJamesRandom')
00025     )
00026 )

Modules for shifting and smearing 4-vectors' energies of Objects.

Parameters:

  • InputTag scaledObject: Specify objects to shift & smear. Object type should correspond to module (e.g. Electron in module ElectronEnergyScale)
  • bool fixMass: Set to "true", if mass should not be smeared, e.g. for leptons with known masses. IMPORTANT: Don't trust this feature at the moment !!! (s. remarks below)
  • double shiftFactor: Scales the 4-vector with this fixed value. E.g. to have all muon energies increased by 12.5%, set "1.125" here. Default is "1.", which has -- of course -- no effect
  • bool useDefaultInitialResolution: Objects contain individual 4-vector resolutions (in terms of Et, theta/eta, phi). Set this to "true" if these should be used to compute initial resolutions for the smearing.
  • double initialResolution: Initial resolution to be used for the energy smearing. Can be an absolute value (in GeV) or a factor giving the fraction of the smeared energy. Overwritten, if 'useDefaultInitialResolution' is "true".
  • bool initialResolutionByFraction: Flags the usage mode of 'initialResolution'. E.g. to set the initial resolution to 5% of the energy, set this to "true" and 'initialResolution' to "0.05". To use a fixed resolution of 1GeV, set this to "false" and 'initialResolution' to "1.".
  • double worsenResolution: Used to calculate the final resolution (after smearing) from the initial resolution. Can be an absolute value (in GeV) or a factor. The energy is smeared with a Gaussion of mu = energy and sigma = sqrt(finalRes^2-iniRes^2) with a cut-off at 0.
  • bool worsenResolutionByFactor: Flags the usage mode of 'worsenResolution'.

Examples:

  • smear Electron 4-vector (fixed mass) with a fixed initial resolution of 500MeV to as final resolution of 1.25GeV: scaledElectrons = cms.module(ElectronEnergyScale) { scaledObject = cms.InputTag("selectedPatElectrons") fixMass = cms.bool(True) shiftFactor = cms.double(1.) useDefaultInitialResolution = cms.bool(False) initialResolution = cms.double(0.5) initialResolutionByFraction = cms.bool(False) ## alternative: worsenResolution = cms.double(0.75) ## 2.5 worsenResolutionByFactor = cms.bool(False) ## true }
  • smear Muon 4-vector (fixed mass) with a initial resolution of 10% to as final resoltion of 20%: scaledMuons = cms.module(MuonEnergyScale) { scaledObject = cms.InputTag("selectedPatMuons") fixMass = cms.bool(True) shiftFactor = cms.double(1.) useDefaultInitialResolution = cms.bool(True) initialResolution = cms.double(0.1) initialResolutionByFraction = cms.bool(True) worsenResolution = cms.double(2.) worsenResolutionByFactor = cms.bool(True) }
  • smear Jet 4-vector to a final resoltion of 150% of the default initial resolution: scaledJets = cms.module(JetEnergyScale) { scaledObject = cms.InputTag("selectedPatAK5CaloJets") fixMass = cms.bool(False) ## ===> no fixed mass for the jet shiftFactor = cms.double(1.) useDefaultInitialResolution = cms.bool(True) initialResolution = cms.double(0.05) ## ===> overwritten by "useDefaultInitialResolution = true" initialResolutionByFraction = cms.bool(True) worsenResolution = cms.double(1.5) worsenResolutionByFactor = cms.bool(True) }

Remarks:

  • Due to the inclusion of the default initial resolutions, these modules are limited to Objects for the moment.
  • The smearing takes care, that final resolutions do not become smaller than initial resolutions. E.g. if (worsenResolution=0.6 && worsenResolutionByFactor=true) is set, it is assumed that the final resolution should be 40% worse than the initial resolution. So, 'worsenResolution' is set to 1.4 internally. (Analogously for (worsenResolution<0. && worsenResolutionByFactor=false).)
  • To switch off energy shifting, use (shiftFactor=1.).
  • To switch off energy smearing, use (worsenResolution=0. && worsenResolutionByFactor=false) or (worsenResolution=1. && worsenResolutionByFactor=true).
  • In the standard sequence at the bottom of this file, Taus are commented.
  • (fixMass=true) isn't reliable so far :-( The input provided by class Particle is not yet understood (Negative mass for positive mass^2 in contradiction to ROOT::TLorentzVector).

Contact: volker.adler@cern.ch initialize random number generator

Definition at line 91 of file objectEnergyScale_cfi.py.

Initial value:
00001 cms.EDFilter("ElectronEnergyScale",
00002  scaledObject                = cms.InputTag("selectedPatElectrons"),
00003  fixMass                     = cms.bool(False),
00004  shiftFactor                 = cms.double(1.),
00005  useDefaultInitialResolution = cms.bool(True),
00006  initialResolution           = cms.double(0.),
00007  initialResolutionByFraction = cms.bool(True),
00008  worsenResolution            = cms.double(1.),
00009  worsenResolutionByFactor    = cms.bool(True),
00010 )

Electrons.

Definition at line 119 of file objectEnergyScale_cfi.py.

Initial value:
00001 cms.EDFilter("JetEnergyScale",
00002  scaledObject                = cms.InputTag("selectedPatJets"),
00003  fixMass                     = cms.bool(False),
00004  shiftFactor                 = cms.double(1.),
00005  useDefaultInitialResolution = cms.bool(True),
00006  initialResolution           = cms.double(0.),
00007  initialResolutionByFraction = cms.bool(True),
00008  worsenResolution            = cms.double(1.),
00009  worsenResolutionByFactor    = cms.bool(True),
00010 )

Jets.

Definition at line 155 of file objectEnergyScale_cfi.py.

Initial value:
00001 cms.EDFilter("METEnergyScale",
00002  scaledObject                = cms.InputTag("selectedPatMETs"),
00003  fixMass                     = cms.bool(False),
00004  shiftFactor                 = cms.double(1.),
00005  useDefaultInitialResolution = cms.bool(True),
00006  initialResolution           = cms.double(0.),
00007  initialResolutionByFraction = cms.bool(True),
00008  worsenResolution            = cms.double(1.),
00009  worsenResolutionByFactor    = cms.bool(True),
00010 )

METs.

Definition at line 167 of file objectEnergyScale_cfi.py.

Initial value:
00001 cms.EDFilter("MuonEnergyScale",
00002  scaledObject                = cms.InputTag("selectedPatMuons"),
00003  fixMass                     = cms.bool(False),
00004  shiftFactor                 = cms.double(1.),
00005  useDefaultInitialResolution = cms.bool(True),
00006  initialResolution           = cms.double(0.),
00007  initialResolutionByFraction = cms.bool(True),
00008  worsenResolution            = cms.double(1.),
00009  worsenResolutionByFactor    = cms.bool(True),
00010 )

Muons.

Definition at line 131 of file objectEnergyScale_cfi.py.

Initial value:
00001 cms.Sequence(
00002     scaledElectrons + 
00003     scaledMuons + 
00004     scaledJets + 
00005 #   scaledTaus +
00006     scaledMETs
00007 )

Standard sequence for all Objects.

Definition at line 179 of file objectEnergyScale_cfi.py.

Initial value:
00001 cms.EDFilter("TauEnergyScale",
00002  scaledObject                = cms.InputTag("selectedPatTaus"),
00003  fixMass                     = cms.bool(False),
00004  shiftFactor                 = cms.double(1.),
00005  useDefaultInitialResolution = cms.bool(True),
00006  initialResolution           = cms.double(0.),
00007  initialResolutionByFraction = cms.bool(True),
00008  worsenResolution            = cms.double(1.),
00009  worsenResolutionByFactor    = cms.bool(True),
00010 )

Taus.

Definition at line 143 of file objectEnergyScale_cfi.py.