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

bug fix in JpsiToPhiPhiGam

parent 8a078c86
No related branches found
No related tags found
No related merge requests found
......@@ -44,34 +44,34 @@ void JpsiToPhiPhiGamLh::initializeHypothesis(){
for (it=_GammaEtaHyps.begin(); it!=_GammaEtaHyps.end(); ++it){
size_t pos=it->find(_EtaKey);
std::string etaDecAmpName=it->substr(pos);
_etaDecAmpMap[*it]=boost::shared_ptr<AbsXdecAmp>(new XToPhiPhiDecAmps( etaDecAmpName, _hypVec, _jpsiToPhiPhiGamStatesPtr, Spin(0)) );
_etaDecAmpMap[*it]=boost::shared_ptr<AbsXdecAmp>(new XToPhiPhiDecAmps( etaDecAmpName, _hypVec, _jpsiToPhiPhiGamStatesPtr, Spin(0), -1 ));
_allAmpMap[*it]=_etaDecAmpMap[*it];
}
for (it=_GammaEta2Hyps.begin(); it!=_GammaEta2Hyps.end(); ++it){
size_t pos=it->find(_Eta2Key);
std::string eta2DecAmpName=it->substr(pos);
_eta2DecAmpMap[*it]=boost::shared_ptr<AbsXdecAmp>(new XToPhiPhiDecAmps( eta2DecAmpName, _hypVec, _jpsiToPhiPhiGamStatesPtr, Spin(2)) );
_eta2DecAmpMap[*it]=boost::shared_ptr<AbsXdecAmp>(new XToPhiPhiDecAmps( eta2DecAmpName, _hypVec, _jpsiToPhiPhiGamStatesPtr, Spin(2), -1 ));
_allAmpMap[*it]=_eta2DecAmpMap[*it];
}
for (it=_GammaF0Hyps.begin(); it!=_GammaF0Hyps.end(); ++it){
size_t pos=it->find(_F0Key);
std::string f0DecAmpName=it->substr(pos);
_f0DecAmpMap[*it]=boost::shared_ptr<AbsXdecAmp>(new XToPhiPhiDecAmps( f0DecAmpName, _hypVec, _jpsiToPhiPhiGamStatesPtr, Spin(0)) );
_f0DecAmpMap[*it]=boost::shared_ptr<AbsXdecAmp>(new XToPhiPhiDecAmps( f0DecAmpName, _hypVec, _jpsiToPhiPhiGamStatesPtr, Spin(0), 1 ));
_allAmpMap[*it]=_f0DecAmpMap[*it];
}
for (it=_GammaF1Hyps.begin(); it!=_GammaF1Hyps.end(); ++it){
size_t pos=it->find(_F1Key);
std::string f1DecAmpName=it->substr(pos);
_f1DecAmpMap[*it]=boost::shared_ptr<AbsXdecAmp>(new XToPhiPhiDecAmps( f1DecAmpName, _hypVec, _jpsiToPhiPhiGamStatesPtr, Spin(1)) );
_f1DecAmpMap[*it]=boost::shared_ptr<AbsXdecAmp>(new XToPhiPhiDecAmps( f1DecAmpName, _hypVec, _jpsiToPhiPhiGamStatesPtr, Spin(1), 1 ));
_allAmpMap[*it]=_f1DecAmpMap[*it];
}
for (it=_GammaF2Hyps.begin(); it!=_GammaF2Hyps.end(); ++it){
size_t pos=it->find(_F2Key);
std::string f2DecAmpName=it->substr(pos);
_f2DecAmpMap[*it]=boost::shared_ptr<AbsXdecAmp>(new XToPhiPhiDecAmps( f2DecAmpName, _hypVec, _jpsiToPhiPhiGamStatesPtr, Spin(2)) );
_f2DecAmpMap[*it]=boost::shared_ptr<AbsXdecAmp>(new XToPhiPhiDecAmps( f2DecAmpName, _hypVec, _jpsiToPhiPhiGamStatesPtr, Spin(2),1 ));
_allAmpMap[*it]=_f2DecAmpMap[*it];
}
......
......@@ -8,8 +8,8 @@
// #include "PwaUtils/EvtDataBaseListNew.hh"
#include "Examples/JpsiToPhiPhiGam/JpsiToPhiPhiGamEventList.hh"
XToPhiPhiDecAmps::XToPhiPhiDecAmps(const std::string& name, const std::vector<std::string>& hypVec, boost::shared_ptr<JpsiToPhiPhiGamStates> theStates, Spin spinX) :
AbsXdecAmp(name, hypVec, spinX)
XToPhiPhiDecAmps::XToPhiPhiDecAmps(const std::string& name, const std::vector<std::string>& hypVec, boost::shared_ptr<JpsiToPhiPhiGamStates> theStates, Spin spinX, int parity) :
AbsXdecAmp(name, hypVec, spinX, parity)
,_phiPhiKey(name+"ToPhiPhi")
,_xBWKey(name+"BreitWigner")
,_massIndependent(true)
......@@ -88,9 +88,11 @@ complex<double> XToPhiPhiDecAmps::phiphiTo4KAmp( EvtDataNew* theData, Spin lambd
void XToPhiPhiDecAmps::getDefaultParams(fitParamsNew& fitVal, fitParamsNew& fitErr){
std::vector< boost::shared_ptr<const JPCLS> > PhiPhiStates;
if(_J_X==0) PhiPhiStates=_theStatesPtr->EtaToPhiPhiStates();
else if(_J_X==1) PhiPhiStates=_theStatesPtr->F1ToPhiPhiStates();
else if(_J_X==2) PhiPhiStates=_theStatesPtr->Eta2ToPhiPhiStates();
if(_J_X==0 && _parity==-1) PhiPhiStates=_theStatesPtr->EtaToPhiPhiStates();
else if(_J_X==0 && _parity==1) PhiPhiStates=_theStatesPtr->F0ToPhiPhiStates();
else if(_J_X==1 && _parity==1) PhiPhiStates=_theStatesPtr->F1ToPhiPhiStates();
else if(_J_X==2 && _parity==-1) PhiPhiStates=_theStatesPtr->Eta2ToPhiPhiStates();
else if(_J_X==2 && _parity==1) PhiPhiStates=_theStatesPtr->F2ToPhiPhiStates();
std::map< boost::shared_ptr<const JPCLS>, double, pawian::Collection::SharedPtrLess > currentMagValMap;
std::map< boost::shared_ptr<const JPCLS>, double, pawian::Collection::SharedPtrLess > currentPhiValMap;
std::map< boost::shared_ptr<const JPCLS>, double, pawian::Collection::SharedPtrLess > currentMagErrMap;
......
......@@ -20,7 +20,7 @@ public:
// create/copy/destroy:
///Constructor
XToPhiPhiDecAmps(const std::string& name, const std::vector<std::string>& hypVec, boost::shared_ptr<JpsiToPhiPhiGamStates> theStates, Spin spinX);
XToPhiPhiDecAmps(const std::string& name, const std::vector<std::string>& hypVec, boost::shared_ptr<JpsiToPhiPhiGamStates> theStates, Spin spinX, int parity=1);
/** Destructor */
virtual ~XToPhiPhiDecAmps();
......
......@@ -6,10 +6,11 @@
#include "qft++/relativistic-quantum-mechanics/Utils.hh"
#include "ErrLogger/ErrLogger.hh"
AbsXdecAmp::AbsXdecAmp(const std::string& name, const std::vector<std::string>& hypVec, Spin spinX) :
AbsXdecAmp::AbsXdecAmp(const std::string& name, const std::vector<std::string>& hypVec, Spin spinX, int parity) :
_name(name)
,_hypVec(hypVec)
,_J_X(spinX)
,_parity(parity)
{
}
......
......@@ -13,7 +13,7 @@
class AbsXdecAmp {
public:
AbsXdecAmp(const std::string& name, const std::vector<std::string>& hypVec, Spin spinX=0);
AbsXdecAmp(const std::string& name, const std::vector<std::string>& hypVec, Spin spinX=0, int parity=1);
virtual ~AbsXdecAmp();
virtual complex<double> XdecAmp(Spin lamX, EvtDataNew* theData, fitParamsNew& theParamVal)=0;
......@@ -21,8 +21,10 @@ public:
virtual void print(std::ostream& os) const=0;
const std::string name() const {return _name;}
const Spin spinX() const {return _J_X;}
const int parity() const {return _parity;}
protected:
const std::string _name;
const std::vector<std::string> _hypVec;
Spin _J_X;
Spin _J_X;
int _parity;
};
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