CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
genvalidTools Namespace Reference

Functions

def switchGenSource
 
def switchGenSourceForValidation
 
def useExternalWeight
 
def useExternalWeightForValidation
 

Function Documentation

def genvalidTools.switchGenSource (   process,
  analyzerName,
  source 
)

Definition at line 27 of file genvalidTools.py.

Referenced by switchGenSourceForValidation().

27 
28 def switchGenSource(process, analyzerName, source):
29  analyzer = getattr(process,analyzerName)
30  if analyzer != None:
31  print "Changing inputSource in "+analyzerName
32  analyzer.hepmcCollection = source
33  setattr(process, analyzerName, analyzer)
34 
#function to switch to an alternative gen source (default is "generator") for all analyzers in the validation chain
def genvalidTools.switchGenSourceForValidation (   process,
  source 
)

Definition at line 35 of file genvalidTools.py.

References switchGenSource().

35 
36 def switchGenSourceForValidation(process, source):
37  process.genParticles.src = 'lhe2HepMCConverter'
38  switchGenSource(process, "basicGenParticleValidation", source)
39  switchGenSource(process, "mbueAndqcdValidation", source)
40  switchGenSource(process, "basicHepMCValidation", source)
41  switchGenSource(process, "drellYanEleValidation", source)
42  switchGenSource(process, "drellYanMuoValidation", source)
43  switchGenSource(process, "wMinusEleValidation", source)
44  switchGenSource(process, "wPlusEleValidation", source)
45  switchGenSource(process, "wMinusMuoValidation", source)
46  switchGenSource(process, "wPlusMuoValidation", source)
47  switchGenSource(process, "tauValidation", source)
48  switchGenSource(process, "duplicationChecker", source)
def switchGenSourceForValidation
def genvalidTools.useExternalWeight (   process,
  analyzerName,
  vWeightProducerTags 
)

Definition at line 4 of file genvalidTools.py.

Referenced by useExternalWeightForValidation().

4 
5 def useExternalWeight(process, analyzerName, vWeightProducerTags):
6  analyzer = getattr(process,analyzerName)
7  if analyzer != None:
8  print "Changing weight in "+analyzerName
9  analyzer.UseWeightFromHepMC = cms.bool(False)
10  analyzer.genEventInfos = vWeightProducerTags
11  setattr(process, analyzerName, analyzer)
12 
#function to switch to an external weight producer for all analyzers in the validation chain
def useExternalWeight
Definition: genvalidTools.py:4
def genvalidTools.useExternalWeightForValidation (   process,
  vWeightProducerTags 
)

Definition at line 13 of file genvalidTools.py.

References useExternalWeight().

13 
14 def useExternalWeightForValidation(process, vWeightProducerTags):
15  useExternalWeight(process, "basicGenParticleValidation", vWeightProducerTags)
16  useExternalWeight(process, "mbueAndqcdValidation", vWeightProducerTags)
17  useExternalWeight(process, "basicHepMCValidation", vWeightProducerTags)
18  useExternalWeight(process, "drellYanEleValidation", vWeightProducerTags)
19  useExternalWeight(process, "drellYanMuoValidation", vWeightProducerTags)
20  useExternalWeight(process, "wMinusEleValidation", vWeightProducerTags)
21  useExternalWeight(process, "wPlusEleValidation", vWeightProducerTags)
22  useExternalWeight(process, "wMinusMuoValidation", vWeightProducerTags)
23  useExternalWeight(process, "wPlusMuoValidation", vWeightProducerTags)
24  useExternalWeight(process, "tauValidation", vWeightProducerTags)
25  useExternalWeight(process, "duplicationChecker", vWeightProducerTags)
26 
#function to switch to an alternative gen source (default is "generator") for an analyzer in the validation chain
def useExternalWeight
Definition: genvalidTools.py:4
def useExternalWeightForValidation