CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
Jet.Jet Class Reference

https://twiki.cern.ch/twiki/bin/viewauth/CMS/BtagRecommendation74X50ns More...

Inheritance diagram for Jet.Jet:

Public Member Functions

def __init__ (self, args, kwargs)
 
def btag (self, name)
 
def btagWP (self, name)
 
def chargedEmEnergyFraction (self)
 
def chargedHadronEnergyFraction (self)
 
def chargedMuEnergyFraction (self)
 
def computeQGvars (self)
 
def corrFactor (self)
 
def electronEnergyFraction (self)
 
def HFEMEnergyFraction (self)
 
def HFHadronEnergyFraction (self)
 
def hoEnergyFraction (self)
 
def jetID (self, name="")
 
def l1corrFactor (self)
 
def leadingTrack (self)
 
def leadTrackPt (self)
 
def looseJetId (self)
 
def muonEnergyFraction (self)
 
def neutralEmEnergyFraction (self)
 
def neutralHadronEnergyFraction (self)
 
def photonEnergyFraction (self)
 
def puJetId (self, label="pileupJetId:fullDiscriminant")
 
def puMva (self, label="pileupJetId:fullDiscriminant")
 
def qgl (self)
 
def rawEnergy (self)
 
def rawFactor (self)
 
def setCorrP4 (self, newP4)
 
def setRawFactor (self, factor)
 

Public Attributes

 hasQGvars
 
 qgl_value
 

Private Member Functions

def _physObjInit (self)
 

Private Attributes

 _leadingTrack
 
 _leadingTrackSearched
 
 _rawFactorMultiplier
 
 _recalibrated
 

Detailed Description

https://twiki.cern.ch/twiki/bin/viewauth/CMS/BtagRecommendation74X50ns

https://twiki.cern.ch/twiki/bin/viewauth/CMS/BtagRecommendation80X

Definition at line 45 of file Jet.py.

Constructor & Destructor Documentation

def Jet.Jet.__init__ (   self,
  args,
  kwargs 
)

Definition at line 46 of file Jet.py.

References Electron.Electron._physObjInit(), and Jet.Jet._physObjInit().

46  def __init__(self, *args, **kwargs):
47  super(Jet, self).__init__(*args, **kwargs)
48  self._physObjInit()
49 
def _physObjInit(self)
Definition: Jet.py:50
def __init__(self, args, kwargs)
Definition: Jet.py:46

Member Function Documentation

def Jet.Jet._physObjInit (   self)
private

Definition at line 50 of file Jet.py.

Referenced by Photon.Photon.__init__(), and Jet.Jet.__init__().

50  def _physObjInit(self):
52  self._recalibrated = False
53  self._leadingTrack = None
54  self._leadingTrackSearched = False
55 
def _physObjInit(self)
Definition: Jet.py:50
_leadingTrack
Definition: Jet.py:53
_recalibrated
Definition: Jet.py:52
_rawFactorMultiplier
Definition: Jet.py:51
_leadingTrackSearched
Definition: Jet.py:54
def Jet.Jet.btag (   self,
  name 
)

Definition at line 182 of file Jet.py.

References pat::Jet.bDiscriminator().

Referenced by Jet.Jet.btagWP().

182  def btag(self,name):
183  ret = self.bDiscriminator(name)
184  if ret == -1000 and name.startswith("pf"):
185  ret = self.bDiscriminator(name[2].lower()+name[3:])
186  return ret
187 
def btag(self, name)
Definition: Jet.py:182
def Jet.Jet.btagWP (   self,
  name 
)

Definition at line 188 of file Jet.py.

References BTagWeightCalculator.BTagWeightCalculator.btag, and Jet.Jet.btag().

188  def btagWP(self,name):
189  global _btagWPs
190  (disc,val) = _btagWPs[name]
191  return self.btag(disc) > val
192 
def btag(self, name)
Definition: Jet.py:182
def btagWP(self, name)
Definition: Jet.py:188
def Jet.Jet.chargedEmEnergyFraction (   self)
def Jet.Jet.chargedHadronEnergyFraction (   self)
def Jet.Jet.chargedMuEnergyFraction (   self)

Definition at line 68 of file Jet.py.

References reco::PFJet.chargedMuEnergy(), JetTester.chargedMuEnergy, pat::Jet.chargedMuEnergy(), SuperClusterHelper.rawEnergy(), reco::SuperCluster.rawEnergy(), Jet.Jet.rawEnergy(), and PhotonFix.rawEnergy().

69  return self.chargedMuEnergy()/self.rawEnergy()
70 
def chargedMuEnergyFraction(self)
Definition: Jet.py:68
def rawEnergy(self)
Definition: Jet.py:56
def Jet.Jet.computeQGvars (   self)

Definition at line 218 of file Jet.py.

Referenced by Jet.Jet.qgl().

218  def computeQGvars(self):
219  #return immediately if qgvars already computed or if qgl is disabled
220  if not hasattr(self,"qgl_rho") or getattr(self,"hasQGVvars",False) :
221  return self
222  self.hasQGvars = True
223 
224  jet = self
225  jet.mult = 0
226  sum_weight = 0.
227  sum_pt = 0.
228  sum_deta = 0.
229  sum_dphi = 0.
230  sum_deta2 = 0.
231  sum_detadphi = 0.
232  sum_dphi2 = 0.
233 
234 
235 
236  for ii in range(0, jet.numberOfDaughters()) :
237 
238  part = jet.daughter(ii)
239 
240  if part.charge() == 0 : # neutral particles
241 
242  if part.pt() < 1.: continue
243 
244  else : # charged particles
245 
246  if part.trackHighPurity()==False: continue
247  if part.fromPV()<=1: continue
248 
249 
250  jet.mult += 1
251 
252  deta = part.eta() - jet.eta()
253  dphi = deltaPhi(part.phi(), jet.phi())
254  partPt = part.pt()
255  weight = partPt*partPt
256  sum_weight += weight
257  sum_pt += partPt
258  sum_deta += deta*weight
259  sum_dphi += dphi*weight
260  sum_deta2 += deta*deta*weight
261  sum_detadphi += deta*dphi*weight
262  sum_dphi2 += dphi*dphi*weight
263 
264 
265 
266 
267  a = 0.
268  b = 0.
269  c = 0.
270 
271  if sum_weight > 0 :
272  jet.ptd = math.sqrt(sum_weight)/sum_pt
273  ave_deta = sum_deta/sum_weight
274  ave_dphi = sum_dphi/sum_weight
275  ave_deta2 = sum_deta2/sum_weight
276  ave_dphi2 = sum_dphi2/sum_weight
277  a = ave_deta2 - ave_deta*ave_deta
278  b = ave_dphi2 - ave_dphi*ave_dphi
279  c = -(sum_detadphi/sum_weight - ave_deta*ave_dphi)
280  else: jet.ptd = 0.
281 
282  delta = math.sqrt(math.fabs((a-b)*(a-b)+4.*c*c))
283 
284  if a+b-delta > 0: jet.axis2 = -math.log(math.sqrt(0.5*(a+b-delta)))
285  else: jet.axis2 = -1.
286  return jet
287 
288 
289 
def computeQGvars(self)
Definition: Jet.py:218
hasQGvars
Definition: Jet.py:222
def Jet.Jet.corrFactor (   self)

