BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtDalitzPlot Class Reference

#include <EvtDalitzPlot.hh>

Public Member Functions

 EvtDalitzPlot ()
 EvtDalitzPlot (double mA, double mB, double mC, double bigM, double ldel=0., double rdel=0.)
 EvtDalitzPlot (const EvtDecayMode &mode, double ldel=0., double rdel=0.)
 EvtDalitzPlot (const EvtDalitzPlot &other)
 ~EvtDalitzPlot ()
bool operator== (const EvtDalitzPlot &other) const
const EvtDalitzPlotclone () const
double qAbsMin (EvtCyclic3::Pair i) const
double qAbsMax (EvtCyclic3::Pair i) const
double mAbsMin (EvtCyclic3::Pair i) const
double mAbsMax (EvtCyclic3::Pair i) const
double qResAbsMin (EvtCyclic3::Pair i) const
double qResAbsMax (EvtCyclic3::Pair i) const
double qHelAbsMin (EvtCyclic3::Pair i) const
double qHelAbsMax (EvtCyclic3::Pair i) const
double qSumMin () const
double qSumMax () const
bool fuzzy () const
double getArea (int N=1000, EvtCyclic3::Pair i=EvtCyclic3::AB, EvtCyclic3::Pair j=EvtCyclic3::BC) const
double qMin (EvtCyclic3::Pair i, EvtCyclic3::Pair j, double q) const
double qMax (EvtCyclic3::Pair i, EvtCyclic3::Pair j, double q) const
double cosTh (EvtCyclic3::Pair i1, double q1, EvtCyclic3::Pair i2, double q2) const
double e (EvtCyclic3::Index i, EvtCyclic3::Pair j, double q) const
double p (EvtCyclic3::Index i, EvtCyclic3::Pair j, double q) const
double q (EvtCyclic3::Pair i1, double cosTh, EvtCyclic3::Pair i2, double q2) const
double jacobian (EvtCyclic3::Pair i, double q) const
EvtTwoBodyVertex vD (EvtCyclic3::Pair iRes, double m0, int L) const
EvtTwoBodyVertex vB (EvtCyclic3::Pair iRes, double m0, int L) const
double sum () const
double bigM () const
double mA () const
double mB () const
double mC () const
double m (EvtCyclic3::Index i) const
void print () const
void sanityCheck () const

Protected Attributes

double _mA
double _mB
double _mC
double _bigM
double _ldel
double _rdel

Detailed Description

Definition at line 25 of file EvtDalitzPlot.hh.

Constructor & Destructor Documentation

◆ EvtDalitzPlot() [1/4]

EvtDalitzPlot::EvtDalitzPlot ( )

Definition at line 32 of file EvtDalitzPlot.cc.

33 : _mA( 0. ), _mB( 0. ), _mC( 0. ), _bigM( 0. ), _ldel( 0. ), _rdel( 0. ) {}

Referenced by clone(), EvtDalitzPlot(), and operator==().

◆ EvtDalitzPlot() [2/4]

EvtDalitzPlot::EvtDalitzPlot ( double mA,
double mB,
double mC,
double bigM,
double ldel = 0.,
double rdel = 0. )

Definition at line 35 of file EvtDalitzPlot.cc.

37 : _mA( mA ), _mB( mB ), _mC( mC ), _bigM( bigM ), _ldel( ldel ), _rdel( rdel ) {
39}
void sanityCheck() const
double mB() const
double bigM() const
double mA() const
double mC() const

◆ EvtDalitzPlot() [3/4]

EvtDalitzPlot::EvtDalitzPlot ( const EvtDecayMode & mode,
double ldel = 0.,
double rdel = 0. )

Definition at line 41 of file EvtDalitzPlot.cc.

41 {
46
47 _ldel = ldel;
48 _rdel = rdel;
49
51}
const char * mother() const
const char * dau(int i) const
static double getMeanMass(EvtId i)
Definition EvtPDL.hh:43
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:272

◆ EvtDalitzPlot() [4/4]

EvtDalitzPlot::EvtDalitzPlot ( const EvtDalitzPlot & other)

Definition at line 53 of file EvtDalitzPlot.cc.

