CMS 3D CMS Logo

Classes | Functions
fftjetcorrectionesproducer_cfi Namespace Reference

Classes

class  ValidFFTJetCorr
 

Functions

def configure_FFTGenericScaleCalculator (variables, factorsForTheseVariables)
 
def configure_fftjet_pooldbessource (process, sequenceTag)
 
def configure_L2L3_fftjet_esproducer (sequenceTag, tableName, tableCategory)
 
def configure_L2Res_fftjet_esproducer (sequenceTag, tableName, tableCategory)
 
def configure_L3Res_fftjet_esproducer (sequenceTag, tableName, tableCategory)
 

Function Documentation

def fftjetcorrectionesproducer_cfi.configure_FFTGenericScaleCalculator (   variables,
  factorsForTheseVariables 
)

Definition at line 209 of file fftjetcorrectionesproducer_cfi.py.

209 def configure_FFTGenericScaleCalculator(variables, factorsForTheseVariables):
210  if len(variables) == 0:
211  raise ValueError("Must have at least one variable mapped")
212  if len(variables) != len(factorsForTheseVariables):
213  raise ValueError("Incompatible length of the input arguments")
214  subclass = cms.PSet(
215  Class = cms.string("FFTGenericScaleCalculator"),
216  factors = cms.vdouble(factorsForTheseVariables),
217  eta=cms.int32(-1),
218  phi=cms.int32(-1),
219  pt=cms.int32(-1),
220  logPt=cms.int32(-1),
221  mass=cms.int32(-1),
222  logMass=cms.int32(-1),
223  energy=cms.int32(-1),
224  logEnergy=cms.int32(-1),
225  gamma=cms.int32(-1),
226  logGamma=cms.int32(-1),
227  pileup=cms.int32(-1),
228  ncells=cms.int32(-1),
229  etSum=cms.int32(-1),
230  etaWidth=cms.int32(-1),
231  phiWidth=cms.int32(-1),
232  averageWidth=cms.int32(-1),
233  widthRatio=cms.int32(-1),
234  etaPhiCorr=cms.int32(-1),
235  fuzziness=cms.int32(-1),
236  convergenceDistance=cms.int32(-1),
237  recoScale=cms.int32(-1),
238  recoScaleRatio=cms.int32(-1),
239  membershipFactor=cms.int32(-1),
240  magnitude=cms.int32(-1),
241  logMagnitude=cms.int32(-1),
242  magS1=cms.int32(-1),
243  LogMagS1=cms.int32(-1),
244  magS2=cms.int32(-1),
245  LogMagS2=cms.int32(-1),
246  driftSpeed=cms.int32(-1),
247  magSpeed=cms.int32(-1),
248  lifetime=cms.int32(-1),
249  splitTime=cms.int32(-1),
250  mergeTime=cms.int32(-1),
251  scale=cms.int32(-1),
252  logScale=cms.int32(-1),
253  nearestNeighborDistance=cms.int32(-1),
254  clusterRadius=cms.int32(-1),
255  clusterSeparation=cms.int32(-1),
256  dRFromJet=cms.int32(-1),
257  LaplacianS1=cms.int32(-1),
258  LaplacianS2=cms.int32(-1),
259  LaplacianS3=cms.int32(-1),
260  HessianS2=cms.int32(-1),
261  HessianS4=cms.int32(-1),
262  HessianS6=cms.int32(-1),
263  nConstituents=cms.int32(-1),
264  aveConstituentPt=cms.int32(-1),
265  logAveConstituentPt=cms.int32(-1),
266  constituentPtDistribution=cms.int32(-1),
267  constituentEtaPhiSpread=cms.int32(-1),
268  chargedHadronEnergyFraction=cms.int32(-1),
269  neutralHadronEnergyFraction=cms.int32(-1),
270  photonEnergyFraction=cms.int32(-1),
271  electronEnergyFraction=cms.int32(-1),
272  muonEnergyFraction=cms.int32(-1),
273  HFHadronEnergyFraction=cms.int32(-1),
274  HFEMEnergyFraction=cms.int32(-1),
275  chargedHadronMultiplicity=cms.int32(-1),
276  neutralHadronMultiplicity=cms.int32(-1),
277  photonMultiplicity=cms.int32(-1),
278  electronMultiplicity=cms.int32(-1),
279  muonMultiplicity=cms.int32(-1),
280  HFHadronMultiplicity=cms.int32(-1),
281  HFEMMultiplicity=cms.int32(-1),
282  chargedEmEnergyFraction=cms.int32(-1),
283  chargedMuEnergyFraction=cms.int32(-1),
284  neutralEmEnergyFraction=cms.int32(-1),
285  EmEnergyFraction=cms.int32(-1),
286  chargedMultiplicity=cms.int32(-1),
287  neutralMultiplicity=cms.int32(-1)
288  )
289  for i, varname in enumerate(variables):
290  setattr(subclass, varname, cms.int32(i))
291  return subclass
292 
293 #
294 # Procedure for configuring the ES source which fetches
295 # the database record. "process.CondDBCommon" should be
296 # already defined before calling this procedure.
297 #
def configure_FFTGenericScaleCalculator(variables, factorsForTheseVariables)
def fftjetcorrectionesproducer_cfi.configure_fftjet_pooldbessource (   process,
  sequenceTag 
)

