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

added pipi wave (Anisovitch parametrization) to genereal pwa tools

parent 4d20c663
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@ Meson sigma \sigma 0 0 1 1 1 0 0 0 0 1.000 0.6000 relBW [PDG f_
Meson omega \omega 0 2 -1 -1 -1 0 0 0 0 0.7825 0.0700 relBW [PDG nonett 1^3S_1]
Meson xomeg \omega^{\prime} 0 2 -1 -1 -1 0 0 0 0 0.7825 0.0700 relBW [PDG nonett 1^3S_1]
Meson eta' \eta^{\prime} 0 0 -1 1 1 0 0 0 0 0.957 0.0001 relBW [PDG nonett 1^1S_0]
Meson pipiS \pi\piS 0 0 1 1 1 0 0 0 0 1. 1. relBW [PDG no idea]
Meson f0(980) f_0(980) 0 0 1 1 1 0 0 0 0 0.980 0.0500 relBW [PDG K\bar{K} molecule candidate]
Meson phi \phi 0 2 -1 -1 -1 0 0 0 0 1.019 0.0040 relBW [PDG nonett 1^3S_1]
Meson h1(1170) h_1(1170) 0 2 1 -1 -1 0 0 0 0 1.170 0.3600 relBW [PDG nonett 1^3S_1]
......
......@@ -118,8 +118,8 @@ void KMatrixKPiSFocus::init2IsoSpin3(){
gFactorsMap[0].push_back(0.); //Ketap
std::vector<double> poleMasses;
poleMasses.resize(1);
poleMasses[0]=sqrt(100.);
poleMasses.resize(1);
poleMasses[0]=sqrt(100.);
std::vector< boost::shared_ptr<KPole> > kPoles;
std::map<int, std::vector<double> >::iterator itgFac;
......
......@@ -12,6 +12,8 @@
#include "PwaUtils/FlatteDynamics.hh"
#include "PwaUtils/KPiSWaveIso12Dynamics.hh"
#include "PwaUtils/KPiSWaveIso32Dynamics.hh"
#include "PwaUtils/PiPiSWaveASDynamics.hh"
#include "PwaUtils/WoDynamics.hh"
#include "ErrLogger/ErrLogger.hh"
......@@ -57,6 +59,8 @@ boost::shared_ptr<AbsDynamics> DynRegistry::getDynamics(boost::shared_ptr<AbsDec
result= boost::shared_ptr<AbsDynamics>(new KPiSWaveIso12Dynamics(theName, fsParticles, theDec->motherPart()));
else if(theDec->dynType()=="KpiSWaveIso32")
result= boost::shared_ptr<AbsDynamics>(new KPiSWaveIso32Dynamics(theName, fsParticles, theDec->motherPart()));
else if(theDec->dynType()=="PiPiSWaveAS")
result= boost::shared_ptr<AbsDynamics>(new PiPiSWaveASDynamics(theName, fsParticles, theDec->motherPart()));
else if(theDec->dynType()=="WoDynamics") result= boost::shared_ptr<AbsDynamics>(new WoDynamics(theName, fsParticles, theDec->motherPart()));
else{
Alert << "Dyn type:\t" << theDec->dynType() << "\tdoes not exist" << endmsg;
......
// PiPiSWaveASDynamics class definition file. -*- C++ -*-
// Copyright 2013 Bertram Kopf
#include <getopt.h>
#include <fstream>
#include <string>
#include "PwaUtils/PiPiSWaveASDynamics.hh"
#include "PwaUtils/XdecAmpRegistry.hh"
#include "PwaUtils/AbsDecay.hh"
#include "PwaUtils/AbsXdecAmp.hh"
#include "ErrLogger/ErrLogger.hh"
#include "Particle/Particle.hh"
#include "PwaDynamics/FVectorPiPiS.hh"
PiPiSWaveASDynamics::PiPiSWaveASDynamics(std::string& name, std::vector<Particle*>& fsParticles, Particle* mother) :
AbsDynamics(name, fsParticles, mother)
{
}
PiPiSWaveASDynamics::~PiPiSWaveASDynamics()
{
}
complex<double> PiPiSWaveASDynamics::eval(EvtData* theData, AbsXdecAmp* grandmaAmp, Spin OrbMom){
complex<double> result(0.,0.);
int evtNo=theData->evtNo;
std::string currentKey="default";
if(0!=grandmaAmp) currentKey=_massKey+grandmaAmp->absDec()->massParKey();
if ( _cacheAmps && !_recalcMap[currentKey]){
result=_cachedStringMap[evtNo][currentKey];
}
else{
theMutex.lock();
boost::shared_ptr<FVectorPiPiS> currentFVec=_fVecMap[currentKey];
currentFVec->evalMatrix(theData->FourVecsString[_dynKey].M());
result=(*currentFVec)[1];
if ( _cacheAmps){
_cachedStringMap[evtNo][currentKey]=result;
}
theMutex.unlock();
}
return result;
}
void PiPiSWaveASDynamics::getDefaultParams(fitParams& fitVal, fitParams& fitErr){
std::map<std::string, std::map<std::string, double> >::iterator it1;
for(it1=_currentbFactorMap.begin(); it1!=_currentbFactorMap.end(); ++it1){
std::map<std::string, double>::iterator it2;
std::map<std::string, double>& bFactors=it1->second;
for(it2=bFactors.begin(); it2!=bFactors.end(); ++it2){
fitVal.otherParams[it1->first+it2->first]=it2->second;
fitErr.otherParams[it1->first+it2->first]=1.;
}
std::map<std::string, double>& fProds=_currentfProdMap[it1->first];
for(it2=fProds.begin(); it2!=fProds.end(); ++it2){
fitVal.otherParams[it1->first+it2->first]=it2->second;
fitErr.otherParams[it1->first+it2->first]=1.;
}
fitVal.otherParams[it1->first+"S0_PosNeg"]=_currentS0Map[it1->first];
fitErr.otherParams[it1->first+"S0_PosNeg"]=4.;
}
}
bool PiPiSWaveASDynamics::checkRecalculation(fitParams& theParamVal){
_recalculate=false;
std::map<std::string, std::map<std::string, double> >::iterator it1;
for(it1=_currentbFactorMap.begin(); it1!=_currentbFactorMap.end(); ++it1){
_recalcMap[it1->first]=false;
std::map<std::string, double>::iterator it2;
std::map<std::string, double>& bFactors=it1->second;
for(it2=bFactors.begin(); it2!=bFactors.end(); ++it2){
if (fabs(it2->second - theParamVal.otherParams[it1->first+it2->first]) > 1.e-10){
_recalculate=true;
_recalcMap[it1->first]=true;
}
}
std::map<std::string, double>& fProds=_currentfProdMap[it1->first];
for(it2=fProds.begin(); it2!=fProds.end(); ++it2){
if (fabs(it2->second - theParamVal.otherParams[it1->first+it2->first]) > 1.e-10){
_recalculate=true;
_recalcMap[it1->first]=true;
}
}
if (fabs(_currentS0Map[it1->first] - theParamVal.otherParams[it1->first+"S0_PosNeg"]) > 1.e-10){
_recalculate=true;
_recalcMap[it1->first]=true;
}
}
return _recalculate;
}
void PiPiSWaveASDynamics::updateFitParams(fitParams& theParamVal){
std::map<std::string, std::map<std::string, double> >::iterator it1;
for(it1=_currentbFactorMap.begin(); it1!=_currentbFactorMap.end(); ++it1){
std::map<std::string, double>::iterator it2;
std::map<std::string, double>& bFactors = it1->second;
for(it2=bFactors.begin(); it2!=bFactors.end(); ++it2){
it2->second = theParamVal.otherParams[it1->first+it2->first];
}
std::map<std::string, double>& fProds=_currentfProdMap[it1->first];
for(it2=fProds.begin(); it2!=fProds.end(); ++it2){
it2->second = theParamVal.otherParams[it1->first+it2->first];
}
_currentS0Map[it1->first]=theParamVal.otherParams[it1->first+"S0_PosNeg"];
boost::shared_ptr<FVectorPiPiS> currentFVec=_fVecMap[it1->first];
//update _pipiSFVec
complex<double> b_pole1=bFactors["b_pole1Mag"]*complex<double>(cos(bFactors["b_pole1Phi"]), sin(bFactors["b_pole1Phi"]));
complex<double> b_pole2=bFactors["b_pole2Mag"]*complex<double>(cos(bFactors["b_pole2Phi"]), sin(bFactors["b_pole2Phi"]));
complex<double> b_pole3=bFactors["b_pole3Mag"]*complex<double>(cos(bFactors["b_pole3Phi"]), sin(bFactors["b_pole3Phi"]));
complex<double> b_pole4=bFactors["b_pole4Mag"]*complex<double>(cos(bFactors["b_pole4Phi"]), sin(bFactors["b_pole4Phi"]));
complex<double> b_pole5=bFactors["b_pole5Mag"]*complex<double>(cos(bFactors["b_pole5Phi"]), sin(bFactors["b_pole5Phi"]));
currentFVec->updateBeta(0, b_pole1);
currentFVec->updateBeta(1, b_pole2);
currentFVec->updateBeta(2, b_pole3);
currentFVec->updateBeta(3, b_pole4);
currentFVec->updateBeta(4, b_pole5);
complex<double> fProdPiPi=fProds["fprod_PiPiMag"]*complex<double>(cos(fProds["fprod_PiPiPhi"]), sin(fProds["fprod_PiPiPhi"]));
complex<double> fProdKK=fProds["fprod_KKMag"]*complex<double>(cos(fProds["fprod_KKPhi"]), sin(fProds["fprod_KKPhi"]));
complex<double> fProd4Pi=fProds["fprod_4PiMag"]*complex<double>(cos(fProds["fprod_4PiPhi"]), sin(fProds["fprod_4PiPhi"]));
complex<double> fProdEtaEta=fProds["fprod_EtaEtaMag"]*complex<double>(cos(fProds["fprod_EtaEtaPhi"]), sin(fProds["fprod_EtaEtaPhi"]));
complex<double> fProdEtaEtap=fProds["fprod_EtaEtapMag"]*complex<double>(cos(fProds["fprod_EtaEtapPhi"]), sin(fProds["fprod_EtaEtapPhi"]));
currentFVec->updateFprod(0, fProdPiPi);
currentFVec->updateFprod(1, fProdKK);
currentFVec->updateFprod(2, fProd4Pi);
currentFVec->updateFprod(3, fProdEtaEta);
currentFVec->updateFprod(4, fProdEtaEtap);
currentFVec->updateS0prod(_currentS0Map[it1->first]);
}
}
void PiPiSWaveASDynamics::addGrandMa(boost::shared_ptr<AbsDecay> theDec){
if(0==theDec){
Alert << "Can not add AbsXdecAmp; 0 pointer!!!" << endmsg;
exit(1);
}
std::string theName=_massKey+theDec->massParKey();
std::cout << "addGrandMa:\t" << theName << std::endl;
std::map<std::string, boost::shared_ptr<FVectorPiPiS> >::iterator it = _fVecMap.find(theName);
if (it != _fVecMap.end()) return;
boost::shared_ptr<FVectorPiPiS> currentFVector=boost::shared_ptr<FVectorPiPiS>(new FVectorPiPiS());
_currentbFactorMap[theName]["b_pole1Mag"]=1.;
_currentbFactorMap[theName]["b_pole1Phi"]=0.;
_currentbFactorMap[theName]["b_pole2Mag"]=1.;
_currentbFactorMap[theName]["b_pole2Phi"]=0.;
_currentbFactorMap[theName]["b_pole3Mag"]=1.;
_currentbFactorMap[theName]["b_pole3Phi"]=0.;
_currentbFactorMap[theName]["b_pole4Mag"]=1.;
_currentbFactorMap[theName]["b_pole4Phi"]=0.;
_currentbFactorMap[theName]["b_pole5Mag"]=1.;
_currentbFactorMap[theName]["b_pole5Phi"]=0.;
std::map<std::string, double>& bFactors = _currentbFactorMap[theName];
complex<double> b_pole1=bFactors["b_pole1Mag"]*complex<double>(cos(bFactors["b_pole1Phi"]), sin(bFactors["b_pole1Phi"]));
complex<double> b_pole2=bFactors["b_pole2Mag"]*complex<double>(cos(bFactors["b_pole2Phi"]), sin(bFactors["b_pole2Phi"]));
complex<double> b_pole3=bFactors["b_pole3Mag"]*complex<double>(cos(bFactors["b_pole3Phi"]), sin(bFactors["b_pole3Phi"]));
complex<double> b_pole4=bFactors["b_pole4Mag"]*complex<double>(cos(bFactors["b_pole4Phi"]), sin(bFactors["b_pole4Phi"]));
complex<double> b_pole5=bFactors["b_pole5Mag"]*complex<double>(cos(bFactors["b_pole5Phi"]), sin(bFactors["b_pole5Phi"]));
currentFVector->updateBeta(0, b_pole1);
currentFVector->updateBeta(1, b_pole2);
currentFVector->updateBeta(2, b_pole3);
currentFVector->updateBeta(3, b_pole4);
currentFVector->updateBeta(4, b_pole5);
_currentfProdMap[theName]["fprod_PiPiMag"]=1.;
_currentfProdMap[theName]["fprod_PiPiPhi"]=0.;
_currentfProdMap[theName]["fprod_KKMag"]=1.;
_currentfProdMap[theName]["fprod_KKPhi"]=0.;
_currentfProdMap[theName]["fprod_4PiMag"]=1.;
_currentfProdMap[theName]["fprod_4PiPhi"]=0.;
_currentfProdMap[theName]["fprod_EtaEtaMag"]=1.;
_currentfProdMap[theName]["fprod_EtaEtaPhi"]=0.;
_currentfProdMap[theName]["fprod_EtaEtapMag"]=1.;
_currentfProdMap[theName]["fprod_EtaEtapPhi"]=0.;
std::map<std::string, double>& fProds=_currentfProdMap[theName];
complex<double> fProdPiPi=fProds["fprod_PiPiMag"]*complex<double>(cos(fProds["fprod_PiPiPhi"]), sin(fProds["fprod_PiPiPhi"]));
complex<double> fProdKK=fProds["fprod_KKMag"]*complex<double>(cos(fProds["fprod_KKPhi"]), sin(fProds["fprod_KKPhi"]));
complex<double> fProd4Pi=fProds["fprod_4PiMag"]*complex<double>(cos(fProds["fprod_4PiPhi"]), sin(fProds["fprod_4PiPhi"]));
complex<double> fProdEtaEta=fProds["fprod_EtaEtaMag"]*complex<double>(cos(fProds["fprod_EtaEtaPhi"]), sin(fProds["fprod_EtaEtaPhi"]));
complex<double> fProdEtaEtap=fProds["fprod_EtaEtapMag"]*complex<double>(cos(fProds["fprod_EtaEtapPhi"]), sin(fProds["fprod_EtaEtapPhi"]));
currentFVector->updateFprod(0, fProdPiPi);
currentFVector->updateFprod(1, fProdKK);
currentFVector->updateFprod(2, fProd4Pi);
currentFVector->updateFprod(3, fProdEtaEta);
currentFVector->updateFprod(4, fProdEtaEtap);
_currentS0Map[theName]=1.;
currentFVector->updateS0prod(_currentS0Map[theName]);
_fVecMap[theName]=currentFVector;
_recalcMap[theName]=true;
}
const std::string& PiPiSWaveASDynamics::grandMaKey(AbsXdecAmp* grandmaAmp){
if(0==grandmaAmp) return _grandmaKey;
return grandmaAmp->absDec()->massParKey();
}
// PiPiSWaveASDynamics class definition file. -*- C++ -*-
// Copyright 2013 Bertram Kopf
#pragma once
#include <iostream>
#include <vector>
#include <complex>
#include <map>
#include <string>
#include <boost/shared_ptr.hpp>
#include "PwaUtils/AbsDynamics.hh"
class AbsXdecAmp;
class FVectorPiPiS;
class PiPiSWaveASDynamics : public AbsDynamics{
public:
PiPiSWaveASDynamics(std::string& massKey, std::vector<Particle*>& fsParticles, Particle* mother);
virtual ~PiPiSWaveASDynamics();
virtual complex<double> eval(EvtData* theData, AbsXdecAmp* grandmaAmp, Spin OrbMom=0);
virtual void getDefaultParams(fitParams& fitVal, fitParams& fitErr);
virtual bool checkRecalculation(fitParams& theParamVal);
virtual void updateFitParams(fitParams& theParamVal);
virtual void addGrandMa(boost::shared_ptr<AbsDecay> theDec);
virtual const std::string& grandMaKey(AbsXdecAmp* grandmaAmp);
protected:
// std::string _massKey;
double _currentMass;
std::map<int, complex<double> > _cachedMap;
std::map<std::string, boost::shared_ptr<AbsXdecAmp> > _grandMaAmpMap;
std::map<std::string, boost::shared_ptr<FVectorPiPiS> > _fVecMap;
std::map<std::string, std::map<std::string, double> > _currentbFactorMap;
std::map<std::string, std::map<std::string, double> > _currentfProdMap;
std::map<std::string, double > _currentS0Map;
std::map<int, std::map<std::string, complex<float> > > _cachedStringMap;
std::map<std::string, bool > _recalcMap;
private:
};
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