decomposition package
Submodules
decomposition.decomposer module
- decomposition.decomposer.addOneStepDecays(sms, sigmacutFB=0.0)[source]
Given a tree, generates a list of new trees (Tree objects), where all the (unstable) nodes appearing at the end of the original tree have been decayed. Each entry in the list corresponds to a different combination of decays. If no decays were possible, return an empty list.
- Parameters
tree – Tree (Tree object) for which to add the decays
sigmacutFB – Cut on the tree weight (xsec*BR) in fb. Any tree with weights smaller than sigmacutFB will be ignored.
- Returns
List of trees with all possible 1-step decays added.
- decomposition.decomposer.cascadeDecay(tree, sigmacutFB=0.0)[source]
Given a tree, generates a list of new trees (Tree objects), where all the particles have cascade decayed to stable final states.
- Parameters
tree – Tree (Tree object) for which to add the decays
sigmacutFB – Cut on the tree weight (xsec*BR) inf b. Any tree with weights smaller than sigmacutFB will be ignored.
- Returns
List of trees with all possible decays added.
- decomposition.decomposer.decompose(model, sigmacut=0.00E+00[fb], massCompress=True, invisibleCompress=True, minmassgap=0.00E+00[GeV])[source]
Perform decomposition using the information stored in model.
- Parameters
sigmacut – minimum sigma*BR to be generated, by default sigcut = 0.1 fb
massCompress – turn mass compression on/off
invisibleCompress – turn invisible compression on/off
minmassgap – maximum value (in GeV) for considering two R-odd particles degenerate (only revelant for massCompress=True )
- Returns
list of topologies (TopologyList object)
- decomposition.decomposer.getDecayNodes(mother)[source]
Generates a simple list of trees with all the decay channels for the mother. In each tree the mother appears as the root and each of its decays as daughters. (The node numbering for the root/mother node is kept equal, while the numbering of the daughters is automatically assigned to avoid overlap with any previously created nodes, so the decay tree can be directly merged to any other tree.)
- Parameters
mother – Mother for which the decay trees will be generated (ParticleNode object)
- Returns
A list with simple tuples ((mom,daughters,BRs)) where the first entry is the new mother ParticleNode, the second is a list of daughter ParticleNode objects and the third the corresponding BR.
decomposition.exceptions module
decomposition.theorySMS module
- class decomposition.theorySMS.TheorySMS[source]
Bases:
GenericSMS
A class for describing Simplified Model Topologies generated by the decompostion of full BSM models.
Initialize basic attributes.
- addNodesFrom(other)[source]
Combines the nodes (add particles) in equivalent nodes in each trees. Can only be done if the trees have the same topology and ordering.
- Parameters
other – TheorySMS object
- attachDecay(motherIndex, decayNodes, br=1.0, copy=True)[source]
Attaches a decay to self. If copy = True, returns a copy of self with the decay attached.
- Parameters
motherIndex – Node index for the mother to which the decay should be added.
decayNodes – Particle nodes for the daughters.
copy – if True, return a copy of self, with the decay attached.
- Br
Branching ratio value for the decay
- Returns
new tree with the other composed with self.
- compareTo(other)[source]
Compare self to other. If the SMS are not sorted, sort them and then do a direct comparison of each node with the same nodeIndex.
- Parameters
other – SMS object to be compared against self
- Returns
0, if objects are equal, -1 if self < other, 1 if other > sekf
- compress(doCompress, doInvisible, minmassgap)[source]
Keep compressing the original SMS and the derived ones till they can be compressed no more.
- Parameters
doCompress – if True, perform mass compression
doInvisible – if True, perform invisible compression
minmassgap – value (in GeV) of the maximum mass difference for compression (if mass difference < minmassgap, perform mass compression)
- Returns
list with the compressed SMS (TheorySMS objects)
- computeWeightList()[source]
Computes the SMS weight (production cross-section*BRs) using maxWeight and the production cross-section.
- Returns
CrossSectionList object
- copy(emptyNodes=False)[source]
Returns a shallow copy of self.
- Parameters
emptyNodes – If True, does not copy any of the nodes from self.
- Returns
TheorySMS object
- getAncestors()[source]
Get a list of all the ancestors of self. The list is ordered so the mothers appear first, then the grandmother, then the grandgrandmothers,…
- Returns
A list of SMS objects containing all the ancestors sorted by generation.
- invisibleCompress()[source]
Perform invisible compression. It is done if there is a decay of the type BSM > xxx if all daughters are leaves and can be considered MET and the mother can be considered MET OR decays promptly.
- Returns
compressed copy of the SMS, if element ends with invisible particles; None, if compression is not possible
- isRelatedTo(other)[source]
Checks if self has other as an ancestor or they share ancestors. Returns True if self and other have at least one ancestor in common, otherwise returns False.
- Returns
True/False
- massCompress(minmassgap)[source]
Perform mass compression. It is only done if there is one decay of type BSM_i -> BSM_j + (any number of SM), where mass(BSM_i) - mass(BSM_j) < minmassgap AND BSM_i have a prompt decay.
- Parameters
minmassgap – value (in GeV) of the maximum mass difference for compression (if mass difference < minmassgap -> perform mass compression)
- Returns
compressed copy of self, if two masses in the SMS can be considered degenerate; None, if compression is not possible;
- setCoveredBy(resultType)[source]
Tag the sms as covered by the result type (it is tested AND its parameters are within the result grid). It also recursively tags all of its ancestors.
- Parameters
resultType – String describing the type of result (e.g. ‘prompt’, ‘displaced’)
- setGlobalProperties(sort=True, canonName=True, weight=True)[source]
Compute and set global properties for the SMS (sort, renumber nodes, compute the canonical name and its total weight). Should only be called once the SMS will no longer be modified.
- Parameters
canonName – If True, compute its canonical name
sort – If True, sort the SMS
weight – If True, compute its total weight
decomposition.topologyDict module
- class decomposition.topologyDict.TopologyDict[source]
Bases:
OrderedDict
An instance of this class represents an iterable collection of topologies.
- compress(doCompress, doInvisible, minmassgap)[source]
Compress all SMS in the dictionary and include the compressed SMS in the topology list.
- Parameters
doCompress – if True, perform mass compression
doInvisible – if True, perform invisible compression
minmassgap – value (in GeV) of the maximum mass difference for compression (if mass difference < minmassgap, perform mass compression)
- getSMSList(canonName=None)[source]
Return a list with all the SMS appearing in the dict. If canonName is not None, return the SMS with the corresponding canonical name only.
- Parameters
canonName – if None, return all SMS, otherwise return only the the SMS with the corresponding canonical name.
- Returns
List of TheorySMS objects.