CMS 3D CMS Logo

EgammaValidationAutoConf_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 class dummy:
4  pass
5 
6 samples=dummy()
7 
8 
11 
12 samples.names = ['Wenu',
13  'Zee',
14  'TripleEle',
15  'GammaJet',
16  'DiGamma']
17 samples.pdgid = [ 11,
18  11,
19  11,
20  22,
21  22]
22 samples.num = [1,
23  2,
24  3,
25  1,
26  2]
27 
28 
31 
32 genp = cms.EDFilter("CandViewSelector",
33  src = cms.InputTag("genParticles"),
34  cut = cms.string("isPromptFinalState() & abs(pdgId) = 11") # replaced in loop
35 )
36 
37 fiducial = cms.EDFilter("EtaPtMinCandViewSelector",
38  src = cms.InputTag("genp"),
39  etaMin = cms.double(-2.5), # to be replaced in loop ?
40  etaMax = cms.double(2.5), # to be replaced in loop ?
41  ptMin = cms.double(2.0) # to be replaced in loop ?
42 )
43 
44 
47 
48 tmp = cms.SequencePlaceholder("tmp")
49 egammaSelectors = 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  # clone genparticles and select correct type
55  genpartname = "genpart"+samples.names[samplenum]
56  globals()[genpartname] = genp.clone()
57  setattr(globals()[genpartname],"cut",cms.string("isPromptFinalState() & abs(pdgId) = "+str(samples.pdgid[samplenum])) ) # set pdgId
58  egammaSelectors *= globals()[genpartname] # add to sequence
59 
60  # clone generator fiducial region
61  fiducialname = "fiducial"+samples.names[samplenum]
62  globals()[fiducialname] = fiducial.clone()
63  setattr(globals()[fiducialname],"src",cms.InputTag(genpartname) ) # set input collection
64  egammaSelectors *= globals()[fiducialname] # add to sequence
65 
66 egammaSelectors.remove(tmp) # remove the initial dummy
67 
68 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
69 emdqm = DQMEDAnalyzer('EmDQM',
70  #processname = cms.string("HLT"), # can be obtained from triggerobject
71  autoConfMode = cms.untracked.bool(True),
72  triggerobject = cms.InputTag("hltTriggerSummaryRAW","","HLT"),
73  genEtaAcc = cms.double(2.5),
74  genEtAcc = cms.double(2.0),
75  PtMax = cms.untracked.double(100.0),
76  isData = cms.bool(False),
77  verbosity = cms.untracked.uint32(0),
78  mcMatchedOnly = cms.untracked.bool(True),
79  noPhiPlots = cms.untracked.bool(True),
80  noIsolationPlots = cms.untracked.bool(True)
81  )
82 
83 # selectors go into separate "prevalidation" sequence
84 egammaValidationSequence = cms.Sequence(emdqm)
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
str
#define str(s)
Definition: TestProcessor.cc:52
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
EgammaValidationAutoConf_cff.dummy
Definition: EgammaValidationAutoConf_cff.py:3