Skip to content

Commit b9f322e

Browse files
committed
improvements in consistent fucntions. Add pdl file needed for D4piTest example.
1 parent 054b4d4 commit b9f322e

File tree

7 files changed

+592
-4
lines changed

7 files changed

+592
-4
lines changed

evt.pdl

+552
Large diffs are not rendered by default.

include/Particle.h

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ class Particle : public AmplitudeComponent
5959
double mass() const
6060
{ return Mass_; }
6161

62+
/// Get name
63+
std::string name() const
64+
{ return Name_; }
65+
6266
/// @}
6367

6468
/// \name Setters

programs/D4piTest.cxx

+12-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ int main( int argc, char** argv)
2020
double radialSize = 1.;
2121
yap::InitialStateParticle* D = factory.createInitialStateParticle(421, radialSize);
2222

23-
// a_1 channels
24-
yap::Resonance* sigma = factory.createResonanceBreitWigner(9000221, radialSize);
2523

2624
// rho rho
2725
yap::Resonance* rho = factory.createResonanceBreitWigner(113, radialSize);
@@ -45,6 +43,18 @@ int main( int argc, char** argv)
4543
factory.createChannel(D, rho, omega, 2);
4644

4745

46+
// a_1 channels
47+
yap::Resonance* sigma = factory.createResonanceBreitWigner(9000221, radialSize);
48+
factory.createChannel(sigma, piPlus, piMinus, 0);
49+
50+
yap::Resonance* a_1 = factory.createResonanceBreitWigner(20213, radialSize);
51+
factory.createChannel(a_1, sigma, piPlus, 1);
52+
53+
factory.createChannel(a_1, rho, piPlus, 0);
54+
factory.createChannel(a_1, rho, piPlus, 2);
55+
56+
factory.createChannel(D, a_1, piMinus, 1);
57+
4858

4959

5060

src/BlattWeisskopf.cxx

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Amp BlattWeisskopf::amplitude(DataPoint& d)
1818
//-------------------------
1919
bool BlattWeisskopf::consistent() const
2020
{
21+
/// \todo implement
2122
return true;
2223
}
2324

src/BreitWigner.cxx

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "BreitWigner.h"
22

33
#include "Constants.h"
4+
#include "logging.h"
45

56
namespace yap {
67

@@ -27,7 +28,17 @@ Amp BreitWigner::amplitude(double s)
2728
//-------------------------
2829
bool BreitWigner::consistent() const
2930
{
30-
return (mass() > 0 && width() > 0);
31+
bool consistent = true;
32+
if (mass() <= 0) {
33+
LOG(ERROR) << "BreitWigner::consistent() - mass <= 0";
34+
consistent = false;
35+
}
36+
if (width() <= 0) {
37+
LOG(ERROR) << "BreitWigner::consistent() - width <= 0";
38+
consistent = false;
39+
}
40+
41+
return consistent;
3142
}
3243

3344
}

src/DecayChannel.cxx

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,16 @@ bool DecayChannel::consistent() const
2727
// check daughters
2828
for (Daughters::const_iterator d = Daughters_.begin(); d != Daughters_.end(); ++d)
2929
consistent &= (*d)->consistent();
30+
if (! consistent) {
31+
LOG(ERROR) << "DecayChannel::consistent() - daughter inconsistent";
32+
}
3033

3134
consistent &= BlattWeisskopf_.consistent();
3235
consistent &= SpinAmplitude_.consistent();
3336

3437
// check size of spin amplitude quantum numbers and size of daughters
3538
if (SpinAmplitude_.finalQuantumNumbers().size() != Daughters_.size()) {
36-
LOG(ERROR) << "DecayChannel::consistent() - quantum mbumbers object and daughters object size mismatch";
39+
LOG(ERROR) << "DecayChannel::consistent() - quantum numbers object and daughters object size mismatch";
3740
consistent = false;
3841
}
3942

@@ -101,6 +104,9 @@ bool DecayChannel::consistent() const
101104
consistent = false;
102105
}
103106

107+
if (! consistent) {
108+
LOG(ERROR) << "Channel is not consistent: " << this->parent()->name() << " - > " << this->daughters()[0]->name() << " + " << this->daughters()[1]->name() << "\n";
109+
}
104110
return consistent;
105111
}
106112

src/Resonance.cxx

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ bool Resonance::consistent() const
2525
consistent &= DecayingParticle::consistent();
2626
consistent &= massShape()->consistent();
2727

28+
if (! consistent) {
29+
LOG(ERROR) << "Resonance is not consistent: " << this->name() << "\n";
30+
}
31+
2832
return consistent;
2933
}
3034

0 commit comments

Comments
 (0)