Пример #1
0
        lepMass,
    )

    print " Helicity angles names:\n helcosthetaK = %s \n helcosthetaL = %s \n helphi = %s" % (
        obsDict["helcosthetaK"][0],
        obsDict["helcosthetaL"][0],
        obsDict["helphi"][0],
    )

    addHelicityAnglesToTree(
        intermediateTree,
        daughterPartNames["posHad"],
        daughterPartNames["negHad"],
        daughterPartNames["posLep"],
        daughterPartNames["negLep"],
        posHadMass,
        negHadMass,
        lepMass,
        lepMass,
        obsDict["helcosthetaK"][0],
        obsDict["helcosthetaL"][0],
        obsDict["helphi"][0],
    )


# close intermediate files
intermediateTree.Write()
intermediateFile.Close()
del intermediateFile
print "P2VV - INFO: Wrote intermediate tree to file: %s" % intermediateFileName
print "P2VV - INFO: Finished refining tree. Continuing to create RooDataSet"
Пример #2
0
if daughterPartMasses['negLep'] == 'muon': lepMass = Mmu
else: assert False, 'P2VV - ERROR: Cannot assign mass to negative hadron.'

# add helicity angles to tree
print ' P2VV - INFO: The following associations will be made:\n '\
    ' Positive hadron name: %s, mass=%s \n  Negative hadron name: %s, mass=%s \n '\
    ' Positive lepton name: %s, mass=%s \n  Negative lepton name: %s, mass=%s \n'\
    ' Units MUST be in MeV. Check!!!'\
    %(daughterPartNames['posHad'], posHadMass, daughterPartNames['negHad'], negHadMass,\
      daughterPartNames['posLep'], lepMass,    daughterPartNames['negLep'], lepMass)
print ' Helicity angles names:\n helcosthetaK = %s \n helcosthetaL = %s \n helphi = %s'\
    %( angleNames['helcosthetaK'], angleNames['helcosthetaL'], angleNames['helphi'] )

addHelicityAnglesToTree(tree, 
                        daughterPartNames['posHad'], daughterPartNames['negHad'], 
                        daughterPartNames['posLep'], daughterPartNames['negLep'],
                        posHadMass, negHadMass, lepMass, lepMass,
                        angleNames['helcosthetaK'], angleNames['helcosthetaL'], angleNames['helphi'],
                        sufixes)

# add all the possible configurations as well  
if options.addAllConfigrtns:
    print 'P2VV - INFO: Fliping hadrons and recalculating helicity angles'
    addHelicityAnglesToTree(tree, 
                            daughterPartNames['negHad'], daughterPartNames['posHad'], 
                            daughterPartNames['posLep'], daughterPartNames['negLep'],
                            negHadMass, posHadMass, lepMass, lepMass,
                            'helcosthetaK__pim_Kpl_mup_mum','helcosthetaL__pim_Kpl_mup_mum','helphi__pim_Kpl_mup_mum',
                            sufixes)

    print 'P2VV - INFO: Fliping leptons and recalculating helicity angles'
    addHelicityAnglesToTree(tree,