Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:20:01

0001 
0002 /***********************************************************************
0003 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors       *
0004 *                                                                      *
0005 * This file is part of EvtGen.                                         *
0006 *                                                                      *
0007 * EvtGen is free software: you can redistribute it and/or modify       *
0008 * it under the terms of the GNU General Public License as published by *
0009 * the Free Software Foundation, either version 3 of the License, or    *
0010 * (at your option) any later version.                                  *
0011 *                                                                      *
0012 * EvtGen is distributed in the hope that it will be useful,            *
0013 * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
0014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
0015 * GNU General Public License for more details.                         *
0016 *                                                                      *
0017 * You should have received a copy of the GNU General Public License    *
0018 * along with EvtGen.  If not, see <https://www.gnu.org/licenses/>.     *
0019 ***********************************************************************/
0020 
0021 #ifndef EVTABSLINESHAPE_HH
0022 #define EVTABSLINESHAPE_HH
0023 
0024 #include "EvtGenBase/EvtId.hh"
0025 #include "EvtGenBase/EvtSpinType.hh"
0026 
0027 #include <vector>
0028 
0029 class EvtId;
0030 
0031 class EvtAbsLineShape {
0032   public:
0033     EvtAbsLineShape() = default;
0034     EvtAbsLineShape( double mass, double width, double maxRange,
0035                      EvtSpinType::spintype sp );
0036     virtual ~EvtAbsLineShape() = default;
0037     EvtAbsLineShape& operator=( const EvtAbsLineShape& x );
0038     EvtAbsLineShape( const EvtAbsLineShape& x );
0039 
0040     double getMass() { return _mass; }
0041     double getMassMin() { return _massMin; }
0042     double getMassMax() { return _massMax; }
0043     double getMaxRange() { return _maxRange; }
0044     double getWidth() { return _width; }
0045     EvtSpinType::spintype getSpinType() { return _spin; }
0046     virtual double rollMass();
0047     virtual EvtAbsLineShape* clone();
0048 
0049     void reSetMass( double mass ) { _mass = mass; }
0050     void reSetWidth( double width ) { _width = width; }
0051     void reSetMassMin( double mass ) { _massMin = mass; }
0052     void reSetMassMax( double mass ) { _massMax = mass; }
0053     virtual void reSetBlatt( double /*blatt*/ ){};
0054     virtual void reSetBlattBirth( double /*blatt*/ ){};
0055     void includeBirthFactor( bool yesno ) { _includeBirthFact = yesno; }
0056     void includeDecayFactor( bool yesno ) { _includeDecayFact = yesno; }
0057     void setPWForDecay( int spin, EvtId d1, EvtId d2 )
0058     {
0059         _userSetPW.push_back( spin );
0060         _userSetPWD1.push_back( d1 );
0061         _userSetPWD2.push_back( d2 );
0062     }
0063     void setPWForBirthL( int spin, EvtId par, EvtId othD )
0064     {
0065         _userSetBirthPW.push_back( spin );
0066         _userSetBirthOthD.push_back( othD );
0067         _userSetBirthPar.push_back( par );
0068     }
0069 
0070     virtual double getRandMass( EvtId* parId, int nDaug, EvtId* dauId,
0071                                 EvtId* othDaugId, double maxMass,
0072                                 double* dauMasses );
0073     virtual double getMassProb( double mass, double massPar, int nDaug,
0074                                 double* massDau );
0075 
0076   protected:
0077     bool _includeDecayFact;
0078     bool _includeBirthFact;
0079     double _mass;
0080     double _massMin;
0081     double _massMax;
0082     double _width;
0083     double _maxRange;
0084 
0085     // allow for special cases where the default method of picking the
0086     //lowest allowed partial wave for a decay is not the right answer.
0087     // string is "<spin> <daughter1> <daughter2>"
0088     //new 9/12/2003 Lange
0089     std::vector<EvtId> _userSetPWD1, _userSetPWD2;
0090     std::vector<int> _userSetPW;
0091 
0092     // also do it for birth factors
0093     std::vector<EvtId> _userSetBirthPar, _userSetBirthOthD;
0094     std::vector<int> _userSetBirthPW;
0095 
0096     EvtSpinType::spintype _spin;
0097 };
0098 
0099 #endif