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
HTauTauElectron.HTauTauElectron Class Reference
Inheritance diagram for HTauTauElectron.HTauTauElectron:

Public Member Functions

def __init__
 
def __str__
 
def chargedAllIso
 
def looseIdForEleTau
 
def looseIdForTriLeptonVeto
 
def photonIso
 
def relaxedIdForEleTau
 
def tightId
 
def tightIdForEleTau
 

Public Attributes

 chargedAllIsoCache
 
 photonIsoCache
 

Detailed Description

Definition at line 9 of file HTauTauElectron.py.

Constructor & Destructor Documentation

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

Definition at line 11 of file HTauTauElectron.py.

11 
12  def __init__(self, *args, **kwargs):
13  super(HTauTauElectron, self).__init__(*args, **kwargs)
14  self.photonIsoCache = None
15  self.chargedAllIsoCache = None

Member Function Documentation

def HTauTauElectron.HTauTauElectron.__str__ (   self)

Definition at line 142 of file HTauTauElectron.py.

References tauImpactParameter::TrackParticle.dxy, Tau.Tau.dxy(), reco::PFTauTransverseImpactParameter.dxy(), Muon.Muon.dxy(), PrimaryVertexMonitor.dxy, PFDisplacedVertexHelper::TracksSelector.dxy(), reco::Conversion.dxy(), Electron.Electron.dxy(), pat::PackedGenParticle.dxy(), reco::TrackBase.dxy(), pat::PackedCandidate.dxy(), pat::Tau.dxy(), tauImpactParameter::TrackParticle.dz, egammaisolation::EgammaTrackSelector.dz, DDHCalXtalAlgo.dz, RigidBodyAlignmentParameters.dz, BowedSurfaceAlignmentDerivatives.dz, DDHCalTestBeamAlgo.dz, BowedSurfaceAlignmentParameters.dz, TrackMultiSelector::Block.dz, DTMuonSLToSL.dz, Tau.Tau.dz(), IdealZDCTrapezoid.dz(), IdealZPrism.dz(), PreshowerStrip.dz(), IdealObliquePrism.dz(), Muon.Muon.dz(), IdealCastorTrapezoid.dz(), pat::VertexAssociation.dz(), TrackerValidationVariables::AVTrackStruct.dz, PrimaryVertexMonitor.dz, DTMuonMillepede.dz, DTSegmentResult.dz, DTHitResult.dz, EcalTrapezoidParameters.dz(), MuonGeometryArrange::MGACollection.dz, reco::Conversion.dz(), pat::PackedGenParticle.dz(), Electron.Electron.dz(), reco::TrackBase.dz(), pat::PackedCandidate.dz(), join(), HTauTauElectron.HTauTauElectron.looseIdForEleTau(), HTauTauElectron.HTauTauElectron.looseIdForTriLeptonVeto(), pat::Electron.passConversionVeto(), Electron.Electron.tightId(), and HTauTauElectron.HTauTauElectron.tightId().

143  def __str__(self):
144  base = [super(HTauTauElectron, self).__str__()]
145  spec = [
146  'vertex : dxy = {dxy}, dz = {dz}'.format(dxy=self.dxy(), dz=self.dz()),
147  # 'mva = {mva}'.format(mva=self.mvaNonTrigV0()),
148  # 'nmisshits = {nhits}'.format(nhits=self.numberOfHits()),
149  'conv veto = {conv}'.format(conv=self.passConversionVeto()),
150  'tight ID = {id}'.format(id=self.tightId()),
151  '3-veto ID = {id}'.format(id=self.looseIdForTriLeptonVeto()),
152  '2-veto ID = {id}'.format(id=self.looseIdForEleTau()),
153  ]
154  return '\n\t'.join( base + spec )
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def HTauTauElectron.HTauTauElectron.chargedAllIso (   self)

Definition at line 49 of file HTauTauElectron.py.

Referenced by Lepton.Lepton.absIso().

49 
50  def chargedAllIso(self):
51  return self.physObj.pfIsolationVariables().sumChargedParticlePt
def HTauTauElectron.HTauTauElectron.looseIdForEleTau (   self)
Loose electron selection, for the lepton veto, 
according to Phil sync prescription for the sync exercise 18/06/12

