CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
particleFlowDQM_cff Namespace Reference

Functions

def createGenJetPlots
 
def createResponsePlots
 
def make_response_plot_pset
 

Variables

string name = "genjet_pt"
 
tuple PFCandAnalyzerDQM
 
tuple pfJetAnalyzerDQM
 
tuple pfJetDQMPostProcessor
 
tuple pfPuppiJetAnalyzerDQM
 
string title = "genjet pt"
 
list vjetResponseDir
 

Function Documentation

def particleFlowDQM_cff.createGenJetPlots (   ptbins,
  etabins 
)

Definition at line 42 of file particleFlowDQM_cff.py.

References defaults_cfi.genjet_distribution_name(), and sistrip::SpyUtilities.range().

42 
43 def createGenJetPlots(ptbins, etabins):
44  plots = []
45  for ietabin in range(len(etabins)-1):
46  eta_low = etabins[ietabin]
47  eta_high = etabins[ietabin + 1]
48  plots += [
49  cms.PSet(
50  name = cms.string(genjet_distribution_name(ietabin)),
51  title = cms.string("GenJet pT ({0} <= |eta| <= {1}".format(eta_low, eta_high)),
52  ptBins = cms.vdouble(ptbins),
53  etaBinLow = cms.double(eta_low),
54  etaBinHigh = cms.double(eta_high),
55  )]
56  return plots
57 
58 #----- ----- ----- ----- ----- ----- ----- -----
59 #
60 # Config for analyzer and postprocessor
61 #
const uint16_t range(const Frame &aFrame)
def genjet_distribution_name
Definition: defaults_cfi.py:14
def particleFlowDQM_cff.createResponsePlots (   ptbins,
  etabins 
)

Definition at line 29 of file particleFlowDQM_cff.py.

References make_response_plot_pset(), sistrip::SpyUtilities.range(), and defaults_cfi.response_distribution_name().

29 
30 def createResponsePlots(ptbins, etabins):
31  response_plots = []
32  #we always use a range [ibin, ibin+1)
33  for ietabin in range(len(etabins)-1):
34  for iptbin in range(len(ptbins)-1):
35 
36  response_plots += [make_response_plot_pset(
37  response_distribution_name(iptbin, ietabin),
38  "Jet response (pT/pTgen) in {0} <= pt < {1}, {2} <= |eta| < {3}".format(ptbins[iptbin], ptbins[iptbin+1], etabins[ietabin], etabins[ietabin+1]),
39  100, 0.0, 3.0, ptbins[iptbin], ptbins[iptbin+1], etabins[ietabin], etabins[ietabin+1]
40  )]
41  return response_plots
const uint16_t range(const Frame &aFrame)
def response_distribution_name
Definition: defaults_cfi.py:9
def particleFlowDQM_cff.make_response_plot_pset (   name,
  title,
  responseNbins,
  responseLow,
  responseHigh,
  ptBinLow,
  ptBinHigh,
  etaBinLow,
  etaBinHigh 
)

Definition at line 10 of file particleFlowDQM_cff.py.

Referenced by createResponsePlots().

10 
11 def make_response_plot_pset(name, title, responseNbins, responseLow, responseHigh, ptBinLow, ptBinHigh, etaBinLow, etaBinHigh):
12  return cms.PSet(
13  name = cms.string(name),
14  title = cms.string(title),
15  responseNbins = cms.uint32(responseNbins),
16  responseLow = cms.double(responseLow),
17  responseHigh = cms.double(responseHigh),
18  ptBinLow = cms.double(ptBinLow),
19  ptBinHigh = cms.double(ptBinHigh),
20  etaBinLow = cms.double(etaBinLow),
21  etaBinHigh = cms.double(etaBinHigh),
22  )
23 
24 #Jet response is plotted in histograms which can be subdivided by pt and |eta| of the genjet.
25 #To minimize the amount of logic on the C++ side, we define all response plots here.
26 #Each plot has low and high pt and |eta| edges, the plot is filled only if the genjet
27 #is in the bin defined by the edges.
28 #It is your job here to make sure you define the bins in a non-overlapping way if
#you want to emulate a 2D map over (pT, |eta|) of 1D histograms.

Variable Documentation

string particleFlowDQM_cff.name = "genjet_pt"

Definition at line 62 of file particleFlowDQM_cff.py.

tuple particleFlowDQM_cff.PFCandAnalyzerDQM
Initial value:
1 = cms.EDProducer("PFCandidateAnalyzerDQM",
2  PFCandType = cms.InputTag("packedPFCandidates"),
3  etabins = cms.vdouble( default.etaBinsOffset ),
4  pdgKeys = cms.vuint32( default.pdgIDDict.keys() ),
5  pdgStrs = cms.vstring( default.pdgIDDict.values() )
6 )

Definition at line 101 of file particleFlowDQM_cff.py.

tuple particleFlowDQM_cff.pfJetAnalyzerDQM
Initial value:
1 = cms.EDProducer("PFJetAnalyzerDQM",
2 
3  #match these reco-jets to the gen-jets and compute jet response
4  recoJetCollection = cms.InputTag('slimmedJets'),
5  genJetCollection = cms.InputTag('slimmedGenJets'),
6  jetDeltaR = cms.double(0.2),
7 
8  # turn gen jets on or off
9  genJetsOn = cms.bool(True),
10 
11  responsePlots = cms.VPSet(createResponsePlots(ptbins, etabins)),
12  genJetPlots = cms.VPSet(createGenJetPlots(ptbins, etabins))
13 
14 )

Definition at line 64 of file particleFlowDQM_cff.py.

tuple particleFlowDQM_cff.pfJetDQMPostProcessor
Initial value:
1 = cms.EDProducer("PFJetDQMPostProcessor",
2 
3  jetResponseDir = cms.vstring( vjetResponseDir ),
4  genjetDir = cms.string( genjetDir ),
5  ptBins = cms.vdouble( ptbins ),
6  etaBins = cms.vdouble( etabins ),
7  recoPtCut = cms.double( 15. )
8 
9 )

Definition at line 89 of file particleFlowDQM_cff.py.

tuple particleFlowDQM_cff.pfPuppiJetAnalyzerDQM
Initial value:
1 = pfJetAnalyzerDQM.clone(
2  recoJetCollection = 'slimmedJetsPuppi',
3  genJetsOn = False
4 )

Definition at line 79 of file particleFlowDQM_cff.py.

string particleFlowDQM_cff.title = "genjet pt"

Definition at line 63 of file particleFlowDQM_cff.py.

list particleFlowDQM_cff.vjetResponseDir
Initial value:
1 = [jetResponseDir + "slimmedJets/JEC/",
2  jetResponseDir + "slimmedJets/noJEC/",
3  jetResponseDir + "slimmedJetsPuppi/JEC/",
4  jetResponseDir + "slimmedJetsPuppi/noJEC/"]

Definition at line 84 of file particleFlowDQM_cff.py.