CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
Jet.Jet Class Reference
Inheritance diagram for Jet.Jet:

Public Member Functions

def __init__
 
def btag
 
def btagWP
 
def computeQGvars
 
def corrFactor
 
def jetID
 
def l1corrFactor
 
def leadingTrack
 
def leadTrackPt
 
def looseJetId
 
def puJetId
 
def puMva
 
def qgl
 
def rawFactor
 
def setCorrP4
 
def setRawFactor
 

Public Attributes

 hasQGvars
 
 qgl_value
 

Private Member Functions

def _physObjInit
 

Private Attributes

 _leadingTrack
 
 _leadingTrackSearched
 
 _rawFactorMultiplier
 
 _recalibrated
 

Detailed Description

Definition at line 40 of file Jet.py.

Constructor & Destructor Documentation

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

Definition at line 41 of file Jet.py.

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

41 
42  def __init__(self, *args, **kwargs):
43  super(Jet, self).__init__(*args, **kwargs)
44  self._physObjInit()
def _physObjInit
Definition: Jet.py:45
def __init__
Definition: Jet.py:41

Member Function Documentation

def Jet.Jet._physObjInit (   self)
private

Definition at line 45 of file Jet.py.

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

45 
46  def _physObjInit(self):
48  self._recalibrated = False
49  self._leadingTrack = None
50  self._leadingTrackSearched = False
_leadingTrack
Definition: Jet.py:48
_recalibrated
Definition: Jet.py:47
def _physObjInit
Definition: Jet.py:45
_rawFactorMultiplier
Definition: Jet.py:46
_leadingTrackSearched
Definition: Jet.py:49
def Jet.Jet.btag (   self,
  name 
)

Definition at line 130 of file Jet.py.

References pat::Jet.bDiscriminator().

Referenced by Jet.Jet.btagWP().

131  def btag(self,name):
132  ret = self.bDiscriminator(name)
133  if ret == -1000 and name.startswith("pf"):
134  ret = self.bDiscriminator(name[2].lower()+name[3:])
135  return ret
def btag
Definition: Jet.py:130
def Jet.Jet.btagWP (   self,
  name 
)

Definition at line 136 of file Jet.py.

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

137  def btagWP(self,name):
138  global _btagWPs
139  (disc,val) = _btagWPs[name]
140  return self.btag(disc) > val
def btag
Definition: Jet.py:130
def btagWP
Definition: Jet.py:136
def Jet.Jet.computeQGvars (   self)

Definition at line 166 of file Jet.py.

Referenced by Jet.Jet.qgl().

167  def computeQGvars(self):
168  #return immediately if qgvars already computed or if qgl is disabled
169  if not hasattr(self,"qgl_rho") or getattr(self,"hasQGVvars",False) :
170  return self
171  self.hasQGvars = True
172 
173  jet = self
174  jet.mult = 0
175  sum_weight = 0.
176  sum_pt = 0.
177  sum_deta = 0.
178  sum_dphi = 0.
179  sum_deta2 = 0.
180  sum_detadphi = 0.
181  sum_dphi2 = 0.
182 
183 
184 
185  for ii in range(0, jet.numberOfDaughters()) :
186 
187  part = jet.daughter(ii)
188 
189  if part.charge() == 0 : # neutral particles
190 
191  if part.pt() < 1.: continue
192 
193  else : # charged particles
194 
195  if part.trackHighPurity()==False: continue
196  if part.fromPV()<=1: continue
197 
198 
199  jet.mult += 1
200 
201  deta = part.eta() - jet.eta()
202  dphi = deltaPhi(part.phi(), jet.phi())
203  partPt = part.pt()
204  weight = partPt*partPt
205  sum_weight += weight
206  sum_pt += partPt
207  sum_deta += deta*weight
208  sum_dphi += dphi*weight
209  sum_deta2 += deta*deta*weight
210  sum_detadphi += deta*dphi*weight
211  sum_dphi2 += dphi*dphi*weight
212 
213 
214 
215 
216  a = 0.
217  b = 0.
218  c = 0.
219 
220  if sum_weight > 0 :
221  jet.ptd = math.sqrt(sum_weight)/sum_pt
222  ave_deta = sum_deta/sum_weight
223  ave_dphi = sum_dphi/sum_weight
224  ave_deta2 = sum_deta2/sum_weight
225  ave_dphi2 = sum_dphi2/sum_weight
226  a = ave_deta2 - ave_deta*ave_deta
227  b = ave_dphi2 - ave_dphi*ave_dphi
228  c = -(sum_detadphi/sum_weight - ave_deta*ave_dphi)
229  else: jet.ptd = 0.
230 
231  delta = math.sqrt(math.fabs((a-b)*(a-b)+4.*c*c))
232 
233  if a+b-delta > 0: jet.axis2 = -math.log(math.sqrt(0.5*(a+b-delta)))
234  else: jet.axis2 = -1.
235  return jet
236 
237 
def computeQGvars
Definition: Jet.py:166
hasQGvars
Definition: Jet.py:170
def Jet.Jet.corrFactor (   self)

Definition at line 110 of file Jet.py.

References Jet.Jet.rawFactor().

111  def corrFactor(self):
112  return 1.0/self.rawFactor()
def corrFactor
Definition: Jet.py:110
def rawFactor
Definition: Jet.py:104
def Jet.Jet.jetID (   self,
  name = "" 
)

Definition at line 51 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(), relval_parameters_module.energy, InternalObj.eta, eetest::CandForTest.eta(), DBlmapWriter::_LMapRowHBEF.eta, res::HelperElectron.eta(), res::HelperMuon.eta(), res::HelperJet.eta(), MSLayersKeeperX0AtEta.eta(), muonisolation::NominalEfficiencyThresholds::ThresholdLocation.eta, RecoObj.eta, HcalCellType::HcalCell.eta, res::HelperMET.eta(), ScoutingParticle.eta(), SimG4HcalHitCluster.eta(), Raddam_ch.eta, SuperClusterHelper.eta(), jetData.eta, ScoutingPhoton.eta(), Residual1DHit.eta, CaloHit.eta(), DDHCalTBZposAlgo.eta, DDHCalTestBeamAlgo.eta, ScoutingElectron.eta(), MySimTrack.eta, MatchStruct.eta, HcalChannelId.eta, BenchmarkTreeEntry.eta, PtEtaPhiMass.eta(), HcalDDDRecConstants::HcalID.eta, HcalHardcodeGeometryLoader::HBHOCellParameters.eta, ScoutingMuon.eta(), HcalFlexiHardcodeGeometryLoader::HBHOCellParameters.eta, L1Analysis::L1AnalysisRecoClusterDataFormat.eta, ScoutingCaloJet.eta(), ImpactPoint.eta, learn_.eta, L2TauPixelTrackMatch::TinyTrack.eta, reco::isodeposit::Direction.eta(), EnergyResolutionVsLumi::DegradationAtEta.eta, ScoutingPFJet.eta(), egHLT::BinData.eta, LMapLoader::_LMapRowHBEF.eta, TrackerValidationVariables::AVHitStruct.eta, ShallowClustersProducer::NearDigis.eta(), LMapRow.eta, ElectronMVAEstimator.eta, DTMuonLocalAlignment.eta, HcalTestHistoClass::Hit.eta, L1Analysis::L1AnalysisRecoMuon2DataFormat.eta, L1Analysis::L1AnalysisL1CaloClusterDataFormat.eta, HcalDDDRecConstants::HcalActiveLength.eta, L1Analysis::L1AnalysisRecoTauDataFormat.eta, PatTrackAnalyzer::Plots.eta, ZMuMuIsolationAnalyzer.eta, HcalHardcodeGeometryLoader::HECellParameters.eta, BeamProfileVtxGenerator.eta(), PHcalTB04Info.eta(), L1Analysis::L1AnalysisRecoElectronDataFormat.eta, IdealZPrism.eta(), MaterialBudgetCastorHistos.eta, QcdLowPtDQM::Pixel.eta(), PHcalTB06Info::Hit.eta, StripCPEgeometric::WrappedCluster.eta(), HcalFlexiHardcodeGeometryLoader::HECellParameters.eta, GloballyPositioned< float >.eta(), GloballyPositioned< align::Scalar >.eta(), RotationType.eta(), GloballyPositioned< T >.eta(), L1Analysis::L1AnalysisL1CaloTowerDataFormat.eta, IdealObliquePrism.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, XMLHTRZeroSuppressionLoader::_datasetDBConfig.eta, IsolatedPixelTrackCandidateProducer::seedAtEC.eta, reco::GhostTrackPrediction.eta(), TrackerValidationVariables::AVTrackStruct.eta, PFECALSuperClusterAlgo::CalibratedPFCluster.eta(), PGlobalSimHit::FwdHit.eta, HcalTB02HistoClass.eta(), MaterialBudgetHcalHistos.eta, HcalHardcodeGeometryLoader::HFCellParameters.eta, reco::PattRecoPeak< double >.eta(), reco::PattRecoPeak< float >.eta(), PattRecoPeak< Real >.eta(), reco::PattRecoPeak< Real >.eta(), goodseedhelpers::HeavyObjectCache.eta, reco::CaloMuon.eta(), SoftElectronMVAEstimator.eta, SimpleL1MuGMTCand.eta(), PHcalTB06Info.eta(), HTrackVariables.eta(), PdtPdgMini.eta, CSCSP_SPblock.eta(), MuScleFitMuon.eta(), XMLProcessor::_LMapRowHBEF.eta, EleRelPoint.eta(), HcalFlexiHardcodeGeometryLoader::HFCellParameters.eta, ValidationMisalignedTracker.eta, reco::CastorCell.eta(), PhotonFix.eta(), HGCalSimHitValidation::hitsinfo.eta, cms::MinBias.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(), PV3DBase< T, PointTag, GlobalTag >.eta(), QcdLowPtDQM::Tracklet.eta(), Vector3DBase< U, LocalTag >.eta(), PV3DBase< align::Scalar, PointTag, GlobalTag >.eta(), PV3DBase< float, PointTag, GlobalTag >.eta(), PV3DBase< float, PointTag, MeasurementTag >.eta(), Vector3DBase< U, GlobalTag >.eta(), PV3DBase< float, VectorTag, MeasurementTag >.eta(), PV3DBase< T, PointTag, FrameTag >.eta(), Point3DBase< T, Frame >.eta(), PV3DBase< Scalar, VectorTag, GlobalTag >.eta(), PV3DBase< T, VectorTag, FrameTag >.eta(), PV3DBase< float, VectorTag, GlobalTag >.eta(), PV3DBase< Scalar, PointTag, GlobalTag >.eta(), PV3DBase< float, PointTag, LocalTag >.eta(), PV3DBase< long double, PointTag, GlobalTag >.eta(), Point3DBase< U, LocalTag >.eta(), Point3DBase< U, GlobalTag >.eta(), Point3DBase< U, FrameTag >.eta(), Vector3DBase< U, FrameTag >.eta(), Vector3DBase< U, Frame >.eta(), Vector3DBase< T, Frame >.eta(), Point3DBase< U, Frame >.eta(), Vector3DBase< double, LocalTag >.eta(), PV3DBase< T, PVType, FrameType >.eta(), Vector3DBase< T, FrameTag >.eta(), PV3DBase< float, VectorTag, LocalTag >.eta(), L1MuDTTrack.eta(), MuonDTLocalMillepedeAlgorithm.eta, BPhysicsValidation::ParticleMonitor.eta, HcalTB02Analysis.eta, L1MuDTEtaProcessor.eta(), L1Analysis::L1AnalysisRecoJetDataFormat.eta, L1MuBMTrack.eta(), L1MuBMEtaProcessor.eta(), MuonGmtPair.eta(), EgammaTowerIsolationNew< NC >.eta, L1TDEMON.eta, cms::Analyzer_minbias.eta, reco::PreId.eta(), reco::CastorCluster.eta(), Lepton.eta, L1TdeGCT.eta, TrackStruct::TrackParameterStruct.eta, reco::Candidate.eta(), egHLT::OffPho.eta(), JetPartonNamespace::JetPartonCalibrationParameterSet.eta(), AnalyzerMinbias.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(), CandidateWithRef< Ref >.eta(), EcalPerEvtLaserAnalyzer.eta, reco::IsoDeposit::const_iterator.eta(), Basic3DVector< float > pos GlobalPoint.eta(), Basic3DVector< double >.eta(), Basic3DVector< U >.eta(), Basic3DVector< align::Scalar >.eta(), Basic3DVector< Scalar >.eta(), Basic3DVector< float >.eta(), Basic3DVector< T >.eta(), Basic3DVector< float > mom GlobalVector.eta(), JetAnalyzer_HeavyIons_matching::MyJet.eta, reco::CaloCluster.eta(), L1Analysis::L1AnalysisRecoMuonDataFormat.eta, GoodSeedProducer.eta, pat::PackedGenParticle.eta(), EcalLaserAnalyzer.eta, TrackingParticle.eta(), RawParticle.eta(), EcalLaserAnalyzer2.eta, SiPixelErrorEstimation.eta, HLTEgamma::OpenHLTPhoton.eta, HLTEgamma::OpenHLTElectron.eta, reco::TrackBase.eta(), pat::PackedCandidate.eta(), EcalSelectiveReadoutValidation::energiesEb_t.eta, EcalSelectiveReadoutValidation::energiesEe_t.eta, SiPixelTrackingRecHitsValid.eta, PMuonSimHit::Trk.eta, PTrackerSimHit::Trk.eta, pat::Jet.isPFJet(), JetTester.isPFJet, JetAnalyzer_HeavyIons.isPFJet, JetTester_HeavyIons.isPFJet, Jet.Jet.jetID(), JetMETHLTOfflineSource.jetID, ExoticaDQM.jetID, HLTJets.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(), CondFormats_SiPixelObjects::dictionary.p4, reco::PUSubMETCandInfo.p4(), InvariantMassFromVertex.p4(), tauImpactParameter::LorentzVectorParticle.p4(), MuScleFitMuon.p4(), reco::Candidate.p4(), reco::Particle.p4(), reco::ParticleState.p4(), TopDecaySubset.p4(), PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex.p4, @586.p4, CandidateWithRef< Ref >.p4(), reco::LeafCandidate.p4(), TrackingParticle.p4(), egHLT::OffPho.p4(), CaloTower.p4(), egHLT::OffEle.p4(), reco::tau::RecoTauConstructor.p4(), pat::PackedGenParticle.p4(), reco::Vertex.p4(), reco::Photon.p4(), pat::PackedCandidate.p4(), Electron.Electron.p4(), reco::GsfElectron.p4(), and Jet.Jet.rawFactor().

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