Definition at line 111 of file HTauTauElectron.py.

References funct.abs(), FWElectronDetailView.deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron.deltaEtaSuperClusterTrackAtVtx(), FWElectronDetailView.deltaPhiSuperClusterTrackAtVtx(), reco::GsfElectron.deltaPhiSuperClusterTrackAtVtx(), tauImpactParameter::TrackParticle.dz, egammaisolation::EgammaTrackSelector.dz, RigidBodyAlignmentParameters.dz, DDHCalXtalAlgo.dz, BowedSurfaceAlignmentDerivatives.dz, DDHCalTestBeamAlgo.dz, BowedSurfaceAlignmentParameters.dz, TrackMultiSelector::Block.dz, DTMuonSLToSL.dz, Tau.Tau.dz(), IdealZDCTrapezoid.dz(), IdealZPrism.dz(), PreshowerStrip.dz(), IdealObliquePrism.dz(), Muon.Muon.dz(), IdealCastorTrapezoid.dz(), pat::VertexAssociation.dz(), TrackerValidationVariables::AVTrackStruct.dz, PrimaryVertexMonitor.dz, DTMuonMillepede.dz, DTSegmentResult.dz, DTHitResult.dz, EcalTrapezoidParameters.dz(), MuonGeometryArrange::MGACollection.dz, reco::Conversion.dz(), pat::PackedGenParticle.dz(), Electron.Electron.dz(), reco::TrackBase.dz(), pat::PackedCandidate.dz(), SuperClusterHelper.hadronicOverEm(), PatPhotonSimpleAnalyzer::struct_recPhoton.hadronicOverEm, PhotonIDSimpleAnalyzer::struct_recPhoton.hadronicOverEm, reco::Photon.hadronicOverEm(), reco::GsfElectron.hadronicOverEm(), EcalRegressionData.isEB(), CaloGenericDetId.isEB(), SimpleElectron.isEB(), reco::Photon::FiducialFlags.isEB, reco::Photon.isEB(), reco::GsfElectron::FiducialFlags.isEB, reco::GsfElectron.isEB(), CaloGenericDetId.isEE(), reco::Photon::FiducialFlags.isEE, reco::Photon.isEE(), reco::GsfElectron::FiducialFlags.isEE, reco::GsfElectron.isEE(), Photon.Photon.sigmaIetaIeta(), SuperClusterHelper.sigmaIetaIeta(), reco::Photon::ShowerShape.sigmaIetaIeta, reco::Photon.sigmaIetaIeta(), reco::GsfElectron::ShowerShape.sigmaIetaIeta, and reco::GsfElectron.sigmaIetaIeta().

Referenced by HTauTauElectron.HTauTauElectron.__str__().

112  def looseIdForEleTau(self):
113  """Loose electron selection, for the lepton veto,
114  according to Phil sync prescription for the sync exercise 18/06/12
115  """
116  #COLIN inner hits and conversion veto not on the twiki
117  # nInnerHits = self.numberOfHits()
118  # if nInnerHits != 0 : return False
119  # if self.passConversionVeto() == False : return False
120  #COLIN: we might want to keep the vertex constraints separated
121  #COLIN: in the twiki there is no cut on dxy
122  # if abs(self.dxy()) >= 0.045 : return False
123  if abs(self.dz()) >= 0.2 : return False
124  # Below, part of WP95 without vertex constraints (applied above)
125  hoe = self.hadronicOverEm()
126  deta = abs(self.deltaEtaSuperClusterTrackAtVtx())
127  dphi = abs(self.deltaPhiSuperClusterTrackAtVtx())
128  sihih = self.sigmaIetaIeta()
129  # print sihih
130  if self.isEB() :
131  if sihih >= 0.010 : return False
132  if dphi >= 0.80 : return False
133  if deta >= 0.007 : return False
134  if hoe >= 0.15 : return False
135  elif self.isEE() :
136  if sihih >= 0.030 : return False
137  if dphi >= 0.70 : return False
if deta >= 0.010 : return False
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def HTauTauElectron.HTauTauElectron.looseIdForTriLeptonVeto (   self)
To be used in the tri-lepton veto for both the etau and mutau channels.
Agreed at the CMS center with Josh, Andrew, Valentina, Jose on the 22nd of October

