ntuple = [] # May have more feature than needed. features = [ 'dr', 'dz', 'cosaXY', 'min_dr', 'min_dz', 'pt', 'pz', 'chiProb', 'p' ] features += create_aliases_for_selected(['PIDppi', 'PIDpk', 'PIDkpi', 'p'], 'Lambda0 -> ^p+ ^pi-', prefix=['proton', 'pi']) spectator = ['isSignal', 'isPrimarySignal', 'mcPDG', 'genMotherPDG'] spectator += ['IPX', 'IPY', 'IPZ', 'M', 'p', 'goodBelleLambda', 'distance'] ntuple = features + spectator return ntuple if __name__ == '__main__': infile, outfile = sys.argv[1], sys.argv[2] mypath = b2.create_path() b2c.convertBelleMdstToBelleIIMdst(infile, path=mypath) reconstructLambda('Lambda0:belle', match=True, only='background', path=mypath) ntuple = make_ntuple() ma.variablesToNtuple('Lambda0:belle', ntuple, 'Lambda', outfile, path=mypath) b2.process(path=mypath)
'BELLE2_OPTION', 'BELLE_POSTGRES_SERVER', 'USE_GRAND_REPROCESS_DATA', 'PANTHER_TABLE_DIR', 'PGUSER' ] # Print env variables for check print("Environmental Variables".center(80, '=')) for v in env_list: print_env(v) # Show input and output file info print("Input: %s" % sys.argv[1]) print("Ouput: %s" % sys.argv[2]) mp = b2.create_path() b2c.convertBelleMdstToBelleIIMdst(sys.argv[1], applyHadronBJSkim=True, path=mp) # Aliases for the variables to make the root file easier to understand variables.addAlias('pid_ppi', 'atcPIDBelle(4,2)') variables.addAlias('pid_pk', 'atcPIDBelle(4,3)') variables.addAlias('pid_kpi', 'atcPIDBelle(3,2)') variables.addAlias('cosa', 'cosAngleBetweenMomentumAndVertexVector') variables.addAlias('cosaXY', 'cosAngleBetweenMomentumAndVertexVectorInXYPlane') mc_vars = [ 'isSignal', 'isPrimarySignal', 'mcPDG', 'genMotherPDG', 'nMCMatches', 'mcP', 'mcE', 'mcPT' ] kinematic_vars = ['M', 'p', 'pt', 'pz', 'phi', 'theta', 'charge', 'xp'] vertex_vars = [