BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtAbsLineShape.hh
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtGen/EvtAbsLineShape.hh
12//
13// Description: Class to keep the particle properties for
14// one particle
15//
16// Modification history:
17//
18// Lange March 10, 2001 Module created
19//
20//------------------------------------------------------------------------
21
22#ifndef EVTABSLINESHAPE_HH
23#define EVTABSLINESHAPE_HH
24
25#include "EvtId.hh"
26#include "EvtSpinType.hh"
27#include <vector>
28
29class EvtId;
30
32
33public:
35 EvtAbsLineShape( double mass, double width, double maxRange, EvtSpinType::spintype sp );
36 virtual ~EvtAbsLineShape();
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 ) {
51 _width = width;
52 // <--- added by L.L. Wang to fix a bug
53 double maxdelta = 15.0 * width;
54 if ( _maxRange > 0.00001 )
55 {
56 _massMax = _mass + maxdelta;
58 }
59 else
60 {
61 _massMax = _mass + maxdelta;
62 _massMin = _mass - 15.0 * width;
63 }
64 if ( _massMin < 0. ) _massMin = 0.;
65 _massMax = _mass + maxdelta;
66 // ---> //
67 }
68 void reSetMassMin( double mass ) { _massMin = mass; }
69 void reSetMassMax( double mass ) { _massMax = mass; }
70 virtual void reSetBlatt( double blatt ){};
71 void includeBirthFactor( bool yesno ) { _includeBirthFact = yesno; }
72 void addFactorPn( double factor = 0. ) { _addFactorPn = factor; }
73 void includeDecayFactor( bool yesno ) { _includeDecayFact = yesno; }
74 void setPWForDecay( int spin, EvtId d1, EvtId d2 ) {
75 _userSetPW.push_back( spin );
76 _userSetPWD1.push_back( d1 );
77 _userSetPWD2.push_back( d2 );
78 }
79 void setPWForBirthL( int spin, EvtId par, EvtId othD ) {
80 _userSetBirthPW.push_back( spin );
81 _userSetBirthOthD.push_back( othD );
82 _userSetBirthPar.push_back( par );
83 }
84
85 virtual double getRandMass( EvtId* parId, int nDaug, EvtId* dauId, EvtId* othDaugId,
86 double maxMass, double* dauMasses );
87 virtual double getMassProb( double mass, double massPar, int nDaug, double* massDau );
88
89 void fixForSP8() { _applyFixForSP8 = true; }
90
91protected:
95 double _mass;
96 double _massMin;
97 double _massMax;
98 double _width;
99 double _maxRange;
100
101 // allow for special cases where the default method of picking the
102 // lowest allowed partial wave for a decay is not the right answer.
103 // string is "<spin> <daughter1> <daughter2>"
104 // new 9/12/2003 Lange
105 std::vector<EvtId> _userSetPWD1, _userSetPWD2;
106 std::vector<int> _userSetPW;
107
108 // also do it for birth factors
110 std::vector<int> _userSetBirthPW;
111
113
115};
116
117#endif
double mass
void reSetWidth(double width)
std::vector< EvtId > _userSetBirthOthD
virtual EvtAbsLineShape * clone()
EvtSpinType::spintype _spin
virtual double getMassProb(double mass, double massPar, int nDaug, double *massDau)
std::vector< EvtId > _userSetPWD1
void reSetMass(double mass)
std::vector< int > _userSetPW
virtual ~EvtAbsLineShape()
void includeDecayFactor(bool yesno)
void addFactorPn(double factor=0.)
EvtSpinType::spintype getSpinType()
EvtAbsLineShape & operator=(const EvtAbsLineShape &x)
virtual double getRandMass(EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses)
void setPWForBirthL(int spin, EvtId par, EvtId othD)
std::vector< int > _userSetBirthPW
void reSetMassMax(double mass)
virtual double rollMass()
virtual void reSetBlatt(double blatt)
std::vector< EvtId > _userSetPWD2
void includeBirthFactor(bool yesno)
void setPWForDecay(int spin, EvtId d1, EvtId d2)
std::vector< EvtId > _userSetBirthPar
void reSetMassMin(double mass)
Definition EvtId.hh:27