CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Variables
objects.autophobj Namespace Reference

Variables

tuple fourVectorType
 
tuple genParticleType
 

GENPARTICLE

More...
 
tuple genParticleWithAncestryType
 
tuple genParticleWithLinksType
 
tuple genParticleWithMotherId
 
tuple isoTrackType
 

ISOTRACK

More...
 
tuple jetType
 

JET

More...
 
tuple jetTypeExtra
 
tuple leptonType
 

LEPTON

More...
 
tuple leptonTypeExtra
 EXTENDED VERSION WITH INDIVIUAL DISCRIMINATING VARIABLES. More...
 
tuple metType
 

MET

More...
 
tuple objectFloat
 
tuple objectInt
 
tuple particleType
 
tuple photonType
 

PHOTON

More...
 
tuple tauType
 

TAU

More...
 
tuple twoVectorType
 

Variable Documentation

tuple objects.autophobj.fourVectorType
Initial value:
1 = NTupleObjectType("fourVector", variables = [
2  NTupleVariable("pt", lambda x : x.pt()),
3  NTupleVariable("eta", lambda x : x.eta()),
4  NTupleVariable("phi", lambda x : x.phi()),
5  NTupleVariable("mass", lambda x : x.mass()),
6  NTupleVariable("p4", lambda x : x, "TLorentzVector", default=ROOT.reco.Particle.LorentzVector(0.,0.,0.,0.), filler = lambda vector, obj: vector.SetPtEtaPhiM(obj.pt(), obj.eta(), obj.phi(), obj.mass())),
7  # ^^^^------- Note: p4 normally is not saved unless 'saveTLorentzVectors' is enabled in the tree producer
8 ])

Definition at line 20 of file autophobj.py.

tuple objects.autophobj.genParticleType
Initial value:
1 = NTupleObjectType("genParticle", baseObjectTypes = [ particleType ], mcOnly=True, variables = [
2  NTupleVariable("charge", lambda x : x.threeCharge()/3.0, float),
3  NTupleVariable("status", lambda x : x.status(),int),
4 ])


GENPARTICLE

Definition at line 194 of file autophobj.py.

tuple objects.autophobj.genParticleWithAncestryType
Initial value:
1 = NTupleObjectType("genParticleWithAncestry", baseObjectTypes = [ genParticleType ], mcOnly=True, variables = [
2  NTupleVariable("motherId", lambda x : x.motherId, int, help="pdgId of the mother of the particle"),
3  NTupleVariable("grandmotherId", lambda x : x.grandmotherId, int, help="pdgId of the grandmother of the particle"),
4  NTupleVariable("sourceId", lambda x : x.sourceId, int, help="origin of the particle (heaviest ancestor): 6=t, 25=h, 23/24=W/Z"),
5 ])

Definition at line 202 of file autophobj.py.

tuple objects.autophobj.genParticleWithLinksType
Initial value:
1 = NTupleObjectType("genParticleWithLinks", baseObjectTypes = [ genParticleWithAncestryType ], mcOnly=True, variables = [
2  NTupleVariable("motherIndex", lambda x : x.motherIndex, int, help="index of the mother in the generatorSummary")
3 ])

Definition at line 207 of file autophobj.py.

tuple objects.autophobj.genParticleWithMotherId
Initial value:
1 = NTupleObjectType("genParticleWithMotherId", baseObjectTypes = [ genParticleType ], mcOnly=True, variables = [
2  NTupleVariable("motherId", lambda x : x.mother(0).pdgId() if x.mother(0) else 0, int, help="pdgId of the mother of the particle"),
3  NTupleVariable("grandmotherId", lambda x : x.mother(0).mother(0).pdgId() if x.mother(0) and x.mother(0).mother(0) else 0, int, help="pdgId of the grandmother of the particle")
4 ])

Definition at line 198 of file autophobj.py.

tuple objects.autophobj.isoTrackType
Initial value:
1 = NTupleObjectType("isoTrack", baseObjectTypes = [ particleType ], variables = [
2  NTupleVariable("charge", lambda x : x.charge(), int),
3  NTupleVariable("dz", lambda x : x.dz() , help="d_{z} of lead track with respect to PV, in cm (with sign)"),
4  NTupleVariable("absIso", lambda x : x.absIso, float, mcOnly=False, help="abs charged iso with condition for isolation such that Min(0.2*pt, 8 GeV)"),
5  NTupleVariable("mcMatchId", lambda x : x.mcMatchId, int, mcOnly=True, help="Match to source from hard scatter (pdgId of heaviest particle in chain, 25 for H, 6 for t, 23/24 for W/Z), zero if non-prompt or fake"),
6 ])


ISOTRACK

Definition at line 126 of file autophobj.py.

