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

added needed classes for gam gam fits

parent da8ca3f9
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@ short AbsChannelEnv::CHANNEL_EPEM = 2;
short AbsChannelEnv::CHANNEL_RES = 3;
short AbsChannelEnv::CHANNEL_GAMMAP = 4;
short AbsChannelEnv::CHANNEL_PIPISCATTERING = 5;
short AbsChannelEnv::CHANNEL_GAMGAM = 6;
AbsChannelEnv::AbsChannelEnv(ParserBase* theParser, short channelType) :
_channelType(channelType)
......
......@@ -86,6 +86,7 @@ public:
static short CHANNEL_RES;
static short CHANNEL_GAMMAP;
static short CHANNEL_PIPISCATTERING;
static short CHANNEL_GAMGAM;
protected:
int _channelID;
......
//************************************************************************//
// //
// Copyright 2017 Bertram Kopf (bertram@ep1.rub.de) //
// - Ruhr-Universität Bochum //
// //
// This file is part of Pawian. //
// //
// Pawian is free software: you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation, either version 3 of the License, or //
// (at your option) any later version. //
// //
// Pawian is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with Pawian. If not, see <http://www.gnu.org/licenses/>. //
// //
//************************************************************************//
// GamgamChannelEnv class definition file. -*- C++ -*-
// Copyright 2017 Bertram Kopf
#include "Particle/ParticleTable.hh"
#include "Particle/Particle.hh"
#include "gamgamUtils/GamgamChannelEnv.hh"
#include "ConfigParser/gamgamParser.hh"
#include "gamgamUtils/gamgamReaction.hh"
//#include "epemUtils/epemHist.hh"
#include "PwaUtils/GlobalEnv.hh"
#include "PwaUtils/AbsDecay.hh"
#include "PwaUtils/AbsDecayList.hh"
#include "PwaUtils/IsobarLSDecay.hh"
#include "PwaUtils/IsobarHeliDecay.hh"
#include "PwaUtils/IsobarTensorDecay.hh"
#include "PwaUtils/ProdChannelInfo.hh"
#include "ErrLogger/ErrLogger.hh"
GamgamChannelEnv::GamgamChannelEnv(gamgamParser* theParser) :
AbsChannelEnv(theParser, AbsChannelEnv::CHANNEL_GAMGAM)
,_theGamGamParser(theParser)
,_cmsMass(1.)
{
}
void GamgamChannelEnv::setupChannel(ChannelID id){
AbsChannelEnv::setupGlobal(id);
_cmsMass=_theGamGamParser->cmsMass();
_jmax = _theGamGamParser->jMax();
_cmEnergy = _cmsMass;
_initial4Vec = Vector4<double>( _cmsMass, 0., 0., 0.);
std::vector<std::string>::const_iterator itStr;
//epem reaction
_gamgamReaction=std::shared_ptr<gamgamReaction>(new gamgamReaction(_prodChannelInfoList, id, _jmax));
std::vector<std::string> additionalStringVecDummy;
std::string dynTypeDefault="WoDynamics";
if (_theGamGamParser->productionFormalism()=="Formation"){
std::vector< std::shared_ptr<IsobarHeliDecay> > prodDecs = _gamgamReaction->productionHeliDecays();
std::vector< std::shared_ptr<IsobarHeliDecay> >::iterator itDec;
for (itDec=prodDecs.begin(); itDec!=prodDecs.end(); ++itDec){
if((*itDec)->prodChannelInfo()->withProdBarrier()) (*itDec)->enableProdBarrier();
else (*itDec)->enableDynamics(dynTypeDefault, additionalStringVecDummy);
_prodDecList->addDecay(*itDec);
}
}
else{
Alert <<"production formalism with the name " << _theGamGamParser->productionFormalism() << " doesn't exist for gam gam reactions!!!" << endmsg;
exit(1);
}
//set prefactor for production and decay amplitudes
AbsChannelEnv::setPrefactors();
//replace suffixes for fit parameter
AbsChannelEnv::replaceParameterSuffixes();
//replace mass key
AbsChannelEnv::replaceMassKeys();
//add dynamics
AbsChannelEnv::addDynamics();
//set decay levels
AbsChannelEnv::setDecayLevels();
}
//************************************************************************//
// //
// Copyright 2017 Bertram Kopf (bertram@ep1.rub.de) //
// - Ruhr-Universität Bochum //
// //
// This file is part of Pawian. //
// //
// Pawian is free software: you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation, either version 3 of the License, or //
// (at your option) any later version. //
// //
// Pawian is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with Pawian. If not, see <http://www.gnu.org/licenses/>. //
// //
//************************************************************************//
// GamgamChannelEnv class definition file. -*- C++ -*-
// Copyright 2017 Bertram Kopf
#pragma once
#include "PwaUtils/AbsChannelEnv.hh"
class gamgamParser;
class gamgamReaction;
class GamgamChannelEnv : public AbsChannelEnv
{
public:
virtual void setupChannel(ChannelID id);
GamgamChannelEnv(gamgamParser* theParser);
std::shared_ptr<gamgamReaction> reaction() {return _gamgamReaction;}
const double cmsMass() {return _cmsMass;}
virtual const std::string channelTypeName() {return "gamgam";}
// std::shared_ptr<AbsHist> CreateHistInstance(std::string additionalSuffix);
private:
gamgamParser* _theGamGamParser;
double _cmsMass;
unsigned _jmax;
std::shared_ptr<gamgamReaction> _gamgamReaction;
};
//************************************************************************//
// //
// Copyright 2017 Bertram Kopf (bertram@ep1.rub.de) //
// - Ruhr-Universität Bochum //
// //
// This file is part of Pawian. //
// //
// Pawian is free software: you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation, either version 3 of the License, or //
// (at your option) any later version. //
// //
// Pawian is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with Pawian. If not, see <http://www.gnu.org/licenses/>. //
// //
//************************************************************************//
// gamgamReaction class definition file. -*- C++ -*-
// Copyright 2017 Bertram Kopf
#include <getopt.h>
#include <fstream>
#include "gamgamUtils/gamgamReaction.hh"
#include "gamgamUtils/gamgamStates.hh"
#include "PwaUtils/IsobarLSDecay.hh"
#include "PwaUtils/IsobarHeliDecay.hh"
#include "PwaUtils/ProdChannelInfo.hh"
#include "qft++/relativistic-quantum-mechanics/Utils.hh"
#include "ErrLogger/ErrLogger.hh"
#include "Particle/Particle.hh"
gamgamReaction::gamgamReaction(std::vector<std::shared_ptr<ProdChannelInfo> > prodChannelInfoList, ChannelID channelID, int jmax) :
_channelID(channelID)
,_jmax(jmax)
,_gamgamStates(new gamgamStates(_jmax))
{
std::vector<std::shared_ptr<ProdChannelInfo> >::iterator itProd;
for (itProd=prodChannelInfoList.begin(); itProd!= prodChannelInfoList.end(); ++itProd){
}
}
gamgamReaction::~gamgamReaction(){
}
void gamgamReaction::print(std::ostream& os) const{
os << "\n gamma gamma reaction\n";
os << "\n ***** decay chains *******\n";
// std::vector< std::shared_ptr<IsobarLSDecay> >::const_iterator itIso;
// for( itIso=_prodCanoDecs.begin(); itIso!=_prodCanoDecs.end(); ++itIso){
// (*itIso)->print(os);
// }
}
//************************************************************************//
// //
// Copyright 2017 Bertram Kopf (bertram@ep1.rub.de) //
// - Ruhr-Universität Bochum //
// //
// This file is part of Pawian. //
// //
// Pawian is free software: you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation, either version 3 of the License, or //
// (at your option) any later version. //
// //
// Pawian is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with Pawian. If not, see <http://www.gnu.org/licenses/>. //
// //
//************************************************************************//
// gamgamReaction class definition file. -*- C++ -*-
// Copyright 2017 Bertram Kopf
#pragma once
#include <iostream>
#include <vector>
#include <complex>
#include <map>
#include <vector>
#include <string>
#include <memory>
#include "PwaUtils/DataUtils.hh"
#include "PwaUtils/AbsChannelEnv.hh"
#include "Utils/PawianCollectionUtils.hh"
class Particle;
class IsobarLSDecay;
class IsobarHeliDecay;
class ProdChannelInfo;
class gamgamStates;
class gamgamReaction {
public:
gamgamReaction(std::vector<std::shared_ptr<ProdChannelInfo> > prodChannelInfoList, ChannelID channelID, int jmax);
virtual ~gamgamReaction();
virtual void print(std::ostream& os) const;
std::shared_ptr<gamgamStates> GamGamStates() {return _gamgamStates;}
std::vector< std::shared_ptr<IsobarLSDecay> >& productionCanoDecays() {return _prodCanoDecs;}
std::vector< std::shared_ptr<IsobarHeliDecay> >& productionHeliDecays() {return _prodHeliDecs;}
protected:
private:
ChannelID _channelID;
unsigned int _jmax;
std::shared_ptr<gamgamStates> _gamgamStates;
std::vector< std::shared_ptr<IsobarLSDecay> > _prodCanoDecs;
std::vector< std::shared_ptr<IsobarHeliDecay> > _prodHeliDecs;
};
......@@ -54,6 +54,28 @@ gamgamStates::gamgamStates(int jmax):
gamgamStates::~gamgamStates(){
}
std::vector< std::shared_ptr<const JPCLS> > gamgamStates::jpcLSStates(Spin lamGam1, Spin lamGam2) const{
if(lamGam1==-1 && lamGam2==-1) return _JPCLSLam1m1Lam2m1_States;
else if(lamGam1==-1 && lamGam2==1) return _JPCLSLam1m1Lam2p1_States;
else if(lamGam1==1 && lamGam2==-1) return _JPCLSLam1p1Lam2m1_States;
else if(lamGam1==1 && lamGam2==1) return _JPCLSLam1p1Lam2p1_States;
else{
Alert << "lamGam1= " << lamGam1 << " and lamGam2= " << lamGam2 << " are not allowed for two initial real photons!!!" << endmsg;
exit(1);
}
}
std::vector< std::shared_ptr<const JPClamlam> > gamgamStates::jpcLamLamStates(Spin lamGam1, Spin lamGam2) const{
if(lamGam1==-1 && lamGam2==-1) return _JPClamlamLam1m1Lam2m1_States;
else if(lamGam1==-1 && lamGam2==1) return _JPClamlamLam1m1Lam2p1_States;
else if(lamGam1==1 && lamGam2==-1) return _JPClamlamLam1p1Lam2m1_States;
else if(lamGam1==1 && lamGam2==1) return _JPClamlamLam1p1Lam2p1_States;
else{
Alert << "lamGam1= " << lamGam1 << " and lamGam2= " << lamGam2 << " are not allowed for two initial real photons!!!" << endmsg;
exit(1);
}
}
bool gamgamStates::calcStates(){
std::cout << "jmax: " << _jmax << std::endl;
for (int j=0; j<=_jmax; j++){
......@@ -77,17 +99,30 @@ bool gamgamStates::calcStates(){
double preFactorLS=sqrt(2.*(*it)->L+1)*Clebsch((*it)->S, lam1-lam2, (*it)->L, 0, jpcPtr->J, lam1-lam2);
if( fabs(preFactorLS) > 1.e-10){
std::shared_ptr<const JPCLS> currentJPCLSPtr(new JPCLS(jpcPtr, (*it)->L, (*it)->S, preFactorLS));
double preFactorLamLam=Clebsch(1, lam1, 1, -lam2, (*it)->S, lam1-lam2);
if(fabs(preFactorLamLam) > 1.e-10){
double cgFactorLamLam = Clebsch(1, lam1, 1, -lam2, (*it)->S, lam1-lam2);
double parityFactorLamLam = jpcPtr->P*pow(-1., jpcPtr->J);
if(fabs(cgFactorLamLam) > 1.e-10){
fillVec(currentJPCLSPtr,_JPCLS_States);
fillVec(currentIGJPCPtr, _allIGjpcRes);
std::shared_ptr<const JPClamlam> currentJPClamlamPtr(new JPClamlam(jpcPtr, lam1, lam2, preFactorLamLam));
std::shared_ptr<const JPClamlam> currentJPClamlamPtr(new JPClamlam(jpcPtr, lam1, lam2, parityFactorLamLam));
fillVec(currentJPClamlamPtr, _JPClamlam_States);
fillVec(jpcPtr, _alljpcRes);
if(lam1==-1 && lam2==-1) fillVec(currentJPCLSPtr, _JPCLSLam1m1Lam2m1_States);
else if(lam1==-1 && lam2==1) fillVec(currentJPCLSPtr, _JPCLSLam1m1Lam2p1_States);
else if(lam1==1 && lam2==-1) fillVec(currentJPCLSPtr, _JPCLSLam1p1Lam2m1_States);
else if(lam1==1 && lam2==1) fillVec(currentJPCLSPtr, _JPCLSLam1p1Lam2p1_States);
if(lam1==-1 && lam2==-1){
fillVec(currentJPCLSPtr, _JPCLSLam1m1Lam2m1_States);
fillVec(currentJPClamlamPtr, _JPClamlamLam1m1Lam2m1_States);
}
else if(lam1==-1 && lam2==1){
fillVec(currentJPCLSPtr, _JPCLSLam1m1Lam2p1_States);
fillVec(currentJPClamlamPtr, _JPClamlamLam1m1Lam2p1_States);
}
else if(lam1==1 && lam2==-1){
fillVec(currentJPCLSPtr, _JPCLSLam1p1Lam2m1_States);
fillVec(currentJPClamlamPtr, _JPClamlamLam1p1Lam2m1_States);
}
else if(lam1==1 && lam2==1){
fillVec(currentJPCLSPtr, _JPCLSLam1p1Lam2p1_States);
fillVec(currentJPClamlamPtr, _JPClamlamLam1p1Lam2p1_States);
}
}
}
}
......@@ -132,29 +167,26 @@ void gamgamStates::print(std::ostream& os) const{
os << std::endl;
}
os << "\n******** JPCLS states for lamGam1=-1 and lamGam2=-1************ " << std::endl;
for ( itJPCLS=_JPCLSLam1m1Lam2m1_States.begin(); itJPCLS!=_JPCLSLam1m1Lam2m1_States.end(); ++itJPCLS){
(*itJPCLS)->print(os);
os << std::endl;
}
os << "\n******** JPCLS states for lamGam1=-1 and lamGam2=1************ " << std::endl;
for ( itJPCLS=_JPCLSLam1m1Lam2p1_States.begin(); itJPCLS!=_JPCLSLam1m1Lam2p1_States.end(); ++itJPCLS){
(*itJPCLS)->print(os);
os << std::endl;
}
os << "\n******** JPCLS states for lamGam1=1 and lamGam2=-1************ " << std::endl;
for ( itJPCLS=_JPCLSLam1p1Lam2m1_States.begin(); itJPCLS!=_JPCLSLam1p1Lam2m1_States.end(); ++itJPCLS){
(*itJPCLS)->print(os);
os << std::endl;
}
for (Spin lam1=-1; lam1<=1; lam1+=2){
for (Spin lam2=-1; lam2<=1; lam2+=2){
os << "\n******** JPCLS states for lamGam1= " << lam1 << " and lamGam2= " << lam2 <<" ===> lamX= " << lam1-lam2 << " ************ " << std::endl;
std::vector< std::shared_ptr<const JPCLS> > currentJPCLSStates=jpcLSStates(lam1, lam2);
for ( itJPCLS=currentJPCLSStates.begin(); itJPCLS!=currentJPCLSStates.end(); ++itJPCLS){
(*itJPCLS)->print(os);
os << std::endl;
}
}
}
os << "\n******** JPCLS states for lamGam1=1 and lamGam2=1************ " << std::endl;
for ( itJPCLS=_JPCLSLam1p1Lam2p1_States.begin(); itJPCLS!=_JPCLSLam1p1Lam2p1_States.end(); ++itJPCLS){
(*itJPCLS)->print(os);
os << std::endl;
}
for (Spin lam1=-1; lam1<=1; lam1+=2){
for (Spin lam2=-1; lam2<=1; lam2+=2){
os << "\n******** JPClamlam states for lamGam1= " << lam1 << " and lamGam2= " << lam2 <<" ===> lamX= " << lam1-lam2 << " ************ " << std::endl;
std::vector< std::shared_ptr<const JPClamlam> > currentJPClamalamStates=jpcLamLamStates(lam1, lam2);
for ( itJPCLamLam=currentJPClamalamStates.begin(); itJPCLamLam!=currentJPClamalamStates.end(); ++itJPCLamLam){
(*itJPCLamLam)->print(os);
os << std::endl;
}
}
}
}
......@@ -57,6 +57,9 @@ public:
return _JPCLS_States;
}
virtual std::vector< std::shared_ptr<const JPCLS> > jpcLSStates(Spin lamGam1, Spin lamGam2) const;
virtual std::vector< std::shared_ptr<const JPClamlam> > jpcLamLamStates(Spin lamGam1, Spin lamGam2) const;
virtual void print(std::ostream& os) const;
protected:
......@@ -77,5 +80,9 @@ public:
std::vector< std::shared_ptr<const JPCLS> > _JPCLSLam1m1Lam2p1_States;
std::vector< std::shared_ptr<const JPCLS> > _JPCLSLam1p1Lam2m1_States;
std::vector< std::shared_ptr<const JPCLS> > _JPCLSLam1p1Lam2p1_States;
std::vector< std::shared_ptr<const JPClamlam> > _JPClamlamLam1m1Lam2m1_States;
std::vector< std::shared_ptr<const JPClamlam> > _JPClamlamLam1m1Lam2p1_States;
std::vector< std::shared_ptr<const JPClamlam> > _JPClamlamLam1p1Lam2m1_States;
std::vector< std::shared_ptr<const JPClamlam> > _JPClamlamLam1p1Lam2p1_States;
};
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