54 : _mA( other._mA )
55 , _mB( other._mB )
56 , _mC( other._mC )
57 , _bigM( other._bigM )
58 , _ldel( other._ldel )
59 , _rdel( other._rdel ) {}
Index other(Index i, Index j)

◆ ~EvtDalitzPlot()

EvtDalitzPlot::~EvtDalitzPlot ( )

Definition at line 61 of file EvtDalitzPlot.cc.

61{}

Member Function Documentation

◆ bigM()

double EvtDalitzPlot::bigM ( ) const
inline

Definition at line 90 of file EvtDalitzPlot.hh.

90{ return _bigM; }

Referenced by e(), EvtDalitzPlot(), print(), qMax(), qMin(), and vB().

◆ clone()

const EvtDalitzPlot * EvtDalitzPlot::clone ( ) const

Definition at line 71 of file EvtDalitzPlot.cc.

71{ return new EvtDalitzPlot( *this ); }

◆ cosTh()

double EvtDalitzPlot::cosTh ( EvtCyclic3::Pair i1,
double q1,
EvtCyclic3::Pair i2,
double q2 ) const

Definition at line 214 of file EvtDalitzPlot.cc.

215 {
216 if ( i1 == i2 ) return 1.;
217
218 double qmax = qMax( i1, i2, q2 );
219 double qmin = qMin( i1, i2, q2 );
220
221 double cos = ( qmax + qmin - 2 * q1 ) / ( qmax - qmin );
222
223 return cos;
224}
double qMin(EvtCyclic3::Pair i, EvtCyclic3::Pair j, double q) const
double qMax(EvtCyclic3::Pair i, EvtCyclic3::Pair j, double q) const

Referenced by EvtDalitzPoint::cosTh(), and q().

◆ e()

double EvtDalitzPlot::e ( EvtCyclic3::Index i,
EvtCyclic3::Pair j,
double q ) const

Definition at line 226 of file EvtDalitzPlot.cc.

226 {
227 if ( i == other( j ) )
228 {
229
230 // i does not belong to pair j
231
232 return ( bigM() * bigM() - q - m( i ) * m( i ) ) / 2 / sqrt( q );
233 }
234 else
235 {
236
237 // i and k make pair j
238
239 Index k;
240 if ( first( j ) == i ) k = second( j );
241 else k = first( j );
242
243 double e = ( q + m( i ) * m( i ) - m( k ) * m( k ) ) / 2 / sqrt( q );
244 return e;
245 }
246}
double q(EvtCyclic3::Pair i1, double cosTh, EvtCyclic3::Pair i2, double q2) const
double m(EvtCyclic3::Index i) const
double e(EvtCyclic3::Index i, EvtCyclic3::Pair j, double q) const
Index second(Pair i)
Index first(Pair i)

Referenced by e(), EvtDalitzPoint::e(), p(), and q().

◆ fuzzy()

bool EvtDalitzPlot::fuzzy ( ) const
inline

Definition at line 54 of file EvtDalitzPlot.hh.

54{ return ( _rdel - _ldel != 0. ); }

◆ getArea()

double EvtDalitzPlot::getArea ( int N = 1000,
EvtCyclic3::Pair i = EvtCyclic3::AB,
EvtCyclic3::Pair j = EvtCyclic3::BC ) const

Definition at line 195 of file EvtDalitzPlot.cc.

195 {
196 // Trapezoidal integral over qi. qj can be calculated.
197 // The first and the last point are zero, so they are not counted
198
199 double dh = ( qAbsMax( i ) - qAbsMin( i ) ) / ( (double)N );
200 double sum = 0;
201
202 int ii;
203 for ( ii = 1; ii < N; ii++ )
204 {
205
206 double x = qAbsMin( i ) + ii * dh;
207 double dy = qMax( j, i, x ) - qMin( j, i, x );
208 sum += dy;
209 }
210
211 return sum * dh;
212}
Double_t x[10]
double qAbsMin(EvtCyclic3::Pair i) const
double sum() const
double qAbsMax(EvtCyclic3::Pair i) const

◆ jacobian()

double EvtDalitzPlot::jacobian ( EvtCyclic3::Pair i,
double q ) const

Definition at line 271 of file EvtDalitzPlot.cc.