tuple objects.autophobj.jetType
Initial value:
1 = NTupleObjectType("jet", baseObjectTypes = [ fourVectorType ], variables = [
2  NTupleVariable("id", lambda x : x.jetID("POG_PFID") , int, mcOnly=False,help="POG Loose jet ID"),
3  NTupleVariable("puId", lambda x : getattr(x, 'puJetIdPassed', -99), int, mcOnly=False, help="puId (full MVA, loose WP, 5.3.X training on AK5PFchs: the only thing that is available now)"),
4  NTupleVariable("btagCSV", lambda x : x.btag('combinedInclusiveSecondaryVertexV2BJetTags'), help="CSV-IVF v2 discriminator"),
5  NTupleVariable("btagCMVA", lambda x : x.btag('combinedMVABJetTags'), help="CMVA discriminator"),
6  NTupleVariable("rawPt", lambda x : x.pt() * x.rawFactor(), help="p_{T} before JEC"),
7  NTupleVariable("mcPt", lambda x : x.mcJet.pt() if getattr(x,"mcJet",None) else 0., mcOnly=True, help="p_{T} of associated gen jet"),
8  NTupleVariable("mcFlavour", lambda x : x.partonFlavour(), int, mcOnly=True, help="parton flavour (physics definition, i.e. including b's from shower)"),
9  NTupleVariable("mcMatchId", lambda x : getattr(x, 'mcMatchId', -99), int, mcOnly=True, help="Match to source from hard scatter (pdgId of heaviest particle in chain, 25 for H, 6 for t, 23/24 for W/Z), zero if non-prompt or fake"),
10 ])


JET

Definition at line 156 of file autophobj.py.

tuple objects.autophobj.jetTypeExtra
Initial value:
1 = NTupleObjectType("jetExtra", baseObjectTypes = [ jetType ], variables = [
2  NTupleVariable("area", lambda x : x.jetArea(), help="Catchment area of jet"),
3  # QG variables:
4  NTupleVariable("qgl", lambda x : getattr(x,'qgl', 0) , float, mcOnly=False,help="QG Likelihood"),
5  NTupleVariable("ptd", lambda x : getattr(x,'ptd', 0), float, mcOnly=False,help="QG input variable: ptD"),
6  NTupleVariable("axis2", lambda x : getattr(x,'axis2', 0) , float, mcOnly=False,help="QG input variable: axis2"),
7  NTupleVariable("mult", lambda x : getattr(x,'mult', 0) , int, mcOnly=False,help="QG input variable: total multiplicity"),
8  NTupleVariable("partonId", lambda x : getattr(x,'partonId', 0), int, mcOnly=True, help="parton flavour (manually matching to status 23 particles)"),
9  NTupleVariable("partonMotherId", lambda x : getattr(x,'partonMotherId', 0), int, mcOnly=True, help="parton flavour (manually matching to status 23 particles)"),
10  NTupleVariable("nLeptons", lambda x : len(x.leptons) if hasattr(x,'leptons') else 0 , float, mcOnly=False,help="Number of associated leptons"),
11 ])

Definition at line 166 of file autophobj.py.

