diff --git a/EvtGenBase/EvtMBreitWigner.hh b/EvtGenBase/EvtMBreitWigner.hh
deleted file mode 100644
index 632f8af..0000000
--- a/EvtGenBase/EvtMBreitWigner.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 __EVTMBREITWIGNER_HH__
-#define __EVTMBREITWIGNER_HH__
-
-#include "EvtGenBase/EvtMRes.hh"
-
-class EvtMBreitWigner : public EvtMLineShape {
- public:
- EvtMBreitWigner( const EvtId& id, const vector& args );
- ~EvtMBreitWigner(){};
-
- EvtComplex shape( const vector& product ) const override;
-
- EvtMLineShape* duplicate() const override;
-
- private:
- EvtId _id;
-
- double _width, _resmass;
-};
-
-#endif
diff --git a/EvtGenBase/EvtMHelAmp.hh b/EvtGenBase/EvtMHelAmp.hh
deleted file mode 100644
index 344295b..0000000
--- a/EvtGenBase/EvtMHelAmp.hh
+++ /dev/null
@@ -1,40 +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 __EVTMHELAMP_HH__
-#define __EVTMHELAMP_HH__
-
-#include "EvtGenBase/EvtMRes.hh"
-
-class EvtMHelAmp : public EvtMRes {
- public:
- EvtMHelAmp( const EvtId& id, EvtMLineShape*, const vector&,
- const vector& );
- ~EvtMHelAmp(){};
-
- EvtSpinAmp amplitude( const vector& product ) const override;
-
- EvtMNode* duplicate() const override;
-
- private:
- vector _elem;
-};
-
-#endif
diff --git a/EvtGenBase/EvtMNode.hh b/EvtGenBase/EvtMNode.hh
deleted file mode 100644
index 7b8458f..0000000
--- a/EvtGenBase/EvtMNode.hh
+++ /dev/null
@@ -1,90 +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 __EVTMNODE_HH__
-#define __EVTMNODE_HH__
-
-#include "EvtGenBase/EvtComplex.hh"
-#include "EvtGenBase/EvtPDL.hh"
-#include "EvtGenBase/EvtSpinAmp.hh"
-#include "EvtGenBase/EvtSymTable.hh"
-#include "EvtGenBase/EvtVector4R.hh"
-
-#include
-using std::vector;
-
-#include
-using std::string;
-
-class EvtMNode {
- public:
- EvtMNode() {}
- virtual ~EvtMNode(){};
-
- // calculate the amplitude associated event this->children return a
- // vector of the form A_{\lambda this} and sum over allowed angular
- // momenta of the children
- virtual EvtSpinAmp amplitude( const vector& product ) const = 0;
-
- // get the 4 vector associated with this node
- EvtVector4R get4vector( const vector& product ) const;
-
- // get twice the spin of the particle
- int getspin() const { return _twospin; }
- EvtSpinType::spintype getspintype() const
- {
- return EvtPDL::getSpinType( _id );
- }
-
- // get the id of this node
- EvtId getid() const { return _id; }
-
- // return which particles this is a combination of
- const vector& getresonance() const { return _resonance; }
-
- void setparent( EvtMNode* parent ) { _parent = parent; }
- EvtMNode* getparent() const { return _parent; }
-
- // get the number of children that this node has
- virtual int getnchild() const = 0;
-
- // return the value of the resonance shape
- virtual EvtComplex line( const vector& product ) const = 0;
-
- // return a pointer node
- virtual EvtMNode* duplicate() const = 0;
-
- protected:
- // store the EvtId of the particle (just in case we need it to access
- // further informatoin about it)
- EvtId _id;
-
- // store TWICE the spin of this resonance (this is to deal with spin 1/2
- int _twospin;
-
- // store the particles that form this resonance, this should match up
- // with the child nodes from below, and is calculated internally
- vector _resonance;
-
- // store the parent node of this one
- EvtMNode* _parent;
-};
-
-#endif
diff --git a/EvtGenBase/EvtMParticle.hh b/EvtGenBase/EvtMParticle.hh
deleted file mode 100644
index c92abf0..0000000
--- a/EvtGenBase/EvtMParticle.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 __EVTMPARTICLE_HH__
-#define __EVTMPARTICLE_HH__
-
-#include "EvtGenBase/EvtMNode.hh"
-
-class EvtMParticle : public EvtMNode {
- public:
- EvtMParticle( int label, const EvtId& id );
- ~EvtMParticle() {}
- EvtSpinAmp amplitude( const vector& product ) const override;
- int getnchild() const override { return 0; }
-
- EvtComplex line( const vector& /*product*/ ) const override
- {
- return EvtComplex( 1.0, 0.0 );
- }
-
- EvtMNode* duplicate() const override;
-};
-
-#endif
diff --git a/EvtGenBase/EvtMRes.hh b/EvtGenBase/EvtMRes.hh
deleted file mode 100644
index 97f52dd..0000000
--- a/EvtGenBase/EvtMRes.hh
+++ /dev/null
@@ -1,63 +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 __EVTMRES_HH__
-#define __EVTMRES_HH__
-
-#include "EvtGenBase/EvtMNode.hh"
-
-class EvtMRes;
-
-class EvtMLineShape {
- public:
- virtual ~EvtMLineShape(){};
-
- void setres( EvtMRes* n ) { _node = n; }
- virtual EvtComplex shape( const vector& product ) const = 0;
-
- virtual EvtMLineShape* duplicate() const = 0;
-
- protected:
- EvtMRes* _node;
-};
-
-class EvtMRes : public EvtMNode {
- public:
- ~EvtMRes();
-
- int getnchild() const override { return _children.size(); }
-
- EvtComplex line( const vector& product ) const override
- {
- return _lineshape->shape( product );
- }
-
- protected:
- // store the child nodes
- vector _children;
-
- // store the parametrization amplitudes in some kind
- EvtSpinAmp _amp;
-
- // store the lineshape of the resonance
- EvtMLineShape* _lineshape;
-};
-
-#endif
diff --git a/EvtGenBase/EvtMTree.hh b/EvtGenBase/EvtMTree.hh
deleted file mode 100644
index 669003a..0000000
--- a/EvtGenBase/EvtMTree.hh
+++ /dev/null
@@ -1,80 +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 __EVTMTREE_HH__
-#define __EVTMTREE_HH__
-
-#include "EvtGenBase/EvtComplex.hh"
-#include "EvtGenBase/EvtMNode.hh"
-#include "EvtGenBase/EvtMParticle.hh"
-#include "EvtGenBase/EvtMRes.hh"
-#include "EvtGenBase/EvtPDL.hh"
-#include "EvtGenBase/EvtSpinAmp.hh"
-#include "EvtGenBase/EvtVector4R.hh"
-
-#include
-using std::vector;
-
-#include
-using std::string;
-
-typedef string::const_iterator ptype;
-
-class EvtParticle;
-
-class EvtMTree {
- public:
- EvtMTree( const EvtId*, unsigned int );
- ~EvtMTree();
-
- // return the invariant amplitude of the entire tree
- EvtSpinAmp amplitude( EvtParticle* ) const;
-
- // add a decay tree to the list of trees that we posess
- void addtree( const string& );
-
- private:
- vector _root;
- vector _lbltbl;
- double _norm;
-
- bool parsecheck( char, const string& );
- void parseerror( bool, ptype&, ptype&, ptype& );
-
- string parseId( ptype&, ptype&, ptype& );
- string parseKey( ptype&, ptype&, ptype& );
- vector parseArg( ptype&, ptype&, ptype& );
- vector parseAmps( ptype&, ptype&, ptype& );
- vector duplicate( const vector& ) const;
- vector> unionChildren( const string&,
- vector>& );
- vector> parseChildren( ptype&, ptype&, ptype& );
- vector parsenode( const string&, bool );
- bool validTree( const EvtMNode* ) const;
-
- vector makeparticles( const string& );
- EvtMRes* makeresonance( const EvtId&, const string&, const vector&,
- const string&, const vector&,
- const vector& );
-
- EvtSpinAmp getrotation( EvtParticle* ) const;
-};
-
-#endif
diff --git a/EvtGenBase/EvtMTrivialLS.hh b/EvtGenBase/EvtMTrivialLS.hh
deleted file mode 100644
index ee3af50..0000000
--- a/EvtGenBase/EvtMTrivialLS.hh
+++ /dev/null
@@ -1,36 +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 __EVTMTRIVIALLS_H__
-#define __EVTMTRIVIALLS_H__
-
-#include "EvtGenBase/EvtMRes.hh"
-
-class EvtMTrivialLS : public EvtMLineShape {
- public:
- EvtMTrivialLS( const EvtId& /*id*/, const vector& /*args*/ ){};
- ~EvtMTrivialLS(){};
-
- EvtComplex shape( const vector& product ) const override;
-
- EvtMLineShape* duplicate() const override;
-};
-
-#endif
diff --git a/EvtGenBase/EvtSpinAmp.hh b/EvtGenBase/EvtSpinAmp.hh
deleted file mode 100644
index e6681b6..0000000
--- a/EvtGenBase/EvtSpinAmp.hh
+++ /dev/null
@@ -1,110 +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 __EVTSPINAMP_HH__
-#define __EVTSPINAMP_HH__
-
-#include "EvtGenBase/EvtComplex.hh"
-#include "EvtGenBase/EvtSpinType.hh"
-
-#include
-using std::vector;
-
-#include
-
-class EvtSpinAmp;
-EvtSpinAmp operator*( const EvtComplex&, const EvtSpinAmp& );
-EvtSpinAmp operator*( const EvtSpinAmp&, const EvtComplex& );
-EvtSpinAmp operator/( const EvtSpinAmp&, const EvtComplex& );
-
-class EvtSpinAmp {
- friend EvtSpinAmp operator*( const EvtComplex&, const EvtSpinAmp& );
- friend EvtSpinAmp operator*( const EvtSpinAmp&, const EvtComplex& );
- friend EvtSpinAmp operator/( const EvtSpinAmp&, const EvtComplex& );
- friend std::ostream& operator<<( std::ostream&, const EvtSpinAmp& );
-
- public:
- EvtSpinAmp(){};
- EvtSpinAmp( const vector& );
- EvtSpinAmp( const vector&, const EvtComplex& );
- EvtSpinAmp( const vector&, const vector& );
- EvtSpinAmp( const EvtSpinAmp& );
-
- ~EvtSpinAmp(){};
-
- // Input to the index functions are twice the magnetic quantum number
- EvtComplex& operator()( const vector& );
- const EvtComplex& operator()( const vector& ) const;
- EvtComplex& operator()( int, ... );
- const EvtComplex& operator()( int, ... ) const;
-
- EvtSpinAmp& operator=( const EvtSpinAmp& );
-
- EvtSpinAmp operator+( const EvtSpinAmp& ) const;
- EvtSpinAmp& operator+=( const EvtSpinAmp& );
-
- EvtSpinAmp operator-( const EvtSpinAmp& ) const;
- EvtSpinAmp& operator-=( const EvtSpinAmp& );
-
- // Direct Product
- EvtSpinAmp operator*( const EvtSpinAmp& ) const;
- EvtSpinAmp& operator*=( const EvtSpinAmp& );
-
- EvtSpinAmp& operator*=( const EvtComplex& );
- EvtSpinAmp& operator/=( const EvtComplex& );
-
- // Contraction of amplitudes
- void intcont( size_t, size_t );
- void extcont( const EvtSpinAmp&, int, int );
-
- // assign this value to every member in the container
- void assign( const EvtComplex& val ) { _elem.assign( _elem.size(), val ); }
-
- // get the order of the container
- size_t rank() const { return _twospin.size(); }
-
- // get the dimension vector of the container
- const vector& dims() const { return _twospin; }
-
- // set the elements and the dimensions of the vector - useful for something
- // things eventough it is usually not the cleanest solution
- void addspin( int twospin ) { _twospin.push_back( twospin ); }
- void setelem( const vector& elem ) { _elem = elem; }
-
- bool iterate( vector& index ) const;
- vector iterinit() const;
-
- bool allowed( const vector& index ) const;
- bool iterateallowed( vector& index ) const;
- vector iterallowedinit() const;
-
- private:
- void checkindexargs( const vector& index ) const;
- void checktwospin( const vector& twospin ) const;
- int findtrueindex( const vector& index ) const;
- vector calctwospin(
- const vector& type ) const;
-
- vector _type;
- vector _twospin;
- vector _elem;
-};
-
-#endif // __EVTSPINAMP__
diff --git a/EvtGenModels/EvtMultibody.hh b/EvtGenModels/EvtMultibody.hh
deleted file mode 100644
index 05295f9..0000000
--- a/EvtGenModels/EvtMultibody.hh
+++ /dev/null
@@ -1,50 +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 EVTMULTIBODY_HH
-#define EVTMULTIBODY_HH
-
-#include "EvtGenBase/EvtDecayAmp.hh"
-#include "EvtGenBase/EvtMTree.hh"
-#include "EvtGenBase/EvtSpinAmp.hh"
-
-class EvtMultibody : public EvtDecayAmp {
- public:
- EvtMultibody()
- {
- _decayTree = nullptr;
- _ilist = nullptr;
- }
- ~EvtMultibody();
-
- std::string getName() override;
- EvtDecayBase* clone() override;
-
- void init() override;
- void initProbMax() override;
-
- void decay( EvtParticle* p ) override;
-
- private:
- EvtMTree* _decayTree;
- int* _ilist;
-};
-
-#endif
diff --git a/src/EvtGenBase/EvtMBreitWigner.cpp b/src/EvtGenBase/EvtMBreitWigner.cpp
deleted file mode 100644
index 34337ed..0000000
--- a/src/EvtGenBase/EvtMBreitWigner.cpp
+++ /dev/null
@@ -1,57 +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/EvtMBreitWigner.hh"
-
-#include "EvtGenBase/EvtPatches.hh"
-#include "EvtGenBase/EvtReport.hh"
-
-#include
-
-using std::endl;
-
-EvtMBreitWigner::EvtMBreitWigner( const EvtId& id, const vector& args )
-{
- if ( args.size() != 0 ) {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "Unknown input arguments passed in to lineshape." << endl;
- ::abort();
- }
-
- _id = id;
- _width = EvtPDL::getWidth( id );
- _resmass = EvtPDL::getMeanMass( id );
-}
-
-EvtComplex EvtMBreitWigner::shape( const vector& product ) const
-{
- static EvtComplex I( 0.0, 1.0 );
- double mass = _node->get4vector( product ).mass();
-
- return sqrt( _width / ( EvtConst::twoPi ) ) * 1 /
- ( mass - _resmass - I * _width / 2 );
-}
-
-EvtMLineShape* EvtMBreitWigner::duplicate() const
-{
- vector args;
- EvtMLineShape* tmp = new EvtMBreitWigner( _id, args );
- return tmp;
-}
diff --git a/src/EvtGenBase/EvtMHelAmp.cpp b/src/EvtGenBase/EvtMHelAmp.cpp
deleted file mode 100644
index f13d6cc..0000000
--- a/src/EvtGenBase/EvtMHelAmp.cpp
+++ /dev/null
@@ -1,148 +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/EvtMHelAmp.hh"
-
-#include "EvtGenBase/EvtKine.hh"
-#include "EvtGenBase/EvtPatches.hh"
-#include "EvtGenBase/EvtReport.hh"
-
-#include
-
-using std::endl;
-
-EvtMHelAmp::EvtMHelAmp( const EvtId& id, EvtMLineShape* lineshape,
- const vector& children,
- const vector& elem )
-{
- _id = id;
- _twospin = EvtSpinType::getSpin2( EvtPDL::getSpinType( id ) );
- _parent = nullptr;
- _lineshape = lineshape;
-
- _elem = elem;
-
- vector type;
- for ( size_t i = 0; i < children.size(); ++i ) {
- _children.push_back( children[i] );
- type.push_back( children[i]->getspintype() );
- const vector& res = children[i]->getresonance();
- for ( size_t j = 0; j < res.size(); ++j )
- _resonance.push_back( res[j] );
- children[i]->setparent( this );
- }
-
- // XXX New code - bugs could appear here XXX
- _amp = EvtSpinAmp( type );
- vector index = _amp.iterinit();
- size_t i = 0;
- do {
- if ( !_amp.allowed( index ) )
- _amp( index ) = 0.0;
- else if ( abs( index[0] - index[1] ) > _twospin )
- _amp( index ) = 0.0;
- else {
- _amp( index ) = elem[i];
- ++i;
- }
- } while ( _amp.iterate( index ) );
- if ( elem.size() != i ) {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "Wrong number of elements input in helicity amplitude." << endl;
- ::abort();
- }
-
- if ( children.size() > 2 ) {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "Helicity amplitude formalism can only handle two body resonances"
- << endl;
- ::abort();
- }
-}
-
-EvtSpinAmp EvtMHelAmp::amplitude( const vector& product ) const
-{
- EvtVector4R d = _children[0]->get4vector( product );
- double phi, theta;
-
- if ( _parent == nullptr ) {
- // This means that we're calculating the first level and we need to just
- // calculate the polar and azymuthal angles daughters in rest frame of
- // this (root) particle (this is automatic).
- phi = atan2( d.get( 1 ), d.get( 2 ) );
- theta = acos( d.get( 3 ) / d.d3mag() );
-
- } else {
- // We have parents therefore calculate things in correct coordinate
- // system
- EvtVector4R p = _parent->get4vector( product );
- EvtVector4R q = get4vector( product );
-
- // See if we have a grandparent - if no then the z-axis is defined by
- // the z-axis of the root particle
- EvtVector4R g = _parent->getparent() == nullptr
- ? EvtVector4R( 0.0, 0.0, 0.0, 1.0 )
- : _parent->getparent()->get4vector( product );
-
- theta = acos( EvtDecayAngle( p, q, d ) );
- phi = EvtDecayAnglePhi( g, p, q, d );
- }
-
- vector types( 3 );
- types[0] = getspintype();
- types[1] = _children[0]->getspintype();
- types[2] = _children[1]->getspintype();
- EvtSpinAmp amp( types, EvtComplex( 0.0, 0.0 ) );
- vector index = amp.iterallowedinit();
-
- do {
- if ( abs( index[1] - index[2] ) > _twospin )
- continue;
- amp( index ) += conj( wignerD( _twospin, index[0], index[1] - index[2],
- phi, theta, 0.0 ) ) *
- _amp( index[1], index[2] );
- } while ( amp.iterateallowed( index ) );
-
- EvtSpinAmp amp0 = _children[0]->amplitude( product );
- EvtSpinAmp amp1 = _children[1]->amplitude( product );
-
- amp.extcont( amp0, 1, 0 );
- amp.extcont( amp1, 1, 0 );
-
- amp *= sqrt( ( _twospin + 1 ) / ( 2 * EvtConst::twoPi ) ) *
- _children[0]->line( product ) * _children[1]->line( product );
-
- return amp;
-}
-
-EvtMNode* EvtMHelAmp::duplicate() const
-{
- vector children;
-
- for ( size_t i = 0; i < _children.size(); ++i ) {
- children.push_back( _children[i]->duplicate() );
- }
-
- EvtMLineShape* lineshape = _lineshape->duplicate();
- EvtMHelAmp* ret = new EvtMHelAmp( _id, lineshape, children, _elem );
- lineshape->setres( ret );
-
- return ret;
-}
diff --git a/src/EvtGenBase/EvtMNode.cpp b/src/EvtGenBase/EvtMNode.cpp
deleted file mode 100644
index 60df9d0..0000000
--- a/src/EvtGenBase/EvtMNode.cpp
+++ /dev/null
@@ -1,34 +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/EvtMNode.hh"
-
-#include "EvtGenBase/EvtPatches.hh"
-
-EvtVector4R EvtMNode::get4vector( const vector& product ) const
-{
- EvtVector4R res( 0.0, 0.0, 0.0, 0.0 );
- vector::const_iterator iter;
-
- for ( iter = _resonance.begin(); iter != _resonance.end(); ++iter )
- res += product[*iter];
-
- return res;
-}
diff --git a/src/EvtGenBase/EvtMParticle.cpp b/src/EvtGenBase/EvtMParticle.cpp
deleted file mode 100644
index 656f6bf..0000000
--- a/src/EvtGenBase/EvtMParticle.cpp
+++ /dev/null
@@ -1,47 +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/EvtMParticle.hh"
-
-#include "EvtGenBase/EvtPatches.hh"
-#include "EvtGenBase/EvtSpinType.hh"
-
-EvtMParticle::EvtMParticle( int label, const EvtId& id )
-{
- _id = id;
- _twospin = EvtSpinType::getSpin2( EvtPDL::getSpinType( id ) );
- _resonance.push_back( label );
-}
-
-EvtSpinAmp EvtMParticle::amplitude( const vector& /*product*/ ) const
-{
- vector types( 2, getspintype() );
- EvtSpinAmp amp( types, EvtComplex( 0.0, 0.0 ) );
-
- for ( int i = -_twospin; i <= _twospin; i += 2 )
- amp( i, i ) = EvtComplex( 1.0, 0.0 );
-
- return amp;
-}
-
-EvtMNode* EvtMParticle::duplicate() const
-{
- return new EvtMParticle( _resonance[0], _id );
-}
diff --git a/src/EvtGenBase/EvtMRes.cpp b/src/EvtGenBase/EvtMRes.cpp
deleted file mode 100644
index 7f41056..0000000
--- a/src/EvtGenBase/EvtMRes.cpp
+++ /dev/null
@@ -1,29 +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/EvtMRes.hh"
-
-#include "EvtGenBase/EvtPatches.hh"
-
-EvtMRes::~EvtMRes()
-{
- for ( size_t i = 0; i < _children.size(); ++i )
- delete _children[i];
-}
diff --git a/src/EvtGenBase/EvtMTree.cpp b/src/EvtGenBase/EvtMTree.cpp
deleted file mode 100644
index e77a143..0000000
--- a/src/EvtGenBase/EvtMTree.cpp
+++ /dev/null
@@ -1,470 +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/EvtMTree.hh"
-
-#include "EvtGenBase/EvtConst.hh"
-#include "EvtGenBase/EvtKine.hh"
-#include "EvtGenBase/EvtMBreitWigner.hh"
-#include "EvtGenBase/EvtMHelAmp.hh"
-#include "EvtGenBase/EvtMTrivialLS.hh"
-#include "EvtGenBase/EvtParticle.hh"
-#include "EvtGenBase/EvtReport.hh"
-
-#include
-#include
-#include
-
-using std::endl;
-
-EvtMTree::EvtMTree( const EvtId* idtbl, unsigned int ndaug )
-{
- for ( size_t i = 0; i < ndaug; ++i ) {
- _lbltbl.push_back( EvtPDL::name( idtbl[i] ) );
- }
-}
-
-EvtMTree::~EvtMTree()
-{
- for ( size_t i = 0; i < _root.size(); ++i )
- delete _root[i];
-}
-
-bool EvtMTree::parsecheck( char arg, const string& chars )
-{
- bool ret = false;
-
- for ( size_t i = 0; i < chars.size(); ++i ) {
- ret = ret || ( chars[i] == arg );
- }
-
- return ret;
-}
-
-vector EvtMTree::makeparticles( const string& strid )
-{
- vector particles;
- vector labels;
-
- for ( size_t i = 0; i < _lbltbl.size(); ++i ) {
- if ( _lbltbl[i] == strid )
- labels.push_back( i );
- }
-
- if ( labels.size() == 0 ) {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "Error unknown particle label " << strid << endl;
- ::abort();
- }
-
- for ( size_t i = 0; i < labels.size(); ++i )
- particles.push_back(
- new EvtMParticle( labels[i], EvtPDL::getId( strid ) ) );
-
- return particles;
-}
-
-EvtMRes* EvtMTree::makeresonance( const EvtId& id, const string& ls,
- const vector& lsarg, const string& type,
- const vector& amps,
- const vector& children )
-{
- EvtMRes* resonance = nullptr;
- EvtMLineShape* lineshape = nullptr;
-
- if ( ls == "BREITWIGNER" ) {
- lineshape = new EvtMBreitWigner( id, lsarg );
- } else if ( ls == "TRIVIAL" ) {
- lineshape = new EvtMTrivialLS( id, lsarg );
- } else {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "Lineshape " << lineshape << " not recognized." << endl;
- ::abort();
- }
-
- if ( type == "HELAMP" ) {
- resonance = new EvtMHelAmp( id, lineshape, children, amps );
- } else {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "Model " << type << " not recognized." << endl;
- ::abort();
- }
-
- lineshape->setres( resonance );
-
- return resonance;
-}
-
-void EvtMTree::parseerror( bool flag, ptype& c_iter, ptype& c_begin, ptype& c_end )
-{
- if ( !flag )
- return;
-
- string error;
-
- while ( c_begin != c_end ) {
- if ( c_begin == c_iter ) {
- error += '_';
- error += *c_begin;
- error += '_';
- } else
- error += *c_begin;
-
- ++c_begin;
- }
-
- EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Parse error at: " << error << endl;
- ::abort();
-}
-
-string EvtMTree::parseId( ptype& c_iter, ptype& c_begin, ptype& c_end )
-{
- string strid;
-
- while ( c_iter != c_end ) {
- parseerror( parsecheck( *c_iter, ")[]," ), c_iter, c_begin, c_end );
- if ( *c_iter == '(' ) {
- ++c_iter;
- return strid;
- }
-
- strid += *c_iter;
- ++c_iter;
- }
-
- return strid;
-}
-
-string EvtMTree::parseKey( ptype& c_iter, ptype& c_begin, ptype& c_end )
-{
- string key;
-
- while ( *c_iter != ',' ) {
- parseerror( c_iter == c_end || parsecheck( *c_iter, "()[]" ), c_iter,
- c_begin, c_end );
- key += *c_iter;
- ++c_iter;
- }
-
- ++c_iter;
-
- parseerror( c_iter == c_end, c_iter, c_begin, c_end );
-
- return key;
-}
-
-vector EvtMTree::parseArg( ptype& c_iter, ptype& c_begin, ptype& c_end )
-{
- vector arg;
-
- if ( *c_iter != '[' )
- return arg;
- ++c_iter;
-
- string temp;
- while ( true ) {
- parseerror( c_iter == c_end || parsecheck( *c_iter, "[()" ), c_iter,
- c_begin, c_end );
-
- if ( *c_iter == ']' ) {
- ++c_iter;
- if ( temp.size() > 0 )
- arg.push_back( temp );
- break;
- }
-
- if ( *c_iter == ',' ) {
- arg.push_back( temp );
- temp.clear();
- ++c_iter;
- continue;
- }
-
- temp += *c_iter;
- ++c_iter;
- }
- parseerror( c_iter == c_end || *c_iter != ',', c_iter, c_begin, c_end );
- ++c_iter;
-
- return arg;
-}
-
-vector EvtMTree::parseAmps( ptype& c_iter, ptype& c_begin,
- ptype& c_end )
-{
- vector parg = parseArg( c_iter, c_begin, c_end );
- parseerror( parg.size() == 0, c_iter, c_begin, c_end );
-
- // Get parametrization amplitudes
- vector::iterator amp_iter = parg.begin();
- vector::iterator amp_end = parg.end();
- vector amps;
-
- while ( amp_iter != amp_end ) {
- const char* nptr;
- char* endptr = nullptr;
- double amp = 0.0, phase = 0.0;
-
- nptr = ( *amp_iter ).c_str();
- amp = strtod( nptr, &endptr );
- parseerror( nptr == endptr, c_iter, c_begin, c_end );
-
- ++amp_iter;
- parseerror( amp_iter == amp_end, c_iter, c_begin, c_end );
-
- nptr = ( *amp_iter ).c_str();
- phase = strtod( nptr, &endptr );
- parseerror( nptr == endptr, c_iter, c_begin, c_end );
-
- amps.push_back( amp * exp( EvtComplex( 0.0, phase ) ) );
-
- ++amp_iter;
- }
-
- return amps;
-}
-
-vector EvtMTree::duplicate( const vector& list ) const
-{
- vector newlist;
-
- for ( size_t i = 0; i < list.size(); ++i )
- newlist.push_back( list[i]->duplicate() );
-
- return newlist;
-}
-
-// XXX Warning it is unsafe to use cl1 after a call to this function XXX
-vector> EvtMTree::unionChildren( const string& nodestr,
- vector>& cl1 )
-{
- vector cl2 = parsenode( nodestr, false );
- vector> cl;
-
- if ( cl1.size() == 0 ) {
- for ( size_t i = 0; i < cl2.size(); ++i ) {
- vector temp( 1, cl2[i] );
- cl.push_back( temp );
- }
-
- return cl;
- }
-
- for ( size_t i = 0; i < cl1.size(); ++i ) {
- for ( size_t j = 0; j < cl2.size(); ++j ) {
- vector temp;
- temp = duplicate( cl1[i] );
- temp.push_back( cl2[j]->duplicate() );
-
- cl.push_back( temp );
- }
- }
-
- for ( size_t i = 0; i < cl1.size(); ++i )
- for ( size_t j = 0; j < cl1[i].size(); ++j )
- delete cl1[i][j];
- for ( size_t i = 0; i < cl2.size(); ++i )
- delete ( cl2[i] );
-
- return cl;
-}
-
-vector> EvtMTree::parseChildren( ptype& c_iter,
- ptype& c_begin, ptype& c_end )
-{
- bool test = true;
- int pcount = 0;
- string nodestr;
- vector> children;
-
- parseerror( c_iter == c_end || *c_iter != '[', c_iter, c_begin, c_end );
- ++c_iter;
-
- while ( test ) {
- parseerror( c_iter == c_end || pcount < 0, c_iter, c_begin, c_end );
-
- switch ( *c_iter ) {
- case ')':
- --pcount;
- nodestr += *c_iter;
- break;
- case '(':
- ++pcount;
- nodestr += *c_iter;
- break;
- case ']':
- if ( pcount == 0 ) {
- children = unionChildren( nodestr, children );
- test = false;
- } else {
- nodestr += *c_iter;
- }
- break;
- case ',':
- if ( pcount == 0 ) {
- children = unionChildren( nodestr, children );
- nodestr.clear();
- } else {
- nodestr += *c_iter;
- }
- break;
- default:
- nodestr += *c_iter;
- break;
- }
-
- ++c_iter;
- }
-
- return children;
-}
-
-vector EvtMTree::parsenode( const string& args, bool rootnode )
-{
- ptype c_iter, c_begin, c_end;
-
- c_iter = c_begin = args.begin();
- c_end = args.end();
-
- string strid = parseId( c_iter, c_begin, c_end );
-
- // Case 1: Particle
- if ( c_iter == c_end )
- return makeparticles( strid );
-
- // Case 2: Resonance - parse further
- EvtId id = EvtPDL::getId( strid );
- parseerror( EvtId( -1, -1 ) == id, c_iter, c_begin, c_end );
-
- string ls;
- vector lsarg;
-
- if ( rootnode ) {
- ls = "TRIVIAL";
- } else {
- // Get lineshape (e.g. BREITWIGNER)
- ls = parseKey( c_iter, c_begin, c_end );
- lsarg = parseArg( c_iter, c_begin, c_end );
- }
-
- // Get resonance parametrization type (e.g. HELAMP)
- string type = parseKey( c_iter, c_begin, c_end );
- vector amps = parseAmps( c_iter, c_begin, c_end );
-
- // Children
- vector> children = parseChildren( c_iter, c_begin, c_end );
-
- EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << children.size() << endl;
- vector resonances;
- for ( size_t i = 0; i < children.size(); ++i ) {
- resonances.push_back(
- makeresonance( id, ls, lsarg, type, amps, children[i] ) );
- }
-
- parseerror( c_iter == c_end || *c_iter != ')', c_iter, c_begin, c_end );
-
- return resonances;
-}
-
-bool EvtMTree::validTree( const EvtMNode* root ) const
-{
- vector res = root->getresonance();
- vector check( res.size(), false );
-
- for ( size_t i = 0; i < res.size(); ++i ) {
- check[res[i]] = true;
- }
-
- bool ret = true;
-
- for ( size_t i = 0; i < check.size(); ++i ) {
- ret = ret && check[i];
- }
-
- // Function appears to check child integer indices, but this fails if they are
- // not always the first and second ones, so just return true for all cases
- ret = true;
-
- return ret;
-}
-
-void EvtMTree::addtree( const string& str )
-{
- // vector roots = parsenode( str, true );
- // Edit previous line to allow the creation of node resonances:
- vector roots = parsenode( str, false );
- _norm = 0;
-
- for ( size_t i = 0; i < roots.size(); ++i ) {
- if ( validTree( roots[i] ) ) {
- _root.push_back( roots[i] );
- _norm = _norm + 1;
- } else
- delete roots[i];
- }
-
- _norm = 1.0 / sqrt( _norm );
-}
-EvtSpinAmp EvtMTree::getrotation( EvtParticle* p ) const
-{
- // Set up the rotation matrix for the root particle (for now)
- EvtSpinDensity sd = p->rotateToHelicityBasis();
- EvtSpinType::spintype type = EvtPDL::getSpinType( _root[0]->getid() );
- int twospin = EvtSpinType::getSpin2( type );
-
- vector types( 2, type );
- EvtSpinAmp rot( types, EvtComplex( 0.0, 0.0 ) );
- vector index = rot.iterallowedinit();
- do {
- rot( index ) = sd.get( ( index[0] + twospin ) / 2,
- ( index[1] + twospin ) / 2 );
- } while ( rot.iterateallowed( index ) );
-
- return rot;
-}
-
-EvtSpinAmp EvtMTree::amplitude( EvtParticle* p ) const
-{
- vector product;
- for ( size_t i = 0; i < p->getNDaug(); ++i )
- product.push_back( p->getDaug( i )->getP4Lab() );
-
- if ( _root.size() == 0 ) {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "No decay tree present." << endl;
- ::abort();
- }
-
- EvtSpinAmp amp = _root[0]->amplitude( product );
- for ( size_t i = 1; i < _root.size(); ++i ) {
- // Assume that helicity amplitude is returned
- amp += _root[i]->amplitude( product );
- }
- amp = _norm * amp;
-
- //ryd
- return amp;
-
- // Do Rotation to Proper Frame
- EvtSpinAmp newamp = getrotation( p );
- newamp.extcont( amp, 1, 0 );
-
- return newamp;
-}
diff --git a/src/EvtGenBase/EvtMTrivialLS.cpp b/src/EvtGenBase/EvtMTrivialLS.cpp
deleted file mode 100644
index 87361a6..0000000
--- a/src/EvtGenBase/EvtMTrivialLS.cpp
+++ /dev/null
@@ -1,37 +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/EvtMTrivialLS.hh"
-
-#include "EvtGenBase/EvtPatches.hh"
-
-EvtComplex EvtMTrivialLS::shape( const vector& /*product*/ ) const
-{
- return EvtComplex( 1.0, 0.0 );
-}
-
-EvtMLineShape* EvtMTrivialLS::duplicate() const
-{
- EvtId temp1;
- vector temp2;
-
- EvtMLineShape* tmp = new EvtMTrivialLS( temp1, temp2 );
- return tmp;
-}
diff --git a/src/EvtGenBase/EvtSpinAmp.cpp b/src/EvtGenBase/EvtSpinAmp.cpp
deleted file mode 100644
index 07294e7..0000000
--- a/src/EvtGenBase/EvtSpinAmp.cpp
+++ /dev/null
@@ -1,528 +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/EvtSpinAmp.hh"
-
-#include "EvtGenBase/EvtPatches.hh"
-#include "EvtGenBase/EvtReport.hh"
-
-#include
-
-using std::endl;
-
-std::ostream& operator<<( std::ostream& os, const EvtSpinAmp& amp )
-{
- vector index = amp.iterinit();
-
- os << ":";
- do {
- os << "<";
- for ( size_t i = 0; i < index.size() - 1; ++i ) {
- os << index[i];
- }
- os << index[index.size() - 1] << ">" << amp( index ) << ":";
- } while ( amp.iterate( index ) );
-
- return os;
-}
-
-EvtSpinAmp operator*( const EvtComplex& real, const EvtSpinAmp& cont )
-{
- EvtSpinAmp ret( cont );
-
- for ( size_t i = 0; i < ret._elem.size(); ++i ) {
- ret._elem[i] *= real;
- }
-
- return ret;
-}
-
-EvtSpinAmp operator*( const EvtSpinAmp& cont, const EvtComplex& real )
-{
- return real * cont;
-}
-
-EvtSpinAmp operator/( const EvtSpinAmp& cont, const EvtComplex& real )
-{
- EvtSpinAmp ret( cont );
-
- for ( size_t i = 0; i < ret._elem.size(); ++i ) {
- ret._elem[i] /= real;
- }
-
- return ret;
-}
-
-vector EvtSpinAmp::calctwospin(
- const vector& type ) const
-{
- vector twospin;
-
- for ( size_t i = 0; i < type.size(); ++i ) {
- twospin.push_back( EvtSpinType::getSpin2( type[i] ) );
- }
-
- return twospin;
-}
-
-EvtSpinAmp::EvtSpinAmp( const vector& type )
-{
- int num = 1;
- _type = type;
- _twospin = calctwospin( type );
-
- for ( size_t i = 0; i < _twospin.size(); ++i )
- num *= _twospin[i] + 1;
-
- _elem = vector( num );
-}
-
-EvtSpinAmp::EvtSpinAmp( const vector& type,
- const EvtComplex& val )
-{
- int num = 1;
- _type = type;
- _twospin = calctwospin( type );
-
- for ( size_t i = 0; i < _twospin.size(); ++i )
- num *= _twospin[i] + 1;
-
- _elem = vector( num, val );
-}
-
-EvtSpinAmp::EvtSpinAmp( const vector& type,
- const vector& elem )
-{
- size_t num = 1;
-
- _type = type;
- _twospin = calctwospin( type );
- _elem = elem;
-
- for ( size_t i = 0; i < _twospin.size(); ++i ) {
- num *= ( _twospin[i] + 1 );
- }
-
- if ( _elem.size() != num ) {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "Wrong number of elements input:" << _elem.size() << " vs. "
- << num << endl;
- ::abort();
- }
-}
-
-EvtSpinAmp::EvtSpinAmp( const EvtSpinAmp& copy )
-{
- _twospin = copy._twospin;
- _elem = copy._elem;
- _type = copy._type;
-}
-
-void EvtSpinAmp::checktwospin( const vector& twospin ) const
-{
- if ( _twospin == twospin )
- return;
-
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "Dimension or order of tensors being operated on does not match"
- << endl;
- ::abort();
-}
-
-void EvtSpinAmp::checkindexargs( const vector& index ) const
-{
- if ( index.size() == 0 ) {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "EvtSpinAmp can't handle no indices" << endl;
- ::abort();
- }
-
- if ( index.size() != _twospin.size() ) {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "Rank of EvtSpinAmp index does not match: " << _twospin.size()
- << " expected " << index.size() << " input." << endl;
- ::abort();
- }
-
- for ( size_t i = 0; i < _twospin.size(); ++i ) {
- if ( static_cast( _twospin[i] ) >= abs( index[i] ) &&
- static_cast( _twospin[i] ) % 2 == index[i] % 2 )
- continue;
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "EvtSpinAmp index out of range" << endl;
- EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << " Index: ";
- for ( size_t j = 0; j < _twospin.size(); ++j )
- EvtGenReport( EVTGEN_ERROR, " " ) << _twospin[j];
-
- EvtGenReport( EVTGEN_ERROR, " " ) << endl << " Index: ";
- for ( size_t j = 0; j < index.size(); ++j )
- EvtGenReport( EVTGEN_ERROR, " " ) << index[j];
- EvtGenReport( EVTGEN_ERROR, " " ) << endl;
- ::abort();
- }
-}
-
-int EvtSpinAmp::findtrueindex( const vector& index ) const
-{
- int trueindex = 0;
-
- for ( size_t i = index.size() - 1; i > 0; --i ) {
- trueindex += ( index[i] + _twospin[i] ) / 2;
- trueindex *= _twospin[i - 1] + 1;
- }
-
- trueindex += ( index[0] + _twospin[0] ) / 2;
-
- return trueindex;
-}
-
-EvtComplex& EvtSpinAmp::operator()( const vector& index )
-{
- checkindexargs( index );
-
- size_t trueindex = findtrueindex( index );
- if ( trueindex >= _elem.size() ) {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "indexing error " << trueindex << " " << _elem.size() << endl;
- for ( size_t i = 0; i < _twospin.size(); ++i ) {
- EvtGenReport( EVTGEN_ERROR, "" ) << _twospin[i] << " ";
- }
- EvtGenReport( EVTGEN_ERROR, "" ) << endl;
-
- for ( size_t i = 0; i < index.size(); ++i ) {
- EvtGenReport( EVTGEN_ERROR, "" ) << index[i] << " ";
- }
- EvtGenReport( EVTGEN_ERROR, "" ) << endl;
-
- ::abort();
- }
-
- return _elem[trueindex];
-}
-
-const EvtComplex& EvtSpinAmp::operator()( const vector& index ) const
-{
- checkindexargs( index );
-
- size_t trueindex = findtrueindex( index );
- if ( trueindex >= _elem.size() ) {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "indexing error " << trueindex << " " << _elem.size() << endl;
- for ( size_t i = 0; i < _twospin.size(); ++i ) {
- EvtGenReport( EVTGEN_ERROR, "" ) << _twospin[i] << " ";
- }
- EvtGenReport( EVTGEN_ERROR, "" ) << endl;
-
- for ( size_t i = 0; i < index.size(); ++i ) {
- EvtGenReport( EVTGEN_ERROR, "" ) << index[i] << " ";
- }
- EvtGenReport( EVTGEN_ERROR, "" ) << endl;
-
- ::abort();
- }
-
- return _elem[trueindex];
-}
-
-EvtComplex& EvtSpinAmp::operator()( int i, ... )
-{
- va_list ap;
- vector index( _twospin.size() );
-
- va_start( ap, i );
-
- index[0] = i;
- for ( size_t n = 1; n < _twospin.size(); ++n )
- index[n] = va_arg( ap, int );
-
- va_end( ap );
-
- return (*this)( index );
-}
-
-const EvtComplex& EvtSpinAmp::operator()( int i, ... ) const
-{
- vector index( _twospin.size() );
- va_list ap;
-
- va_start( ap, i );
-
- index[0] = i;
- for ( size_t n = 1; n < _twospin.size(); ++n )
- index[n] = va_arg( ap, int );
-
- va_end( ap );
-
- return (*this)( index );
-}
-
-EvtSpinAmp& EvtSpinAmp::operator=( const EvtSpinAmp& cont )
-{
- _twospin = cont._twospin;
- _elem = cont._elem;
- _type = cont._type;
-
- return *this;
-}
-
-EvtSpinAmp EvtSpinAmp::operator+( const EvtSpinAmp& cont ) const
-{
- checktwospin( cont._twospin );
-
- EvtSpinAmp ret( cont );
- for ( size_t i = 0; i < ret._elem.size(); ++i ) {
- ret._elem[i] += _elem[i];
- }
-
- return ret;
-}
-
-EvtSpinAmp& EvtSpinAmp::operator+=( const EvtSpinAmp& cont )
-{
- checktwospin( cont._twospin );
-
- for ( size_t i = 0; i < _elem.size(); ++i )
- _elem[i] += cont._elem[i];
-
- return *this;
-}
-
-EvtSpinAmp EvtSpinAmp::operator-( const EvtSpinAmp& cont ) const
-{
- checktwospin( cont._twospin );
-
- EvtSpinAmp ret( *this );
- for ( size_t i = 0; i < ret._elem.size(); ++i )
- ret._elem[i] -= cont._elem[i];
-
- return ret;
-}
-
-EvtSpinAmp& EvtSpinAmp::operator-=( const EvtSpinAmp& cont )
-{
- checktwospin( cont._twospin );
-
- for ( size_t i = 0; i < _elem.size(); ++i )
- _elem[i] -= cont._elem[i];
-
- return *this;
-}
-
-// amp = amp1 * amp2
-EvtSpinAmp EvtSpinAmp::operator*( const EvtSpinAmp& amp2 ) const
-{
- vector index( rank() + amp2.rank() );
- vector index1( rank() ), index2( amp2.rank() );
- EvtSpinAmp amp;
-
- amp._twospin = _twospin;
- amp._type = _type;
-
- for ( size_t i = 0; i < amp2._twospin.size(); ++i ) {
- amp._twospin.push_back( amp2._twospin[i] );
- amp._type.push_back( amp2._type[i] );
- }
-
- amp._elem = vector( _elem.size() * amp2._elem.size() );
-
- for ( size_t i = 0; i < index1.size(); ++i )
- index[i] = index1[i] = -_twospin[i];
-
- for ( size_t i = 0; i < index2.size(); ++i )
- index[i + rank()] = index2[i] = -amp2._twospin[i];
-
- while ( true ) {
- amp( index ) = (*this)(index1)*amp2( index2 );
- if ( !amp.iterate( index ) )
- break;
-
- for ( size_t i = 0; i < index1.size(); ++i )
- index1[i] = index[i];
-
- for ( size_t i = 0; i < index2.size(); ++i )
- index2[i] = index[i + rank()];
- }
-
- return amp;
-}
-
-EvtSpinAmp& EvtSpinAmp::operator*=( const EvtSpinAmp& cont )
-{
- EvtSpinAmp ret = ( *this ) * cont;
- *this = ret;
- return *this;
-}
-
-EvtSpinAmp& EvtSpinAmp::operator*=( const EvtComplex& real )
-{
- for ( size_t i = 0; i < _elem.size(); ++i )
- _elem[i] *= real;
-
- return *this;
-}
-
-EvtSpinAmp& EvtSpinAmp::operator/=( const EvtComplex& real )
-{
- for ( size_t i = 0; i < _elem.size(); ++i )
- _elem[i] /= real;
-
- return *this;
-}
-
-vector EvtSpinAmp::iterinit() const
-{
- vector init( _twospin.size() );
-
- for ( size_t i = 0; i < _twospin.size(); ++i )
- init[i] = -_twospin[i];
-
- return init;
-}
-
-bool EvtSpinAmp::iterate( vector& index ) const
-{
- int last = _twospin.size() - 1;
-
- index[0] += 2;
- for ( size_t j = 0; static_cast( j ) < last; ++j ) {
- if ( index[j] > static_cast( _twospin[j] ) ) {
- index[j] = -_twospin[j];
- index[j + 1] += 2;
- }
- }
-
- return ( abs( index[last] ) ) <= ( (int)_twospin[last] );
-}
-
-// Test whether a particular index is an allowed one (specifically to deal with
-// photons and possibly neutrinos)
-bool EvtSpinAmp::allowed( const vector& index ) const
-{
- if ( index.size() != _type.size() ) {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "Wrong dimensino index input to allowed." << endl;
- ::abort();
- }
-
- for ( size_t i = 0; i < index.size(); ++i ) {
- switch ( _type[i] ) {
- case EvtSpinType::PHOTON:
- if ( abs( index[i] ) != 2 )
- return false;
- break;
- case EvtSpinType::NEUTRINO:
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "EvMultibody currently cannot handle neutrinos." << endl;
- ::abort();
- default:
- break;
- }
- }
-
- return true;
-}
-
-bool EvtSpinAmp::iterateallowed( vector& index ) const
-{
- while ( true ) {
- if ( !iterate( index ) )
- return false;
- if ( allowed( index ) )
- return true;
- }
-}
-
-vector EvtSpinAmp::iterallowedinit() const
-{
- vector init = iterinit();
- while ( !allowed( init ) ) {
- iterate( init );
- }
-
- return init;
-}
-
-void EvtSpinAmp::intcont( size_t a, size_t b )
-{
- if ( rank() <= 2 ) {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "EvtSpinAmp can't handle no indices" << endl;
- ::abort();
- }
-
- size_t newrank = rank() - 2;
-
- if ( _twospin[a] != _twospin[b] ) {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "Contaction called on indices of different dimension" << endl;
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "Called on " << _twospin[a] << " and " << _twospin[b] << endl;
- ::abort();
- }
-
- vector newtwospin( newrank );
- vector newtype( newrank );
-
- for ( size_t i = 0, j = 0; i < _twospin.size(); ++i ) {
- if ( i == a || i == b )
- continue;
-
- newtwospin[j] = _twospin[i];
- newtype[j] = _type[i];
- ++j;
- }
-
- EvtSpinAmp newamp( newtype );
- vector index( rank() ), newindex = newamp.iterinit();
-
- for ( size_t i = 0; i < newrank; ++i )
- newindex[i] = -newtwospin[i];
-
- while ( true ) {
- for ( size_t i = 0, j = 0; i < rank(); ++i ) {
- if ( i == a || i == b )
- continue;
- index[i] = newindex[j];
- ++j;
- }
-
- index[b] = index[a] = -_twospin[a];
- newamp( newindex ) = (*this)( index );
- for ( size_t i = -_twospin[a] + 2; i <= _twospin[a]; i += 2 ) {
- index[b] = index[a] = i;
- newamp( newindex ) += (*this)( index );
- }
-
- if ( !newamp.iterate( newindex ) )
- break;
- }
-
- *this = newamp;
-}
-
-// In A.extcont(B), a is the index in A and b is the index in B - note that this
-// routine can be extremely improved!
-void EvtSpinAmp::extcont( const EvtSpinAmp& cont, int a, int b )
-{
- EvtSpinAmp ret = ( *this ) * cont;
- ret.intcont( a, rank() + b );
-
- *this = ret;
-}
diff --git a/src/EvtGenModels/EvtModelReg.cpp b/src/EvtGenModels/EvtModelReg.cpp
index 39a1758..1eeacc3 100644
--- a/src/EvtGenModels/EvtModelReg.cpp
+++ b/src/EvtGenModels/EvtModelReg.cpp
@@ -1,349 +1,347 @@
/***********************************************************************
* Copyright 1998-2021 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 "EvtGenModels/EvtModelReg.hh"
#include "EvtGenBase/EvtModel.hh"
#include "EvtGenBase/EvtPDL.hh"
#include "EvtGenBase/EvtParticle.hh"
#include "EvtGenBase/EvtPatches.hh"
#include "EvtGenModels/EvtBBScalar.hh"
#include "EvtGenModels/EvtBLLNuL.hh"
#include "EvtGenModels/EvtBTo3piCP.hh"
#include "EvtGenModels/EvtBTo4piCP.hh"
#include "EvtGenModels/EvtBToDDalitzCPK.hh"
#include "EvtGenModels/EvtBToDiBaryonlnupQCD.hh"
#include "EvtGenModels/EvtBToKpipiCP.hh"
#include "EvtGenModels/EvtBToPlnuBK.hh"
#include "EvtGenModels/EvtBToVlnuBall.hh"
#include "EvtGenModels/EvtBToXElNu.hh"
#include "EvtGenModels/EvtBaryonPCR.hh"
#include "EvtGenModels/EvtBcBsNPi.hh"
#include "EvtGenModels/EvtBcBsStarNPi.hh"
#include "EvtGenModels/EvtBcPsiNPi.hh"
#include "EvtGenModels/EvtBcSMuNu.hh"
#include "EvtGenModels/EvtBcTMuNu.hh"
#include "EvtGenModels/EvtBcToNPi.hh"
#include "EvtGenModels/EvtBcVHad.hh"
#include "EvtGenModels/EvtBcVMuNu.hh"
#include "EvtGenModels/EvtBcVNpi.hh"
#include "EvtGenModels/EvtBcVPPHad.hh"
#include "EvtGenModels/EvtBsMuMuKK.hh"
#include "EvtGenModels/EvtBsquark.hh"
#include "EvtGenModels/EvtBto2piCPiso.hh"
#include "EvtGenModels/EvtBtoKD3P.hh"
#include "EvtGenModels/EvtBtoKpiCPiso.hh"
#include "EvtGenModels/EvtBtoXsEtap.hh"
#include "EvtGenModels/EvtBtoXsgamma.hh"
#include "EvtGenModels/EvtBtoXsll.hh"
#include "EvtGenModels/EvtCBTo3piMPP.hh"
#include "EvtGenModels/EvtCBTo3piP00.hh"
#include "EvtGenModels/EvtD0gammaDalitz.hh"
#include "EvtGenModels/EvtD0mixDalitz.hh"
#include "EvtGenModels/EvtDDalitz.hh"
#include "EvtGenModels/EvtDMix.hh"
#include "EvtGenModels/EvtDToKpienu.hh"
#include "EvtGenModels/EvtEtaDalitz.hh"
#include "EvtGenModels/EvtEtaLLPiPi.hh"
#include "EvtGenModels/EvtFlatQ2.hh"
#include "EvtGenModels/EvtFlatSqDalitz.hh"
#include "EvtGenModels/EvtFourBodyPhsp.hh"
#include "EvtGenModels/EvtGenericDalitz.hh"
#include "EvtGenModels/EvtGoityRoberts.hh"
#include "EvtGenModels/EvtHQET.hh"
#include "EvtGenModels/EvtHQET2.hh"
#include "EvtGenModels/EvtHelAmp.hh"
#include "EvtGenModels/EvtHypNonLepton.hh"
#include "EvtGenModels/EvtISGW.hh"
#include "EvtGenModels/EvtISGW2.hh"
#include "EvtGenModels/EvtKKLambdaC.hh"
#include "EvtGenModels/EvtKStopizmumu.hh"
#include "EvtGenModels/EvtKstarnunu.hh"
#include "EvtGenModels/EvtKstarstargamma.hh"
#include "EvtGenModels/EvtLNuGamma.hh"
#include "EvtGenModels/EvtLambdaB2LambdaV.hh"
#include "EvtGenModels/EvtLambdaP_BarGamma.hh"
#include "EvtGenModels/EvtLambdacPHH.hh"
#include "EvtGenModels/EvtLb2Baryonlnu.hh"
#include "EvtGenModels/EvtLb2Lll.hh"
#include "EvtGenModels/EvtLb2plnuLCSR.hh"
#include "EvtGenModels/EvtLb2plnuLQCD.hh"
#include "EvtGenModels/EvtMelikhov.hh"
-#include "EvtGenModels/EvtMultibody.hh"
#include "EvtGenModels/EvtOmegaDalitz.hh"
#include "EvtGenModels/EvtPVVCPLH.hh"
#include "EvtGenModels/EvtPartWave.hh"
#include "EvtGenModels/EvtPhiDalitz.hh"
#include "EvtGenModels/EvtPhsp.hh"
#include "EvtGenModels/EvtPhspDecaytimeCut.hh"
#include "EvtGenModels/EvtPhspFlatLifetime.hh"
#include "EvtGenModels/EvtPi0Dalitz.hh"
#include "EvtGenModels/EvtPropSLPole.hh"
#include "EvtGenModels/EvtPsi2JpsiPiPi.hh"
#include "EvtGenModels/EvtPto3P.hh"
#include "EvtGenModels/EvtRareLbToLll.hh"
#include "EvtGenModels/EvtSLBKPole.hh"
#include "EvtGenModels/EvtSLN.hh"
#include "EvtGenModels/EvtSLPole.hh"
#include "EvtGenModels/EvtSSDCP.hh"
#include "EvtGenModels/EvtSSD_DirectCP.hh"
#include "EvtGenModels/EvtSSSCP.hh"
#include "EvtGenModels/EvtSSSCPT.hh"
#include "EvtGenModels/EvtSSSCPpng.hh"
#include "EvtGenModels/EvtSTS.hh"
#include "EvtGenModels/EvtSTSCP.hh"
#include "EvtGenModels/EvtSVP.hh"
#include "EvtGenModels/EvtSVPCP.hh"
#include "EvtGenModels/EvtSVPHelAmp.hh"
#include "EvtGenModels/EvtSVPHelCPMix.hh"
#include "EvtGenModels/EvtSVS.hh"
#include "EvtGenModels/EvtSVSCP.hh"
#include "EvtGenModels/EvtSVSCPLH.hh"
#include "EvtGenModels/EvtSVSCPiso.hh"
#include "EvtGenModels/EvtSVSNONCPEIGEN.hh"
#include "EvtGenModels/EvtSVVCP.hh"
#include "EvtGenModels/EvtSVVCPLH.hh"
#include "EvtGenModels/EvtSVVHelAmp.hh"
#include "EvtGenModels/EvtSVVHelCPMix.hh"
#include "EvtGenModels/EvtSVVNONCPEIGEN.hh"
#include "EvtGenModels/EvtSingleParticle.hh"
#include "EvtGenModels/EvtSll.hh"
#include "EvtGenModels/EvtTSS.hh"
#include "EvtGenModels/EvtTVP.hh"
#include "EvtGenModels/EvtTVSPwave.hh"
#include "EvtGenModels/EvtTauHadnu.hh"
#include "EvtGenModels/EvtTauScalarnu.hh"
#include "EvtGenModels/EvtTauVectornu.hh"
#include "EvtGenModels/EvtTaulnunu.hh"
#include "EvtGenModels/EvtThreeBodyPhsp.hh"
#include "EvtGenModels/EvtVPHOtoVISRHi.hh"
#include "EvtGenModels/EvtVSPPwave.hh"
#include "EvtGenModels/EvtVSS.hh"
#include "EvtGenModels/EvtVSSBMixCPT.hh"
#include "EvtGenModels/EvtVSSMix.hh"
#include "EvtGenModels/EvtVVP.hh"
#include "EvtGenModels/EvtVVPIPI_WEIGHTED.hh"
#include "EvtGenModels/EvtVVSPwave.hh"
#include "EvtGenModels/EvtVVpipi.hh"
#include "EvtGenModels/EvtVectorIsr.hh"
#include "EvtGenModels/EvtVll.hh"
#include "EvtGenModels/EvtVtoSll.hh"
#include "EvtGenModels/EvtVub.hh"
#include "EvtGenModels/EvtVubBLNP.hh"
#include "EvtGenModels/EvtVubBLNPHybrid.hh"
#include "EvtGenModels/EvtVubHybrid.hh"
#include "EvtGenModels/EvtVubNLO.hh"
#include "EvtGenModels/EvtXPsiGamma.hh"
#include "EvtGenModels/EvtY3SToY1SpipiMoxhay.hh"
#include "EvtGenModels/EvtYmSToYnSpipiCLEO.hh"
#include "EvtGenModels/EvtbTosllAli.hh"
#include "EvtGenModels/EvtbTosllBall.hh"
#include "EvtGenModels/EvtbTosllMS.hh"
#include "EvtGenModels/EvtbTosllMSExt.hh"
#include "EvtGenModels/Evtbs2llGammaISRFSR.hh"
#include "EvtGenModels/Evtbs2llGammaMNT.hh"
#include "EvtGenModels/EvtbsToLLLL.hh"
#include "EvtGenModels/EvtbsToLLLLHyperCP.hh"
#include
#include
#include
#include
#include
#include
using std::cout;
using std::endl;
using std::fstream;
EvtModelReg::EvtModelReg( const std::list* extraModels )
{
EvtModel& modelist = EvtModel::instance();
if ( extraModels ) {
for ( std::list::const_iterator it = extraModels->begin();
it != extraModels->end(); ++it ) {
modelist.registerModel( *it );
}
}
modelist.registerModel( new EvtBBScalar );
modelist.registerModel( new EvtLambdaP_BarGamma );
modelist.registerModel( new EvtFlatQ2 );
modelist.registerModel( new EvtTauHadnu );
modelist.registerModel( new EvtTauVectornu );
modelist.registerModel( new EvtVVP );
modelist.registerModel( new EvtSLN );
modelist.registerModel( new EvtISGW2 );
modelist.registerModel( new EvtMelikhov );
modelist.registerModel( new EvtSLPole );
modelist.registerModel( new EvtPropSLPole );
modelist.registerModel( new EvtSLBKPole );
modelist.registerModel( new EvtHQET );
modelist.registerModel( new EvtHQET2 );
modelist.registerModel( new EvtISGW );
modelist.registerModel( new EvtVSS );
modelist.registerModel( new EvtVSSMix );
modelist.registerModel( new EvtVSSBMixCPT );
modelist.registerModel( new EvtVSPPwave );
modelist.registerModel( new EvtGoityRoberts );
modelist.registerModel( new EvtSVS );
modelist.registerModel( new EvtTSS );
modelist.registerModel( new EvtTVSPwave );
modelist.registerModel( new EvtSVVHelAmp );
modelist.registerModel( new EvtSVPHelAmp );
modelist.registerModel( new EvtSVPCP );
modelist.registerModel( new EvtVVSPwave );
modelist.registerModel( new EvtDDalitz );
modelist.registerModel( new EvtOmegaDalitz );
modelist.registerModel( new EvtEtaDalitz );
modelist.registerModel( new EvtPhsp );
modelist.registerModel( new EvtPhspDecaytimeCut );
modelist.registerModel( new EvtBtoXsgamma );
modelist.registerModel( new EvtBtoXsll );
modelist.registerModel( new EvtBtoXsEtap );
modelist.registerModel( new EvtSSSCP );
modelist.registerModel( new EvtSSSCPpng );
modelist.registerModel( new EvtSTSCP );
modelist.registerModel( new EvtSTS );
modelist.registerModel( new EvtSSSCPT );
modelist.registerModel( new EvtSVSCP );
modelist.registerModel( new EvtSSDCP );
modelist.registerModel( new EvtSVSNONCPEIGEN );
modelist.registerModel( new EvtSVVNONCPEIGEN );
modelist.registerModel( new EvtSVVCP );
modelist.registerModel( new EvtSVVCPLH );
modelist.registerModel( new EvtSVSCPLH );
modelist.registerModel( new EvtSll );
modelist.registerModel( new EvtVll );
modelist.registerModel( new EvtTaulnunu );
modelist.registerModel( new EvtTauScalarnu );
modelist.registerModel( new EvtKstarnunu );
modelist.registerModel( new EvtbTosllBall );
modelist.registerModel( new EvtBto2piCPiso );
modelist.registerModel( new EvtBtoKpiCPiso );
modelist.registerModel( new EvtSVSCPiso );
modelist.registerModel( new EvtSingleParticle );
modelist.registerModel( new EvtVectorIsr );
modelist.registerModel( new EvtPi0Dalitz );
modelist.registerModel( new EvtHelAmp );
modelist.registerModel( new EvtPartWave );
modelist.registerModel( new EvtVVpipi );
modelist.registerModel( new EvtY3SToY1SpipiMoxhay );
modelist.registerModel( new EvtYmSToYnSpipiCLEO );
modelist.registerModel( new EvtBsquark );
modelist.registerModel( new EvtPhiDalitz );
modelist.registerModel( new EvtBToPlnuBK );
modelist.registerModel( new EvtBToVlnuBall );
modelist.registerModel( new EvtVVPIPI_WEIGHTED );
modelist.registerModel( new EvtVPHOtoVISRHi );
modelist.registerModel( new EvtBTo4piCP );
modelist.registerModel( new EvtBTo3piCP );
modelist.registerModel( new EvtCBTo3piP00 );
modelist.registerModel( new EvtCBTo3piMPP );
modelist.registerModel( new EvtBToKpipiCP );
modelist.registerModel( new EvtLb2Lll );
modelist.registerModel( new EvtRareLbToLll );
modelist.registerModel( new EvtHypNonLepton );
modelist.registerModel( new EvtSVVHelCPMix );
modelist.registerModel( new EvtSVPHelCPMix );
modelist.registerModel( new EvtLNuGamma );
modelist.registerModel( new EvtKstarstargamma );
modelist.registerModel( new EvtVub );
modelist.registerModel( new EvtVubHybrid );
modelist.registerModel( new EvtVubNLO );
modelist.registerModel( new EvtVubBLNP );
modelist.registerModel( new EvtVubBLNPHybrid );
modelist.registerModel( new EvtPto3P );
modelist.registerModel( new EvtBtoKD3P );
modelist.registerModel( new EvtKKLambdaC );
- modelist.registerModel( new EvtMultibody );
modelist.registerModel( new EvtDMix );
modelist.registerModel( new EvtD0mixDalitz );
modelist.registerModel( new EvtD0gammaDalitz );
modelist.registerModel( new EvtbTosllAli );
modelist.registerModel( new EvtBaryonPCR );
modelist.registerModel( new EvtBToDDalitzCPK );
modelist.registerModel( new EvtLambdaB2LambdaV );
modelist.registerModel( new EvtLambda2PPiForLambdaB2LambdaV );
modelist.registerModel( new EvtV2VpVmForLambdaB2LambdaV );
modelist.registerModel( new EvtPVVCPLH );
modelist.registerModel( new EvtSSD_DirectCP );
modelist.registerModel( new EvtBcToNPi );
modelist.registerModel( new EvtBcPsiNPi );
modelist.registerModel( new EvtBcBsNPi );
modelist.registerModel( new EvtBcBsStarNPi );
modelist.registerModel( new EvtBcSMuNu );
modelist.registerModel( new EvtBcVMuNu );
modelist.registerModel( new EvtBcTMuNu );
modelist.registerModel( new EvtBcVNpi );
modelist.registerModel( new EvtSVP );
modelist.registerModel( new EvtTVP );
modelist.registerModel( new EvtXPsiGamma );
modelist.registerModel( new EvtbsToLLLL );
modelist.registerModel( new EvtbsToLLLLHyperCP );
modelist.registerModel( new EvtBLLNuL );
modelist.registerModel( new EvtKStopizmumu );
modelist.registerModel( new EvtVtoSll );
modelist.registerModel( new EvtBsMuMuKK );
modelist.registerModel( new EvtGenericDalitz );
modelist.registerModel( new EvtBcVHad );
modelist.registerModel( new EvtBcVPPHad );
modelist.registerModel( new Evtbs2llGammaMNT );
modelist.registerModel( new Evtbs2llGammaISRFSR );
modelist.registerModel( new EvtbTosllMS );
modelist.registerModel( new EvtbTosllMSExt );
modelist.registerModel( new EvtLb2plnuLQCD );
modelist.registerModel( new EvtLb2plnuLCSR );
modelist.registerModel( new EvtLb2Baryonlnu );
modelist.registerModel( new EvtBToDiBaryonlnupQCD );
modelist.registerModel( new EvtFlatSqDalitz );
modelist.registerModel( new EvtPhspFlatLifetime );
modelist.registerModel( new EvtLambdacPHH );
modelist.registerModel( new EvtDToKpienu );
modelist.registerModel( new EvtPsi2JpsiPiPi );
modelist.registerModel( new EvtThreeBodyPhsp );
modelist.registerModel( new EvtFourBodyPhsp );
modelist.registerModel( new EvtEtaLLPiPi );
modelist.registerModel( new EvtBToXElNu );
}
diff --git a/src/EvtGenModels/EvtMultibody.cpp b/src/EvtGenModels/EvtMultibody.cpp
deleted file mode 100644
index b687444..0000000
--- a/src/EvtGenModels/EvtMultibody.cpp
+++ /dev/null
@@ -1,94 +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 "EvtGenModels/EvtMultibody.hh"
-
-#include "EvtGenBase/EvtConst.hh"
-#include "EvtGenBase/EvtGenKine.hh"
-#include "EvtGenBase/EvtKine.hh"
-#include "EvtGenBase/EvtPDL.hh"
-#include "EvtGenBase/EvtParticle.hh"
-#include "EvtGenBase/EvtPatches.hh"
-#include "EvtGenBase/EvtReport.hh"
-#include "EvtGenBase/EvtResonance.hh"
-#include "EvtGenBase/EvtResonance2.hh"
-#include "EvtGenBase/EvtdFunction.hh"
-
-EvtMultibody::~EvtMultibody()
-{
- if ( _decayTree != nullptr )
- delete _decayTree;
- _decayTree = nullptr;
- if ( _ilist != nullptr )
- delete[] _ilist;
- _ilist = nullptr;
-}
-
-std::string EvtMultibody::getName()
-{
- return "D_MULTIBODY";
-}
-
-EvtDecayBase* EvtMultibody::clone()
-{
- return new EvtMultibody;
-}
-
-void EvtMultibody::init()
-{
- int N = getNArg();
-
- _decayTree = new EvtMTree( getDaugs(), getNDaug() );
- _ilist = new int[getNDaug() + 1];
-
- for ( int i = 0; i < N - 1; ++i ) {
- if ( getArgStr( i ) == "RESONANCE" ) {
- _decayTree->addtree( getArgStr( ++i ) );
- } else {
- EvtGenReport( EVTGEN_ERROR, "EvtGen" )
- << "Syntax error at " << getArgStr( i ) << std::endl;
- ::abort();
- }
- }
-}
-
-void EvtMultibody::initProbMax()
-{
- setProbMax( 1.0 );
-}
-
-void EvtMultibody::decay( EvtParticle* p )
-{
- // Initialize the phase space before doing anything else!
- p->initializePhaseSpace( getNDaug(), getDaugs() );
-
- EvtSpinAmp amp = _decayTree->amplitude( p );
-
- vector index = amp.iterallowedinit();
- vector spins = amp.dims();
-
- do {
- for ( size_t i = 0; i < index.size(); ++i ) {
- _ilist[i] = index[i] + spins[i];
- }
-
- vertex( _ilist, amp( index ) );
- } while ( amp.iterateallowed( index ) );
-}
diff --git a/test/jsonFiles/D_MULTIBODY__D0_K0sKK.json b/test/jsonFiles/D_MULTIBODY__D0_K0sKK.json
deleted file mode 100644
index 351393a..0000000
--- a/test/jsonFiles/D_MULTIBODY__D0_K0sKK.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "parent" : "D0",
- "daughters" : ["K_S0", "K-", "K+"],
- "models" : ["D_MULTIBODY"],
- "parameters" : [["RESONANCE", "a_00(BREITWIGNER,HELAMP,[1.0,0.0],[K+,K-])",
- "RESONANCE", "a_0+(BREITWIGNER,HELAMP,[0.460,3.59],[K_S0,K+])",
- "RESONANCE", "f'_0(BREITWIGNER,HELAMP,[0.435,-2.65],[K+,K-])"]],
- "do_conjugate_decay" : [false],
- "extras" : ["noPhotos"],
- "events" : 10000,
- "histograms" : [
- {"variable" : "prob", "title" : "Probability", "d1" : 0, "d2" : 0, "nbins" : 100, "xmin" : 0.0, "xmax" : 1.0},
- {"variable" : "mass", "title" : "m(K^{0}_{S} K^{+})", "d1" : 1, "d2" : 2, "nbins" : 100, "xmin" : 0.9, "xmax" : 1.5},
- {"variable" : "mass", "title" : "m(K^{0}_{S} K^{-})", "d1" : 1, "d2" : 3, "nbins" : 100, "xmin" : 0.9, "xmax" : 1.5},
- {"variable" : "mass", "title" : "m(K^{-} K^{+})", "d1" : 2, "d2" : 3, "nbins" : 100, "xmin" : 0.9, "xmax" : 1.5},
- {"variable" : "massSq", "title" : "Dalitz m^{2}(K^{0}_{S} K^{+}) vs m^{2}(K^{0}_{S} K^{-})", "d1" : 1, "d2" : 2, "nbins" : 50, "xmin" : 0.8, "xmax" : 2.0, "variableY" : "massSq", "d1Y" : 1, "d2Y" : 3, "nbinsY" : 50, "ymin" : 0.8, "ymax" : 2.0},
- {"variable" : "massSq", "title" : "Dalitz m^{2}(K^{+} K^{-}) vs m^{2}(K^{0}_{S} K^{+})", "d1" : 2, "d2" : 3, "nbins" : 50, "xmin" : 0.8, "xmax" : 2.0, "variableY" : "massSq", "d1Y" : 1, "d2Y" : 2, "nbinsY" : 50, "ymin" : 0.8, "ymax" : 2.0},
- {"variable" : "mPrime", "title" : "sqDalitz", "d1" : 1, "d2" : 2, "nbins" : 25, "xmin" : 0.0, "xmax" : 1.00, "variableY" : "thetaPrime", "d1Y" : 1, "d2Y" : 2, "nbinsY" : 25, "ymin" : 0.0, "ymax" : 1.0},
- {"variable" : "cosHel", "title" : "cosHel12", "d1" : 1, "d2" : 2, "nbins" : 50, "xmin" : -1.0, "xmax" : 1.0},
- {"variable" : "cosHel", "title" : "cosHel23", "d1" : 2, "d2" : 3, "nbins" : 50, "xmin" : -1.0, "xmax" : 1.0},
- {"variable" : "cosHel", "title" : "cosHel13", "d1" : 1, "d2" : 3, "nbins" : 50, "xmin" : -1.0, "xmax" : 1.0}
- ],
- "outfile" : "D_MULTIBODY__D0_K0sKK.root",
- "reference" : "RefD_MULTIBODY__D0_K0sKK.root"
-}