Newer
Older
//************************************************************************//
// //
// Copyright 2013 Bertram Kopf (bertram@ep1.rub.de) //
// Julian Pychy (julian@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/>. //
// //
//************************************************************************//
// LSOmegaTo3PiDecAmps class definition file. -*- C++ -*-
// Copyright 2012 Bertram Kopf
#include <getopt.h>
#include <fstream>
#include <string>
#include "PwaUtils/LSOmegaTo3PiDecAmps.hh"
#include "qft++/relativistic-quantum-mechanics/Utils.hh"
#include "ErrLogger/ErrLogger.hh"
#include "PwaUtils/DataUtils.hh"
//#include "PwaUtils/OmegaTo3PiLSDecay.hh"
//#include "PwaUtils/XdecAmpRegistry.hh"
#include "Particle/Particle.hh"
Julian Pychy
committed
LSOmegaTo3PiDecAmps::LSOmegaTo3PiDecAmps(std::shared_ptr<OmegaTo3PiLSDecay> theDec, ChannelID channelID) :
LSDecRefAmps( (std::shared_ptr<AbsDecay>) theDec, channelID)
,_lambdaDecKey(theDec->lambdaDecKey())
Bertram Kopf
committed
_LSs=theDec->LSAmps();
Bertram Kopf
committed
if(_LSs.size()>0) _factorMag=1./sqrt(_LSs.size());
}
LSOmegaTo3PiDecAmps::~LSOmegaTo3PiDecAmps()
{
}
Bertram Kopf
committed
complex<double> LSOmegaTo3PiDecAmps::XdecPartAmp(Spin& lamX, Spin& lamDec, short fixDaughterNr, EvtData* theData, Spin& lamFs, AbsXdecAmp* grandmaAmp){
Bertram Kopf
committed
std::vector< std::shared_ptr<const LScomb> >::iterator it;
for (it=_LSs.begin(); it!=_LSs.end(); ++it){
if( fabs(lamX) > _JPCPtr->J ) continue;
double theMag=_currentParamMags[*it];
double thePhi=_currentParamPhis[*it];
complex<double> expi(cos(thePhi), sin(thePhi));
complex<double> amp = theMag*expi*sqrt(2*(*it)->L+1)
Bertram Kopf
committed
*conj( theData->WignerDsString[_wignerDKey][_JPCPtr->J][lamX][0]);
result+=amp;
}
return result;
}
Bertram Kopf
committed
complex<double> LSOmegaTo3PiDecAmps::XdecAmp(Spin& lamX, EvtData* theData, Spin& lamFs, AbsXdecAmp* grandmaAmp){
std::string refKey=_refKey;
if (0!=grandmaAmp) refKey=grandmaAmp->refKey();
Julian Pychy
committed
complex<double> result(0.,0.);
Id2StringType currentSpinIndex=FunctionUtils::spin2Index(lamX,lamFs);
result=_cachedAmpMapNew.at(evtNo).at(refKey).at(_absDyn->grandMaKey(grandmaAmp)).at(currentSpinIndex);
// result*=_absDyn->eval(theData, grandmaAmp);
Julian Pychy
committed
Bertram Kopf
committed
std::vector< std::shared_ptr<const LScomb> >::iterator it;
for (it=_LSs.begin(); it!=_LSs.end(); ++it){
if( fabs(lamX) > _JPCPtr->J ) continue;
Julian Pychy
committed
complex<double> amp = _currentParamMagExpi.at(*it)*sqrt(2*(*it)->L+1)
*conj( theData->WignerDsStringString.at(_wignerDKey).at(refKey).at(_JPCPtr->J).at(lamX).at(0));
if (_absDyn->isLdependent()) amp*=_absDyn->eval(theData, grandmaAmp, (*it)->L);
result*=sqrt( theData->DoubleStringString[_lambdaDecKey][refKey] );
if (!_absDyn->isLdependent()) result*=_absDyn->eval(theData, grandmaAmp);
_cachedAmpMapNew[evtNo][refKey][_absDyn->grandMaKey(grandmaAmp)][currentSpinIndex]=result;
// result*=_absDyn->eval(theData, grandmaAmp);