tuple objects.autophobj.leptonType
Initial value:
1 = NTupleObjectType("lepton", baseObjectTypes = [ particleType ], variables = [
2  NTupleVariable("charge", lambda x : x.charge(), int),
3  # Identification
4  NTupleVariable("tightId", lambda x : x.tightId(), int, help="POG Tight ID (for electrons it's configured in the analyzer)"),
5  NTupleVariable("eleCutIdCSA14_25ns_v1", lambda x : (1*x.electronID("POG_Cuts_ID_CSA14_25ns_v1_Veto") + 1*x.electronID("POG_Cuts_ID_CSA14_25ns_v1_Loose") + 1*x.electronID("POG_Cuts_ID_CSA14_25ns_v1_Medium") + 1*x.electronID("POG_Cuts_ID_CSA14_25ns_v1_Tight")) if abs(x.pdgId()) == 11 else -1, int, help="Electron cut-based id (POG CSA14_25ns_v1): 0=none, 1=veto, 2=loose, 3=medium, 4=tight"),
6  NTupleVariable("eleCutIdCSA14_50ns_v1", lambda x : (1*x.electronID("POG_Cuts_ID_CSA14_50ns_v1_Veto") + 1*x.electronID("POG_Cuts_ID_CSA14_50ns_v1_Loose") + 1*x.electronID("POG_Cuts_ID_CSA14_50ns_v1_Medium") + 1*x.electronID("POG_Cuts_ID_CSA14_50ns_v1_Tight")) if abs(x.pdgId()) == 11 else -1, int, help="Electron cut-based id (POG CSA14_50ns_v1): 0=none, 1=veto, 2=loose, 3=medium, 4=tight"),
7  # Impact parameter
8  NTupleVariable("dxy", lambda x : x.dxy(), help="d_{xy} with respect to PV, in cm (with sign)"),
9  NTupleVariable("dz", lambda x : x.dz() , help="d_{z} with respect to PV, in cm (with sign)"),
10  NTupleVariable("edxy", lambda x : x.edB(), help="#sigma(d_{xy}) with respect to PV, in cm"),
11  NTupleVariable("edz", lambda x : x.gsfTrack().dzError() if abs(x.pdgId())==11 else x.innerTrack().dzError() , help="#sigma(d_{z}) with respect to PV, in cm"),
12  NTupleVariable("ip3d", lambda x : x.ip3D() , help="d_{3d} with respect to PV, in cm (absolute value)"),
13  NTupleVariable("sip3d", lambda x : x.sip3D(), help="S_{ip3d} with respect to PV (significance)"),
14  # Conversion rejection
15  NTupleVariable("convVeto", lambda x : x.passConversionVeto() if abs(x.pdgId())==11 else 1, int, help="Conversion veto (always true for muons)"),
16  NTupleVariable("lostHits", lambda x : (x.gsfTrack() if abs(x.pdgId())==11 else x.innerTrack()).hitPattern().numberOfLostHits(ROOT.reco.HitPattern.MISSING_INNER_HITS), int, help="Number of lost hits on inner track"),
17  # Isolations with the two radia
18  NTupleVariable("relIso03", lambda x : x.relIso03, help="PF Rel Iso, R=0.3, pile-up corrected"),
19  NTupleVariable("relIso04", lambda x : x.relIso04, help="PF Rel Iso, R=0.4, pile-up corrected"),
20  # Charge flip rejection criteria
21  NTupleVariable("tightCharge", lambda lepton : ( lepton.isGsfCtfScPixChargeConsistent() + lepton.isGsfScPixChargeConsistent() ) if abs(lepton.pdgId()) == 11 else 2*(lepton.innerTrack().ptError()/lepton.innerTrack().pt() < 0.2), int, help="Tight charge criteria: for electrons, 2 if isGsfCtfScPixChargeConsistent, 1 if only isGsfScPixChargeConsistent, 0 otherwise; for muons, 2 if ptError/pt < 0.20, 0 otherwise "),
22  # MC-match info
23  NTupleVariable("mcMatchId", lambda x : x.mcMatchId, int, mcOnly=True, help="Match to source from hard scatter (pdgId of heaviest particle in chain, 25 for H, 6 for t, 23/24 for W/Z), zero if non-prompt or fake"),
24  NTupleVariable("mcMatchAny", lambda x : x.mcMatchAny, int, mcOnly=True, help="Match to any final state leptons: 0 if unmatched, 1 if light flavour (including prompt), 4 if charm, 5 if bottom"),
25  NTupleVariable("mcMatchTau", lambda x : x.mcMatchTau, int, mcOnly=True, help="True if the leptons comes from a tau"),
26 ])
Abs< T >::type abs(const T &t)
Definition: Abs.h:22


LEPTON

BASIC VERSION WITH ONLY MAIN LEPTON ID CRITERIA

Definition at line 37 of file autophobj.py.

Referenced by TopGenEvent.numberOfLeptons().

tuple objects.autophobj.leptonTypeExtra

EXTENDED VERSION WITH INDIVIUAL DISCRIMINATING VARIABLES.

Definition at line 65 of file autophobj.py.

tuple objects.autophobj.metType
Initial value:
1 = NTupleObjectType("met", baseObjectTypes = [ fourVectorType ], variables = [
2  NTupleVariable("sumEt", lambda x : x.sumEt() ),
3  NTupleVariable("genPt", lambda x : x.genMET().pt() , mcOnly=True ),
4  NTupleVariable("genPhi", lambda x : x.genMET().phi(), mcOnly=True ),
5  NTupleVariable("genEta", lambda x : x.genMET().eta(), mcOnly=True ),
6 ])
T eta() const
Definition: DDAxes.h:10


MET

Definition at line 183 of file autophobj.py.

tuple objects.autophobj.objectFloat
Initial value:
1 = NTupleObjectType("builtInType", variables = [
2  NTupleVariable("", lambda x : x),
3 ])

Definition at line 8 of file autophobj.py.

tuple objects.autophobj.objectInt
Initial value:
1 = NTupleObjectType("builtInType", variables = [
2  NTupleVariable("", lambda x : x,int),
3 ])

Definition at line 11 of file autophobj.py.

tuple objects.autophobj.particleType
Initial value:
1 = NTupleObjectType("particle", baseObjectTypes = [ fourVectorType ], variables = [
2  NTupleVariable("pdgId", lambda x : x.pdgId(), int),
3 ])

