test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
customiseReEmulateCaloLayer2.py
Go to the documentation of this file.
1 
2 import FWCore.ParameterSet.Config as cms
3 
4 def reEmulateLayer2(process):
5 
6  process.load('L1Trigger/L1TCalorimeter/simCaloStage2Digis_cfi')
7  process.load('L1Trigger.L1TCalorimeter.caloStage2Params_2016_v3_3_cfi')
8 
9  process.simCaloStage2Digis.towerToken = cms.InputTag("caloStage2Digis", "CaloTower")
10 
11  process.caloLayer2 = cms.Path(process.simCaloStage2Digis)
12 
13  process.schedule.append(process.caloLayer2)
14 
15  return process
16 
17 
18 def hwEmulCompHistos(process):
19 
20  # histograms
21  process.load('L1Trigger.L1TCalorimeter.l1tStage2CaloAnalyzer_cfi')
22  process.l1tStage2CaloAnalyzer.doEvtDisp = False
23  process.l1tStage2CaloAnalyzer.mpBx = 0
24  process.l1tStage2CaloAnalyzer.dmxBx = 0
25  process.l1tStage2CaloAnalyzer.allBx = False
26  process.l1tStage2CaloAnalyzer.towerToken = cms.InputTag("simCaloStage2Digis", "MP")
27  process.l1tStage2CaloAnalyzer.clusterToken = cms.InputTag("None")
28  process.l1tStage2CaloAnalyzer.mpEGToken = cms.InputTag("simCaloStage2Digis", "MP")
29  process.l1tStage2CaloAnalyzer.mpTauToken = cms.InputTag("simCaloStage2Digis", "MP")
30  process.l1tStage2CaloAnalyzer.mpJetToken = cms.InputTag("simCaloStage2Digis", "MP")
31  process.l1tStage2CaloAnalyzer.mpEtSumToken = cms.InputTag("simCaloStage2Digis", "MP")
32  process.l1tStage2CaloAnalyzer.egToken = cms.InputTag("simCaloStage2Digis")
33  process.l1tStage2CaloAnalyzer.tauToken = cms.InputTag("simCaloStage2Digis")
34  process.l1tStage2CaloAnalyzer.jetToken = cms.InputTag("simCaloStage2Digis")
35  process.l1tStage2CaloAnalyzer.etSumToken = cms.InputTag("simCaloStage2Digis")
36 
37  import L1Trigger.L1TCalorimeter.l1tStage2CaloAnalyzer_cfi
38  process.l1tCaloStage2HwHistos = L1Trigger.L1TCalorimeter.l1tStage2CaloAnalyzer_cfi.l1tStage2CaloAnalyzer.clone()
39  process.l1tCaloStage2HwHistos.doEvtDisp = False
40  process.l1tCaloStage2HwHistos.mpBx = 0
41  process.l1tCaloStage2HwHistos.dmxBx = 0
42  process.l1tCaloStage2HwHistos.allBx = False
43  process.l1tCaloStage2HwHistos.towerToken = cms.InputTag("caloStage2Digis", "CaloTower")
44  process.l1tCaloStage2HwHistos.clusterToken = cms.InputTag("None")
45  process.l1tCaloStage2HwHistos.mpEGToken = cms.InputTag("caloStage2Digis", "MP")
46  process.l1tCaloStage2HwHistos.mpTauToken = cms.InputTag("caloStage2Digis","MP")
47  process.l1tCaloStage2HwHistos.mpJetToken = cms.InputTag("caloStage2Digis", "MP")
48  process.l1tCaloStage2HwHistos.mpEtSumToken = cms.InputTag("caloStage2Digis", "MP")
49  process.l1tCaloStage2HwHistos.egToken = cms.InputTag("caloStage2Digis", "EGamma")
50  process.l1tCaloStage2HwHistos.tauToken = cms.InputTag("caloStage2Digis", "Tau")
51  process.l1tCaloStage2HwHistos.jetToken = cms.InputTag("caloStage2Digis", "Jet")
52  process.l1tCaloStage2HwHistos.etSumToken = cms.InputTag("caloStage2Digis", "EtSum")
53 
54  process.hwEmulHistos = cms.Path(
55  process.l1tStage2CaloAnalyzer
56  +process.l1tCaloStage2HwHistos
57  )
58 
59  process.schedule.append(process.hwEmulHistos)
60 
61  return process
62 
63 
65 
66  process.load('EventFilter.L1TRawToDigi.caloTowersFilter_cfi')
67 
68  reEmulateLayer2(process)
69  hwEmulCompHistos(process)
70 
71  process.l1ntupleraw.insert(0,process.caloTowersFilter)
72  #process.l1ntuplesim.insert(0,process.caloTowersFilter)
73  process.caloLayer2.insert(0,process.caloTowersFilter)
74  process.hwEmulHistos.insert(0,process.caloTowersFilter)
75 
76  return process
77