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

bug fix for coupled channel analyses in DynRegistry

parent 35f2aa60
No related branches found
No related tags found
No related merge requests found
...@@ -115,7 +115,7 @@ public: ...@@ -115,7 +115,7 @@ public:
double massSumFsParticlesDec1(); double massSumFsParticlesDec1();
double massSumFsParticlesDec2(); double massSumFsParticlesDec2();
int orbMomMin() {return _Lmin;} int orbMomMin() {return _Lmin;}
ChannelID channelId() {return _channelId;}
protected: protected:
virtual void extractLmin(); virtual void extractLmin();
......
...@@ -84,8 +84,18 @@ std::shared_ptr<AbsDynamics> DynRegistry::getDynamics(std::shared_ptr<AbsDecay> ...@@ -84,8 +84,18 @@ std::shared_ptr<AbsDynamics> DynRegistry::getDynamics(std::shared_ptr<AbsDecay>
std::shared_ptr<AbsDynamics> result; std::shared_ptr<AbsDynamics> result;
std::map<std::string, std::shared_ptr<AbsDynamics> >::iterator it = _dynMap.find(theName); ChannelID currentChannelId = theDec->channelId();
if (it !=_dynMap.end()){ std::map<std::string, std::shared_ptr<AbsDynamics> > currentDynMap;
std::map<ChannelID, std::map<std::string, std::shared_ptr<AbsDynamics> > >::iterator itChannelId =_dynMapChannel.find(currentChannelId);
if (itChannelId !=_dynMapChannel.end()){
currentDynMap=itChannelId->second;
}
else _dynMapChannel[currentChannelId]=currentDynMap;
std::map<std::string, std::shared_ptr<AbsDynamics> >::iterator it = currentDynMap.find(theName);
if (it !=currentDynMap.end()){
result=it->second; result=it->second;
Info << "Dynamics\t" << theName << "\tfound!!!" << endmsg; Info << "Dynamics\t" << theName << "\tfound!!!" << endmsg;
} }
...@@ -156,7 +166,7 @@ std::shared_ptr<AbsDynamics> DynRegistry::getDynamics(std::shared_ptr<AbsDecay> ...@@ -156,7 +166,7 @@ std::shared_ptr<AbsDynamics> DynRegistry::getDynamics(std::shared_ptr<AbsDecay>
Info << "add dynamics for " << theName << endmsg; Info << "add dynamics for " << theName << endmsg;
_dynMap[theName]=result; _dynMapChannel[currentChannelId][theName]=result;
_dynVec.push_back(result); _dynVec.push_back(result);
} }
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <cassert> #include <cassert>
#include <memory> #include <memory>
#include "PwaUtils/AbsChannelEnv.hh"
class AbsDecay; class AbsDecay;
class AbsDynamics; class AbsDynamics;
...@@ -57,7 +58,7 @@ protected: ...@@ -57,7 +58,7 @@ protected:
static DynRegistry* _instance; static DynRegistry* _instance;
private: private:
std::map<ChannelID, std::map<std::string, std::shared_ptr<AbsDynamics> > > _dynMapChannel;
std::map<std::string, std::shared_ptr<AbsDynamics> > _dynMap; std::map<std::string, std::shared_ptr<AbsDynamics> > _dynMap;
std::vector<std::shared_ptr<AbsDynamics> > _dynVec; std::vector<std::shared_ptr<AbsDynamics> > _dynVec;
......
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