51 
52  def jetID(self,name=""):
53  if not self.isPFJet():
54  raise RuntimeError("jetID implemented only for PF Jets")
55  eta = abs(self.eta());
56  energy = (self.p4()*self.rawFactor()).energy();
57  chf = self.chargedHadronEnergy()/energy;
58  nhf = self.neutralHadronEnergy()/energy;
59  phf = self.neutralEmEnergy()/energy;
60  muf = self.muonEnergy()/energy;
61  elf = self.chargedEmEnergy()/energy;
62  chm = self.chargedHadronMultiplicity();
63  npr = self.chargedMultiplicity() + self.neutralMultiplicity();
64  npn = self.neutralMultiplicity();
65  #if npr != self.nConstituents():
66  # import pdb; pdb.set_trace()
67  if name == "POG_PFID":
68 
69  if self.jetID("PAG_monoID_Tight") and self.jetID("POG_PFID_Tight") : return 5;
70  if self.jetID("PAG_monoID_Loose") and self.jetID("POG_PFID_Tight") : return 4;
71  if self.jetID("POG_PFID_Tight") : return 3;
72  #elif self.jetID("POG_PFID_Medium") : return 2; commented this line because this working point doesn't exist anymore (as 12/05/15)
73  elif self.jetID("POG_PFID_Loose") : return 1;
74  else : return 0;
75 
76  # jetID from here: https://twiki.cern.ch/twiki/bin/viewauth/CMS/JetID#Recommendations_for_13_TeV_data
77  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)));
78  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));
79  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)));
80  if name == "VBFHBB_PFID_Loose": return (npr>1 and phf<0.99 and nhf<0.99);
81  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);
82  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);
83  raise RuntimeError("jetID '%s' not supported" % name)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def jetID
Definition: Jet.py:51
def rawFactor
Definition: Jet.py:104
def Jet.Jet.l1corrFactor (   self)

