Line data Source code
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: EvtLineShape.cc
12 : //
13 : // Description: Store particle properties for one particle.
14 : //
15 : // Modification history:
16 : //
17 : // Lange March 10, 2001 Module created
18 : // Dvoretskii June 03, 2002 Reimplemented rollMass()
19 : //
20 : //------------------------------------------------------------------------
21 : #include "EvtGenBase/EvtPatches.hh"
22 :
23 : #include "EvtGenBase/EvtPatches.hh"
24 : #include "EvtGenBase/EvtFlatLineShape.hh"
25 : #include "EvtGenBase/EvtRandom.hh"
26 : #include "EvtGenBase/EvtTwoBodyVertex.hh"
27 : #include "EvtGenBase/EvtBlattWeisskopf.hh"
28 : #include "EvtGenBase/EvtPropBreitWignerRel.hh"
29 : #include "EvtGenBase/EvtPropBreitWigner.hh"
30 : #include "EvtGenBase/EvtPDL.hh"
31 : #include "EvtGenBase/EvtSpinType.hh"
32 :
33 0 : EvtFlatLineShape::EvtFlatLineShape() {
34 :
35 0 : }
36 :
37 0 : EvtFlatLineShape::~EvtFlatLineShape() {
38 0 : }
39 :
40 0 : EvtFlatLineShape::EvtFlatLineShape(double mass, double width, double maxRange, EvtSpinType::spintype sp) {
41 :
42 0 : _mass=mass;
43 0 : _width=width;
44 0 : _spin=sp;
45 0 : _maxRange=maxRange;
46 :
47 : double maxdelta = width;
48 :
49 0 : _massMax=mass+maxdelta;
50 0 : _massMin=mass-maxdelta;
51 :
52 0 : if ( _massMin< 0. ) _massMin=0.;
53 :
54 0 : }
55 :
56 : EvtFlatLineShape::EvtFlatLineShape(const EvtFlatLineShape& x):
57 0 : EvtAbsLineShape( x ) {
58 0 : _mass=x._mass;
59 0 : _width=x._width;
60 0 : _spin=x._spin;
61 0 : _massMax=x._massMax;
62 0 : _massMin=x._massMin;
63 0 : _maxRange=x._maxRange;
64 :
65 0 : }
66 :
67 : EvtFlatLineShape& EvtFlatLineShape::operator=(const EvtFlatLineShape& x){
68 0 : _mass=x._mass;
69 0 : _massMax=x._massMax;
70 0 : _massMin=x._massMin;
71 0 : _width=x._width;
72 0 : _maxRange=x._maxRange;
73 0 : _spin=x._spin;
74 0 : return *this;
75 :
76 : }
77 :
78 : EvtAbsLineShape* EvtFlatLineShape::clone() {
79 :
80 0 : return new EvtFlatLineShape(*this);
81 0 : }
82 :
83 :
84 : double EvtFlatLineShape::getMassProb(double mass, double massPar,int nDaug, double *massDau) {
85 :
86 :
87 : double dTotMass=0.;
88 :
89 : int i;
90 0 : for (i=0; i<nDaug; i++) {
91 0 : dTotMass+=massDau[i];
92 : }
93 0 : if ( (mass<dTotMass) ) return 0.;
94 :
95 0 : if ( massPar>0.0000000001 ) {
96 0 : if ( mass > massPar) return 0.;
97 : }
98 :
99 0 : return 1.;
100 0 : }
101 :
102 : double EvtFlatLineShape::getRandMass(EvtId*,int, EvtId*, EvtId*, double, double*) {
103 :
104 0 : return EvtRandom::Flat(_massMin,_massMax);
105 :
106 : }
107 :
108 :
109 :
110 :
|