Definition at line 162 of file Jet.py.

References Jet.Jet.rawFactor().

162  def corrFactor(self):
163  return 1.0/self.rawFactor()
164 
def rawFactor(self)
Definition: Jet.py:156
def corrFactor(self)
Definition: Jet.py:162
def Jet.Jet.electronEnergyFraction (   self)
def Jet.Jet.HFEMEnergyFraction (   self)
def Jet.Jet.HFHadronEnergyFraction (   self)
def Jet.Jet.hoEnergyFraction (   self)

Definition at line 93 of file Jet.py.

References TrackDetMatchInfo.hoEnergy(), reco::PFJet.hoEnergy(), reco::PFCandidate.hoEnergy(), pat::Jet.hoEnergy(), SuperClusterHelper.rawEnergy(), reco::SuperCluster.rawEnergy(), Jet.Jet.rawEnergy(), and PhotonFix.rawEnergy().

93  def hoEnergyFraction(self):
94  return self.hoEnergy()/self.rawEnergy()
95 
96 
97 
def hoEnergyFraction(self)
Definition: Jet.py:93
def rawEnergy(self)
Definition: Jet.py:56
def Jet.Jet.jetID (   self,
  name = "" 
)

Definition at line 98 of file Jet.py.

References funct.abs(), reco::JPTJet.chargedEmEnergy(), reco::PFJet.chargedEmEnergy(), JetTester.chargedEmEnergy, pat::Jet.chargedEmEnergy(), ScoutingPFJet.chargedHadronEnergy(), reco::JPTJet.chargedHadronEnergy(), reco::PFJet.chargedHadronEnergy(), JetTester.chargedHadronEnergy, pat::Jet.chargedHadronEnergy(), ScoutingPFJet.chargedHadronMultiplicity(), reco::PFJet.chargedHadronMultiplicity(), JetTester.chargedHadronMultiplicity, pat::Jet.chargedHadronMultiplicity(), reco::JPTJet.chargedMultiplicity(), reco::PFJet.chargedMultiplicity(), JetTester.chargedMultiplicity, pat::Jet.chargedMultiplicity(), eetest::CandForTest.eta(), btagbtvdeep::JetFeatures.eta, res::HelperElectron.eta(), res::HelperMuon.eta(), PuppiCandidate.eta(), res::HelperJet.eta(), dnn_inputs_2017v1.eta, omtf::DtDataWord64.eta(), omtf::MuonDataWord64.eta(), muonisolation::NominalEfficiencyThresholds::ThresholdLocation.eta, MSLayersKeeperX0AtEta.eta(), RecoObj.eta, HcalCellType::HcalCell.eta, res::HelperMET.eta(), ScoutingParticle.eta(), SimG4HcalHitCluster.eta(), SuperClusterHelper.eta(), jetData.eta, ScoutingPhoton.eta(), l1t::EMTFPtLUT.eta, Residual1DHit.eta, CaloHit.eta(), ScoutingElectron.eta(), DDHCalTBZposAlgo.eta, DDHCalTestBeamAlgo.eta, MySimTrack.eta, MatchStruct.eta, HcalChannelId.eta, BenchmarkTreeEntry.eta, PtEtaPhiMass.eta(), HcalDDDRecConstants::HcalID.eta, HcalHardcodeGeometryLoader::HBHOCellParameters.eta, L1Analysis::L1AnalysisRecoClusterDataFormat.eta, ScoutingCaloJet.eta(), ImpactPoint.eta, learn_.eta, L2TauPixelTrackMatch::TinyTrack.eta, EnergyResolutionVsLumi::DegradationAtEta.eta, reco::isodeposit::Direction.eta(), HEChannel.eta, ScoutingPFJet.eta(), egHLT::BinData.eta, ScoutingMuon.eta(), TrackerValidationVariables::AVHitStruct.eta, ShallowClustersProducer::NearDigis.eta(), ResonanceBuilder.Resonance.eta(), LMapRow.eta, ElectronMVAEstimator.eta, DTMuonLocalAlignment.eta, HcalTestHistoClass::Hit.eta, L1Analysis::L1AnalysisL1CaloClusterDataFormat.eta, ZMuMuIsolationAnalyzer.eta, HcalDDDRecConstants::HcalActiveLength.eta, L1Analysis::L1AnalysisRecoTauDataFormat.eta, PatTrackAnalyzer::Plots.eta, BeamProfileVtxGenerator.eta(), PHcalTB04Info.eta(), HcalHardcodeGeometryLoader::HECellParameters.eta, MaterialBudgetCastorHistos.eta, L1Analysis::L1AnalysisRecoElectronDataFormat.eta, QcdLowPtDQM::Pixel.eta(), PHcalTB06Info::Hit.eta, StripCPEgeometric::WrappedCluster.eta(), GloballyPositioned< float >.eta(), GloballyPositioned< align::Scalar >.eta(), RotationType.eta(), GloballyPositioned< T >.eta(), L1Analysis::L1AnalysisL1CaloTowerDataFormat.eta, IdealObliquePrism.eta(), L1Analysis::L1AnalysisRecoMuon2DataFormat.eta, RhoEtaPhi.eta(), IdealZPrism.eta(), jpt::Map.eta(), PGlobalSimHit::CalHit.eta, OnePiRange< T >.eta(), Geom::OnePiRange< T >.eta(), MaterialBudget.eta, HLTJetsCleanedFromLeadingLeptons< JetType >::EtaPhiE.eta(), L1MuGMTEtaLUT.eta(), FWPFCandidateDetailView.eta(), JetCalibrationParameterSetTauJet.eta(), HGCalRecHitValidation::HitsInfo.eta, trigger::TriggerObject.eta(), MaterialBudgetForward.eta, cms::MinBias.eta, TauL1TPair.eta(), IsolatedPixelTrackCandidateProducer::seedAtEC.eta, reco::GhostTrackPrediction.eta(), TrackerValidationVariables::AVTrackStruct.eta, PGlobalSimHit::FwdHit.eta, HcalTB02HistoClass.eta(), MaterialBudgetHcalHistos.eta, reco::PattRecoPeak< double >.eta(), reco::PattRecoPeak< float >.eta(), PattRecoPeak< Real >.eta(), reco::PattRecoPeak< Real >.eta(), goodseedhelpers::HeavyObjectCache.eta, IsolatedPixelTrackCandidateL1TProducer::seedAtEC.eta, HcalHardcodeGeometryLoader::HFCellParameters.eta, reco::CaloMuon.eta(), SoftElectronMVAEstimator.eta, SimpleL1MuGMTCand.eta(), PFECALSuperClusterAlgo::CalibratedPFCluster.eta(), PHcalTB06Info.eta(), PdtPdgMini.eta, HTrackVariables.eta(), HcalFlexiHardcodeGeometryLoader::HFCellParameters.eta, CSCSP_SPblock.eta(), MuScleFitMuon.eta(), EleRelPoint.eta(), XMLProcessor::_LMapRowHBEF.eta, ValidationMisalignedTracker.eta, reco::CastorCell.eta(), PhotonFix.eta(), HGCalSimHitValidation::hitsinfo.eta, L1MuDTEtaPattern.eta(), LMapDetId.eta, PatPhotonSimpleAnalyzer::struct_recPhoton.eta, PGlobalSimHit::BrlHit.eta, PhotonIDSimpleAnalyzer::struct_recPhoton.eta, reco::IsoDeposit.eta(), reco::CastorEgamma.eta(), reco::CastorJet.eta(), QcdLowPtDQM::Tracklet.eta(), Point3DBase< U, LocalTag >.eta(), Point3DBase< U, Frame >.eta(), Vector3DBase< U, GlobalTag >.eta(), PV3DBase< float, VectorTag, GlobalTag >.eta(), Vector3DBase< double, LocalTag >.eta(), PV3DBase< float, VectorTag, LocalTag >.eta(), PV3DBase< float, VectorTag, MeasurementTag >.eta(), PV3DBase< T, VectorTag, FrameTag >.eta(), PV3DBase< T, PointTag, FrameTag >.eta(), Point3DBase< Scalar, LocalTag >.eta(), Point3DBase< U, GlobalTag >.eta(), Vector3DBase< U, LocalTag >.eta(), Point3DBase< U, FrameTag >.eta(), Vector3DBase< U, FrameTag >.eta(), Point3DBase< T, Frame >.eta(), Vector3DBase< T, Frame >.eta(), Vector3DBase< T, FrameTag >.eta(), PV3DBase< T, PVType, FrameType >.eta(), PV3DBase< Scalar, VectorTag, GlobalTag >.eta(), Vector3DBase< U, Frame >.eta(), L1MuDTTrack.eta(), HcalTB02Analysis.eta, MuonDTLocalMillepedeAlgorithm.eta, MuonGmtPair.eta(), BPhysicsValidation::ParticleMonitor.eta, L1MuDTEtaProcessor.eta(), L1Analysis::L1AnalysisRecoJetDataFormat.eta, L1MuBMTrack.eta(), EgammaTowerIsolationNew< NC >.eta, L1MuBMEtaProcessor.eta(), L1TDEMON.eta, reco::PreId.eta(), reco::CastorCluster.eta(), Lepton.eta, cms::Analyzer_minbias.eta, L1TdeGCT.eta, TrackStruct::TrackParameterStruct.eta, reco::Candidate.eta(), egHLT::OffPho.eta(), JetPartonNamespace::JetPartonCalibrationParameterSet.eta(), AnalyzerMinbias.eta, TrajSeedMatcher::SCHitMatch.eta(), reco::Particle.eta(), reco::ParticleState.eta(), L1GctInternJetData.eta(), egHLT::OffEle.eta(), EcalTestPulseAnalyzer.eta, EcalABAnalyzer.eta, MuonGeometryArrange::MGACollection.eta, Basic3DVector< long double >.eta(), HGCalClusterT< C >.eta(), CandidateWithRef< Ref >.eta(), reco::LeafCandidate.eta(), CompositeRefCandidateT< reco::GenParticleRefVector >.eta(), EcalPerEvtLaserAnalyzer.eta, reco::IsoDeposit::const_iterator.eta(), CosmicRateAnalyzer.eta, Basic3DVector< float > constituentCentre Basic3DVector< float >.eta(), Basic3DVector< float > pos GlobalPoint.eta(), Basic3DVector< double >.eta(), Basic3DVector< float >.eta(), Basic3DVector< align::Scalar >.eta(), Basic3DVector< Scalar >.eta(), Basic3DVector< T >.eta(), Basic3DVector< float > mom GlobalVector.eta(), Basic3DVector< U >.eta(), JetAnalyzer_HeavyIons_matching::MyJet.eta, CaloParticle.eta(), L1Analysis::L1AnalysisRecoMuonDataFormat.eta, reco::CaloCluster.eta(), SimCluster.eta(), GoodSeedProducer.eta, EcalLaserAnalyzer.eta, l1t::EMTFTrack.eta, TrackingParticle.eta(), RawParticle.eta(), EcalLaserAnalyzer2.eta, pat::PackedGenParticle.eta(), SiPixelErrorEstimation.eta, l1t::EMTFHit.eta, reco::TrackBase.eta(), pat::PackedCandidate.eta(), EcalSelectiveReadoutValidation::energiesEb_t.eta, EcalSelectiveReadoutValidation::energiesEe_t.eta, SiPixelTrackingRecHitsValid.eta, PMuonSimHit::Trk.eta, PTrackerSimHit::Trk.eta, JetAnalyzer_HeavyIons.isPFJet, pat::Jet.isPFJet(), JetTester.isPFJet, JetTester_HeavyIons.isPFJet, Jet.Jet.jetID(), JetMETHLTOfflineSource.jetID, ExoticaDQM.jetID, pat::Jet.jetID(), ScoutingPFJet.muonEnergy(), reco::PFJet.muonEnergy(), JetTester.muonEnergy, pat::Jet.muonEnergy(), reco::JPTJet.neutralEmEnergy(), reco::PFJet.neutralEmEnergy(), JetTester.neutralEmEnergy, pat::Jet.neutralEmEnergy(), ScoutingPFJet.neutralHadronEnergy(), reco::JPTJet.neutralHadronEnergy(), reco::PFJet.neutralHadronEnergy(), JetTester.neutralHadronEnergy, pat::Jet.neutralHadronEnergy(), reco::PFJet.neutralMultiplicity(), JetTester.neutralMultiplicity, pat::Jet.neutralMultiplicity(), SuperClusterHelper.rawEnergy(), reco::SuperCluster.rawEnergy(), Jet.Jet.rawEnergy(), and PhotonFix.rawEnergy().

