Skip to content

Commit

Permalink
GeneratorDBLabel with Initial State
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkzerwas authored Dec 4, 2024
1 parent a6f5d2a commit 35a9cf5
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions python/Process.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,24 @@ def process_info(self):
self._proclabel += f"{self._finfo[p].name} "
self._parts.append(self._finfo[p])
# generate the label for the generatorDB
# first the initial state
initialstate = [abs(self.initial[0]), abs(self.initial[1])]
#sort ascending
initialstate.sort()
# add to label
for pdg in initialstate:
self.generatorDBLabel += f"_{str(abs(pdg))}"
# remove leading "_"
self.generatorDBLabel = self.generatorDBLabel[
(self.generatorDBLabel.index("_") + 1) :
]
# now the final state
finalstate = [abs(part) for part in self.final]
# sort ascending
finalstate.sort()
# add to label
for pdg in finalstate:
self.generatorDBLabel += f"_{str(abs(pdg))}"
# remove leading _
self.generatorDBLabel = self.generatorDBLabel[
(self.generatorDBLabel.index("_") + 1) :
]

def set_particle_data(self, pdata):
if pdata is None or self._init:
Expand Down

0 comments on commit 35a9cf5

Please sign in to comment.