CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
customizeDeltaBetaWeights_cfi Namespace Reference

Functions

def customize
 
def customizeElectronsOnly
 
def customizeMuonsOnly
 
def customizePhotonsOnly
 

Detailed Description

Customization functions for cmsDriver to get neutral weighted isolation

Function Documentation

def customizeDeltaBetaWeights_cfi.customize (   process)
run neutral particle weighting sequence and use it for isolation of electrons, muons and photons

   syntax: --customise RecoParticleFlow/Configuration/customizeDeltaBetaWeights_cfi.customize
   It will add 2 new sequences to the RECO sequence that will produce pfWeightedPhotons and 
   pfWeightedNeutralHadrons. They are produced from pfAllPhotons and pfAllNeutralHadrons by rescaling
   pt of each particle by a weight that reflects the probability that it is from pileup. The formula is
   w = sumNPU/(sumNPU+sumPU). The sums are running over all charged particles from the PV (NPU) or from the PU.
   The function used in the sum is ln(pt(i)/deltaR(i,j)) where i is neutral particle that is being weighted and j
   is the charged particle (either PU or NPU) that is used to access 'pileupility' of a particle.

   Neutral isolation of electrons, muons and photons is calculated using the weighed collection.

Definition at line 7 of file customizeDeltaBetaWeights_cfi.py.

References tools_cfi.isoDepositReplace().

7 
8 def customize(process):
9  '''run neutral particle weighting sequence and use it for isolation of electrons, muons and photons
10 
11  syntax: --customise RecoParticleFlow/Configuration/customizeDeltaBetaWeights_cfi.customize
12  It will add 2 new sequences to the RECO sequence that will produce pfWeightedPhotons and
13  pfWeightedNeutralHadrons. They are produced from pfAllPhotons and pfAllNeutralHadrons by rescaling
14  pt of each particle by a weight that reflects the probability that it is from pileup. The formula is
15  w = sumNPU/(sumNPU+sumPU). The sums are running over all charged particles from the PV (NPU) or from the PU.
16  The function used in the sum is ln(pt(i)/deltaR(i,j)) where i is neutral particle that is being weighted and j
17  is the charged particle (either PU or NPU) that is used to access 'pileupility' of a particle.
18 
19  Neutral isolation of electrons, muons and photons is calculated using the weighed collection.
20  '''
21 
22  if hasattr(process,'pfParticleSelectionSequence'):
23  process.load("CommonTools.ParticleFlow.deltaBetaWeights_cff")
24  process.pfParticleSelectionSequence += process.pfDeltaBetaWeightingSequence
25 
26  if hasattr(process,'elPFIsoDepositNeutral'):
27  process.elPFIsoDepositNeutral=isoDepositReplace('pfElectronTranslator:pf','pfWeightedNeutralHadrons')
28 
29  if hasattr(process,'elPFIsoDepositGamma'):
30  process.elPFIsoDepositGamma=isoDepositReplace('pfElectronTranslator:pf','pfWeightedPhotons')
31 
32  if hasattr(process,'gedElPFIsoDepositNeutral'):
33  process.gedElPFIsoDepositNeutral=isoDepositReplace('gedGsfElectronsTmp','pfWeightedNeutralHadrons')
34 
35  if hasattr(process,'gedElPFIsoDepositGamma'):
36  process.gedElPFIsoDepositGamma=isoDepositReplace('gedGsfElectronsTmp','pfWeightedPhotons')
37 
38  if hasattr(process,'muPFIsoDepositNeutral'):
39  process.muPFIsoDepositNeutral=isoDepositReplace('muons1stStep','pfWeightedNeutralHadrons')
40 
41  if hasattr(process,'muPFIsoDepositGamma'):
42  process.muPFIsoDepositGamma=isoDepositReplace('muons1stStep','pfWeightedPhotons')
43 
44  if hasattr(process,'phPFIsoDepositNeutral'):
45  process.phPFIsoDepositNeutral=isoDepositReplace('pfSelectedPhotons','pfWeightedNeutralHadrons')
46 
47  if hasattr(process,'phPFIsoDepositGamma'):
48  process.phPFIsoDepositGamma.ExtractorPSet.inputCandView = cms.InputTag("pfWeightedPhotons")
49 
50  return process
51 
def isoDepositReplace
Definition: tools_cfi.py:6
def customizeDeltaBetaWeights_cfi.customizeElectronsOnly (   process)
run neutral particle weighting sequence and use it for isolation of electrons only.

syntax: --customise RecoParticleFlow/Configuration/customizeDeltaBetaWeights_cfi.customizeElectronsOnly
Same as customize, only that the weighted collections are used only for electron neutral isolation, 
while muons and photons are left untouched.

Definition at line 52 of file customizeDeltaBetaWeights_cfi.py.

References tools_cfi.isoDepositReplace().

