当前位置: 首页>>代码示例>>Python>>正文


Python Constants.baryonproductionthreshold方法代码示例

本文整理汇总了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)
开发者ID:PyLund-MC,项目名称:PyLund,代码行数:48,代码来源:Availabledecays.py


注:本文中的Constants.baryonproductionthreshold方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。