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

added particle cloning

parent 12104135
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@ void AbsEnv::setup(ParserBase* theParser){
_alreadySetUp=true;
// common options (move to base class later)
// common options
_outputFileNameSuffix = theParser->outputFileNameSuffix();
// pdtTable
......@@ -49,6 +49,20 @@ void AbsEnv::setup(ParserBase* theParser){
exit(1);
}
// cloned particles
const std::vector<std::string> cloneParticle=theParser->cloneParticle();
std::vector<std::string>::const_iterator itcP;
for ( itcP = cloneParticle.begin(); itcP != cloneParticle.end(); ++itcP){
std::istringstream particles(*itcP);
std::string particleOld;
std::string particleNew;
particles >> particleOld >> particleNew;
_particleTable->clone(particleNew, particleOld);
}
//final state particles
const std::vector<std::string> finalStateParticleStr=theParser->finalStateParticles();
......
......@@ -68,6 +68,7 @@ ParserBase::ParserBase(int argc,char **argv)
("replaceParamSuffix",po::value< vector<string> >(&_replaceParSuffix), "replace suffix for fit parameter name")
("replaceMassKey",po::value< vector<string> >(&_replaceMassKey), "replace Key for the fit parameter of the mass")
("production",po::value< vector<string> >(&_productionSystem), "pair of produced particles")
("cloneParticle",po::value< vector<string> >(&_cloneParticle), "particles to be cloned")
;
......@@ -157,6 +158,10 @@ bool ParserBase::parseCommandLine(int argc, char **argv)
std::vector<std::string>::const_iterator it;
for (it = _cloneParticle.begin(); it!=_cloneParticle.end(); ++it){
std::cout << "clone particles: " << (*it) << "\n";
}
for (it=_enabledHyps.begin(); it!=_enabledHyps.end();++it){
std::cout << "hypothesis\t" << (*it) << "\t enabled\n";
}
......
......@@ -57,6 +57,7 @@ public:
const std::vector<std::string>& replaceMassKey() const { return _replaceMassKey; }
const std::vector<std::string>& decayDynamics() const { return _dynamics;}
const std::vector<std::string>& productionSystem() const { return _productionSystem; }
const std::vector<std::string>& cloneParticle() const { return _cloneParticle; }
protected:
virtual bool parseCommandLine(int argc,char **argv);
......@@ -87,4 +88,5 @@ protected:
std::vector<std::string> _replaceParSuffix;
std::vector<std::string> _replaceMassKey;
std::vector<std::string> _productionSystem;
std::vector<std::string> _cloneParticle;
};
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