271 {
272 return 2 * p( first( i ), i, q ) * p( other( i ), i, q ); // J(BC) = 2pA*pB = 2pA*pC
273}
double p(EvtCyclic3::Index i, EvtCyclic3::Pair j, double q) const

◆ m()

double EvtDalitzPlot::m ( EvtCyclic3::Index i) const

Definition at line 84 of file EvtDalitzPlot.cc.

84 {
85
86 double m = _mA;
87 if ( i == B ) m = _mB;
88 else if ( i == C ) m = _mC;
89
90 return m;
91}

Referenced by e(), m(), p(), q(), qAbsMax(), qAbsMin(), qMax(), qMin(), vB(), and vD().

◆ mA()

double EvtDalitzPlot::mA ( ) const
inline

Definition at line 91 of file EvtDalitzPlot.hh.

91{ return _mA; }

Referenced by EvtDalitzPlot().

◆ mAbsMax()

double EvtDalitzPlot::mAbsMax ( EvtCyclic3::Pair i) const

Definition at line 129 of file EvtDalitzPlot.cc.

129{ return sqrt( qAbsMax( i ) ); }

◆ mAbsMin()

double EvtDalitzPlot::mAbsMin ( EvtCyclic3::Pair i) const

Definition at line 127 of file EvtDalitzPlot.cc.

127{ return sqrt( qAbsMin( i ) ); }

◆ mB()

double EvtDalitzPlot::mB ( ) const
inline

Definition at line 92 of file EvtDalitzPlot.hh.

92{ return _mB; }

Referenced by EvtDalitzPlot().

◆ mC()

double EvtDalitzPlot::mC ( ) const
inline

Definition at line 93 of file EvtDalitzPlot.hh.

93{ return _mC; }

Referenced by EvtDalitzPlot().

◆ operator==()

bool EvtDalitzPlot::operator== ( const EvtDalitzPlot & other) const

Definition at line 63 of file EvtDalitzPlot.cc.

63 {
64 bool ret = false;
65 if ( _mA == other._mA && _mB == other._mB && _mC == other._mC && _bigM == other._bigM )
66 ret = true;
67
68 return ret;
69}

◆ p()

double EvtDalitzPlot::p ( EvtCyclic3::Index i,
EvtCyclic3::Pair j,
double q ) const

Definition at line 248 of file EvtDalitzPlot.cc.

248 {
249 double en = e( i, j, q );
250 double p2 = en * en - m( i ) * m( i );
251
252 if ( p2 < 0 )
253 {
254 printf( "Bad value of p2 %f %d %d %f %f\n", p2, i, j, en, m( i ) );
255 assert( 0 );
256 }
257
258 return sqrt( p2 );
259}
double p2[4]

Referenced by jacobian(), EvtDalitzPoint::p(), and q().

◆ print()

void EvtDalitzPlot::print ( ) const

Definition at line 283 of file EvtDalitzPlot.cc.

283 {
284 // masses
285 printf( "Mass M %f\n", bigM() );
286 printf( "Mass mA %f\n", _mA );
287 printf( "Mass mB %f\n", _mB );
288 printf( "Mass mC %f\n", _mC );
289 // limits
290 printf( "Limits qAB %f : %f\n", qAbsMin( AB ), qAbsMax( AB ) );
291 printf( "Limits qBC %f : %f\n", qAbsMin( BC ), qAbsMax( BC ) );
292 printf( "Limits qCA %f : %f\n", qAbsMin( CA ), qAbsMax( CA ) );
293 printf( "Sum q %f\n", sum() );
294 printf( "Limit qsum %f : %f\n", qSumMin(), qSumMax() );
295}
double qSumMin() const
double qSumMax() const

Referenced by EvtDalitzPoint::print().

◆ q()

double EvtDalitzPlot::q ( EvtCyclic3::Pair i1,
double cosTh,
EvtCyclic3::Pair i2,
double q2 ) const

Definition at line 261 of file EvtDalitzPlot.cc.