Referenced by Jet.Jet.jetID(), and Jet.Jet.looseJetId().

98  def jetID(self,name=""):
99  if not self.isPFJet():
100  raise RuntimeError("jetID implemented only for PF Jets")
101  eta = abs(self.eta());
102  energy = self.rawEnergy();
103  chf = self.chargedHadronEnergy()/energy;
104  nhf = self.neutralHadronEnergy()/energy;
105  phf = self.neutralEmEnergy()/energy;
106  muf = self.muonEnergy()/energy;
107  elf = self.chargedEmEnergy()/energy;
108  chm = self.chargedHadronMultiplicity();
109  npr = self.chargedMultiplicity() + self.neutralMultiplicity();
110  npn = self.neutralMultiplicity();
111  #if npr != self.nConstituents():
112  # import pdb; pdb.set_trace()
113  if name == "POG_PFID":
114 
115  if self.jetID("PAG_monoID_Tight") and self.jetID("POG_PFID_Tight") : return 5;
116  if self.jetID("PAG_monoID_Loose") and self.jetID("POG_PFID_Tight") : return 4;
117  if self.jetID("POG_PFID_Tight") : return 3;
118  #elif self.jetID("POG_PFID_Medium") : return 2; commented this line because this working point doesn't exist anymore (as 12/05/15)
119  elif self.jetID("POG_PFID_Loose") : return 1;
120  else : return 0;
121 
122  # jetID from here: https://twiki.cern.ch/twiki/bin/viewauth/CMS/JetID#Recommendations_for_13_TeV_data
123  if name == "POG_PFID_Loose": return ((eta<3.0 and ((npr>1 and phf<0.99 and nhf<0.99) and (eta>2.4 or (elf<0.99 and chf>0 and chm>0)))) or (eta>3.0 and (phf<0.90 and npn>10)));
124  if name == "POG_PFID_Medium": return (npr>1 and phf<0.95 and nhf<0.95 and muf < 0.8) and (eta>2.4 or (elf<0.99 and chf>0 and chm>0));
125  if name == "POG_PFID_Tight": return ((eta<3.0 and ((npr>1 and phf<0.90 and nhf<0.90) and (eta>2.4 or (elf<0.99 and chf>0 and chm>0)))) or (eta>3.0 and (phf<0.90 and npn>10)));
126  if name == "VBFHBB_PFID_Loose": return (npr>1 and phf<0.99 and nhf<0.99);
127  if name == "VBFHBB_PFID_Medium": return (npr>1 and phf<0.99 and nhf<0.99) and ((eta<=2.4 and nhf<0.9 and phf<0.9 and elf<0.99 and muf<0.99 and chf>0 and chm>0) or eta>2.4);
128  if name == "VBFHBB_PFID_Tight": return (npr>1 and phf<0.99 and nhf<0.99) and ((eta<=2.4 and nhf<0.9 and phf<0.9 and elf<0.70 and muf<0.70 and chf>0 and chm>0) or eta>2.4);
129  if name == "PAG_monoID_Loose": return (eta<3.0 and chf>0.05 and nhf<0.7 and phf<0.8);
130  if name == "PAG_monoID_Tight": return (eta<3.0 and chf>0.2 and nhf<0.7 and phf<0.7);
131 
132  raise RuntimeError("jetID '%s' not supported" % name)
133 
def jetID(self, name="")
Definition: Jet.py:98
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def rawEnergy(self)
Definition: Jet.py:56
def Jet.Jet.l1corrFactor (   self)