Definition at line 119 of file Jet.py.

References Jet.Jet._recalibrated.

120  def l1corrFactor(self):
121  if hasattr(self, 'CorrFactor_L1'):
122  return self.CorrFactor_L1
123  if self._recalibrated:
124  raise RuntimeError("The jet was recalibrated, but without calculateSeparateCorrections. L1 is not available")
125  jecLevels = self.physObj.availableJECLevels()
126  for level in jecLevels:
127  if "L1" in level:
128  return self.physObj.jecFactor(level)/self.physObj.jecFactor('Uncorrected')
129  return 1.0 # Jet does not have any L1 correction
_recalibrated
Definition: Jet.py:47
def l1corrFactor
Definition: Jet.py:119
def Jet.Jet.leadingTrack (   self)

Definition at line 141 of file Jet.py.

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

Referenced by Jet.Jet.leadTrackPt().

142  def leadingTrack(self):
143  if self._leadingTrackSearched :
144  return self._leadingTrack
145  self._leadingTrackSearched = True
146  self._leadingTrack = max( self.daughterPtrVector() , key = lambda x : x.pt() if x.charge()!=0 else 0. )
147  if self._leadingTrack.charge()==0: #in case of "all neutral"
148  self._leadingTrack = None
149  return self._leadingTrack
_leadingTrack
Definition: Jet.py:48
def leadingTrack
Definition: Jet.py:141
_leadingTrackSearched
Definition: Jet.py:49
def Jet.Jet.leadTrackPt (   self)

