// the following fuction is to calculate the strand break number
computeStrandBreaks(sb)
}
question one
when using the multithread , the function is performed in the unique thread, i wonder that we should performe the function after the accumulate the energy deposit from all threads
question two
the fucntion is performed in the eventaction function, if we should transfer the fuction into runaction.
In multithreaded running, each event is processed in a separate thread. Events do not interact with one another or contribute to one another. Thatβs why the strand-breaking is done per thread, and why it is done in EventAction.
I get it, although the deposit energy is acquired by the separate thread, the result of strand- breaking is based on the total deposit energy from all the thread . for example .
threshold is 1.
thread one: deposit energy is 0.5 < threshold, strand is not breaked.
thread two : deposit energy is 0.5 < threshold, strand is not breaked.
thread three : deposit energy is 0.5 < threshold, strand is not breaked.
but the total energy 1.5 > threshold , i think we should check that the strand has been breaked. if we check the result in the event action , we will underestimate the number of strand breaks.
Iβm not explaining it well. You run your simulation, and you type /run/beamOn 50 at the end. That generates fifty entirely separate, uncorrelated simulations. The energy from each of those separate events does not add together. Each one is independent.
If you run single threaded, then those events are generate one after another after another. If you run multithreaded, then each event gets farmed out to a thread. But they are still independent, and you do not sum up the energies from different events.
thanks your reply. to calculate the DNA strand break, there are two examples.
one is from the geant4 example pdb4dna. in this example, the calculation of DSB is performed in the end event action.
another example is from IDDRRA_project. in this project ,the author performs the calculation of DSB after the simulation with the python. the relevant code can be gained in the github.
in the python script,
with open (infile, βrβ) as fp:
line = fp.readline()