Definition at line 84 of file HTauTauElectron.py.

References funct.abs(), eta(), Electron.Electron.mvaNonTrigV0(), pat::Electron.passConversionVeto(), mypt.pt, res::HelperElectron.pt(), res::HelperMuon.pt(), res::HelperJet.pt(), reco::VoronoiBackground.pt(), RecoObj.pt, tauImpactParameter::LorentzVectorParticle.pt, L1MuCSCPtLut.pt(), Residual1DHit.pt, reco::MuonMETCorrectionData.pt(), PtEtaPhiMass.pt(), PtHatReweightUserHook.pt, MatchStruct.pt, ALILine.pt(), L2TauPixelTrackMatch::TinyTrack.pt, TrackMultiSelector::Block.pt, ElectronMVAEstimator.pt, DTMuonLocalAlignment.pt, TtFullHadSignalSel.pt(), PGlobalSimHit::Trk.pt, lhef::JetClustering::Jet.pt(), ZMuMuIsolationAnalyzer.pt, PatTrackAnalyzer::Plots.pt, TrackerValidationVariables::AVTrackStruct.pt, jpt::Map.pt(), SiStripLAProfileBooker.pt, reco::CaloMuon.pt(), trigger::TriggerObject.pt(), BSTrkParameters.pt(), SoftElectronMVAEstimator.pt, PhysicsObjectsMonitor.pt, MuScleFitMuon.pt(), SimpleL1MuGMTCand.pt(), HTrackVariables.pt(), PTrajectoryStateOnDet.pt(), ValidationMisalignedTracker.pt, HepLine3D.pt(), L1MuDTTrack.pt(), TrajectoryStateClosestToPoint.pt(), MuonDTLocalMillepedeAlgorithm.pt, susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.pt, reco::Particle.pt(), MuonGmtPair.pt(), reco::PreId.pt(), Lepton.pt, reco::Candidate.pt(), egHLT::OffPho.pt(), TrackingParticle.pt(), LeafRefCandidateT< T >.pt(), reco::LeafRefCandidateT< T >.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), PtHatRapReweightUserHook.pt, pat::PackedGenParticle.pt(), AlignmentMonitorMuonSystemMap1D::MyTrack.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, pat::PackedCandidate.pt(), reco::PFCluster.pt(), GoodSeedProducer.pt, pat::MET::UncorInfo.pt, pat::MET::Vector2.pt(), CandidateWithRef< Ref >.pt(), reco::LeafCandidate.pt(), reco::TrackBase.pt(), PMuonSimHit::Trk.pt, PTrackerSimHit::Trk.pt, reco::Electron.superCluster(), reco::PreshowerClusterShape.superCluster(), reco::RecoEcalCandidate.superCluster(), reco::GsfElectronCore.superCluster(), reco::RecoCandidate.superCluster(), reco::Photon.superCluster(), reco::PhotonCore.superCluster(), pat::Photon.superCluster(), pat::Electron.superCluster(), reco::SiStripElectron.superCluster(), pat::GenericParticle.superCluster(), and reco::GsfElectron.superCluster().

Referenced by HTauTauElectron.HTauTauElectron.__str__().

84 
85  def looseIdForTriLeptonVeto(self):
86  '''To be used in the tri-lepton veto for both the etau and mutau channels.
87  Agreed at the CMS center with Josh, Andrew, Valentina, Jose on the 22nd of October
88  '''
89  # JAN FIXME - do we need this cut?
90  # if self.numberOfHits() != 0: return False
91  if not self.passConversionVeto(): return False
92  eta = abs( self.superCluster().eta() )
93  #Colin no eta cut should be done here.
94  # if eta > 2.1 : return False
95  lmvaID = -99999 # identification
96  if self.pt() < 20 :
97  if eta<0.8: lmvaID = 0.925
98  elif eta<1.479: lmvaID = 0.915
99  else : lmvaID = 0.965
100  else:
101  if eta<0.8: lmvaID = 0.905
102  elif eta<1.479: lmvaID = 0.955
103  else : lmvaID = 0.975
104  result = self.mvaNonTrigV0() > lmvaID
105  return result
106 
T eta() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def HTauTauElectron.HTauTauElectron.photonIso (   self)