Definition at line 150 of file Jet.py.

References Jet.Jet.leadingTrack().

151  def leadTrackPt(self):
152  lt=self.leadingTrack()
153  if lt :
154  return lt.pt()
155  else :
return 0.
def leadingTrack
Definition: Jet.py:141
def leadTrackPt
Definition: Jet.py:150
def Jet.Jet.looseJetId (   self)
PF Jet ID (loose operation point) [method provided for convenience only]

Definition at line 84 of file Jet.py.

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

84 
85  def looseJetId(self):
86  '''PF Jet ID (loose operation point) [method provided for convenience only]'''
87  return self.jetID("POG_PFID_Loose")
def looseJetId
Definition: Jet.py:84
def jetID
Definition: Jet.py:51
def Jet.Jet.puJetId (   self,
  label = "pileupJetId:fullDiscriminant" 
)
Full mva PU jet id

Definition at line 91 of file Jet.py.

References funct.abs(), InternalObj.eta, eetest::CandForTest.eta(), DBlmapWriter::_LMapRowHBEF.eta, res::HelperElectron.eta(), res::HelperMuon.eta(), res::HelperJet.eta(), muonisolation::NominalEfficiencyThresholds::ThresholdLocation.eta, MSLayersKeeperX0AtEta.eta(), RecoObj.eta, HcalCellType::HcalCell.eta, res::HelperMET.eta(), SimG4HcalHitCluster.eta(), Raddam_ch.eta, ScoutingParticle.eta(), SuperClusterHelper.eta(), jetData.eta, ScoutingPhoton.eta(), Residual1DHit.eta, CaloHit.eta(), DDHCalTestBeamAlgo.eta, DDHCalTBZposAlgo.eta, ScoutingElectron.eta(), HcalChannelId.eta, MatchStruct.eta, MySimTrack.eta, BenchmarkTreeEntry.eta, PtEtaPhiMass.eta(), HcalDDDRecConstants::HcalID.eta, HcalHardcodeGeometryLoader::HBHOCellParameters.eta, ScoutingMuon.eta(), HcalFlexiHardcodeGeometryLoader::HBHOCellParameters.eta, L1Analysis::L1AnalysisRecoClusterDataFormat.eta, ScoutingCaloJet.eta(), ImpactPoint.eta, learn_.eta, L2TauPixelTrackMatch::TinyTrack.eta, reco::isodeposit::Direction.eta(), EnergyResolutionVsLumi::DegradationAtEta.eta, egHLT::BinData.eta, ScoutingPFJet.eta(), LMapLoader::_LMapRowHBEF.eta, TrackerValidationVariables::AVHitStruct.eta, ShallowClustersProducer::NearDigis.eta(), LMapRow.eta, DTMuonLocalAlignment.eta, HcalTestHistoClass::Hit.eta, L1Analysis::L1AnalysisRecoMuon2DataFormat.eta, ElectronMVAEstimator.eta, L1Analysis::L1AnalysisL1CaloClusterDataFormat.eta, HcalDDDRecConstants::HcalActiveLength.eta, L1Analysis::L1AnalysisRecoTauDataFormat.eta, ZMuMuIsolationAnalyzer.eta, HcalHardcodeGeometryLoader::HECellParameters.eta, PatTrackAnalyzer::Plots.eta, BeamProfileVtxGenerator.eta(), PHcalTB04Info.eta(), L1Analysis::L1AnalysisRecoElectronDataFormat.eta, IdealZPrism.eta(), MaterialBudgetCastorHistos.eta, QcdLowPtDQM::Pixel.eta(), PHcalTB06Info::Hit.eta, StripCPEgeometric::WrappedCluster.eta(), GloballyPositioned< float >.eta(), GloballyPositioned< align::Scalar >.eta(), HcalFlexiHardcodeGeometryLoader::HECellParameters.eta, RotationType.eta(), L1Analysis::L1AnalysisL1CaloTowerDataFormat.eta, GloballyPositioned< T >.eta(), IdealObliquePrism.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, XMLHTRZeroSuppressionLoader::_datasetDBConfig.eta, IsolatedPixelTrackCandidateProducer::seedAtEC.eta, TrackerValidationVariables::AVTrackStruct.eta, reco::GhostTrackPrediction.eta(), reco::PattRecoPeak< float >.eta(), PGlobalSimHit::FwdHit.eta, HcalTB02HistoClass.eta(), HcalHardcodeGeometryLoader::HFCellParameters.eta, MaterialBudgetHcalHistos.eta, reco::PattRecoPeak< double >.eta(), PattRecoPeak< Real >.eta(), PFECALSuperClusterAlgo::CalibratedPFCluster.eta(), reco::PattRecoPeak< Real >.eta(), goodseedhelpers::HeavyObjectCache.eta, reco::CaloMuon.eta(), SoftElectronMVAEstimator.eta, SimpleL1MuGMTCand.eta(), PHcalTB06Info.eta(), PdtPdgMini.eta, HTrackVariables.eta(), CSCSP_SPblock.eta(), MuScleFitMuon.eta(), XMLProcessor::_LMapRowHBEF.eta, EleRelPoint.eta(), ValidationMisalignedTracker.eta, HcalFlexiHardcodeGeometryLoader::HFCellParameters.eta, reco::CastorCell.eta(), HGCalSimHitValidation::hitsinfo.eta, cms::MinBias.eta, PhotonFix.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, Frame >.eta(), PV3DBase< T, VectorTag, FrameTag >.eta(), PV3DBase< float, VectorTag, LocalTag >.eta(), PV3DBase< Scalar, PointTag, GlobalTag >.eta(), PV3DBase< float, PointTag, GlobalTag >.eta(), Vector3DBase< U, FrameTag >.eta(), Vector3DBase< T, FrameTag >.eta(), Vector3DBase< double, LocalTag >.eta(), PV3DBase< float, PointTag, MeasurementTag >.eta(), PV3DBase< float, PointTag, LocalTag >.eta(), PV3DBase< T, PointTag, GlobalTag >.eta(), PV3DBase< T, PointTag, FrameTag >.eta(), PV3DBase< align::Scalar, PointTag, GlobalTag >.eta(), Point3DBase< U, FrameTag >.eta(), Point3DBase< U, LocalTag >.eta(), Vector3DBase< U, LocalTag >.eta(), Vector3DBase< U, GlobalTag >.eta(), Point3DBase< T, Frame >.eta(), Vector3DBase< U, Frame >.eta(), Point3DBase< U, GlobalTag >.eta(), Vector3DBase< T, Frame >.eta(), PV3DBase< Scalar, VectorTag, GlobalTag >.eta(), PV3DBase< T, PVType, FrameType >.eta(), PV3DBase< float, VectorTag, MeasurementTag >.eta(), PV3DBase< float, VectorTag, GlobalTag >.eta(), PV3DBase< long double, PointTag, GlobalTag >.eta(), L1MuDTTrack.eta(), MuonDTLocalMillepedeAlgorithm.eta, BPhysicsValidation::ParticleMonitor.eta, HcalTB02Analysis.eta, L1MuDTEtaProcessor.eta(), L1Analysis::L1AnalysisRecoJetDataFormat.eta, L1MuBMTrack.eta(), L1MuBMEtaProcessor.eta(), MuonGmtPair.eta(), EgammaTowerIsolationNew< NC >.eta, L1TDEMON.eta, cms::Analyzer_minbias.eta, reco::PreId.eta(), reco::CastorCluster.eta(), Lepton.eta, L1TdeGCT.eta, TrackStruct::TrackParameterStruct.eta, reco::Candidate.eta(), egHLT::OffPho.eta(), JetPartonNamespace::JetPartonCalibrationParameterSet.eta(), AnalyzerMinbias.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(), CandidateWithRef< Ref >.eta(), EcalPerEvtLaserAnalyzer.eta, reco::IsoDeposit::const_iterator.eta(), Basic3DVector< Scalar >.eta(), Basic3DVector< T >.eta(), Basic3DVector< float >.eta(), Basic3DVector< float > mom GlobalVector.eta(), Basic3DVector< U >.eta(), Basic3DVector< float > pos GlobalPoint.eta(), Basic3DVector< double >.eta(), Basic3DVector< align::Scalar >.eta(), JetAnalyzer_HeavyIons_matching::MyJet.eta, reco::CaloCluster.eta(), L1Analysis::L1AnalysisRecoMuonDataFormat.eta, GoodSeedProducer.eta, pat::PackedGenParticle.eta(), EcalLaserAnalyzer.eta, TrackingParticle.eta(), RawParticle.eta(), EcalLaserAnalyzer2.eta, SiPixelErrorEstimation.eta, HLTEgamma::OpenHLTPhoton.eta, HLTEgamma::OpenHLTElectron.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().

