diff --git a/PwaUtils/AbsChannelEnv.cc b/PwaUtils/AbsChannelEnv.cc index 368e6c7fe90ca57ad07ec3c48c56c842825ce2f7..71dfbe48110f4165e41920324c8058055dae276f 100644 --- a/PwaUtils/AbsChannelEnv.cc +++ b/PwaUtils/AbsChannelEnv.cc @@ -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) diff --git a/PwaUtils/AbsChannelEnv.hh b/PwaUtils/AbsChannelEnv.hh index 0df7f1a1f95f166eda60c55536e91e03f519c5cf..4bb9f6d26170376ac838080c471d41bfa98cfa53 100644 --- a/PwaUtils/AbsChannelEnv.hh +++ b/PwaUtils/AbsChannelEnv.hh @@ -86,6 +86,7 @@ public: static short CHANNEL_RES; static short CHANNEL_GAMMAP; static short CHANNEL_PIPISCATTERING; + static short CHANNEL_GAMGAM; protected: int _channelID; diff --git a/gamgamUtils/GamgamChannelEnv.cc b/gamgamUtils/GamgamChannelEnv.cc new file mode 100644 index 0000000000000000000000000000000000000000..d139f3a42ddb1451a795a3542e29b4670c6a7a04 --- /dev/null +++ b/gamgamUtils/GamgamChannelEnv.cc @@ -0,0 +1,101 @@ +//************************************************************************// +// // +// 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(); +} + + diff --git a/gamgamUtils/GamgamChannelEnv.hh b/gamgamUtils/GamgamChannelEnv.hh new file mode 100644 index 0000000000000000000000000000000000000000..6f29be9d8350b159523fe2c7870f469ea5c5f9a0 --- /dev/null +++ b/gamgamUtils/GamgamChannelEnv.hh @@ -0,0 +1,51 @@ +//************************************************************************// +// // +// 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; +}; diff --git a/gamgamUtils/gamgamReaction.cc b/gamgamUtils/gamgamReaction.cc new file mode 100644 index 0000000000000000000000000000000000000000..6a15bb410dfd22fe465badaba9e77ba2350d25f4 --- /dev/null +++ b/gamgamUtils/gamgamReaction.cc @@ -0,0 +1,60 @@ +//************************************************************************// +// // +// 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); + // } +} diff --git a/gamgamUtils/gamgamReaction.hh b/gamgamUtils/gamgamReaction.hh new file mode 100644 index 0000000000000000000000000000000000000000..95f6b9a3f416dc5f43d6173386cef4132688f0c3 --- /dev/null +++ b/gamgamUtils/gamgamReaction.hh @@ -0,0 +1,67 @@ +//************************************************************************// +// // +// 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; +}; diff --git a/gamgamUtils/gamgamStates.cc b/gamgamUtils/gamgamStates.cc index 024be9400d5ea8949a68c187acad9002cbf79f72..d51bc5b3ca22dc44e85882a27b4b62daf4242be0 100644 --- a/gamgamUtils/gamgamStates.cc +++ b/gamgamUtils/gamgamStates.cc @@ -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; + } + } + } } diff --git a/gamgamUtils/gamgamStates.hh b/gamgamUtils/gamgamStates.hh index 6b98eb6b7a222c47a00a27d2e0edbba49b33a817..63919c2a1a9cc262e21f8b515a388747f65ecc3a 100644 --- a/gamgamUtils/gamgamStates.hh +++ b/gamgamUtils/gamgamStates.hh @@ -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; };