262 {
263 if ( i1 == i2 ) return q2;
264
265 EvtCyclic3::Index f = first( i1 );
266 EvtCyclic3::Index s = second( i1 );
267 return m( f ) * m( f ) + m( s ) * m( s ) + 2 * e( f, i2, q2 ) * e( s, i2, q2 ) -
268 2 * p( f, i2, q2 ) * p( s, i2, q2 ) * cosTh;
269}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
XmlRpcServer s
double cosTh(EvtCyclic3::Pair i1, double q1, EvtCyclic3::Pair i2, double q2) const

Referenced by e(), jacobian(), p(), qMax(), and qMin().

◆ qAbsMax()

double EvtDalitzPlot::qAbsMax ( EvtCyclic3::Pair i) const

Definition at line 102 of file EvtDalitzPlot.cc.

102 {
103 Index j = other( i );
104 return ( _bigM - m( j ) ) * ( _bigM - m( j ) );
105}

Referenced by getArea(), EvtDalitzPoint::isValid(), mAbsMax(), print(), qHelAbsMax(), qHelAbsMin(), and qResAbsMax().

◆ qAbsMin()

double EvtDalitzPlot::qAbsMin ( EvtCyclic3::Pair i) const

Definition at line 95 of file EvtDalitzPlot.cc.

95 {
96 Index j = first( i );
97 Index k = second( i );
98
99 return ( m( j ) + m( k ) ) * ( m( j ) + m( k ) );
100}

Referenced by getArea(), EvtDalitzPoint::isValid(), mAbsMin(), print(), qHelAbsMax(), qHelAbsMin(), and qResAbsMin().

◆ qHelAbsMax()

double EvtDalitzPlot::qHelAbsMax ( EvtCyclic3::Pair i) const

Definition at line 121 of file EvtDalitzPlot.cc.

121 {
122 Pair j = next( i );
123 Pair k = prev( i );
124 return ( qAbsMax( j ) - qAbsMin( k ) ) / 2.;
125}
Index next(Index i)
Index prev(Index i)
Definition EvtCyclic3.cc:94

◆ qHelAbsMin()

double EvtDalitzPlot::qHelAbsMin ( EvtCyclic3::Pair i) const

Definition at line 115 of file EvtDalitzPlot.cc.

115 {
116 Pair j = next( i );
117 Pair k = prev( i );
118 return ( qAbsMin( j ) - qAbsMax( k ) ) / 2.;
119}

◆ qMax()

double EvtDalitzPlot::qMax ( EvtCyclic3::Pair i,
EvtCyclic3::Pair j,
double q ) const

Definition at line 165 of file EvtDalitzPlot.cc.

165 {
166
167 if ( i == j ) return q;
168 else
169 {
170
171 // Particle pair j defines the rest-frame
172 // 0 - particle common to r.f. and angle calculations
173 // 1 - particle belonging to r.f. but not angle
174 // 2 - particle not belonging to r.f.
175
176 Index k0 = common( i, j );
177 Index k2 = other( j );
178 Index k1 = other( k0, k2 );
179
180 // Energy, momentum of particle common to rest-frame and angle
181 EvtTwoBodyKine jpair( m( k0 ), m( k1 ), sqrt( q ) );
182 double ek = jpair.e( EvtTwoBodyKine::A, EvtTwoBodyKine::AB );
183 double pk = jpair.p();
184
185 // Energy and momentum of the other particle
186 EvtTwoBodyKine mother( sqrt( q ), m( k2 ), bigM() );
187 double ej = mother.e( EvtTwoBodyKine::B, EvtTwoBodyKine::A );
188 double pj = mother.p( EvtTwoBodyKine::A );
189
190 // See PDG 34.4.3.1
191 return ( ek + ej ) * ( ek + ej ) - ( pk - pj ) * ( pk - pj );
192 }
193}
Index common(Pair i, Pair j)

Referenced by cosTh(), getArea(), and EvtDalitzPoint::qMax().

◆ qMin()

double EvtDalitzPlot::qMin ( EvtCyclic3::Pair i,
EvtCyclic3::Pair j,
double q ) const

Definition at line 133 of file EvtDalitzPlot.cc.