91 
92  def puJetId(self, label="pileupJetId:fullDiscriminant"):
93  '''Full mva PU jet id'''
94 
95  puMva = self.puMva(label)
96  wp = loose_53X_WP
97  eta = abs(self.eta())
98 
99  for etamin, etamax, cut in wp:
100  if not(eta>=etamin and eta<etamax):
101  continue
102  return puMva>cut
103  return -99
def puMva
Definition: Jet.py:88
def puJetId
Definition: Jet.py:91
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def Jet.Jet.puMva (   self,
  label = "pileupJetId:fullDiscriminant" 
)

Definition at line 88 of file Jet.py.

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

Referenced by Jet.Jet.puJetId().

88 
89  def puMva(self, label="pileupJetId:fullDiscriminant"):
90  return self.userFloat(label)
def puMva
Definition: Jet.py:88
def Jet.Jet.qgl (   self)

Definition at line 156 of file Jet.py.

References Jet.Jet.computeQGvars().

157  def qgl(self) :
158  if not hasattr(self,"qgl_value") :
159  if hasattr(self,"qgl_rho") : #check if qgl calculator is configured
161  self.qgl_value=self.qgl_calc(self,self.qgl_rho)
162  else :
163  self.qgl_value=-1. #if no qgl calculator configured
164 
165  return self.qgl_value
def qgl
Definition: Jet.py:156
qgl_value
Definition: Jet.py:160
def computeQGvars
Definition: Jet.py:166
def Jet.Jet.rawFactor (   self)