Definition at line 171 of file Jet.py.

References Jet.Jet._recalibrated.

171  def l1corrFactor(self):
172  if hasattr(self, 'CorrFactor_L1'):
173  return self.CorrFactor_L1
174  if self._recalibrated:
175  raise RuntimeError("The jet was recalibrated, but without calculateSeparateCorrections. L1 is not available")
176  jecLevels = self.physObj.availableJECLevels()
177  for level in jecLevels:
178  if "L1" in level:
179  return self.physObj.jecFactor(level)/self.physObj.jecFactor('Uncorrected')
180  return 1.0 # Jet does not have any L1 correction
181 
_recalibrated
Definition: Jet.py:52
def l1corrFactor(self)
Definition: Jet.py:171
def Jet.Jet.leadingTrack (   self)

Definition at line 193 of file Jet.py.

References Jet.Jet._leadingTrack, Jet.Jet._leadingTrackSearched, reco::CompositePtrCandidate.daughterPtrVector(), pat::Jet.daughterPtrVector(), and SiStripPI.max.

Referenced by Jet.Jet.leadTrackPt().

193  def leadingTrack(self):
194  if self._leadingTrackSearched :
195  return self._leadingTrack
196  self._leadingTrackSearched = True
197  self._leadingTrack = max( self.daughterPtrVector() , key = lambda x : x.pt() if x.charge()!=0 else 0. )
198  if self._leadingTrack.charge()==0: #in case of "all neutral"
199  self._leadingTrack = None
200  return self._leadingTrack
201 
_leadingTrack
Definition: Jet.py:53
_leadingTrackSearched
Definition: Jet.py:54
def leadingTrack(self)
Definition: Jet.py:193
def Jet.Jet.leadTrackPt (   self)

