Skip to content
Snippets Groups Projects
Commit 3efa2335 authored by Marc Pelizaeus's avatar Marc Pelizaeus
Browse files

Add FitParamIndex

parent 9bb736fd
No related branches found
No related tags found
No related merge requests found
#include "Examples/JpsiGamKsKlKK/FitParamIndex.hh"
FitParamIndex::FitParamIndex(fitParams& theParams){
int indexCounter=0;
//iterate amplitude magnitueds
std::map<int, std::map< boost::shared_ptr<const JPCLS>, double, pawian::Collection::SharedPtrLess > >& startMagMap=theParams.Mags;
std::map<int, std::map< boost::shared_ptr<const JPCLS>, double, pawian::Collection::SharedPtrLess > >::iterator itMagMap;
for (itMagMap=startMagMap.begin(); itMagMap!=startMagMap.end(); ++itMagMap){
std::map< boost::shared_ptr<const JPCLS>, double, pawian::Collection::SharedPtrLess >::map jpclsMap = itMagMap->second;
std::map< boost::shared_ptr<const JPCLS>, double, pawian::Collection::SharedPtrLess >::iterator jpclsMapIter;
for (jpclsMapIter=jpclsMap.begin(); jpclsMapIter!=jpclsMap.end(); ++jpclsMapIter){
_Mags[itMagMap->first][jpclsMapIter->first] = indexCounter;
indexCounter++;
}
}
//loop again and fill phi index
for (itMagMap=startMagMap.begin(); itMagMap!=startMagMap.end(); ++itMagMap){
std::map< boost::shared_ptr<const JPCLS>, double, pawian::Collection::SharedPtrLess >::map jpclsMap = itMagMap->second;
std::map< boost::shared_ptr<const JPCLS>, double, pawian::Collection::SharedPtrLess >::iterator jpclsMapIter;
for (jpclsMapIter=jpclsMap.begin(); jpclsMapIter!=jpclsMap.end(); ++jpclsMapIter){
_Phis[itMagMap->first][jpclsMapIter->first] = indexCounter;
indexCounter++;
}
}
}
#ifndef _FitParamIndex_H
#define _FitParamIndex_H
#include "PwaUtils/FitParamsBase.hh"
class FitParamIndex {
public:
FitParamIndex( fitParams& theParams );
virtual ~FitParamIndex(){};
int Mag(int amp, boost::shared_ptr<const JPCLS> state){ return _Mags[amp][state]; }
int Phi(int amp, boost::shared_ptr<const JPCLS> state){ return _Phis[amp][state]; }
std::map<int, std::map< boost::shared_ptr<const JPCLS>, int, pawian::Collection::SharedPtrLess > > _Mags;
std::map<int, std::map< boost::shared_ptr<const JPCLS>, int, pawian::Collection::SharedPtrLess > > _Phis;
};
#endif
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