Definition at line 104 of file Jet.py.

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

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

105  def rawFactor(self):
106  return self.jecFactor('Uncorrected') * self._rawFactorMultiplier
_rawFactorMultiplier
Definition: Jet.py:46
def rawFactor
Definition: Jet.py:104
def Jet.Jet.setCorrP4 (   self,
  newP4 
)

Definition at line 113 of file Jet.py.

References Jet.Jet._recalibrated, InternalObj.pt, eetest::CandForTest.pt(), mypt.pt, res::HelperElectron.pt(), res::HelperMuon.pt(), res::HelperJet.pt(), reco::VoronoiBackground.pt(), RecoObj.pt, tauImpactParameter::LorentzVectorParticle.pt, ScoutingParticle.pt(), L1MuCSCPtLut.pt(), ScoutingPhoton.pt(), Residual1DHit.pt, reco::MuonMETCorrectionData.pt(), ScoutingElectron.pt(), PtHatReweightUserHook.pt, MatchStruct.pt, PtEtaPhiMass.pt(), MySimTrack.pt, ALILine.pt(), ScoutingMuon.pt(), ScoutingCaloJet.pt(), L2TauPixelTrackMatch::TinyTrack.pt, TrackMultiSelector::Block.pt, ScoutingPFJet.pt(), L1Analysis::L1AnalysisRecoMuon2DataFormat.pt, DTMuonLocalAlignment.pt, PGlobalSimHit::Trk.pt, TtFullHadSignalSel.pt(), L1Analysis::L1AnalysisRecoTauDataFormat.pt, ElectronMVAEstimator.pt, ZMuMuIsolationAnalyzer.pt, L1Analysis::L1AnalysisRecoElectronDataFormat.pt, PatTrackAnalyzer::Plots.pt, jpt::Map.pt(), SiStripLAProfileBooker.pt, PhysicsObjectsMonitor.pt, reco::CaloMuon.pt(), TrackerValidationVariables::AVTrackStruct.pt, trigger::TriggerObject.pt(), BSTrkParameters.pt(), ElectronMVAEstimatorRun2Phys14NonTrig::AllVariables.pt, goodseedhelpers::HeavyObjectCache.pt, MuScleFitMuon.pt(), SoftElectronMVAEstimator.pt, PTrajectoryStateOnDet.pt(), SimpleL1MuGMTCand.pt(), ValidationMisalignedTracker.pt, HTrackVariables.pt(), HepLine3D.pt(), L1MuDTTrack.pt(), ElectronMVAEstimatorRun2Spring15NonTrig::AllVariables.pt, TrajectoryStateClosestToPoint.pt(), L1MuBMTrack.pt(), ElectronMVAEstimatorRun2Spring15Trig::AllVariables.pt, MuonDTLocalMillepedeAlgorithm.pt, BPhysicsValidation::ParticleMonitor.pt, l1t::emtf::SP.pt, L1TMuon::InternalTrack.pt, susybsm::HSCParticle.pt(), PhotonPair.pt(), QualityCutsAnalyzer::histogram_element_t.pt, MuonGmtPair.pt(), reco::PreId.pt(), Lepton.pt, reco::Candidate.pt(), egHLT::OffPho.pt(), TrackStruct::TrackParameterStruct.pt, reco::Particle.pt(), reco::ParticleState.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), PtHatRapReweightUserHook.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, reco::LeafCandidate.pt(), CandidateWithRef< Ref >.pt(), AlignmentMonitorMuonSystemMap1D::MyTrack.pt, reco::PFCluster.pt(), JetAnalyzer_HeavyIons_matching::MyJet.pt, L1Analysis::L1AnalysisRecoMuonDataFormat.pt, TrackingParticle.pt(), pat::MET::Vector2.pt(), GoodSeedProducer.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(), reco::LeafCandidate.setP4(), CandidateWithRef< Ref >.setP4(), pat::PackedGenParticle.setP4(), reco::Photon.setP4(), pat::PackedCandidate.setP4(), reco::GsfElectron.setP4(), and Jet.Jet.setRawFactor().

