BOSS
7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtFlatLineShape.cc
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: 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
EvtFlatLineShape::EvtFlatLineShape
() {
34
35
}
36
37
EvtFlatLineShape::~EvtFlatLineShape
() {
38
}
39
40
EvtFlatLineShape::EvtFlatLineShape
(
double
mass
,
double
width,
double
maxRange,
EvtSpinType::spintype
sp) {
41
42
_mass
=
mass
;
43
_width
=width;
44
_spin
=sp;
45
_maxRange
=maxRange;
46
47
double
maxdelta = width;
48
49
_massMax
=
mass
+maxdelta;
50
_massMin
=
mass
-maxdelta;
51
52
if
(
_massMin
< 0. )
_massMin
=0.;
53
54
}
55
56
EvtFlatLineShape::EvtFlatLineShape
(
const
EvtFlatLineShape
& x) {
57
_mass
=
x
._mass;
58
_width
=
x
._width;
59
_spin
=
x
._spin;
60
_massMax
=
x
._massMax;
61
_massMin
=
x
._massMin;
62
_maxRange
=
x
._maxRange;
63
64
}
65
66
EvtFlatLineShape
&
EvtFlatLineShape::operator=
(
const
EvtFlatLineShape
& x){
67
_mass
=
x
._mass;
68
_massMax
=
x
._massMax;
69
_massMin
=
x
._massMin;
70
_width
=
x
._width;
71
_maxRange
=
x
._maxRange;
72
_spin
=
x
._spin;
73
return
*
this
;
74
75
}
76
77
EvtAbsLineShape
*
EvtFlatLineShape::clone
() {
78
79
return
new
EvtFlatLineShape
(*
this
);
80
}
81
82
83
double
EvtFlatLineShape::getMassProb
(
double
mass
,
double
massPar,
int
nDaug,
double
*massDau) {
84
85
86
double
dTotMass=0.;
87
88
int
i;
89
for
(i=0; i<nDaug; i++) {
90
dTotMass+=massDau[i];
91
}
92
if
( (
mass
<dTotMass) )
return
0.;
93
94
if
( massPar>0.0000000001 ) {
95
if
(
mass
> massPar)
return
0.;
96
}
97
98
return
1.;
99
}
100
101
double
EvtFlatLineShape::getRandMass
(
EvtId
*parId,
int
nDaug,
EvtId
*dauId,
EvtId
*othDaugId,
double
massMax,
double
*dauMasses) {
102
103
return
EvtRandom::Flat
(
_massMin
,
_massMax
);
104
}
105
106
107
108
mass
double mass
Definition:
CosmicGenerator.cxx:138
EvtBlattWeisskopf.hh
EvtFlatLineShape.hh
EvtPDL.hh
EvtPatches.hh
EvtPropBreitWignerRel.hh
EvtPropBreitWigner.hh
EvtRandom.hh
EvtSpinType.hh
EvtTwoBodyVertex.hh
EvtAbsLineShape
Definition:
EvtAbsLineShape.hh:31
EvtAbsLineShape::_massMax
double _massMax
Definition:
EvtAbsLineShape.hh:95
EvtAbsLineShape::_spin
EvtSpinType::spintype _spin
Definition:
EvtAbsLineShape.hh:110
EvtAbsLineShape::_mass
double _mass
Definition:
EvtAbsLineShape.hh:93
EvtAbsLineShape::_maxRange
double _maxRange
Definition:
EvtAbsLineShape.hh:97
EvtAbsLineShape::_width
double _width
Definition:
EvtAbsLineShape.hh:96
EvtAbsLineShape::_massMin
double _massMin
Definition:
EvtAbsLineShape.hh:94
EvtFlatLineShape
Definition:
EvtFlatLineShape.hh:27
EvtFlatLineShape::getRandMass
double getRandMass(EvtId *parId, int nDaug, EvtId *dauId, EvtId *othDaugId, double maxMass, double *dauMasses)
Definition:
EvtFlatLineShape.cc:101
EvtFlatLineShape::operator=
EvtFlatLineShape & operator=(const EvtFlatLineShape &x)
Definition:
EvtFlatLineShape.cc:66
EvtFlatLineShape::EvtFlatLineShape
EvtFlatLineShape()
Definition:
EvtFlatLineShape.cc:33
EvtFlatLineShape::clone
EvtAbsLineShape * clone()
Definition:
EvtFlatLineShape.cc:77
EvtFlatLineShape::~EvtFlatLineShape
~EvtFlatLineShape()
Definition:
EvtFlatLineShape.cc:37
EvtFlatLineShape::getMassProb
double getMassProb(double mass, double massPar, int nDaug, double *massDau)
Definition:
EvtFlatLineShape.cc:83
EvtId
Definition:
EvtId.hh:27
EvtRandom::Flat
static double Flat()
Definition:
EvtRandom.cc:74
EvtSpinType::spintype
spintype
Definition:
EvtSpinType.hh:31
x
double x[1000]
Definition:
draw_charge_space_coarse_II.cxx:8
source
Generator
BesEvtGen
BesEvtGen-00-04-08
src
EvtGen
EvtGenBase
EvtFlatLineShape.cc
Generated by
1.9.6