00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef EVTABSLINESHAPE_HH
00023 #define EVTABSLINESHAPE_HH
00024
00025 #include "EvtGenBase/EvtSpinType.hh"
00026 #include "EvtGenBase/EvtId.hh"
00027 #include <vector>
00028
00029 class EvtId;
00030
00031 class EvtAbsLineShape {
00032
00033 public:
00034
00035 EvtAbsLineShape();
00036 EvtAbsLineShape(double mass, double width, double maxRange, EvtSpinType::spintype sp);
00037 virtual ~EvtAbsLineShape();
00038 EvtAbsLineShape& operator=(const EvtAbsLineShape& x);
00039 EvtAbsLineShape(const EvtAbsLineShape& x);
00040
00041 double getMass() {return _mass;}
00042 double getMassMin() {return _massMin;}
00043 double getMassMax() {return _massMax;}
00044 double getMaxRange() {return _maxRange;}
00045 double getWidth() {return _width;}
00046 EvtSpinType::spintype getSpinType() {return _spin;}
00047 virtual double rollMass();
00048 virtual EvtAbsLineShape* clone();
00049
00050 void reSetMass(double mass) { _mass=mass;}
00051 void reSetWidth(double width) {
00052 _width=width;
00053
00054 double maxdelta=15.0*width;
00055 if ( _maxRange > 0.00001 ) {
00056 _massMax=_mass+maxdelta;
00057 _massMin=_mass-_maxRange;
00058 }
00059 else{
00060 _massMax=_mass+maxdelta;
00061 _massMin=_mass-15.0*width;
00062 }
00063 if ( _massMin< 0. ) _massMin=0.;
00064 _massMax=_mass+maxdelta;
00065
00066 }
00067 void reSetMassMin(double mass) { _massMin=mass;}
00068 void reSetMassMax(double mass) { _massMax=mass;}
00069 virtual void reSetBlatt(double blatt) {};
00070 void includeBirthFactor(bool yesno) { _includeBirthFact = yesno; }
00071 void addFactorPn(double factor=0.) { _addFactorPn = factor;}
00072 void includeDecayFactor(bool yesno) { _includeDecayFact = yesno; }
00073 void setPWForDecay( int spin, EvtId d1, EvtId d2) {
00074 _userSetPW.push_back(spin);
00075 _userSetPWD1.push_back(d1);
00076 _userSetPWD2.push_back(d2);
00077 }
00078 void setPWForBirthL( int spin, EvtId par, EvtId othD) {
00079 _userSetBirthPW.push_back(spin);
00080 _userSetBirthOthD.push_back(othD);
00081 _userSetBirthPar.push_back(par);
00082 }
00083
00084 virtual double getRandMass(EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId,double maxMass, double *dauMasses);
00085 virtual double getMassProb(double mass, double massPar, int nDaug, double *massDau);
00086
00087 void fixForSP8() { _applyFixForSP8=true;}
00088 protected:
00089
00090 bool _includeDecayFact;
00091 bool _includeBirthFact;
00092 double _addFactorPn;
00093 double _mass;
00094 double _massMin;
00095 double _massMax;
00096 double _width;
00097 double _maxRange;
00098
00099
00100
00101
00102
00103 std::vector<EvtId> _userSetPWD1,_userSetPWD2;
00104 std::vector<int> _userSetPW;
00105
00106
00107 std::vector<EvtId> _userSetBirthPar,_userSetBirthOthD;
00108 std::vector<int> _userSetBirthPW;
00109
00110 EvtSpinType::spintype _spin;
00111
00112 bool _applyFixForSP8;
00113 };
00114
00115 #endif
00116