Skip to content
Snippets Groups Projects
Commit a7fcc051 authored by Bertram Kopf's avatar Bertram Kopf
Browse files

added missing mutex in AbsXdecAmp::setSpinProjections

parent 46a62f16
No related branches found
No related tags found
No related merge requests found
......@@ -159,26 +159,31 @@ void AbsXdecAmp::calcDynamics(EvtData* theData, AbsXdecAmp* grandmaAmp){
void AbsXdecAmp::setSpinProjections(int projId){
std::vector<Spin> projections=_fsParticleProjections->spinProjections().at(projId);
theMutex.lock();
_projIdThreadMap[std::this_thread::get_id()]=projId;
_lam1MinThreadMap[std::this_thread::get_id()]=_lam1Min;
_lam1MaxThreadMap[std::this_thread::get_id()]=_lam1Max;
_lam2MinThreadMap[std::this_thread::get_id()]=_lam2Min;
_lam2MaxThreadMap[std::this_thread::get_id()]=_lam2Max;
theMutex.unlock();
if(_daughter1IsStable){
Spin currentProjection=projections.at(_daughter1ProjId);
theMutex.lock();
_lam1MinThreadMap[std::this_thread::get_id()]=currentProjection;
_lam1MaxThreadMap[std::this_thread::get_id()]=currentProjection;
theMutex.unlock();
}
else _decAmpDaughter1->setSpinProjections(projId);
if(_daughter2IsStable){
Spin currentProjection=projections.at(_daughter2ProjId);
theMutex.lock();
_lam2MinThreadMap[std::this_thread::get_id()]=currentProjection;
_lam2MaxThreadMap[std::this_thread::get_id()]=currentProjection;
theMutex.unlock();
}
else _decAmpDaughter2->setSpinProjections(projId);
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment