本文整理汇总了Python中Constants.baryonproductionthreshold方法的典型用法代码示例。如果您正苦于以下问题:Python Constants.baryonproductionthreshold方法的具体用法?Python Constants.baryonproductionthreshold怎么用?Python Constants.baryonproductionthreshold使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Constants
的用法示例。
在下文中一共展示了Constants.baryonproductionthreshold方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Finddecay
# 需要导入模块: import Constants [as 别名]
# 或者: from Constants import baryonproductionthreshold [as 别名]
def Finddecay(self):
sdc = Stringdecay.stringdecay4D(self.__mrs) # stringdecayclass
content = self.Getend()
chosenquark = content[0] # this is either the quark/antiquark of the string QID, QbarID.
chosenquark = float(chosenquark)
chosencode = PDG_ID.PDG_Type(chosenquark)
otherendcode = PDG_ID.PDG_Type(float(content[1]))
if chosencode.isDiquark() is True: # If decaying end is a diquark, doesnt actually matter what the other end is. The diquark does its own thing and leaves a remnant.
return self.Quarkdecay(chosenquark)
if chosencode.isQuark() is True and otherendcode.isDiquark() is True: # In the event that you have a quark and a diquark, and you choose the quark end.
# The chosen quark cannot produce a diquark as there is already one at the other end.
while True:
product = self.Quarkdecay(chosenquark)
productcode = PDG_ID.PDG_Type(float(product[1]))
#print "AVAIALBLEDECAYS STUCK PLACE 1"
#print productcode
#print productcode.isDiquark(), "CODE TRUTH"
if productcode.isDiquark() is False:
return product
continue
# In the event that we have two quarks, this part runs. Need to make sure that we conserve spin of diquarks and dont produce something unphysical (doesnt have to make a diquark.
invaliddiquarks = [1101,2201,3301]
while True:
product = self.Quarkdecay(chosenquark)
productcode = PDG_ID.PDG_Type(float(product[1]))
#print "AVAILABLEDECAYS STUCK PLACE 2"
if productcode.isDiquark() is True:
#print "AVAILDECAYS STUCK 2 LOOP"
if self.__mrs.Getstringmass() <= Constants.baryonproductionthreshold():
"AVAILDECAYS STUCK 2 LOOP BBB"
continue
#print "PASSED CRITERIONS"
recievingdiquark = sdc.Finddiquarkstringcontent(chosenquark,product[1]) # check that you dont produce an invalid diquark (spin conservation)
#print "GOT PAST DIQUARK FORMER"
if abs(recievingdiquark) in invaliddiquarks:
#print "INVALID DIQUARKS BREAKING"
continue
return product
return self.Quarkdecay(chosenquark)