133 {
134 if ( i == j ) return q;
135
136 else
137 {
138
139 // Particle pair j defines the rest-frame
140 // 0 - particle common to r.f. and angle calculations
141 // 1 - particle belonging to r.f. but not angle
142 // 2 - particle not belonging to r.f.
143
144 Index k0 = common( i, j );
145 Index k2 = other( j );
146 Index k1 = other( k0, k2 );
147
148 // Energy, momentum of particle common to rest-frame and angle
149 EvtTwoBodyKine jpair( m( k0 ), m( k1 ), sqrt( q ) );
150 double pk = jpair.p();
151 double ek = jpair.e( EvtTwoBodyKine::A, EvtTwoBodyKine::AB );
152
153 // Energy and momentum of the other particle
154 EvtTwoBodyKine mother( sqrt( q ), m( k2 ), bigM() );
155 double ej = mother.e( EvtTwoBodyKine::B, EvtTwoBodyKine::A );
156 double pj = mother.p( EvtTwoBodyKine::A );
157
158 // See PDG 34.4.3.1
159 return ( ek + ej ) * ( ek + ej ) - ( pk + pj ) * ( pk + pj );
160 }
161}

Referenced by cosTh(), getArea(), and EvtDalitzPoint::qMin().

◆ qResAbsMax()

double EvtDalitzPlot::qResAbsMax ( EvtCyclic3::Pair i) const

Definition at line 111 of file EvtDalitzPlot.cc.

111 {
112 return qAbsMax( i ) - sum() / 3.;
113}

◆ qResAbsMin()

double EvtDalitzPlot::qResAbsMin ( EvtCyclic3::Pair i) const

Definition at line 107 of file EvtDalitzPlot.cc.

107 {
108 return qAbsMin( i ) - sum() / 3.;
109}

◆ qSumMax()

double EvtDalitzPlot::qSumMax ( ) const
inline

Definition at line 53 of file EvtDalitzPlot.hh.

53{ return sum() + _rdel; }

Referenced by print().

◆ qSumMin()

double EvtDalitzPlot::qSumMin ( ) const
inline

Definition at line 52 of file EvtDalitzPlot.hh.

52{ return sum() + _ldel; }

Referenced by print().

◆ sanityCheck()

void EvtDalitzPlot::sanityCheck ( ) const

Definition at line 73 of file EvtDalitzPlot.cc.

73 {
74 if ( _mA < 0 || _mB < 0 || _mC < 0 || _bigM <= 0 || _bigM - _mA - _mB - _mC < 0. )
75 {
76
77 printf( "Invalid Dalitz plot %f %f %f %f\n", _mA, _mB, _mC, _bigM );
78 assert( 0 );
79 }
80 assert( _ldel <= 0. );
81 assert( _rdel >= 0. );
82}

Referenced by EvtDalitzPlot(), and EvtDalitzPlot().

◆ sum()

double EvtDalitzPlot::sum ( ) const

Definition at line 93 of file EvtDalitzPlot.cc.

93{ return _mA * _mA + _mB * _mB + _mC * _mC + _bigM * _bigM; }

Referenced by EvtDalitzPoint::EvtDalitzPoint(), getArea(), print(), qResAbsMax(), qResAbsMin(), qSumMax(), and qSumMin().

◆ vB()

EvtTwoBodyVertex EvtDalitzPlot::vB ( EvtCyclic3::Pair iRes,
double m0,
int L ) const

Definition at line 279 of file EvtDalitzPlot.cc.

279 {
280 return EvtTwoBodyVertex( m0, m( other( iRes ) ), bigM(), L );
281}

◆ vD()

EvtTwoBodyVertex EvtDalitzPlot::vD ( EvtCyclic3::Pair iRes,
double m0,
int L ) const

Definition at line 275 of file EvtDalitzPlot.cc.

275 {
276 return EvtTwoBodyVertex( m( first( iRes ) ), m( second( iRes ) ), m0, L );
277}

Member Data Documentation

◆ _bigM

double EvtDalitzPlot::_bigM
protected

◆ _ldel

double EvtDalitzPlot::_ldel
protected

◆ _mA

double EvtDalitzPlot::_mA
protected

◆ _mB

double EvtDalitzPlot::_mB
protected

◆ _mC

double EvtDalitzPlot::_mC
protected

◆ _rdel

double EvtDalitzPlot::_rdel
protected

The documentation for this class was generated from the following files: