evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
EvtAbsLineShape.hh
Go to the documentation of this file.
1 
2 /***********************************************************************
3 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4 * *
5 * This file is part of EvtGen. *
6 * *
7 * EvtGen is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * EvtGen is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19 ***********************************************************************/
20 
21 #ifndef EVTABSLINESHAPE_HH
22 #define EVTABSLINESHAPE_HH
23 
24 #include "EvtGenBase/EvtId.hh"
26 
27 #include <vector>
28 
29 class EvtId;
30 
32  public:
33  EvtAbsLineShape() = default;
34  EvtAbsLineShape( double mass, double width, double maxRange,
36  virtual ~EvtAbsLineShape() = default;
38  EvtAbsLineShape( const EvtAbsLineShape& x );
39 
40  double getMass() { return _mass; }
41  double getMassMin() { return _massMin; }
42  double getMassMax() { return _massMax; }
43  double getMaxRange() { return _maxRange; }
44  double getWidth() { return _width; }
46  virtual double rollMass();
47  virtual EvtAbsLineShape* clone();
48 
49  void reSetMass( double mass ) { _mass = mass; }
50  void reSetWidth( double width ) { _width = width; }
51  void reSetMassMin( double mass ) { _massMin = mass; }
52  void reSetMassMax( double mass ) { _massMax = mass; }
53  virtual void reSetBlatt( double /*blatt*/ ){};
54  virtual void reSetBlattBirth( double /*blatt*/ ){};
55  void includeBirthFactor( bool yesno ) { _includeBirthFact = yesno; }
56  void includeDecayFactor( bool yesno ) { _includeDecayFact = yesno; }
57  void setPWForDecay( int spin, EvtId d1, EvtId d2 )
58  {
59  _userSetPW.push_back( spin );
60  _userSetPWD1.push_back( d1 );
61  _userSetPWD2.push_back( d2 );
62  }
63  void setPWForBirthL( int spin, EvtId par, EvtId othD )
64  {
65  _userSetBirthPW.push_back( spin );
66  _userSetBirthOthD.push_back( othD );
67  _userSetBirthPar.push_back( par );
68  }
69 
70  virtual double getRandMass( EvtId* parId, int nDaug, EvtId* dauId,
71  EvtId* othDaugId, double maxMass,
72  double* dauMasses );
73  virtual double getMassProb( double mass, double massPar, int nDaug,
74  double* massDau );
75 
76  protected:
79  double _mass;
80  double _massMin;
81  double _massMax;
82  double _width;
83  double _maxRange;
84 
85  // allow for special cases where the default method of picking the
86  //lowest allowed partial wave for a decay is not the right answer.
87  // string is "<spin> <daughter1> <daughter2>"
88  //new 9/12/2003 Lange
89  std::vector<EvtId> _userSetPWD1, _userSetPWD2;
90  std::vector<int> _userSetPW;
91 
92  // also do it for birth factors
93  std::vector<EvtId> _userSetBirthPar, _userSetBirthOthD;
94  std::vector<int> _userSetBirthPW;
95 
97 };
98 
99 #endif
void reSetMassMax(double mass)
virtual EvtAbsLineShape * clone()
virtual void reSetBlatt(double)
virtual double getMassProb(double mass, double massPar, int nDaug, double *massDau)
void reSetWidth(double width)
std::vector< EvtId > _userSetPWD1
void reSetMassMin(double mass)
virtual ~EvtAbsLineShape()=default
EvtSpinType::spintype getSpinType()
virtual double rollMass()
void setPWForBirthL(int spin, EvtId par, EvtId othD)
void includeBirthFactor(bool yesno)
void setPWForDecay(int spin, EvtId d1, EvtId d2)
Definition: EvtId.hh:27
virtual void reSetBlattBirth(double)
EvtAbsLineShape()=default
std::vector< EvtId > _userSetBirthOthD
virtual double getRandMass(EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses)
std::vector< EvtId > _userSetPWD2
std::vector< int > _userSetPW
EvtSpinType::spintype _spin
std::vector< int > _userSetBirthPW
void includeDecayFactor(bool yesno)
std::vector< EvtId > _userSetBirthPar
EvtAbsLineShape & operator=(const EvtAbsLineShape &x)
void reSetMass(double mass)