114  def setCorrP4(self,newP4):
115  self._recalibrated = True
116  corr = newP4.Pt() / (self.pt() * self.rawFactor())
117  self.setP4(newP4);
118  self.setRawFactor(1.0/corr);
def setRawFactor
Definition: Jet.py:107
_recalibrated
Definition: Jet.py:47
def setCorrP4
Definition: Jet.py:113
def rawFactor
Definition: Jet.py:104
def Jet.Jet.setRawFactor (   self,
  factor 
)

Definition at line 107 of file Jet.py.

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

Referenced by Jet.Jet.setCorrP4().

108  def setRawFactor(self, factor):
109  self._rawFactorMultiplier = factor/self.jecFactor('Uncorrected')
def setRawFactor
Definition: Jet.py:107
_rawFactorMultiplier
Definition: Jet.py:46

Member Data Documentation

Jet.Jet._leadingTrack
private

Definition at line 48 of file Jet.py.

Referenced by Jet.Jet.leadingTrack().

Jet.Jet._leadingTrackSearched
private

Definition at line 49 of file Jet.py.

Referenced by Jet.Jet.leadingTrack().

Jet.Jet._rawFactorMultiplier
private

Definition at line 46 of file Jet.py.

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

Jet.Jet._recalibrated
private

Definition at line 47 of file Jet.py.

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

Jet.Jet.hasQGvars

Definition at line 170 of file Jet.py.

Jet.Jet.qgl_value

Definition at line 160 of file Jet.py.