Skip to content
Snippets Groups Projects
Commit ac3b3901 authored by Julian Pychy's avatar Julian Pychy
Browse files

improved the pbarp L dropping option

parent 1ea2258d
No related branches found
No related tags found
No related merge requests found
...@@ -74,16 +74,6 @@ void pbarpEnv::setup(pbarpParser* thePbarpParser){ ...@@ -74,16 +74,6 @@ void pbarpEnv::setup(pbarpParser* thePbarpParser){
_lmax=thePbarpParser->getLMax(); _lmax=thePbarpParser->getLMax();
// individual Lmax settings // individual Lmax settings
std::vector<std::string> theLmaxParticles = thePbarpParser->lmaxParticle();
for(auto lmaxIt = theLmaxParticles.begin(); lmaxIt != theLmaxParticles.end(); ++lmaxIt){
std::string particle;
short lmax;
std::stringstream stringStr;
stringStr << (*lmaxIt);
stringStr >> particle >> lmax;
_lmaxParticleData[particle] = lmax;
}
std::vector<std::string> theDropPbarpLForParticles = thePbarpParser->dropPbarpLForParticle(); std::vector<std::string> theDropPbarpLForParticles = thePbarpParser->dropPbarpLForParticle();
for(auto ldropIt = theDropPbarpLForParticles.begin(); ldropIt != theDropPbarpLForParticles.end(); ++ldropIt){ for(auto ldropIt = theDropPbarpLForParticles.begin(); ldropIt != theDropPbarpLForParticles.end(); ++ldropIt){
std::string particle; std::string particle;
......
...@@ -57,7 +57,6 @@ public: ...@@ -57,7 +57,6 @@ public:
boost::shared_ptr<pbarpReaction> reaction() {return _pbarpReaction;} boost::shared_ptr<pbarpReaction> reaction() {return _pbarpReaction;}
std::vector<std::string>& spinDensityNames(){ return _spinDensity;} std::vector<std::string>& spinDensityNames(){ return _spinDensity;}
std::map<std::string, short> lmaxParticleData(){ return _lmaxParticleData; }
std::map<std::string, std::vector<short> > dropPbarpLForParticleData(){ return _dropPbarpLForParticleData; } std::map<std::string, std::vector<short> > dropPbarpLForParticleData(){ return _dropPbarpLForParticleData; }
protected: protected:
...@@ -69,6 +68,5 @@ protected: ...@@ -69,6 +68,5 @@ protected:
boost::shared_ptr<pbarpReaction> _pbarpReaction; boost::shared_ptr<pbarpReaction> _pbarpReaction;
std::vector<std::string> _spinDensity; std::vector<std::string> _spinDensity;
std::map<std::string, short> _lmaxParticleData;
std::map<std::string, std::vector<short> > _dropPbarpLForParticleData; std::map<std::string, std::vector<short> > _dropPbarpLForParticleData;
}; };
...@@ -50,7 +50,6 @@ pbarpParser::pbarpParser(int argc,char **argv): ...@@ -50,7 +50,6 @@ pbarpParser::pbarpParser(int argc,char **argv):
po::options_description config("Configuration file options"); po::options_description config("Configuration file options");
config.add_options() config.add_options()
("spinDensity", po::value< vector<string> >(&_spinDensity), "particles for spin density matrix calculation") ("spinDensity", po::value< vector<string> >(&_spinDensity), "particles for spin density matrix calculation")
("lmaxParticle", po::value< vector<string> >(&_lmaxParticle), "individual lmax (pbarp system) for certain particle")
("dropPbarpLForParticle", po::value< vector<string> >(&_dropPbarpLForParticle), "drop l (pbarp system) for certain particle") ("dropPbarpLForParticle", po::value< vector<string> >(&_dropPbarpLForParticle), "drop l (pbarp system) for certain particle")
; ;
_config->add(config); _config->add(config);
...@@ -72,11 +71,7 @@ bool pbarpParser::parseCommandLine(int argc, char **argv) ...@@ -72,11 +71,7 @@ bool pbarpParser::parseCommandLine(int argc, char **argv)
std::cout << (*it) << "\n"; std::cout << (*it) << "\n";
} }
std::cout << "\nindividual pbarp angular momentum settings " << std::endl; std::cout << "\ndrop pbarp L " << std::endl;
for (it=_lmaxParticle.begin(); it!=_lmaxParticle.end(); ++it){
std::cout << (*it) << "\n";
}
for (it=_dropPbarpLForParticle.begin(); it!=_dropPbarpLForParticle.end(); ++it){ for (it=_dropPbarpLForParticle.begin(); it!=_dropPbarpLForParticle.end(); ++it){
std::cout << (*it) << "\n"; std::cout << (*it) << "\n";
} }
......
...@@ -42,7 +42,6 @@ class pbarpParser : public ParserBase ...@@ -42,7 +42,6 @@ class pbarpParser : public ParserBase
const unsigned int getLMax() const { return _lMax; } const unsigned int getLMax() const { return _lMax; }
const float getpbarMomentum() const { return _pbarMomentum; } const float getpbarMomentum() const { return _pbarMomentum; }
const std::vector<std::string>& spinDensityNames() const { return _spinDensity;} const std::vector<std::string>& spinDensityNames() const { return _spinDensity;}
const std::vector<std::string>& lmaxParticle() const{ return _lmaxParticle; }
const std::vector<std::string>& dropPbarpLForParticle() const{ return _dropPbarpLForParticle; } const std::vector<std::string>& dropPbarpLForParticle() const{ return _dropPbarpLForParticle; }
protected: protected:
...@@ -50,7 +49,6 @@ protected: ...@@ -50,7 +49,6 @@ protected:
unsigned int _lMax; unsigned int _lMax;
float _pbarMomentum; float _pbarMomentum;
std::vector<std::string> _spinDensity; std::vector<std::string> _spinDensity;
std::vector<std::string> _lmaxParticle;
std::vector<std::string> _dropPbarpLForParticle; std::vector<std::string> _dropPbarpLForParticle;
}; };
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "PwaUtils/IsobarLSDecay.hh" #include "PwaUtils/IsobarLSDecay.hh"
#include "PwaUtils/IsobarHeliDecay.hh" #include "PwaUtils/IsobarHeliDecay.hh"
#include "PwaUtils/IsobarTensorDecay.hh" #include "PwaUtils/IsobarTensorDecay.hh"
#include "PwaUtils/ParserBase.hh"
#include "qft++/relativistic-quantum-mechanics/Utils.hh" #include "qft++/relativistic-quantum-mechanics/Utils.hh"
#include "ErrLogger/ErrLogger.hh" #include "ErrLogger/ErrLogger.hh"
#include "Particle/Particle.hh" #include "Particle/Particle.hh"
...@@ -48,16 +49,11 @@ pbarpReaction::pbarpReaction(std::vector<std::pair<Particle*, Particle*> >& prod ...@@ -48,16 +49,11 @@ pbarpReaction::pbarpReaction(std::vector<std::pair<Particle*, Particle*> >& prod
for(itJPCLS = all_JPCLSs.begin(); itJPCLS != all_JPCLSs.end(); ++itJPCLS){ for(itJPCLS = all_JPCLSs.begin(); itJPCLS != all_JPCLSs.end(); ++itJPCLS){
boost::shared_ptr<const jpcRes> currentJPC = (*itJPCLS); boost::shared_ptr<const jpcRes> currentJPC = (*itJPCLS);
auto minMapIt = _minLMap.find(currentJPC);
if(minMapIt == _minLMap.end()){ if(std::find(_jpcToJPCLSMap[currentJPC].begin(), _jpcToJPCLSMap[currentJPC].end(), (*itJPCLS)) == _jpcToJPCLSMap[currentJPC].end()){
_minLMap[currentJPC] = (*itJPCLS)->L; _jpcToJPCLSMap[currentJPC].push_back(*itJPCLS);
}
else{
if(_minLMap[currentJPC] > (*itJPCLS)->L)
_minLMap[currentJPC] = (*itJPCLS)->L;
} }
_jpcToLMap[currentJPC].push_back((*itJPCLS)->L);
} }
for(itJPC = pbarpJPCStatesAll.begin(); itJPC!=pbarpJPCStatesAll.end(); ++itJPC){ for(itJPC = pbarpJPCStatesAll.begin(); itJPC!=pbarpJPCStatesAll.end(); ++itJPC){
...@@ -65,89 +61,70 @@ pbarpReaction::pbarpReaction(std::vector<std::pair<Particle*, Particle*> >& prod ...@@ -65,89 +61,70 @@ pbarpReaction::pbarpReaction(std::vector<std::pair<Particle*, Particle*> >& prod
std::vector<std::pair<Particle*, Particle*> >::iterator itPartPairs; std::vector<std::pair<Particle*, Particle*> >::iterator itPartPairs;
for (itPartPairs=prodPairs.begin(); itPartPairs!= prodPairs.end(); ++itPartPairs){ for (itPartPairs=prodPairs.begin(); itPartPairs!= prodPairs.end(); ++itPartPairs){
std::string decName=(*itJPC)->name(); std::string decName=(*itJPC)->name();
// std::string decName="";
boost::shared_ptr<IsobarLSDecay> currentDec(new IsobarLSDecay( (*itJPC),itPartPairs->first, itPartPairs->second, pbarpEnv::instance(), decName)); boost::shared_ptr<IsobarLSDecay> currentDec(new IsobarLSDecay( (*itJPC),itPartPairs->first, itPartPairs->second, pbarpEnv::instance(), decName));
if (currentDec->JPCLSAmps().size()>0 && if(!currentDec->JPCLSAmps().size()>0)// &&
CheckLDrop((std::string&)(*itPartPairs).first->name(), *itJPC) && continue;
CheckLDrop((std::string&)(*itPartPairs).second->name(), *itJPC)){
_prodDecs.push_back(currentDec); bool acceptProd=false;
for(auto lIt = _jpcToJPCLSMap[*itJPC].begin(); lIt != _jpcToJPCLSMap[*itJPC].end(); ++lIt){
if(CheckJPCLSForParticle((std::string&)(*itPartPairs).first->name(), *lIt) &&
CheckJPCLSForParticle((std::string&)(*itPartPairs).second->name(), *lIt)){
if(std::find(_pbarpJPCLSs.begin(), _pbarpJPCLSs.end(), *lIt) == _pbarpJPCLSs.end())
_pbarpJPCLSs.push_back(*lIt);
acceptProd = true;
}
}
//boost::shared_ptr<IsobarTensorDecay> currentTensorDec(new IsobarTensorDecay( (*itJPC),itPartPairs->first, itPartPairs->second, pbarpEnv::instance(), decName)); if(!acceptProd)
//_prodTensorDecs.push_back(currentTensorDec); continue;
acceptJPC=true;
_prodDecs.push_back(currentDec);
if(pbarpEnv::instance()->parser()->productionFormalism() == "Tensor"){
boost::shared_ptr<IsobarTensorDecay> currentTensorDec(new IsobarTensorDecay( (*itJPC),itPartPairs->first, itPartPairs->second, pbarpEnv::instance(), decName));
_prodTensorDecs.push_back(currentTensorDec);
}
else if(pbarpEnv::instance()->parser()->productionFormalism() == "Heli"){
boost::shared_ptr<IsobarHeliDecay> currentHeliDec(new IsobarHeliDecay( (*itJPC),itPartPairs->first, itPartPairs->second, pbarpEnv::instance(), decName)); boost::shared_ptr<IsobarHeliDecay> currentHeliDec(new IsobarHeliDecay( (*itJPC),itPartPairs->first, itPartPairs->second, pbarpEnv::instance(), decName));
_prodHeliDecs.push_back(currentHeliDec); _prodHeliDecs.push_back(currentHeliDec);
acceptJPC=true;
} }
} }
if(acceptJPC) if(acceptJPC)
_pbarpJPCs.push_back(*itJPC); _pbarpJPCs.push_back(*itJPC);
} }
_pbarpJPCLSs = extractStates(_pbarpJPCs, all_JPCLSs); //_pbarpJPCLSs = extractStates(_pbarpJPCs, all_JPCLSs);
std::vector< boost::shared_ptr<const JPCLS> > all_pbarpSingletLS = thepbarpStates->singlet_JPCLS_States(); std::vector< boost::shared_ptr<const JPCLS> > all_pbarpSingletLS = thepbarpStates->singlet_JPCLS_States();
_pbarpJPCLSsinglet = extractStates(_pbarpJPCs, all_pbarpSingletLS); _pbarpJPCLSsinglet = extractStates(_pbarpJPCLSs, all_pbarpSingletLS);
// fillMap(_pbarpJPCLSsinglet, _prodDecs, _pbarpSingletDecMap);
std::vector< boost::shared_ptr<const JPCLS> > all_pbarpTriplet0LS = thepbarpStates->triplet0_JPCLS_States(); std::vector< boost::shared_ptr<const JPCLS> > all_pbarpTriplet0LS = thepbarpStates->triplet0_JPCLS_States();
_pbarpJPCLStriplet0 = extractStates(_pbarpJPCs, all_pbarpTriplet0LS); _pbarpJPCLStriplet0 = extractStates(_pbarpJPCLSs, all_pbarpTriplet0LS);
// fillMap(_pbarpJPCLStriplet0, _prodDecs, _pbarpTriplet0DecMap);
std::vector< boost::shared_ptr<const JPCLS> > all_pbarpTripletp1LS = thepbarpStates->tripletp1_JPCLS_States(); std::vector< boost::shared_ptr<const JPCLS> > all_pbarpTripletp1LS = thepbarpStates->tripletp1_JPCLS_States();
_pbarpJPCLStripletp1 = extractStates(_pbarpJPCs, all_pbarpTripletp1LS); _pbarpJPCLStripletp1 = extractStates(_pbarpJPCLSs, all_pbarpTripletp1LS);
// fillMap(_pbarpJPCLStripletp1, _prodDecs, _pbarpTripletp1DecMap);
std::vector< boost::shared_ptr<const JPCLS> > all_pbarpTripletm1LS = thepbarpStates->tripletm1_JPCLS_States(); std::vector< boost::shared_ptr<const JPCLS> > all_pbarpTripletm1LS = thepbarpStates->tripletm1_JPCLS_States();
_pbarpJPCLStripletm1 = extractStates(_pbarpJPCs, all_pbarpTripletm1LS); _pbarpJPCLStripletm1 = extractStates(_pbarpJPCLSs, all_pbarpTripletm1LS);
// fillMap(_pbarpJPCLStripletm1, _prodDecs, _pbarpTripletm1DecMap);
} }
bool pbarpReaction::CheckJPCLSForParticle(std::string& particleName, boost::shared_ptr<const JPCLS> theJPCLS){
bool pbarpReaction::CheckLDrop(std::string& particleName, boost::shared_ptr<const jpcRes> theJPC){
std::map<std::string, short> lmaxMap = pbarpEnv::instance()->lmaxParticleData();
std::map<std::string, std::vector<short> > ldropMap = pbarpEnv::instance()->dropPbarpLForParticleData(); std::map<std::string, std::vector<short> > ldropMap = pbarpEnv::instance()->dropPbarpLForParticleData();
auto lmaxIt = lmaxMap.find(particleName);
if(lmaxIt != lmaxMap.end()){
short lmaxParticle = (*lmaxIt).second;
short lMin = 1E4;
for(auto jpcLIt = _jpcToLMap[theJPC].begin(); jpcLIt != _jpcToLMap[theJPC].end(); ++jpcLIt){
if((*jpcLIt) < lMin)
lMin = *jpcLIt;
}
if(lMin > lmaxParticle)
return false;
}
auto ldropIt = ldropMap.find(particleName); auto ldropIt = ldropMap.find(particleName);
if(ldropIt != ldropMap.end()){
bool accept = false;
short numfound=0;
for(auto jpcLIt = _jpcToLMap[theJPC].begin(); jpcLIt != _jpcToLMap[theJPC].end(); ++jpcLIt){
bool found=false;
for(auto ldropListIt = (*ldropIt).second.begin(); ldropListIt != (*ldropIt).second.end(); ++ldropListIt){
if((*ldropListIt) == (*jpcLIt)){
found = true;
}
}
if(!found)
accept = true;
else
numfound++;
}
if(accept && numfound>0){ if(ldropIt == ldropMap.end())
Warning << "Could not drop " << numfound << " pbarp L state(s) due to JPC = " << theJPC->J << " " << theJPC->P << " " << theJPC->C << return true;
" ambiguity. Manual parameter fixing needed." << endmsg;
}
return accept; for(auto ldropListIt = (*ldropIt).second.begin(); ldropListIt != (*ldropIt).second.end(); ++ldropListIt){
if((*ldropListIt) == theJPCLS->L){
return false;
}
} }
return true; return true;
......
...@@ -76,8 +76,7 @@ private: ...@@ -76,8 +76,7 @@ private:
std::vector< boost::shared_ptr<IsobarHeliDecay> > _prodHeliDecs; std::vector< boost::shared_ptr<IsobarHeliDecay> > _prodHeliDecs;
std::vector< boost::shared_ptr<IsobarTensorDecay> > _prodTensorDecs; std::vector< boost::shared_ptr<IsobarTensorDecay> > _prodTensorDecs;
std::map< boost::shared_ptr<const jpcRes>, Spin, pawian::Collection::SharedPtrLess > _minLMap; std::map< boost::shared_ptr<const jpcRes>, std::vector< boost::shared_ptr<const JPCLS> >, pawian::Collection::SharedPtrLess> _jpcToJPCLSMap;
std::map< boost::shared_ptr<const jpcRes>, std::vector<Spin>, pawian::Collection::SharedPtrLess> _jpcToLMap;
bool CheckLDrop(std::string& particleName, boost::shared_ptr<const jpcRes> theJPC); bool CheckJPCLSForParticle(std::string& particleName, boost::shared_ptr<const JPCLS> theJPCLS);
}; };
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