def addToIncludeBlocks(jetname, list): key = jetname + "_include" dict = JetTagD3PDFlags.D3PDPropDict() if key in dict.keys(): list += dict[key] JetTagD3PDFlags.D3PDPropDict().update({key: list})
def addBHadronGhostAssociation(jetcollection): if TruthD3PDFlags.GenParticleAssocLabel() != "": addToIncludeBlocks( jetcollection, [JetTagD3PDKeys.JetBHadronGhostAssocBlockName() + "tmp"]) JetTagD3PDFlags.D3PDPropDict().update({ jetcollection + "_" + JetTagD3PDKeys.JetBHadronGhostAssocBlockName( ) + "_target": TruthD3PDFlags.GenParticleAssocLabel() })
def addTrackGhostAssociation(jetcollection): ### assoc name is TrackAssoc ### using the default assoc otherwise use setupGhostAssociator to get a custom assoc if JetTagD3PDFlags.TrackAssocLabel() != "": JetTagD3PDFlags.D3PDPropDict().update( { jetcollection + "_" + JetTagD3PDKeys.JetTrackGhostAssocBlockName( ) + "_target": JetTagD3PDFlags.TrackAssocLabel() })
JetTagD3PDFlags.TrackPtCut = 250. JetTagD3PDFlags.MCPtMinCut = 250. JetTagD3PDFlags.Taggers = JetTagD3PDFlags.AllTaggers() JetTagD3PDFlags.JetFitterFlipTwoTrackVertexAssoc = False JetTagD3PDFlags.JetFitterFlipVxOnJetAxisAssoc = False JetTagD3PDFlags.JetFitterVertexFinderInfo = False JetTagD3PDFlags.JetVKalVxBadTrack = False JetTagD3PDFlags.InfoBaseCalib = True JetTagD3PDFlags.JetFitterTagFlipInfo = True ### 25-11-2010 all other flags are as default - no need to change them JetTagD3PDFlags.AddVxOnJetAxisInJetsObject = False JetTagD3PDFlags.AddTwoTrackVertexInJetsObject = False JetTagD3PDFlags.METObjects = [] JetTagD3PDFlags.AddPixelClusterObject = False JetTagD3PDFlags.AddTruthTrackObjects = False JetTagD3PDFlags.AddGenVertexObjects = False ### remove muon hit summary JetTagD3PDFlags.D3PDPropDict().update(muon1injet_level=1) JetTagD3PDFlags.D3PDPropDict().update(muon2injet_level=1) JetTagD3PDFlags.JetElectronAssoc = True JetTagD3PDFlags.JetPhotonAssoc = False JetTagD3PDFlags.SoftElectronInfo = True JetTagD3PDFlags.SoftMuonInfo = True JetTagD3PDFlags.AddElectronInJetsObject = True JetTagD3PDFlags.AddPhotonInJetsObject = False JetTagD3PDFlags.NewGbbNNInfo = True JetTagD3PDFlags.QGInfo = True JetTagD3PDFlags.JetFitterCharmTagInfo = True
JetTagD3PDKeys.PrimaryVertexGetterLabel = JetTagD3PDKeys.PrimaryVertexPrefix() ### switch on second muon from BTagging.BTaggingFlags import BTaggingFlags if BTaggingFlags.SecondSoftMu: JetTagD3PDFlags.AddSecondMuonCollection=True ### which ntuple configuration to load? if JetTagD3PDFlags.NtupleType() == "": print "custom configuration used for JetTagD3PD" if JetTagD3PDFlags.NtupleType() == "Debug": include("JetTagD3PDMaker/DebugNtuple_LoadConfig.py") print "Debug configuration used for JetTagD3PD" if JetTagD3PDFlags.NtupleType() == "Full": include("JetTagD3PDMaker/FullNtuple_LoadConfig.py") print "Full configuration used for JetTagD3PD" if JetTagD3PDFlags.NtupleType() == "Efficiency": include("JetTagD3PDMaker/EffNtuple_LoadConfig.py") print "Efficiency configuration used for JetTagD3PD" ## create the D3PD alg import D3PDMakerCoreComps alg = D3PDMakerCoreComps.MakerAlg(JetTagD3PDKeys.D3PDAlgName(), topSequence, file = JetTagD3PDKeys.D3PDFileName(), D3PDSvc = 'D3PD::RootD3PDSvc', tuplename=JetTagD3PDKeys.D3PDTupleName()) from JetTagD3PDMaker.BTaggingD3PD import BTaggingD3PD BTaggingD3PD(alg, **(JetTagD3PDFlags.D3PDPropDict()))
addToIncludeBlocks('AntiKt4LCTopoJets' + jettagd3pd_jetnamepostfix, ['ConstituentScale', 'TracksMoments']) if JetTagD3PD_AntiKt6LCTopo: JetTagD3PDFlags.JetCollections += [ 'AntiKt6LCTopoJets' + jettagd3pd_jetnamepostfix ] addToIncludeBlocks('AntiKt6LCTopoJets' + jettagd3pd_jetnamepostfix, ['ConstituentScale', 'TracksMoments']) ### configure btagging for additional jet collections if JetTagD3PD_AntiKt4MuonNonInteractingTruth: JetTagD3PDFlags.JetCollections += [ 'AntiKt4MuonNonInteractingTruthJets' + jettagd3pd_jetnamepostfix ] JetTagD3PDFlags.D3PDPropDict().update({ "AntiKt4MuonNonInteractingTruthJets" + jettagd3pd_jetnamepostfix + "_level": 0 }) if JetTagD3PD_runJVF: JetTagD3PDFlags.D3PDPropDict().update({ "AntiKt4MuonNonInteractingTruthJets" + jettagd3pd_jetnamepostfix + "_include": ["JVtx"] }) if JetTagD3PD_AntiKt6MuonNonInteractingTruth: JetTagD3PDFlags.JetCollections += [ 'AntiKt6MuonNonInteractingTruthJets' + jettagd3pd_jetnamepostfix ] JetTagD3PDFlags.D3PDPropDict().update({ "AntiKt6MuonNonInteractingTruthJets" + jettagd3pd_jetnamepostfix + "_level": 0 })