CMS 3D CMS Logo

Variables
objectEnergyScale_cfi Namespace Reference

Variables

 engineName
 
 fixMass
 
 initialResolution
 
 initialResolutionByFraction
 
 initialSeed
 
 RandomNumberGeneratorService
 Modules for shifting and smearing 4-vectors' energies of Objects. More...
 
 scaledElectrons
 Electrons. More...
 
 scaledJets
 Jets. More...
 
 scaledMETs
 METs. More...
 
 scaledMuons
 Muons. More...
 
 scaledObject
 
 scaledObjects
 Standard sequence for all Objects. More...
 
 scaledTaus
 Taus. More...
 
 shiftFactor
 
 theSource
 
 useDefaultInitialResolution
 
 worsenResolution
 
 worsenResolutionByFactor
 

Variable Documentation

objectEnergyScale_cfi.engineName
objectEnergyScale_cfi.fixMass

Definition at line 121 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.initialResolution

Definition at line 124 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.initialResolutionByFraction

Definition at line 125 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.initialSeed
objectEnergyScale_cfi.RandomNumberGeneratorService

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: volke.nosp@m.r.ad.nosp@m.ler@c.nosp@m.ern..nosp@m.ch initialize random number generator

Definition at line 91 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.scaledElectrons

Electrons.

Definition at line 92 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.scaledJets

Jets.

Definition at line 108 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.scaledMETs

METs.

Definition at line 112 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.scaledMuons

Muons.

Definition at line 96 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.scaledObject

Definition at line 120 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.scaledObjects

Standard sequence for all Objects.

Definition at line 179 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.scaledTaus

Taus.

Definition at line 104 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.shiftFactor

Definition at line 122 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.theSource

Definition at line 100 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.useDefaultInitialResolution

Definition at line 123 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.worsenResolution

Definition at line 126 of file objectEnergyScale_cfi.py.

objectEnergyScale_cfi.worsenResolutionByFactor

Definition at line 127 of file objectEnergyScale_cfi.py.