52 
53 def customizeElectronsOnly(process):
54  '''run neutral particle weighting sequence and use it for isolation of electrons only.
55 
56  syntax: --customise RecoParticleFlow/Configuration/customizeDeltaBetaWeights_cfi.customizeElectronsOnly
57  Same as customize, only that the weighted collections are used only for electron neutral isolation,
58  while muons and photons are left untouched.
59  '''
60 
61  if hasattr(process,'pfParticleSelectionSequence'):
62  process.load("CommonTools.ParticleFlow.deltaBetaWeights_cff")
63  process.pfParticleSelectionSequence += process.pfDeltaBetaWeightingSequence
64 
65  if hasattr(process,'elPFIsoDepositNeutral'):
66  process.elPFIsoDepositNeutral=isoDepositReplace('pfElectronTranslator:pf','pfWeightedNeutralHadrons')
67 
68  if hasattr(process,'elPFIsoDepositGamma'):
69  process.elPFIsoDepositGamma=isoDepositReplace('pfElectronTranslator:pf','pfWeightedPhotons')
70 
71  if hasattr(process,'gedElPFIsoDepositNeutral'):
72  process.gedElPFIsoDepositNeutral=isoDepositReplace('gedGsfElectronsTmp','pfWeightedNeutralHadrons')
73 
74  if hasattr(process,'gedElPFIsoDepositGamma'):
75  process.gedElPFIsoDepositGamma=isoDepositReplace('gedGsfElectronsTmp','pfWeightedPhotons')
76 
77  return process
78 
def isoDepositReplace
Definition: tools_cfi.py:6
def customizeDeltaBetaWeights_cfi.customizeMuonsOnly (   process)
run neutral particle weighting sequence and use it for isolation of muonss only.

syntax: --customise RecoParticleFlow/Configuration/customizeDeltaBetaWeights_cfi.customizeMuonsOnly
Same as customize, only that the weighted collections are used only for muon neutral isolation,
while electronss and photons are left untouched.

Definition at line 79 of file customizeDeltaBetaWeights_cfi.py.

References tools_cfi.isoDepositReplace().

79 
80 def customizeMuonsOnly(process):
81  '''run neutral particle weighting sequence and use it for isolation of muonss only.
82 
83  syntax: --customise RecoParticleFlow/Configuration/customizeDeltaBetaWeights_cfi.customizeMuonsOnly
84  Same as customize, only that the weighted collections are used only for muon neutral isolation,
85  while electronss and photons are left untouched.
86  '''
87 
88  if hasattr(process,'pfParticleSelectionSequence'):
89  process.load("CommonTools.ParticleFlow.deltaBetaWeights_cff")
90  process.pfParticleSelectionSequence += process.pfDeltaBetaWeightingSequence
91 
92  if hasattr(process,'muPFIsoDepositNeutral'):
93  process.muPFIsoDepositNeutral=isoDepositReplace('muons1stStep','pfWeightedNeutralHadrons')
94 
95  if hasattr(process,'muPFIsoDepositGamma'):
96  process.muPFIsoDepositGamma=isoDepositReplace('muons1stStep','pfWeightedPhotons')
97 
98  return process
99 
def isoDepositReplace
Definition: tools_cfi.py:6
def customizeDeltaBetaWeights_cfi.customizePhotonsOnly (   process)
run neutral particle weighting sequence and use it for isolation of muons only.

syntax: --customise RecoParticleFlow/Configuration/customizeDeltaBetaWeights_cfi.customizePhotonsOnly
Same as customize, only that the weighted collections are used only for photon neutral isolation,
while electronss and muons are left untouched.

Definition at line 100 of file customizeDeltaBetaWeights_cfi.py.

References tools_cfi.isoDepositReplace().

101 def customizePhotonsOnly(process):
102  '''run neutral particle weighting sequence and use it for isolation of muons only.
103 
104  syntax: --customise RecoParticleFlow/Configuration/customizeDeltaBetaWeights_cfi.customizePhotonsOnly
105  Same as customize, only that the weighted collections are used only for photon neutral isolation,
106  while electronss and muons are left untouched.
107  '''
108 
109  if hasattr(process,'pfParticleSelectionSequence'):
110  process.load("CommonTools.ParticleFlow.deltaBetaWeights_cff")
111  process.pfParticleSelectionSequence += process.pfDeltaBetaWeightingSequence
112 
113  if hasattr(process,'phPFIsoDepositNeutral'):
114  process.phPFIsoDepositNeutral=isoDepositReplace('pfSelectedPhotons','pfWeightedNeutralHadrons')
115 
116  if hasattr(process,'phPFIsoDepositGamma'):
117  process.phPFIsoDepositGamma.ExtractorPSet.inputCandView = cms.InputTag("pfWeightedPhotons")
118 
119 
120  return process
def isoDepositReplace
Definition: tools_cfi.py:6