CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
customiseL1Ntuple.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import os
3 
4 ##############################################################################
5 # customisations for L1 ntuple generation
6 #
7 # Add new customisations to this file!
8 #
9 # Example usage :
10 # cmsDriver.py testNtuple -s NONE --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.customiseL1NtupleAOD --conditions=auto:run2_mc_50ns --filein='/store/relval/CMSSW_7_5_0_pre1/RelValProdTTbar_13/AODSIM/MCRUN2_74_V7-v1/00000/48159643-5EE3-E411-818F-0025905A48F0.root' -n 100
11 #
12 ##############################################################################
13 
14 def L1NtupleTFileOut(process):
15 
16  process.TFileService = cms.Service(
17  "TFileService",
18  fileName = cms.string('L1Ntuple.root')
19  )
20 
21  return process
22 
24 
25 
26 def L1NtupleAOD(process):
27 
28  L1NtupleTFileOut(process)
29  L1NtupleCustomReco(process)
30 
31  process.load('L1Trigger.L1TNtuples.L1NtupleAOD_cff')
32  process.l1ntupleaod = cms.Path(
33  process.L1NtupleAOD
34  )
35 
36  process.schedule.append(process.l1ntupleaod)
37 
38  return process
39 
40 
41 
42 def L1NtupleRAW(process):
43 
44  L1NtupleTFileOut(process)
45 
46  process.load('L1Trigger.L1TNtuples.L1NtupleRAW_cff')
47  process.l1ntupleraw = cms.Path(
48  process.L1NtupleRAW
49  )
50 
51  process.schedule.append(process.l1ntupleraw)
52 
53  # for 5 BX of candidates in L1Extra
54  if process.producers.has_key("gctDigis"):
55  process.gctDigis.numberOfGctSamplesToUnpack = cms.uint32(5)
56 
57  if process.producers.has_key("l1extraParticles"):
58  process.l1extraParticles.centralBxOnly = cms.bool(False)
59 
60  return process
61 
62 
63 
64 def L1NtupleEMU(process):
65 
66  L1NtupleTFileOut(process)
67 
68  process.load('L1Trigger.L1TNtuples.L1NtupleEMU_cff')
69  process.l1ntuplesim = cms.Path(
70  process.L1NtupleEMU
71  )
72 
73  process.schedule.append(process.l1ntuplesim)
74 
75  return process
76 
77 
78 def L1NtupleRAWEMU(process):
79 
80  L1NtupleRAW(process)
81  L1NtupleEMU(process)
82 
83  return process
84 
85 
86 def L1NtupleAODRAW(process):
87 
88  L1NtupleRAW(process)
89  L1NtupleAOD(process)
90 
91  return process
92 
93 
94 def L1NtupleAODRAWEMU(process):
95 
96  L1NtupleRAW(process)
97  L1NtupleEMU(process)
98  L1NtupleAOD(process)
99 
100  return process
101 
def L1NtupleTFileOut
customisations for L1 ntuple generation