diff --git a/PwaUtils/AbsEnv.cc b/PwaUtils/AbsEnv.cc index eb7480fdb73f2d6030574872fb4d682cb1e29892..131379d42a94ce8977516946061900d862399e15 100644 --- a/PwaUtils/AbsEnv.cc +++ b/PwaUtils/AbsEnv.cc @@ -243,5 +243,71 @@ void AbsEnv::setup(ParserBase* theParser){ } counter++; } + + // hist angles + std::vector<std::string> theHistAngleNames=theParser->histAngleNames(); +//fill vector histMassSystems + for ( itStr = theHistAngleNames.begin(); itStr != theHistAngleNames.end(); ++itStr){ + std::stringstream stringStr; + stringStr << (*itStr); + + std::string tmpName; + std::vector<std::string> currentStringDecVec; + std::vector<std::string> currentStringDecVec2; + std::vector<std::string> currentStringMotherVec; + bool isDecParticle=true; + bool isFirstDecParticle=true; + short nBodyDecay=2; + while(stringStr >> tmpName){ + if(tmpName=="from") { + isDecParticle=false; + continue; + } + else if(tmpName=="and") { + isFirstDecParticle=false; + nBodyDecay=3; + continue; + } + if(isDecParticle && isFirstDecParticle) currentStringDecVec.push_back(tmpName); + else if(isDecParticle && !isFirstDecParticle) currentStringDecVec2.push_back(tmpName); + else currentStringMotherVec.push_back(tmpName); + } + boost::shared_ptr<angleHistData> currentAngleHistData(new angleHistData(currentStringMotherVec, currentStringDecVec, currentStringDecVec2, nBodyDecay)); + _angleHistDataVec.push_back(currentAngleHistData); + } + + // 2D hists + std::vector<std::string> theHistAngleNames2D=theParser->histAngleNames2D(); + for ( itStr = theHistAngleNames2D.begin(); itStr != theHistAngleNames2D.end(); ++itStr){ + std::stringstream stringStr; + stringStr << (*itStr); + + std::string tmpName; + std::vector<std::string> currentStringDecVec; + std::vector<std::string> currentStringMotherVec; + std::vector<std::string> currentStringDecVec_2; + std::vector<std::string> currentStringMotherVec_2; + bool isDecParticle=true; + bool isFirstAxes=true; + while(stringStr >> tmpName){ + if(tmpName=="from") { + isDecParticle=false; + std::cout << tmpName << std::endl; + continue; + } + else if(tmpName=="versus") { + isFirstAxes=false; + isDecParticle=true; + continue; + } + if(isDecParticle && isFirstAxes) currentStringDecVec.push_back(tmpName); + else if (!isDecParticle && isFirstAxes) currentStringMotherVec.push_back(tmpName); + else if(isDecParticle && !isFirstAxes) currentStringDecVec_2.push_back(tmpName); + else currentStringMotherVec_2.push_back(tmpName); + } + boost::shared_ptr<angleHistData2D> currentAngleHistData2D(new angleHistData2D(currentStringMotherVec, currentStringDecVec, currentStringMotherVec_2, currentStringDecVec_2)); + _angleHistDataVec2D.push_back(currentAngleHistData2D); + } + } diff --git a/epemUtils/epemEnv.cc b/epemUtils/epemEnv.cc index a7caeaf9ff7811d956dc79b20e274415345757a8..086a14f62e391a69b140155e33c0f94be94490ed 100644 --- a/epemUtils/epemEnv.cc +++ b/epemUtils/epemEnv.cc @@ -154,84 +154,6 @@ _cmsMass=theEpEmParser->cmsMass(); } } - // std::vector<std::string> theHistMassNames=theEpEmParser->histMassNames(); - // //fill vector histMassSystems - // for ( itStr = theHistMassNames.begin(); itStr != theHistMassNames.end(); ++itStr){ - // std::stringstream stringStr; - // stringStr << (*itStr); - - // std::string tmpName; - // std::vector<std::string> currentStringVec; - // while(stringStr >> tmpName){ - // currentStringVec.push_back(tmpName); - // } - // _histMassSystems.push_back(currentStringVec); - // } - - std::vector<std::string> theHistAngleNames=theEpEmParser->histAngleNames(); - //fill vector histMassSystems - for ( itStr = theHistAngleNames.begin(); itStr != theHistAngleNames.end(); ++itStr){ - std::stringstream stringStr; - stringStr << (*itStr); - - std::string tmpName; - std::vector<std::string> currentStringDecVec; - std::vector<std::string> currentStringDecVec2; - std::vector<std::string> currentStringMotherVec; - bool isDecParticle=true; - bool isFirstDecParticle=true; - short nBodyDecay=2; - while(stringStr >> tmpName){ - if(tmpName=="from") { - isDecParticle=false; - continue; - } - else if(tmpName=="and") { - isFirstDecParticle=false; - nBodyDecay=3; - continue; - } - if(isDecParticle && isFirstDecParticle) currentStringDecVec.push_back(tmpName); - else if(isDecParticle && !isFirstDecParticle) currentStringDecVec2.push_back(tmpName); - else currentStringMotherVec.push_back(tmpName); - } - boost::shared_ptr<angleHistData> currentAngleHistData(new angleHistData(currentStringMotherVec, currentStringDecVec, currentStringDecVec2, nBodyDecay)); - _angleHistDataVec.push_back(currentAngleHistData); - } - - std::vector<std::string> theHistAngleNames2D=theEpEmParser->histAngleNames2D(); - for ( itStr = theHistAngleNames2D.begin(); itStr != theHistAngleNames2D.end(); ++itStr){ - std::stringstream stringStr; - stringStr << (*itStr); - - std::string tmpName; - std::vector<std::string> currentStringDecVec; - std::vector<std::string> currentStringMotherVec; - std::vector<std::string> currentStringDecVec_2; - std::vector<std::string> currentStringMotherVec_2; - bool isDecParticle=true; - bool isFirstAxes=true; - while(stringStr >> tmpName){ - if(tmpName=="from") { - isDecParticle=false; - std::cout << tmpName << std::endl; - continue; - } - else if(tmpName=="versus") { - isFirstAxes=false; - isDecParticle=true; - continue; - } - if(isDecParticle && isFirstAxes) currentStringDecVec.push_back(tmpName); - else if (!isDecParticle && isFirstAxes) currentStringMotherVec.push_back(tmpName); - else if(isDecParticle && !isFirstAxes) currentStringDecVec_2.push_back(tmpName); - else currentStringMotherVec_2.push_back(tmpName); - } - boost::shared_ptr<angleHistData2D> currentAngleHistData2D(new angleHistData2D(currentStringMotherVec, currentStringDecVec, currentStringMotherVec_2, currentStringDecVec_2)); - _angleHistDataVec2D.push_back(currentAngleHistData2D); - } - - } diff --git a/pbarpUtils/pbarpEnv.cc b/pbarpUtils/pbarpEnv.cc index bd9902e7de23d2d87b0f0b40d68faf930acd26ed..5f320e5896d6aec820096df60fc1ce4c924671f8 100644 --- a/pbarpUtils/pbarpEnv.cc +++ b/pbarpUtils/pbarpEnv.cc @@ -193,51 +193,6 @@ void pbarpEnv::setup(pbarpParser* thePbarpParser){ } } - // std::vector<std::string> theHistMassNames=thePbarpParser->histMassNames(); - // //fill vector histMassSystems - // for ( itStr = theHistMassNames.begin(); itStr != theHistMassNames.end(); ++itStr){ - // std::stringstream stringStr; - // stringStr << (*itStr); - - // std::string tmpName; - // std::vector<std::string> currentStringVec; - // while(stringStr >> tmpName){ - // currentStringVec.push_back(tmpName); - // } - // _histMassSystems.push_back(currentStringVec); - // } - - std::vector<std::string> theHistAngleNames=thePbarpParser->histAngleNames(); - //fill vector histMassSystems - for ( itStr = theHistAngleNames.begin(); itStr != theHistAngleNames.end(); ++itStr){ - std::stringstream stringStr; - stringStr << (*itStr); - - std::string tmpName; - std::vector<std::string> currentStringDecVec; - std::vector<std::string> currentStringDecVec2; - std::vector<std::string> currentStringMotherVec; - bool isDecParticle=true; - bool isFirstDecParticle=true; - short nBodyDecay=2; - while(stringStr >> tmpName){ - if(tmpName=="from") { - isDecParticle=false; - continue; - } - else if(tmpName=="and") { - isFirstDecParticle=false; - nBodyDecay=3; - continue; - } - if(isDecParticle && isFirstDecParticle) currentStringDecVec.push_back(tmpName); - else if(isDecParticle && !isFirstDecParticle) currentStringDecVec2.push_back(tmpName); - else currentStringMotherVec.push_back(tmpName); - } - boost::shared_ptr<angleHistData> currentAngleHistData(new angleHistData(currentStringMotherVec, currentStringDecVec, currentStringDecVec2, nBodyDecay)); - _angleHistDataVec.push_back(currentAngleHistData); - } - // spin density particles _spinDensity = thePbarpParser->spinDensityNames();