diff --git a/EvtGenBase/Evt3Rank3C.hh b/EvtGenBase/Evt3Rank3C.hh deleted file mode 100644 index 8adaddf..0000000 --- a/EvtGenBase/Evt3Rank3C.hh +++ /dev/null @@ -1,120 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#ifndef EVT3RANK3C_HH -#define EVT3RANK3C_HH - -#include "EvtGenBase/EvtComplex.hh" - -#include - -class EvtTensor3C; -class EvtVector3C; -class EvtVector3R; - -class Evt3Rank3C; -inline Evt3Rank3C operator*( const EvtComplex& c, const Evt3Rank3C& t2 ); -inline Evt3Rank3C operator*( const double d, const Evt3Rank3C& t2 ); -inline Evt3Rank3C operator*( const Evt3Rank3C& t2, const EvtComplex& c ); -inline Evt3Rank3C operator*( const Evt3Rank3C& t2, const double d ); -inline Evt3Rank3C operator+( const Evt3Rank3C& t1, const Evt3Rank3C& t2 ); -inline Evt3Rank3C operator-( const Evt3Rank3C& t1, const Evt3Rank3C& t2 ); -Evt3Rank3C directProd( const EvtVector3C& c1, const EvtVector3C& c2, - const EvtVector3C& c3 ); -Evt3Rank3C conj( const Evt3Rank3C& t2 ); - -class Evt3Rank3C final { - friend Evt3Rank3C operator*( const EvtComplex& c, const Evt3Rank3C& t2 ); - friend Evt3Rank3C operator*( const double d, const Evt3Rank3C& t2 ); - friend Evt3Rank3C operator*( const Evt3Rank3C& t2, const EvtComplex& c ); - friend Evt3Rank3C operator*( const Evt3Rank3C& t2, const double d ); - friend Evt3Rank3C operator+( const Evt3Rank3C& t1, const Evt3Rank3C& t2 ); - friend Evt3Rank3C operator-( const Evt3Rank3C& t1, const Evt3Rank3C& t2 ); - friend Evt3Rank3C directProd( const EvtVector3C& c1, const EvtVector3C& c2, - const EvtVector3C& c3 ); - friend Evt3Rank3C conj( const Evt3Rank3C& t2 ); - - friend std::ostream& operator<<( std::ostream& s, const Evt3Rank3C& t2 ); - - public: - Evt3Rank3C(); - Evt3Rank3C( const Evt3Rank3C& t1 ); - Evt3Rank3C& operator=( const Evt3Rank3C& t1 ); - inline void set( int i, int j, int k, const EvtComplex& c ); - inline const EvtComplex& get( int i, int j, int k ) const; - void zero(); - - Evt3Rank3C& operator+=( const Evt3Rank3C& t2 ); - Evt3Rank3C& operator-=( const Evt3Rank3C& t2 ); - Evt3Rank3C& operator*=( const double d ); - Evt3Rank3C& operator*=( const EvtComplex& c ); - Evt3Rank3C conj() const; - EvtTensor3C cont1( const EvtVector3C& v ) const; - EvtTensor3C cont2( const EvtVector3C& v ) const; - EvtTensor3C cont3( const EvtVector3C& v ) const; - EvtTensor3C cont1( const EvtVector3R& v ) const; - EvtTensor3C cont2( const EvtVector3R& v ) const; - EvtTensor3C cont3( const EvtVector3R& v ) const; - - private: - EvtComplex t[3][3][3]; -}; - -inline Evt3Rank3C operator*( const EvtComplex& c, const Evt3Rank3C& t2 ) -{ - return Evt3Rank3C( t2 ) *= c; -} - -inline Evt3Rank3C operator*( const double d, const Evt3Rank3C& t2 ) -{ - return Evt3Rank3C( t2 ) *= d; -} - -inline Evt3Rank3C operator*( const Evt3Rank3C& t2, const EvtComplex& c ) -{ - return Evt3Rank3C( t2 ) *= c; -} - -inline Evt3Rank3C operator*( const Evt3Rank3C& t2, const double d ) -{ - return Evt3Rank3C( t2 ) *= d; -} - -inline Evt3Rank3C operator+( const Evt3Rank3C& t1, const Evt3Rank3C& t2 ) -{ - return Evt3Rank3C( t1 ) += t2; -} - -inline Evt3Rank3C operator-( const Evt3Rank3C& t1, const Evt3Rank3C& t2 ) -{ - return Evt3Rank3C( t1 ) -= t2; -} - -inline void Evt3Rank3C::set( int i, int j, int k, const EvtComplex& c ) -{ - t[i][j][k] = c; -} - -inline const EvtComplex& Evt3Rank3C::get( int i, int j, int k ) const -{ - return t[i][j][k]; -} - -#endif diff --git a/EvtGenBase/EvtAbsBinning.hh b/EvtGenBase/EvtAbsBinning.hh deleted file mode 100644 index a1dfc75..0000000 --- a/EvtGenBase/EvtAbsBinning.hh +++ /dev/null @@ -1,53 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#ifndef EVT_ABS_BINNING_HH -#define EVT_ABS_BINNING_HH -#define BIN_OUTSIDE -1 - -#include - -/* - * Data point to bin value mapping - */ - -template -class EvtAbsBinning { - public: - EvtAbsBinning() {} - EvtAbsBinning( const EvtAbsBinning& other ) {} - virtual ~EvtAbsBinning() {} - - virtual EvtAbsBinning* clone() const = 0; - virtual int getBin( const T& point ) const = 0; - virtual T getBinPoint( int bin ) const = 0; - virtual double size( int bin ) const = 0; - - virtual int nTypes() const = 0; - - virtual char* typeLabel( int i ) const - { - char* a = new char[128]; - sprintf( a, "%d", i ); - return a; - } -}; - -#endif diff --git a/EvtGenBase/EvtAmpAmpPdf.hh b/EvtGenBase/EvtAmpAmpPdf.hh deleted file mode 100644 index 6666e83..0000000 --- a/EvtGenBase/EvtAmpAmpPdf.hh +++ /dev/null @@ -1,89 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#ifndef EVT_AMP_AMP_PDF_HH -#define EVT_AMP_AMP_PDF_HH - -// From the product A1A2* four PDF terms can be constructed, by taking the positive -// and the negative parts or the real and imaginary part of the product. - -#include "EvtGenBase/EvtAmplitude.hh" -#include "EvtGenBase/EvtMacros.hh" -#include "EvtGenBase/EvtPdf.hh" - -#include - -enum -{ - POSRE = 0, - NEGRE, - POSIM, - NEGIM -}; - -template -class EvtAmpAmpPdf : public EvtPdf { - public: - EvtAmpAmpPdf() {} - EvtAmpAmpPdf( int type, const EvtAmplitude& amp1, - const EvtAmplitude& amp2 ) : - EvtPdf(), _type( type ), _amp1( amp1.clone() ), _amp2( amp2.clone() ) - { - } - EvtAmpAmpPdf( const EvtAmpAmpPdf& other ) : - EvtPdf( other ), - _type( other._type ), - COPY_PTR( _amp1 ), - COPY_PTR( _amp2 ) - { - } - virtual ~EvtAmpAmpPdf() - { - delete _amp1; - delete _amp2; - } - - virtual EvtAmpAmpPdf* clone() const { return new EvtAmpAmpPdf( *this ); } - - virtual double pdf( const T& p ) const - { - EvtComplex amp1 = _amp1->evaluate( p ); - EvtComplex amp2 = _amp2->evaluate( p ); - EvtComplex pr = amp1 * conj( amp2 ); - - if ( _type == POSRE ) - return real( pr ) > 0 ? real( pr ) : 0.; - if ( _type == NEGRE ) - return real( pr ) < 0 ? -real( pr ) : 0.; - if ( _type == POSIM ) - return imag( pr ) > 0 ? imag( pr ) : 0.; - if ( _type == NEGIM ) - return imag( pr ) < 0 ? -imag( pr ) : 0.; - - assert( 0 ); - } - - private: - int _type; - EvtAmplitude* _amp1; - EvtAmplitude* _amp2; -}; - -#endif diff --git a/EvtGenBase/EvtAmpIndex.hh b/EvtGenBase/EvtAmpIndex.hh deleted file mode 100644 index 00834a4..0000000 --- a/EvtGenBase/EvtAmpIndex.hh +++ /dev/null @@ -1,45 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#ifndef EVTAMPINDEX_HH -#define EVTAMPINDEX_HH - -#include - -class EvtAmpIndex { - friend class EvtAmpSubIndex; - - public: - EvtAmpIndex( std::vector ind ); - virtual ~EvtAmpIndex() {} - - void reset(); - bool next(); - - int index(); - - private: - std::vector _ind; - int _size; - std::vector _state; - std::vector _nstate; -}; - -#endif diff --git a/EvtGenBase/EvtAmpSubIndex.hh b/EvtGenBase/EvtAmpSubIndex.hh deleted file mode 100644 index b54051e..0000000 --- a/EvtGenBase/EvtAmpSubIndex.hh +++ /dev/null @@ -1,41 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#ifndef EVTAMPSUBINDEX_HH -#define EVTAMPSUBINDEX_HH - -#include -class EvtAmpIndex; - -class EvtAmpSubIndex { - public: - EvtAmpSubIndex( EvtAmpIndex* ind, std::vector sub ); - virtual ~EvtAmpSubIndex() {} - - int index(); - - private: - EvtAmpIndex* _ind; - std::vector _sub; - int _size; - std::vector _nstate; -}; - -#endif diff --git a/EvtGenBase/EvtBreitWignerPdf.hh b/EvtGenBase/EvtBreitWignerPdf.hh deleted file mode 100644 index 7193711..0000000 --- a/EvtGenBase/EvtBreitWignerPdf.hh +++ /dev/null @@ -1,52 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#ifndef EVT_BREIT_WIGNER_PDF_HH -#define EVT_BREIT_WIGNER_PDF_HH - -#include "EvtGenBase/EvtIntegPdf1D.hh" - -// Breit-Wigner PDF - -class EvtBreitWignerPdf : public EvtIntegPdf1D { - public: - EvtBreitWignerPdf( double min, double max, double m0, double g0 ); - EvtBreitWignerPdf( const EvtBreitWignerPdf& other ); - - double pdf( const EvtPoint1D& x ) const override; - EvtPdf* clone() const override - { - return new EvtBreitWignerPdf( *this ); - } - - double pdfIntegral( double m ) const override; - double pdfIntegralInverse( double x ) const override; - - // accessors - - inline double m0() const { return _m0; } - inline double g0() const { return _g0; } - - private: - double _m0; - double _g0; -}; - -#endif diff --git a/EvtGenBase/EvtDecayParm.hh b/EvtGenBase/EvtDecayParm.hh deleted file mode 100644 index f1119d1..0000000 --- a/EvtGenBase/EvtDecayParm.hh +++ /dev/null @@ -1,56 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#ifndef EVTDECAYPARM_HH -#define EVTDECAYPARM_HH - -#include - -// Description: Class to keep the arguments and daughters of a decay - -class EvtParticle; - -typedef void ( *fcnPtr )( EvtParticle*, int, int*, double* ); - -class EvtDecayParm { - public: - EvtDecayParm(); - ~EvtDecayParm(); - - void init( fcnPtr pfcn, int ndaug, int* daugs, int narg, double* args, - std::string name ); - - int getNDaug() { return itsndaug; } - int getNArg() { return itsnarg; } - int* getDaugs() { return itsdaugs; } - double* getArgs() { return itsargs; } - fcnPtr getfcnPtr() { return itsfcn; } - std::string getModelName() { return modelname; } - - private: - fcnPtr itsfcn; - int itsndaug; - int* itsdaugs; - int itsnarg; - double* itsargs; - std::string modelname; -}; - -#endif diff --git a/EvtGenBase/EvtIntegPdf1D.hh b/EvtGenBase/EvtIntegPdf1D.hh deleted file mode 100644 index a253663..0000000 --- a/EvtGenBase/EvtIntegPdf1D.hh +++ /dev/null @@ -1,48 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#ifndef EVT_INTEG_PDF_1D_HH -#define EVT_INTEG_PDF_1D_HH - -#include "EvtGenBase/EvtPdf.hh" -#include "EvtGenBase/EvtPoint1D.hh" - -// Analytically integrable one dimensional PDF. - -class EvtIntegPdf1D : public EvtPdf { - public: - EvtIntegPdf1D( double min, double max ); - EvtIntegPdf1D( const EvtIntegPdf1D& ); - - // Pdf integral function and its inverse to be defined in subclasses - - virtual double pdfIntegral( double x ) const = 0; - virtual double pdfIntegralInverse( double x ) const = 0; - - using EvtPdf::compute_integral; - EvtValError compute_integral() const override; - EvtPoint1D randomPoint() override; - - protected: - double _min; - double _max; -}; - -#endif diff --git a/EvtGenBase/EvtPointPred.hh b/EvtGenBase/EvtPointPred.hh deleted file mode 100644 index b991d20..0000000 --- a/EvtGenBase/EvtPointPred.hh +++ /dev/null @@ -1,38 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#ifndef EVT_POINT_PRED_HH -#define EVT_POINT_PRED_HH - -// Predicate testing validity of a point. The point class must provide -// bool isValid() method - -template -class EvtPointPred { - public: - typedef Point argument_type; - typedef bool result_type; - - EvtPointPred() {} - EvtPointPred( const EvtPointPred& ) {} - ~EvtPointPred() {} - - result_type operator()( argument_type x ) { return x.isValid(); } -}; diff --git a/EvtGenBase/EvtPto3PAmpSmpResolution.hh b/EvtGenBase/EvtPto3PAmpSmpResolution.hh deleted file mode 100644 index 36ae0ed..0000000 --- a/EvtGenBase/EvtPto3PAmpSmpResolution.hh +++ /dev/null @@ -1,54 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#ifndef EVT_PTO3P_AMP_SMPRSL_HH -#define EVT_PTO3P_AMP_SMPRSL_HH - -#include "EvtGenBase/EvtCyclic3.hh" -#include "EvtGenBase/EvtPto3PAmp.hh" - -class EvtComplex; - -class EvtPto3PAmpSmpResolution : public EvtPto3PAmp { - public: - EvtPto3PAmpSmpResolution( EvtDalitzPlot dp, EvtCyclic3::Pair pairAng, - EvtCyclic3::Pair pairRes, - EvtSpinType::spintype spin, - const EvtPropagator& prop, NumType typeN ); - - EvtAmplitude* clone() const override - { - return new EvtPto3PAmpSmpResolution( *this ); - } - - EvtComplex evalPropagator( double m ) const override; - - void setResolution( double bias, double sigma ) - { - _bias = bias; - _sigma = sigma; - } - - private: - double _bias; - double _sigma; -}; - -#endif diff --git a/src/EvtGenBase/Evt3Rank3C.cpp b/src/EvtGenBase/Evt3Rank3C.cpp deleted file mode 100644 index 90eff20..0000000 --- a/src/EvtGenBase/Evt3Rank3C.cpp +++ /dev/null @@ -1,282 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#include "EvtGenBase/Evt3Rank3C.hh" - -#include "EvtGenBase/EvtComplex.hh" -#include "EvtGenBase/EvtPatches.hh" -#include "EvtGenBase/EvtReport.hh" -#include "EvtGenBase/EvtTensor3C.hh" -#include "EvtGenBase/EvtVector3C.hh" - -#include -#include - -Evt3Rank3C::Evt3Rank3C( const Evt3Rank3C& t1 ) -{ - int i, j, k; - - for ( i = 0; i < 3; i++ ) { - for ( j = 0; j < 3; j++ ) { - for ( k = 0; k < 3; k++ ) { - t[i][j][k] = t1.t[i][j][k]; - } - } - } -} - -Evt3Rank3C& Evt3Rank3C::operator=( const Evt3Rank3C& t1 ) -{ - int i, j, k; - - for ( i = 0; i < 3; i++ ) { - for ( j = 0; j < 3; j++ ) { - for ( k = 0; k < 3; k++ ) { - t[i][j][k] = t1.t[i][j][k]; - } - } - } - return *this; -} - -Evt3Rank3C Evt3Rank3C::conj() const -{ - Evt3Rank3C temp; - - int i, j, k; - - for ( i = 0; i < 3; i++ ) { - for ( j = 0; j < 3; j++ ) { - for ( k = 0; k < 3; k++ ) { - temp.set( i, j, k, ::conj( t[i][j][k] ) ); - } - } - } - return temp; -} - -void Evt3Rank3C::zero() -{ - int i, j, k; - for ( i = 0; i < 3; i++ ) { - for ( j = 0; j < 3; j++ ) { - for ( k = 0; k < 3; k++ ) { - t[i][j][k] = EvtComplex( 0.0, 0.0 ); - } - } - } -} - -Evt3Rank3C::Evt3Rank3C() -{ - int i, j, k; - - for ( i = 0; i < 3; i++ ) { - for ( j = 0; j < 3; j++ ) { - for ( k = 0; k < 3; k++ ) { - t[i][j][k] = EvtComplex( 0.0, 0.0 ); - } - } - } -} - -std::ostream& operator<<( std::ostream& s, const Evt3Rank3C& t2 ) -{ - int i, j, k; - for ( k = 0; k < 3; k++ ) { - for ( i = 0; i < 3; i++ ) { - for ( j = 0; j < 3; j++ ) { - EvtGenReport( EVTGEN_INFO, "EvtGen" ) << t2.t[k][i][j]; - } - EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "\n"; - } - } - return s; -} - -Evt3Rank3C& Evt3Rank3C::operator+=( const Evt3Rank3C& t2 ) -{ - int i, j, k; - - for ( i = 0; i < 3; i++ ) { - for ( j = 0; j < 3; j++ ) { - for ( k = 0; k < 3; k++ ) { - t[i][j][k] += t2.t[i][j][k]; - } - } - } - return *this; -} - -Evt3Rank3C& Evt3Rank3C::operator-=( const Evt3Rank3C& t2 ) -{ - int i, j, k; - - for ( i = 0; i < 3; i++ ) { - for ( j = 0; j < 3; j++ ) { - for ( k = 0; k < 3; k++ ) { - t[i][j][k] -= t2.t[i][j][k]; - } - } - } - - return *this; -} - -Evt3Rank3C& Evt3Rank3C::operator*=( const EvtComplex& c ) -{ - int i, j, k; - - for ( i = 0; i < 3; i++ ) { - for ( j = 0; j < 3; j++ ) { - for ( k = 0; k < 3; k++ ) { - t[i][j][k] *= c; - } - } - } - return *this; -} - -Evt3Rank3C& Evt3Rank3C::operator*=( const double c ) -{ - int i, j, k; - - for ( i = 0; i < 3; i++ ) { - for ( j = 0; j < 3; j++ ) { - for ( k = 0; k < 3; k++ ) { - t[i][j][k] *= c; - } - } - } - - return *this; -} - -Evt3Rank3C conj( const Evt3Rank3C& t2 ) -{ - Evt3Rank3C temp; - - int i, j, k; - - for ( i = 0; i < 3; i++ ) { - for ( j = 0; j < 3; j++ ) { - for ( k = 0; k < 3; k++ ) { - temp.t[i][j][k] = ::conj( t2.t[i][j][k] ); - } - } - } - return temp; -} - -EvtTensor3C Evt3Rank3C::cont1( const EvtVector3C& v ) const -{ - EvtTensor3C temp; - - int i, k; - - for ( i = 0; i < 3; i++ ) { - for ( k = 0; k < 3; k++ ) { - temp.set( i, k, - t[0][i][k] * v.get( 0 ) + t[1][i][k] * v.get( 1 ) + - t[2][i][k] * v.get( 2 ) ); - } - } - return temp; -} - -EvtTensor3C Evt3Rank3C::cont2( const EvtVector3C& v ) const -{ - EvtTensor3C temp; - - int i, k; - - for ( i = 0; i < 3; i++ ) { - for ( k = 0; k < 3; k++ ) { - temp.set( i, k, - t[i][0][k] * v.get( 0 ) + t[i][1][k] * v.get( 1 ) + - t[i][2][k] * v.get( 2 ) ); - } - } - return temp; -} - -EvtTensor3C Evt3Rank3C::cont3( const EvtVector3C& v ) const -{ - EvtTensor3C temp; - - int i, k; - - for ( i = 0; i < 3; i++ ) { - for ( k = 0; k < 3; k++ ) { - temp.set( i, k, - t[i][k][0] * v.get( 0 ) + t[i][k][1] * v.get( 1 ) + - t[i][k][2] * v.get( 2 ) ); - } - } - return temp; -} - -EvtTensor3C Evt3Rank3C::cont1( const EvtVector3R& v ) const -{ - EvtTensor3C temp; - - int i, k; - - for ( i = 0; i < 3; i++ ) { - for ( k = 0; k < 3; k++ ) { - temp.set( i, k, - t[0][i][k] * v.get( 0 ) + t[1][i][k] * v.get( 1 ) + - t[2][i][k] * v.get( 2 ) ); - } - } - return temp; -} - -EvtTensor3C Evt3Rank3C::cont2( const EvtVector3R& v ) const -{ - EvtTensor3C temp; - - int i, k; - - for ( i = 0; i < 3; i++ ) { - for ( k = 0; k < 3; k++ ) { - temp.set( i, k, - t[i][0][k] * v.get( 0 ) + t[i][1][k] * v.get( 1 ) + - t[i][2][k] * v.get( 2 ) ); - } - } - return temp; -} - -EvtTensor3C Evt3Rank3C::cont3( const EvtVector3R& v ) const -{ - EvtTensor3C temp; - - int i, k; - - for ( i = 0; i < 3; i++ ) { - for ( k = 0; k < 3; k++ ) { - temp.set( i, k, - t[i][k][0] * v.get( 0 ) + t[i][k][1] * v.get( 1 ) + - t[i][k][2] * v.get( 2 ) ); - } - } - return temp; -} diff --git a/src/EvtGenBase/EvtAmpIndex.cpp b/src/EvtGenBase/EvtAmpIndex.cpp deleted file mode 100644 index c0fd25d..0000000 --- a/src/EvtGenBase/EvtAmpIndex.cpp +++ /dev/null @@ -1,75 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#include "EvtGenBase/EvtAmpIndex.hh" - -#include "EvtGenBase/EvtPatches.hh" - -#include -using std::vector; - -EvtAmpIndex::EvtAmpIndex( std::vector ind ) : - _ind( ind ), _size( ind.size() ), _state( ind.size() ), _nstate( ind.size() ) -{ - int i; - - for ( i = 0; i < _size; i++ ) { - _state[i] = 0; - if ( i == 0 ) { - _nstate[i] = 1; - } else { - _nstate[i] = _nstate[i - 1] * _ind[i]; - } - } -} - -void EvtAmpIndex::reset() -{ - int i; - for ( i = 0; i < _size; i++ ) { - _state[i] = 0; - } -} - -bool EvtAmpIndex::next() -{ - int i; - for ( i = 0; i < _size; i++ ) { - _state[i]++; - if ( _state[i] < _ind[i] ) { - return true; - } else { - _state[i] = 0; - } - } - return false; -} - -int EvtAmpIndex::index() -{ - int i; - int ind = 0; - - for ( i = 0; i < _size; i++ ) { - ind += _state[i] * _nstate[i]; - } - - return ind; -} diff --git a/src/EvtGenBase/EvtAmpSubIndex.cpp b/src/EvtGenBase/EvtAmpSubIndex.cpp deleted file mode 100644 index 295b3c6..0000000 --- a/src/EvtGenBase/EvtAmpSubIndex.cpp +++ /dev/null @@ -1,53 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#include "EvtGenBase/EvtAmpSubIndex.hh" - -#include "EvtGenBase/EvtAmpIndex.hh" -#include "EvtGenBase/EvtPatches.hh" - -#include -using std::vector; - -EvtAmpSubIndex::EvtAmpSubIndex( EvtAmpIndex* ind, std::vector sub ) : - _ind( ind ), _sub( sub ), _size( sub.size() ), _nstate( sub.size() ) -{ - int i; - - for ( i = 0; i < _size; i++ ) { - if ( i == 0 ) { - _nstate[i] = 1; - } else { - _nstate[i] = _nstate[i - 1] * _ind->_ind[sub[i - 1]]; - } - } -} - -int EvtAmpSubIndex::index() -{ - int i; - int ind = 0; - - for ( i = 0; i < _size; i++ ) { - ind += _ind->_state[_ind->_ind[i]] * _nstate[i]; - } - - return ind; -} diff --git a/src/EvtGenBase/EvtBreitWignerPdf.cpp b/src/EvtGenBase/EvtBreitWignerPdf.cpp deleted file mode 100644 index f437e8b..0000000 --- a/src/EvtGenBase/EvtBreitWignerPdf.cpp +++ /dev/null @@ -1,83 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#include "EvtGenBase/EvtBreitWignerPdf.hh" - -#include "EvtGenBase/EvtConst.hh" -#include "EvtGenBase/EvtPatches.hh" - -#include -#include -#include - -EvtBreitWignerPdf::EvtBreitWignerPdf( double min, double max, double m0, - double g0 ) : - EvtIntegPdf1D( min, max ), _m0( m0 ), _g0( g0 ) -{ -} - -EvtBreitWignerPdf::EvtBreitWignerPdf( const EvtBreitWignerPdf& other ) : - EvtIntegPdf1D( other ), _m0( other._m0 ), _g0( other._g0 ) -{ -} - -double EvtBreitWignerPdf::pdf( const EvtPoint1D& x ) const -{ - double m = x.value(); - if ( ( 0 == ( m - _m0 ) ) && ( 0. == _g0 ) ) { - printf( "Delta function Breit-Wigner\n" ); - assert( 0 ); - } - - double ret = _g0 / EvtConst::twoPi / - ( ( m - _m0 ) * ( m - _m0 ) + _g0 * _g0 / 4 ); - - return ret; -} - -double EvtBreitWignerPdf::pdfIntegral( double m ) const -{ - double itg = 0; - if ( _g0 == 0 ) { - if ( m > _m0 ) - itg = 1.; - else if ( m < _m0 ) - itg = 0.; - else - itg = 0.5; - } else - itg = atan( ( m - _m0 ) / ( _g0 / 2. ) ) / EvtConst::pi + 0.5; - - return itg; -} - -double EvtBreitWignerPdf::pdfIntegralInverse( double x ) const -{ - if ( x < 0 || x > 1 ) { - printf( "Invalid integral value %f\n", x ); - assert( 0 ); - } - - double m = _m0; - if ( _g0 != 0 ) - m = _m0 + ( _g0 / 2. ) * tan( EvtConst::pi * ( x - 0.5 ) ); - - return m; -} diff --git a/src/EvtGenBase/EvtDecayParm.cpp b/src/EvtGenBase/EvtDecayParm.cpp deleted file mode 100644 index 0a8e69e..0000000 --- a/src/EvtGenBase/EvtDecayParm.cpp +++ /dev/null @@ -1,72 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#include "EvtGenBase/EvtDecayParm.hh" - -#include "EvtGenBase/EvtPatches.hh" - -#include -#include -#include -#include -#include -using std::fstream; - -void EvtDecayParm::init( fcnPtr pfcn, int ndaug, int* daugs, int narg, - double* args, std::string name ) -{ - int i; - - itsfcn = pfcn; - itsndaug = ndaug; - itsnarg = narg; - - itsdaugs = new int[itsndaug]; - for ( i = 0; i < itsndaug; i++ ) { - itsdaugs[i] = daugs[i]; - } - itsargs = new double[itsnarg]; - for ( i = 0; i < itsnarg; i++ ) { - itsargs[i] = args[i]; - } - modelname = name; -} - -EvtDecayParm::EvtDecayParm() -{ - itsfcn = nullptr; - itsndaug = 0; - itsnarg = 0; - itsdaugs = nullptr; - itsargs = nullptr; - - modelname = "**********"; -} - -EvtDecayParm::~EvtDecayParm() -{ - if ( itsdaugs != nullptr ) { - delete[] itsdaugs; - } - - if ( itsargs != nullptr ) { - delete[] itsargs; - } -} diff --git a/src/EvtGenBase/EvtIntegPdf1D.cpp b/src/EvtGenBase/EvtIntegPdf1D.cpp deleted file mode 100644 index 81069ee..0000000 --- a/src/EvtGenBase/EvtIntegPdf1D.cpp +++ /dev/null @@ -1,53 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#include "EvtGenBase/EvtIntegPdf1D.hh" - -#include "EvtGenBase/EvtMacros.hh" -#include "EvtGenBase/EvtPatches.hh" - -#include - -EvtIntegPdf1D::EvtIntegPdf1D( double min, double max ) : - EvtPdf(), _min( min ), _max( max ) -{ - assert( min <= max ); -} - -EvtIntegPdf1D::EvtIntegPdf1D( const EvtIntegPdf1D& other ) : - EvtPdf( other ), _min( other._min ), _max( other._max ) -{ -} - -EvtValError EvtIntegPdf1D::compute_integral() const -{ - double x1 = pdfIntegral( _min ); - double x2 = pdfIntegral( _max ); - return EvtValError( x2 - x1, 0. ); -} - -EvtPoint1D EvtIntegPdf1D::randomPoint() -{ - double itgmin = pdfIntegral( _min ); - double itgmax = pdfIntegral( _max ); - double itgrnd = EvtRandom::Flat( itgmin, itgmax ); - - return EvtPoint1D( _min, _max, pdfIntegralInverse( itgrnd ) ); -} diff --git a/src/EvtGenBase/EvtPto3PAmpSmpResolution.cpp b/src/EvtGenBase/EvtPto3PAmpSmpResolution.cpp deleted file mode 100644 index 53cf200..0000000 --- a/src/EvtGenBase/EvtPto3PAmpSmpResolution.cpp +++ /dev/null @@ -1,68 +0,0 @@ - -/*********************************************************************** -* Copyright 1998-2020 CERN for the benefit of the EvtGen authors * -* * -* This file is part of EvtGen. * -* * -* EvtGen 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. * -* * -* EvtGen 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 EvtGen. If not, see . * -***********************************************************************/ - -#include "EvtGenBase/EvtPto3PAmpSmpResolution.hh" - -#include "EvtGenBase/EvtComplex.hh" -#include "EvtGenBase/EvtCyclic3.hh" -#include "EvtGenBase/EvtDalitzCoord.hh" -#include "EvtGenBase/EvtPatches.hh" -#include "EvtGenBase/EvtPto3PAmp.hh" - -#include -#include -#include -using EvtCyclic3::Index; -using EvtCyclic3::Pair; -using std::cout; -using std::endl; - -EvtPto3PAmpSmpResolution::EvtPto3PAmpSmpResolution( EvtDalitzPlot dp, - Pair pairAng, Pair pairRes, - EvtSpinType::spintype spin, - const EvtPropagator& prop, - NumType typeN ) : - EvtPto3PAmp( dp, pairAng, pairRes, spin, prop, typeN ) -{ -} - -EvtComplex EvtPto3PAmpSmpResolution::evalPropagator( double m ) const -{ - EvtComplex prop( 0, 0 ); - - if ( _sigma > 0 ) { // convolved - int nconv = 20; - double min = m + _bias - _sigma * 2.5; - double max = m + _bias + _sigma * 2.5; - double dm = ( max - min ) / nconv; - static double sqrt2pi = sqrt( 2 * 3.14159 ); - double ifact = 1. / ( sqrt2pi * _sigma ); - for ( int i = 0; i < nconv; i++ ) { - double mprime = min + dm * ( i + 0.5 ); - double t = ( mprime - m ) / _sigma; - prop += ifact * exp( -0.5 * t * t ) * - EvtPto3PAmp::evalPropagator( m ) * dm; - } - } else { - prop = EvtPto3PAmp::evalPropagator( m ); - } - - return prop; -}