Definition at line 29 of file HTauTauElectron.py.

Referenced by Lepton.Lepton.absIso(), and Lepton.Lepton.absIsoFromEA().

29 
30  def photonIso(self):
31  return super(HTauTauElectron, self).photonIso(0.3)
def HTauTauElectron.HTauTauElectron.relaxedIdForEleTau (   self)
Relaxing conversion cuts for sideband studies

Definition at line 52 of file HTauTauElectron.py.

References funct.abs(), eta(), Electron.Electron.mvaNonTrigV0(), reco::Electron.superCluster(), reco::PreshowerClusterShape.superCluster(), reco::RecoEcalCandidate.superCluster(), reco::GsfElectronCore.superCluster(), reco::RecoCandidate.superCluster(), reco::Photon.superCluster(), reco::PhotonCore.superCluster(), pat::Photon.superCluster(), reco::SiStripElectron.superCluster(), pat::Electron.superCluster(), pat::GenericParticle.superCluster(), and reco::GsfElectron.superCluster().

52 
53  def relaxedIdForEleTau(self):
54  """Relaxing conversion cuts for sideband studies
55  """
56  eta = abs( self.superCluster().eta() )
57  if eta<0.8: lmvaID = 0.925
58  elif eta<1.479: lmvaID = 0.975
59  else : lmvaID = 0.985
60  result = self.mvaNonTrigV0() > lmvaID
61  return result
T eta() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def HTauTauElectron.HTauTauElectron.tightId (   self)

Definition at line 107 of file HTauTauElectron.py.

References HTauTauElectron.HTauTauElectron.tightIdForEleTau().

Referenced by HTauTauElectron.HTauTauElectron.__str__().

108  def tightId( self ):
109  return self.tightIdForEleTau()
110 
def HTauTauElectron.HTauTauElectron.tightIdForEleTau (   self)
reference numbers from the Htautau twiki

https://twiki.cern.ch/twiki/bin/view/CMS/HiggsToTauTauWorking2012#2012_Baseline_Selection

Definition at line 62 of file HTauTauElectron.py.

References funct.abs(), eta(), Electron.Electron.mvaNonTrigV0(), pat::Electron.passConversionVeto(), reco::Electron.superCluster(), reco::PreshowerClusterShape.superCluster(), reco::RecoEcalCandidate.superCluster(), reco::GsfElectronCore.superCluster(), reco::RecoCandidate.superCluster(), reco::Photon.superCluster(), reco::PhotonCore.superCluster(), pat::Photon.superCluster(), pat::Electron.superCluster(), reco::SiStripElectron.superCluster(), pat::GenericParticle.superCluster(), and reco::GsfElectron.superCluster().

Referenced by HTauTauElectron.HTauTauElectron.tightId().

62 
63  def tightIdForEleTau(self):
64  """reference numbers from the Htautau twiki
65 
66  https://twiki.cern.ch/twiki/bin/view/CMS/HiggsToTauTauWorking2012#2012_Baseline_Selection
67  """
68 
69  # JAN FIXME - do we need this cut?
70  # if self.numberOfHits() != 0: return False
71  if not self.passConversionVeto(): return False
72  eta = abs( self.superCluster().eta() )
73 
74  # Update Jan: Deleted the old numbers which are for e-mu, the ones below
75  # are for e-tau starting from pt>20
76  if 1:
77  if eta<0.8: lmvaID = 0.925
78  elif eta<1.479: lmvaID = 0.975
79  else : lmvaID = 0.985
80  result = self.mvaNonTrigV0() > lmvaID
81  #self.tightIdResult = result
82  return result
83 
T eta() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

HTauTauElectron.HTauTauElectron.chargedAllIsoCache

Definition at line 14 of file HTauTauElectron.py.

HTauTauElectron.HTauTauElectron.photonIsoCache

Definition at line 13 of file HTauTauElectron.py.