Definition at line 298 of file fftjetcorrectionesproducer_cfi.py.

298 def configure_fftjet_pooldbessource(process, sequenceTag):
299  config = cms.ESSource(
300  "PoolDBESSource",
301  process.CondDBCommon,
302  toGet = cms.VPSet(cms.PSet(
303  record = cms.string(fftjet_corr_types[sequenceTag].dbRecord),
304  tag = cms.string(fftjet_corr_types[sequenceTag].dbTag),
305  ))
306  )
307  sourceName = "FFT" + sequenceTag + "DBESSource"
308  setattr(process, sourceName, config)
309  return
310 
def configure_fftjet_pooldbessource(process, sequenceTag)
def fftjetcorrectionesproducer_cfi.configure_L2L3_fftjet_esproducer (   sequenceTag,
  tableName,
  tableCategory 
)

Definition at line 105 of file fftjetcorrectionesproducer_cfi.py.

105 def configure_L2L3_fftjet_esproducer(sequenceTag, tableName, tableCategory):
106  #
107  # The ES producer name comes from the C++ plugin registration code
108  esProducer = fftjet_corr_types[sequenceTag].esProducer
109  config = cms.ESProducer(
110  esProducer,
111  sequence = cms.VPSet(
112  cms.PSet(
113  level = cms.uint32(2),
114  applyTo = cms.string("DataOrMC"),
115  adjuster = cms.PSet(
116  Class = cms.string("FFTSimpleScalingAdjuster")
117  ),
118  scalers = cms.VPSet(
119  cms.PSet(
120  Class = cms.string("auto"),
121  name = cms.string(tableName),
122  nameIsRegex = cms.bool(False),
123  category = cms.string(tableCategory),
124  categoryIsRegex = cms.bool(False)
125  )
126  )
127  )
128  ),
129  isArchiveCompressed = cms.bool(False),
130  verbose = cms.untracked.bool(False)
131  )
132  return (config, esProducer)
133 
134 #
135 # ES producer for L2 residual corrections
136 #
def configure_L2L3_fftjet_esproducer(sequenceTag, tableName, tableCategory)
def fftjetcorrectionesproducer_cfi.configure_L2Res_fftjet_esproducer (   sequenceTag,
  tableName,
  tableCategory 
)

Definition at line 137 of file fftjetcorrectionesproducer_cfi.py.

137 def configure_L2Res_fftjet_esproducer(sequenceTag, tableName, tableCategory):
138  #
139  # The ES producer name comes from the C++ plugin registration code
140  esProducer = fftjet_corr_types[sequenceTag].esProducer
141  config = cms.ESProducer(
142  esProducer,
143  sequence = cms.VPSet(
144  cms.PSet(
145  level = cms.uint32(3),
146  applyTo = cms.string("DataOnly"),
147  adjuster = cms.PSet(
148  Class = cms.string("FFTSimpleScalingAdjuster")
149  ),
150  scalers = cms.VPSet(
151  cms.PSet(
152  Class = cms.string("FFTSpecificScaleCalculator"),
153  Subclass = cms.PSet(
154  Class = cms.string("L2ResScaleCalculator"),
155  radiusFactor = cms.double(1.0)
156  ),
157  name = cms.string(tableName),
158  nameIsRegex = cms.bool(False),
159  category = cms.string(tableCategory),
160  categoryIsRegex = cms.bool(False)
161  )
162  )
163  )
164  ),
165  isArchiveCompressed = cms.bool(False),
166  verbose = cms.untracked.bool(False)
167  )
168  return (config, esProducer)
169 
170 #
171 # ES producer for L3 residual corrections
172 #
def configure_L2Res_fftjet_esproducer(sequenceTag, tableName, tableCategory)
def fftjetcorrectionesproducer_cfi.configure_L3Res_fftjet_esproducer (   sequenceTag,
  tableName,
  tableCategory 
)

Definition at line 173 of file fftjetcorrectionesproducer_cfi.py.

173 def configure_L3Res_fftjet_esproducer(sequenceTag, tableName, tableCategory):
174  #
175  # The ES producer name comes from the C++ plugin registration code
176  esProducer = fftjet_corr_types[sequenceTag].esProducer
177  config = cms.ESProducer(
178  esProducer,
179  sequence = cms.VPSet(
180  cms.PSet(
181  level = cms.uint32(4),
182  applyTo = cms.string("DataOnly"),
183  adjuster = cms.PSet(
184  Class = cms.string("FFTSimpleScalingAdjuster")
185  ),
186  scalers = cms.VPSet(
187  cms.PSet(
188  Class = cms.string("FFTSpecificScaleCalculator"),
189  Subclass = cms.PSet(
190  Class = cms.string("L2RecoScaleCalculator"),
191  radiusFactor = cms.double(1.0)
192  ),
193  name = cms.string(tableName),
194  nameIsRegex = cms.bool(False),
195  category = cms.string(tableCategory),
196  categoryIsRegex = cms.bool(False)
197  )
198  )
199  )
200  ),
201  isArchiveCompressed = cms.bool(False),
202  verbose = cms.untracked.bool(False)
203  )
204  return (config, esProducer)
205 
206 #
207 # Helper function for configuring FFTGenericScaleCalculator
208 #
def configure_L3Res_fftjet_esproducer(sequenceTag, tableName, tableCategory)