Definition at line 202 of file Jet.py.

References Jet.Jet.leadingTrack().

202  def leadTrackPt(self):
203  lt=self.leadingTrack()
204  if lt :
205  return lt.pt()
206  else :
207  return 0.
def leadTrackPt(self)
Definition: Jet.py:202
def leadingTrack(self)
Definition: Jet.py:193
def Jet.Jet.looseJetId (   self)
PF Jet ID (loose operation point) [method provided for convenience only]

Definition at line 134 of file Jet.py.

References Jet.Jet.jetID(), JetMETHLTOfflineSource.jetID, ExoticaDQM.jetID, and pat::Jet.jetID().

134  def looseJetId(self):
135  '''PF Jet ID (loose operation point) [method provided for convenience only]'''
136  return self.jetID("POG_PFID_Loose")
137 
def jetID(self, name="")
Definition: Jet.py:98
def looseJetId(self)
Definition: Jet.py:134
def Jet.Jet.muonEnergyFraction (   self)
def Jet.Jet.neutralEmEnergyFraction (   self)
def Jet.Jet.neutralHadronEnergyFraction (   self)
def Jet.Jet.photonEnergyFraction (   self)
def Jet.Jet.puJetId (   self,
  label = "pileupJetId:fullDiscriminant" 
)
Full mva PU jet id

Definition at line 143 of file Jet.py.

