CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 28 of file genvalidTools.py.

References print().

Referenced by switchGenSourceForValidation().

28 
29 def switchGenSource(process, analyzerName, source):
30  analyzer = getattr(process,analyzerName)
31  if analyzer != None:
32  print("Changing inputSource in "+analyzerName)
33  analyzer.hepmcCollection = source
34  setattr(process, analyzerName, analyzer)
35 
#function to switch to an alternative gen source (default is "generator") for all analyzers in the validation chain
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def genvalidTools.switchGenSourceForValidation (   process,
  source 
)

Definition at line 36 of file genvalidTools.py.

References switchGenSource().

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

Definition at line 5 of file genvalidTools.py.

References print().

Referenced by useExternalWeightForValidation().

5 
6 def useExternalWeight(process, analyzerName, vWeightProducerTags):
7  analyzer = getattr(process,analyzerName)
8  if analyzer != None:
9  print("Changing weight in "+analyzerName)
10  analyzer.UseWeightFromHepMC = cms.bool(False)
11  analyzer.genEventInfos = vWeightProducerTags
12  setattr(process, analyzerName, analyzer)
13 
#function to switch to an external weight producer for all analyzers in the validation chain
def useExternalWeight
Definition: genvalidTools.py:5
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def genvalidTools.useExternalWeightForValidation (   process,
  vWeightProducerTags 
)

Definition at line 14 of file genvalidTools.py.

References useExternalWeight().

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