CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EgammaValidationReco_cff.py
Go to the documentation of this file.
2 
3 class dummy:
4  pass
5 
6 samples=dummy()
7 paths=dummy()
8 
9 ##########################################################
10 # Define which preselections to run #
11 ##########################################################
12 
13 samples.names = ['Wenu',
14  'Zee',
15  'GammaJet',
16  'DiGamma']
17 samples.pdgid = [ 11,
18  11,
19  22,
20  22]
21 samples.num = [1,
22  2,
23  1,
24  2]
25 
26 #which triggers for which sample
27 
28 paths.Wenu = [
29  'HLT_Ele17_SW_TighterEleIdIsol_L1RDQM',
30 
31  'HLT_Ele10_LW_L1RDQM',
32  'HLT_Ele15_SW_L1RDQM',
33  'HLT_Ele10_LW_EleId_L1RDQM'
34  ]
35 
36 paths.Zee = paths.Wenu + ['HLT_DoubleEle5_SW_L1RDQM']
37 
38 paths.GammaJet = ['HLT_Photon15_TrackIso_L1R_DQM',
39  'HLT_Photon10_L1R_DQM']
40 
41 paths.DiGamma = paths.GammaJet
42 
43 
44 ##########################################################
45 # loop over samples to create modules and sequence #
46 ##########################################################
47 
48 tmp = cms.SequencePlaceholder("tmp")
49 egammaValidationSequenceReco = cms.Sequence(tmp) # no empty sequences allowed, start with dummy
50 
51 #loop over samples
52 for samplenum in range(len(samples.names)):
53 
54  # loop over triggers for each sample
55  for trig in getattr(paths,samples.names[samplenum]):
56  trigname = trig + samples.names[samplenum]
57  #import appropriate config snippet
58  filename = "HLTriggerOffline.Egamma."+trig+"_cfi"
59  trigdef =__import__( filename )
60  import sys
61  globals()[trigname] = getattr(sys.modules[filename],trig).clone() # clone imported config
62  setattr(globals()[trigname],"_TypedParameterizable__type","EmDQMReco")
63  # setattr(globals()[trigname],"cutcollection",cms.InputTag(fiducialname)) # set preselacted generator collection
64  setattr(globals()[trigname],"cutnum",cms.int32( samples.num[samplenum] )) # cut value for preselection
65  setattr(globals()[trigname],"pdgGen",cms.int32( samples.pdgid[samplenum])) #correct pdgId for MC matching
66  egammaValidationSequenceReco *= globals()[trigname] # add to sequence
67 
68 
69 egammaValidationSequenceReco.remove(tmp) # remove the initial dummy
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135