References funct.abs(), eetest::CandForTest.eta(), btagbtvdeep::JetFeatures.eta, PuppiCandidate.eta(), res::HelperElectron.eta(), res::HelperMuon.eta(), res::HelperJet.eta(), dnn_inputs_2017v1.eta, omtf::DtDataWord64.eta(), omtf::MuonDataWord64.eta(), muonisolation::NominalEfficiencyThresholds::ThresholdLocation.eta, MSLayersKeeperX0AtEta.eta(), RecoObj.eta, HcalCellType::HcalCell.eta, res::HelperMET.eta(), SimG4HcalHitCluster.eta(), ScoutingParticle.eta(), SuperClusterHelper.eta(), jetData.eta, ScoutingPhoton.eta(), l1t::EMTFPtLUT.eta, Residual1DHit.eta, CaloHit.eta(), DDHCalTBZposAlgo.eta, DDHCalTestBeamAlgo.eta, ScoutingElectron.eta(), HcalChannelId.eta, MatchStruct.eta, MySimTrack.eta, BenchmarkTreeEntry.eta, PtEtaPhiMass.eta(), HcalHardcodeGeometryLoader::HBHOCellParameters.eta, HcalDDDRecConstants::HcalID.eta, L1Analysis::L1AnalysisRecoClusterDataFormat.eta, ScoutingCaloJet.eta(), ImpactPoint.eta, learn_.eta, L2TauPixelTrackMatch::TinyTrack.eta, EnergyResolutionVsLumi::DegradationAtEta.eta, reco::isodeposit::Direction.eta(), HEChannel.eta, ScoutingPFJet.eta(), egHLT::BinData.eta, ScoutingMuon.eta(), TrackerValidationVariables::AVHitStruct.eta, ShallowClustersProducer::NearDigis.eta(), ResonanceBuilder.Resonance.eta(), LMapRow.eta, DTMuonLocalAlignment.eta, HcalTestHistoClass::Hit.eta, ElectronMVAEstimator.eta, L1Analysis::L1AnalysisL1CaloClusterDataFormat.eta, ZMuMuIsolationAnalyzer.eta, HcalDDDRecConstants::HcalActiveLength.eta, L1Analysis::L1AnalysisRecoTauDataFormat.eta, PatTrackAnalyzer::Plots.eta, BeamProfileVtxGenerator.eta(), PHcalTB04Info.eta(), HcalHardcodeGeometryLoader::HECellParameters.eta, MaterialBudgetCastorHistos.eta, L1Analysis::L1AnalysisRecoElectronDataFormat.eta, QcdLowPtDQM::Pixel.eta(), PHcalTB06Info::Hit.eta, StripCPEgeometric::WrappedCluster.eta(), GloballyPositioned< float >.eta(), GloballyPositioned< align::Scalar >.eta(), L1Analysis::L1AnalysisL1CaloTowerDataFormat.eta, GloballyPositioned< T >.eta(), RotationType.eta(), IdealObliquePrism.eta(), L1Analysis::L1AnalysisRecoMuon2DataFormat.eta, RhoEtaPhi.eta(), IdealZPrism.eta(), jpt::Map.eta(), PGlobalSimHit::CalHit.eta, OnePiRange< T >.eta(), Geom::OnePiRange< T >.eta(), MaterialBudget.eta, HLTJetsCleanedFromLeadingLeptons< JetType >::EtaPhiE.eta(), L1MuGMTEtaLUT.eta(), FWPFCandidateDetailView.eta(), JetCalibrationParameterSetTauJet.eta(), HGCalRecHitValidation::HitsInfo.eta, trigger::TriggerObject.eta(), MaterialBudgetForward.eta, cms::MinBias.eta, TauL1TPair.eta(), IsolatedPixelTrackCandidateProducer::seedAtEC.eta, TrackerValidationVariables::AVTrackStruct.eta, reco::GhostTrackPrediction.eta(), PGlobalSimHit::FwdHit.eta, HcalTB02HistoClass.eta(), MaterialBudgetHcalHistos.eta, reco::PattRecoPeak< double >.eta(), reco::PattRecoPeak< float >.eta(), PattRecoPeak< Real >.eta(), reco::PattRecoPeak< Real >.eta(), goodseedhelpers::HeavyObjectCache.eta, IsolatedPixelTrackCandidateL1TProducer::seedAtEC.eta, HcalHardcodeGeometryLoader::HFCellParameters.eta, reco::CaloMuon.eta(), HTrackVariables.eta(), SimpleL1MuGMTCand.eta(), PFECALSuperClusterAlgo::CalibratedPFCluster.eta(), PHcalTB06Info.eta(), PdtPdgMini.eta, HcalFlexiHardcodeGeometryLoader::HFCellParameters.eta, SoftElectronMVAEstimator.eta, CSCSP_SPblock.eta(), MuScleFitMuon.eta(), XMLProcessor::_LMapRowHBEF.eta, EleRelPoint.eta(), ValidationMisalignedTracker.eta, reco::CastorCell.eta(), PhotonFix.eta(), HGCalSimHitValidation::hitsinfo.eta, L1MuDTEtaPattern.eta(), LMapDetId.eta, PGlobalSimHit::BrlHit.eta, PatPhotonSimpleAnalyzer::struct_recPhoton.eta, PhotonIDSimpleAnalyzer::struct_recPhoton.eta, reco::IsoDeposit.eta(), reco::CastorEgamma.eta(), reco::CastorJet.eta(), Point3DBase< T, Frame >.eta(), PV3DBase< T, PointTag, FrameTag >.eta(), QcdLowPtDQM::Tracklet.eta(), PV3DBase< float, VectorTag, LocalTag >.eta(), Vector3DBase< T, Frame >.eta(), Vector3DBase< U, LocalTag >.eta(), Vector3DBase< T, FrameTag >.eta(), Vector3DBase< U, GlobalTag >.eta(), PV3DBase< float, VectorTag, MeasurementTag >.eta(), PV3DBase< T, VectorTag, FrameTag >.eta(), PV3DBase< Scalar, VectorTag, GlobalTag >.eta(), PV3DBase< float, VectorTag, GlobalTag >.eta(), Vector3DBase< U, FrameTag >.eta(), Point3DBase< U, LocalTag >.eta(), Point3DBase< U, GlobalTag >.eta(), Vector3DBase< U, Frame >.eta(), Point3DBase< U, FrameTag >.eta(), Point3DBase< U, Frame >.eta(), Vector3DBase< double, LocalTag >.eta(), PV3DBase< T, PVType, FrameType >.eta(), Point3DBase< Scalar, LocalTag >.eta(), HcalTB02Analysis.eta, L1MuDTTrack.eta(), MuonDTLocalMillepedeAlgorithm.eta, BPhysicsValidation::ParticleMonitor.eta, MuonGmtPair.eta(), L1MuDTEtaProcessor.eta(), L1Analysis::L1AnalysisRecoJetDataFormat.eta, L1MuBMTrack.eta(), EgammaTowerIsolationNew< NC >.eta, L1MuBMEtaProcessor.eta(), L1TDEMON.eta, reco::PreId.eta(), reco::CastorCluster.eta(), Lepton.eta, cms::Analyzer_minbias.eta, L1TdeGCT.eta, TrackStruct::TrackParameterStruct.eta, reco::Candidate.eta(), egHLT::OffPho.eta(), JetPartonNamespace::JetPartonCalibrationParameterSet.eta(), AnalyzerMinbias.eta, TrajSeedMatcher::SCHitMatch.eta(), reco::Particle.eta(), reco::ParticleState.eta(), L1GctInternJetData.eta(), egHLT::OffEle.eta(), EcalTestPulseAnalyzer.eta, EcalABAnalyzer.eta, MuonGeometryArrange::MGACollection.eta, Basic3DVector< long double >.eta(), reco::LeafCandidate.eta(), CompositeRefCandidateT< reco::GenParticleRefVector >.eta(), CandidateWithRef< Ref >.eta(), HGCalClusterT< C >.eta(), EcalPerEvtLaserAnalyzer.eta, reco::IsoDeposit::const_iterator.eta(), CosmicRateAnalyzer.eta, Basic3DVector< float > pos GlobalPoint.eta(), Basic3DVector< float > constituentCentre Basic3DVector< float >.eta(), Basic3DVector< float > mom GlobalVector.eta(), Basic3DVector< Scalar >.eta(), Basic3DVector< align::Scalar >.eta(), Basic3DVector< U >.eta(), Basic3DVector< T >.eta(), Basic3DVector< double >.eta(), Basic3DVector< float >.eta(), JetAnalyzer_HeavyIons_matching::MyJet.eta, CaloParticle.eta(), L1Analysis::L1AnalysisRecoMuonDataFormat.eta, reco::CaloCluster.eta(), SimCluster.eta(), GoodSeedProducer.eta, EcalLaserAnalyzer.eta, TrackingParticle.eta(), l1t::EMTFTrack.eta, RawParticle.eta(), EcalLaserAnalyzer2.eta, pat::PackedGenParticle.eta(), SiPixelErrorEstimation.eta, l1t::EMTFHit.eta, reco::TrackBase.eta(), pat::PackedCandidate.eta(), EcalSelectiveReadoutValidation::energiesEb_t.eta, EcalSelectiveReadoutValidation::energiesEe_t.eta, SiPixelTrackingRecHitsValid.eta, PMuonSimHit::Trk.eta, PTrackerSimHit::Trk.eta, and Jet.Jet.puMva().

143  def puJetId(self, label="pileupJetId:fullDiscriminant"):
144  '''Full mva PU jet id'''
145 
146  puMva = self.puMva(label)
147  wp = loose_53X_WP
148  eta = abs(self.eta())
149 
150  for etamin, etamax, cut in wp:
151  if not(eta>=etamin and eta<etamax):
152  continue
153  return puMva>cut
154  return -99
155 
def puJetId(self, label="pileupJetId:fullDiscriminant")
Definition: Jet.py:143
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def puMva(self, label="pileupJetId:fullDiscriminant")
Definition: Jet.py:138
def Jet.Jet.puMva (   self,
  label = "pileupJetId:fullDiscriminant" 
)

Definition at line 138 of file Jet.py.

