Exemple #1
0
def tuple_spec_data(name, sel_seq, template,
                    B_meson='b', weights='./weights_soft.xml',
                    tools=[
                        "TupleToolKinematic",
                        "TupleToolPrimaries",
                        "TupleToolEventInfo",
                        "TupleToolTrackInfo",
                        "TupleToolRecoStats"
                    ],
                    trigger_list=[
                        # L0
                        'L0HadronDecision',
                        'L0MuonDecision',
                        'L0DiMuonDecision',
                        'L0ElectronDecision',
                        # HLT 1
                        'Hlt1TrackMVADecision',
                        'Hlt1TwoTrackMVADecision',
                        'Hlt1TrackMuonDecision',
                        # HLT 2
                        'Hlt2DiMuonDetachedHeavyDecision',
                    ]
                    ):
    tp = DecayTreeTuple(name)
    tp.NTupleDir = ''  # From Greg, might be interesting
    tp.TupleName = name

    tp_input = sel_seq if isinstance(sel_seq, str) else sel_seq.outputLocation()
    tp.Inputs = [tp_input]

    tp.setDescriptorTemplate(template)

    tp.ToolList += tools

    tt_pid = really_add_tool(tp, 'TupleToolPid')
    tt_pid.Verbose = True

    tt_geo = really_add_tool(tp, 'TupleToolGeometry')
    tt_geo.Verbose = True

    tt_tistos = really_add_tool(tp, 'TupleToolTISTOS')
    tt_tistos.Verbose = True
    tt_tistos.TriggerList = trigger_list

    tt_l0_calo = really_add_tool(tp, 'TupleToolL0Calo')
    tt_l0_calo.WhichCalo = "HCAL"
    tt_l0_calo.TriggerClusterLocation = "/Event/Trig/L0/Calo"

    tt_app_iso = getattr(tp, B_meson).addTupleTool('TupleToolApplyIsolation')
    tt_app_iso.WeightsFile = weights

    return tp