Definition at line 28 of file autophobj.py.

tuple objects.autophobj.photonType
Initial value:
1 = NTupleObjectType("gamma", baseObjectTypes = [ particleType ], variables = [
2  NTupleVariable("idCutBased", lambda x : x.idCutBased, int, help="1,2,3 if the gamma passes the loose, medium, tight WP of PhotonCutBasedID"),
3  NTupleVariable("hOverE", lambda x : x.hOVERe(), float, help="hoverE for photons"),
4  NTupleVariable("r9", lambda x : x.r9(), float, help="r9 for photons"),
5  NTupleVariable("sigmaIetaIeta", lambda x : x.sigmaIetaIeta(), float, help="sigmaIetaIeta for photons"),
6  #NTupleVariable("chHadIso", lambda x : x.chargedHadronIso(), float, help="chargedHadronIsolation for photons"),
7  #NTupleVariable("neuHadIso", lambda x : x.neutralHadronIso(), float, help="neutralHadronIsolation for photons"),
8  #NTupleVariable("phIso", lambda x : x.photonIso(), float, help="gammaIsolation for photons"),
9  NTupleVariable("chHadIso", lambda x : x.recoChargedHadronIso(), float, help="chargedHadronIsolation for photons"),
10  NTupleVariable("neuHadIso", lambda x : x.recoNeutralHadronIso(), float, help="neutralHadronIsolation for photons"),
11  NTupleVariable("phIso", lambda x : x.recoPhotonIso(), float, help="gammaIsolation for photons"),
12  NTupleVariable("mcMatchId", lambda x : x.mcMatchId, int, mcOnly=True, help="Match to source from hard scatter (pdgId of heaviest particle in chain, 25 for H, 6 for t, 23/24 for W/Z), zero if non-prompt or fake"),
13 ])


PHOTON

Definition at line 138 of file autophobj.py.

Referenced by gen::EvtGenInterface.init().

tuple objects.autophobj.tauType
Initial value:
1 = NTupleObjectType("tau", baseObjectTypes = [ particleType ], variables = [
2  NTupleVariable("charge", lambda x : x.charge(), int),
3  NTupleVariable("decayMode", lambda x : x.decayMode(), int),
4  NTupleVariable("idDecayMode", lambda x : x.idDecayMode, int),
5  NTupleVariable("idDecayModeNewDMs", lambda x : x.idDecayModeNewDMs, int),
6  NTupleVariable("dxy", lambda x : x.dxy(), help="d_{xy} of lead track with respect to PV, in cm (with sign)"),
7  NTupleVariable("dz", lambda x : x.dz() , help="d_{z} of lead track with respect to PV, in cm (with sign)"),
8  NTupleVariable("idMVA", lambda x : x.idMVA, int, help="1,2,3,4,5,6 if the tau passes the very loose to very very tight WP of the MVA3oldDMwLT discriminator"),
9  NTupleVariable("idMVANewDM", lambda x : x.idMVANewDM, int, help="1,2,3,4,5,6 if the tau passes the very loose to very very tight WP of the MVA3newDMwLT discriminator"),
10  NTupleVariable("idCI3hit", lambda x : x.idCI3hit, int, help="1,2,3 if the tau passes the loose, medium, tight WP of the By<X>CombinedIsolationDBSumPtCorr3Hits discriminator"),
11  NTupleVariable("idAntiMu", lambda x : x.idAntiMu, int, help="1,2 if the tau passes the loose/tight WP of the againstMuon<X>3 discriminator"),
12  NTupleVariable("idAntiE", lambda x : x.idAntiE, int, help="1,2,3,4,5 if the tau passes the v loose, loose, medium, tight, v tight WP of the againstElectron<X>MVA5 discriminator"),
13  NTupleVariable("isoCI3hit", lambda x : x.tauID("byCombinedIsolationDeltaBetaCorrRaw3Hits"), help="byCombinedIsolationDeltaBetaCorrRaw3Hits raw output discriminator"),
14  # MC-match info
15  NTupleVariable("mcMatchId", lambda x : x.mcMatchId, int, mcOnly=True, help="Match to source from hard scatter (pdgId of heaviest particle in chain, 25 for H, 6 for t, 23/24 for W/Z), zero if non-prompt or fake"),
16 ])


TAU

Definition at line 105 of file autophobj.py.

tuple objects.autophobj.twoVectorType
Initial value:
1 = NTupleObjectType("twoVector", variables = [
2  NTupleVariable("pt", lambda x : x.pt()),
3  NTupleVariable("phi", lambda x : x.phi()),
4 ])

Definition at line 15 of file autophobj.py.