References pat::PATObject< ObjectType >.hasUserFloat(), pat::PATObject< reco::Jet >.hasUserFloat(), pat::PATObject< reco::CompositeCandidate >.hasUserFloat(), pat::PATObject< reco::Photon >.hasUserFloat(), pat::PATObject< reco::MET >.hasUserFloat(), pat::PATObject< reco::PFCandidate >.hasUserFloat(), pat::PATObject< reco::GsfElectron >.hasUserFloat(), pat::PATObject< reco::LeafCandidate >.hasUserFloat(), pat::PATObject< LeptonType >.hasUserFloat(), pat::PATObject< reco::BaseTau >.hasUserFloat(), pat::PATObject< reco::Muon >.hasUserFloat(), Lepton< LeptonType >.hasUserFloat(), pat::PATObject< reco::RecoCandidate >.hasUserFloat(), pat::PATObject< ObjectType >.userFloat(), pat::PATObject< reco::PFCandidate >.userFloat(), pat::PATObject< reco::BaseTau >.userFloat(), pat::PATObject< reco::MET >.userFloat(), pat::PATObject< reco::GsfElectron >.userFloat(), pat::PATObject< reco::Muon >.userFloat(), Lepton< LeptonType >.userFloat(), pat::PATObject< LeptonType >.userFloat(), pat::PATObject< reco::CompositeCandidate >.userFloat(), pat::PATObject< reco::Photon >.userFloat(), pat::PATObject< reco::LeafCandidate >.userFloat(), pat::PATObject< reco::Jet >.userFloat(), and pat::PATObject< reco::RecoCandidate >.userFloat().

Referenced by Jet.Jet.puJetId().

138  def puMva(self, label="pileupJetId:fullDiscriminant"):
139  if self.hasUserFloat(label):
140  return self.userFloat(label)
141  return -99
142 
def puMva(self, label="pileupJetId:fullDiscriminant")
Definition: Jet.py:138
def Jet.Jet.qgl (   self)

Definition at line 208 of file Jet.py.

References Jet.Jet.computeQGvars().

208  def qgl(self) :
209  if not hasattr(self,"qgl_value") :
210  if hasattr(self,"qgl_rho") : #check if qgl calculator is configured
211  self.computeQGvars()
212  self.qgl_value=self.qgl_calc(self,self.qgl_rho)
213  else :
214  self.qgl_value=-1. #if no qgl calculator configured
215 
216  return self.qgl_value
217 
qgl_value
Definition: Jet.py:212
def computeQGvars(self)
Definition: Jet.py:218
def qgl(self)
Definition: Jet.py:208
def Jet.Jet.rawEnergy (   self)

Definition at line 56 of file Jet.py.

References btagbtvdeep::JetFeatures.energy, CaloRecHit.energy(), CommonHcalNoiseRBXData.energy(), EnergyDepositUnit.energy(), PassiveHit.energy(), EnergySegmentFP420.energy(), PCaloHit.energy(), reco::CastorEgamma.energy(), reco::CastorJet.energy(), JetMatchingTools::JetConstituent.energy, TrivialAmplitudeAlgo< C >.energy(), TrivialAmplitudeAlgo< EEDataFrame >.energy(), TrivialAmplitudeAlgo< EBDataFrame >.energy(), RecHitWithFraction.energy, reco::CastorCell.energy(), G4SimTrack.energy(), HFPreRecHit.energy(), HFQIE10Info.energy(), egHLT::BinData.energy, ResonanceBuilder.Resonance.energy(), reco::CastorCluster.energy(), FTLRecHit.energy(), Multi5x5ClusterAlgo::ProtoBasicCluster.energy(), PFMultiDepthClusterizer::ClusterLink.energy(), FillInfo.energy(), HFClusterAlgo::HFCompleteHit.energy, HGCalRecHitValidation::HitsInfo.energy, MuScleFitMuon.energy(), PFECALSuperClusterAlgo::CalibratedPFCluster.energy(), metsig::SigInputObj.energy, KinematicParameters.energy(), DigitizerUtility::EnergyDepositUnit.energy(), trigger::TriggerObject.energy(), EcalRecHit.energy(), lumi::Lumi2DB::beamData.energy, reco::Candidate.energy(), reco::PFCluster.energy(), reco::Particle.energy(), reco::ParticleState.energy(), egHLT::OffPho.energy(), CaloParticle.energy(), CandidateWithRef< Ref >.energy(), HGCalClusterT< C >.energy(), CompositeRefCandidateT< reco::GenParticleRefVector >.energy(), reco::LeafCandidate.energy(), SimCluster.energy(), reco::PFRecHit.energy(), egHLT::OffEle.energy(), reco::CaloCluster.energy(), TrackingParticle.energy(), ZdcTBAnalysis.energy, pat::PackedGenParticle.energy(), SiPixelDigitizerAlgorithm::EnergyDepositUnit.energy(), pat::PackedCandidate.energy(), and Jet.Jet.rawFactor().

Referenced by Jet.Jet.chargedEmEnergyFraction(), Jet.Jet.chargedHadronEnergyFraction(), Jet.Jet.chargedMuEnergyFraction(), Jet.Jet.electronEnergyFraction(), Jet.Jet.HFEMEnergyFraction(), Jet.Jet.HFHadronEnergyFraction(), Jet.Jet.hoEnergyFraction(), Jet.Jet.jetID(), Jet.Jet.muonEnergyFraction(), Jet.Jet.neutralEmEnergyFraction(), Jet.Jet.neutralHadronEnergyFraction(), and Jet.Jet.photonEnergyFraction().

56  def rawEnergy(self):
57  return self.energy() * self.rawFactor()
58 
def rawFactor(self)
Definition: Jet.py:156
def rawEnergy(self)
Definition: Jet.py:56
def Jet.Jet.rawFactor (   self)

Definition at line 156 of file Jet.py.

References Jet.Jet._rawFactorMultiplier, pat::Jet.jecFactor(), and pat::Tau.jecFactor().

Referenced by Jet.Jet.corrFactor(), Jet.Jet.rawEnergy(), and Jet.Jet.setCorrP4().

156  def rawFactor(self):
157  return self.jecFactor('Uncorrected') * self._rawFactorMultiplier
158 
_rawFactorMultiplier
Definition: Jet.py:51
def rawFactor(self)
Definition: Jet.py:156
def Jet.Jet.setCorrP4 (   self,
  newP4 
)

Definition at line 165 of file Jet.py.

