Beispiel #1
0
def hsg2_redo_jvf_for_d3pd():
    from JetRec.JetMomentGetter import make_JetMomentGetter

    from JetMomentTools.SetupJetMomentTools import getJetVertexAssociationTool
    jvatool = getJetVertexAssociationTool('AntiKt', 0.4, 'Topo')
    # optional : rename the moment if you don't want to overwrite the existing one
    jvatool.JVFMomentName = "JVF2"
    make_JetMomentGetter( 'AntiKt4TopoJets' , [jvatool] )
    make_JetMomentGetter( 'AntiKt4TopoEMJets' , [jvatool] )


    import JetD3PDMaker
    from JetD3PDMaker.JetD3PDObject import JetD3PDObject
    JetD3PDObject.defineBlock(1, 'JVF2',
                              JetD3PDMaker.JetMomentFillerTool,
                              Moments=['JVF2'])
if TruthD3PDFlags.WriteTruthVertices():
    from TruthD3PDMaker.GenVertexD3PDObject import GenVertexD3PDObject
    alg += GenVertexD3PDObject(1,
                               'GenVertex',
                               sgkey=jobproperties.D3PDMakerFlags.TruthSGKey(),
                               prefix='mcVx_',
                               label='mcVx_')

from JetD3PDMaker.JetD3PDObject import JetD3PDObject as myJetD3PDObject
import TruthD3PDMaker

# Add parton flavor information to jets
myJetD3PDObject.defineBlock(0,
                            'JetFullTruthTag_Info',
                            TruthD3PDMaker.JetFullTruthTag,
                            prefix='flavor_',
                            MinPartonPt=5 * GeV,
                            MinHadronPt=5 * GeV)

alg += myJetD3PDObject(
    2,
    'Jet_Truth',
    sgkey='AntiKt4TruthJets',
    prefix='jet_AntiKt4TruthJets_',
    include=['TrueFlavorComponents', 'JetLabel'],
    exclude=[
        'L1Kinematics', 'L2Kinematics', 'EFKinematics', 'El02Match',
        'Mu02Match', 'L1Info', 'L2Info', 'EFInfo', 'OriginCorrection',
        'DQMoments', 'JetSamplingsFrac', 'JetQual', 'EMFraction', 'JES',
        'JESMoments', 'EMScale', 'Layer', 'Samplings', 'ConstituentScale',
        'JetLArHVMoment', 'JetClusterMoment'