References Jet.Jet._recalibrated, eetest::CandForTest.pt(), mypt.pt, btagbtvdeep::JetFeatures.pt, btagbtvdeep::SecondaryVertexFeatures.pt, res::HelperElectron.pt(), res::HelperMuon.pt(), res::HelperJet.pt(), dnn_inputs_2017v1.pt, reco::VoronoiBackground.pt(), RecoObj.pt, ScoutingParticle.pt(), tauImpactParameter::LorentzVectorParticle.pt, L1MuCSCPtLut.pt(), ScoutingPhoton.pt(), Residual1DHit.pt, reco::MuonMETCorrectionData.pt(), ScoutingElectron.pt(), PtHatReweightUserHook.pt, MatchStruct.pt, PtEtaPhiMass.pt(), MySimTrack.pt, ALILine.pt(), ScoutingCaloJet.pt(), L2TauPixelTrackMatch::TinyTrack.pt, TrackMultiSelector::Block.pt, ResonanceBuilder.Resonance.pt(), ScoutingPFJet.pt(), ScoutingMuon.pt(), DTMuonLocalAlignment.pt, PGlobalSimHit::Trk.pt, TtFullHadSignalSel.pt(), ElectronMVAEstimator.pt, L1Analysis::L1AnalysisRecoTauDataFormat.pt, ZMuMuIsolationAnalyzer.pt, L1Analysis::L1AnalysisRecoElectronDataFormat.pt, PatTrackAnalyzer::Plots.pt, L1Analysis::L1AnalysisRecoMuon2DataFormat.pt, PhysicsObjectsMonitor.pt, jpt::Map.pt(), SiStripLAProfileBooker.pt, reco::CaloMuon.pt(), TrackerValidationVariables::AVTrackStruct.pt, trigger::TriggerObject.pt(), ElectronMVAEstimatorRun2Phys14NonTrig::AllVariables.pt, BSTrkParameters.pt(), TauL1TPair.pt(), goodseedhelpers::HeavyObjectCache.pt, MuScleFitMuon.pt(), ElectronMVAEstimatorRun2Spring16GeneralPurpose::AllVariables.pt, SoftElectronMVAEstimator.pt, PTrajectoryStateOnDet.pt(), ValidationMisalignedTracker.pt, SimpleL1MuGMTCand.pt(), HTrackVariables.pt(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables.pt, HepLine3D.pt(), ElectronMVAEstimatorRun2Spring15NonTrig::AllVariables.pt, L1MuDTTrack.pt(), ElectronMVAEstimatorRun2Spring15Trig::AllVariables.pt, TrajectoryStateClosestToPoint.pt(), L1MuBMTrack.pt(), MuonGmtPair.pt(), MuonDTLocalMillepedeAlgorithm.pt, BPhysicsValidation::ParticleMonitor.pt, susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.pt, reco::PreId.pt(), Lepton.pt, reco::Candidate.pt(), egHLT::OffPho.pt(), reco::Particle.pt(), TrackStruct::TrackParameterStruct.pt, reco::ParticleState.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, CompositeRefCandidateT< reco::GenParticleRefVector >.pt(), reco::LeafCandidate.pt(), HGCalClusterT< C >.pt(), AlignmentMonitorMuonSystemMap1D::MyTrack.pt, CandidateWithRef< Ref >.pt(), reco::PFCluster.pt(), CosmicRateAnalyzer.pt, PtHatRapReweightUserHook.pt, CaloParticle.pt(), JetAnalyzer_HeavyIons_matching::MyJet.pt, SimCluster.pt(), L1Analysis::L1AnalysisRecoMuonDataFormat.pt, TrackingParticle.pt(), pat::MET::Vector2.pt(), GoodSeedProducer.pt, l1t::EMTFTrack.pt, pat::PackedGenParticle.pt(), reco::TrackBase.pt(), pat::PackedCandidate.pt(), PMuonSimHit::Trk.pt, PTrackerSimHit::Trk.pt, Jet.Jet.rawFactor(), reco::PUSubMETCandInfo.setP4(), reco::Candidate.setP4(), reco::Particle.setP4(), reco::ParticleState.setP4(), HGCalClusterT< C >.setP4(), CandidateWithRef< Ref >.setP4(), reco::LeafCandidate.setP4(), CompositeRefCandidateT< reco::GenParticleRefVector >.setP4(), pat::PackedGenParticle.setP4(), reco::Photon.setP4(), pat::PackedCandidate.setP4(), reco::GsfElectron.setP4(), and Jet.Jet.setRawFactor().

165  def setCorrP4(self,newP4):
166  self._recalibrated = True
167  corr = newP4.Pt() / (self.pt() * self.rawFactor())
168  self.setP4(newP4);
169  self.setRawFactor(1.0/corr);
170 
_recalibrated
Definition: Jet.py:52
def setCorrP4(self, newP4)
Definition: Jet.py:165
def rawFactor(self)
Definition: Jet.py:156
def setRawFactor(self, factor)
Definition: Jet.py:159
def Jet.Jet.setRawFactor (   self,
  factor 
)

Definition at line 159 of file Jet.py.

References Jet.Jet._rawFactorMultiplier, pat::Jet.jecFactor(), and pat::Tau.jecFactor().

Referenced by Jet.Jet.setCorrP4().

159  def setRawFactor(self, factor):
160  self._rawFactorMultiplier = factor/self.jecFactor('Uncorrected')
161 
_rawFactorMultiplier
Definition: Jet.py:51
def setRawFactor(self, factor)
Definition: Jet.py:159

Member Data Documentation

Jet.Jet._leadingTrack
private

Definition at line 53 of file Jet.py.

Referenced by Jet.Jet.leadingTrack().

Jet.Jet._leadingTrackSearched
private

Definition at line 54 of file Jet.py.

Referenced by Jet.Jet.leadingTrack().

Jet.Jet._rawFactorMultiplier
private

Definition at line 51 of file Jet.py.

Referenced by Jet.Jet.rawFactor(), and Jet.Jet.setRawFactor().

Jet.Jet._recalibrated
private

Definition at line 52 of file Jet.py.

Referenced by Jet.Jet.l1corrFactor(), and Jet.Jet.setCorrP4().

Jet.Jet.hasQGvars

Definition at line 222 of file Jet.py.

Jet.Jet.qgl_value

Definition at line 212 of file Jet.py.