BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtPto3PAmpFactory Class Reference

#include <EvtPto3PAmpFactory.hh>

+ Inheritance diagram for EvtPto3PAmpFactory:

Public Member Functions

 EvtPto3PAmpFactory (const EvtDalitzPlot &dp)
 
 EvtPto3PAmpFactory (const EvtPto3PAmpFactory &other)
 
virtual ~EvtPto3PAmpFactory ()
 
virtual EvtAmpFactory< EvtDalitzPoint > * clone () const
 
virtual void processAmp (EvtComplex c, std::vector< std::string > vv, bool conj)
 
- Public Member Functions inherited from EvtAmpFactory< EvtDalitzPoint >
 EvtAmpFactory ()
 
 EvtAmpFactory (const EvtAmpFactory< EvtDalitzPoint > &other)
 
virtual ~EvtAmpFactory ()
 
virtual EvtAmpFactory< EvtDalitzPoint > * clone () const=0
 
virtual void build (const EvtMultiChannelParser &parser, int nItg)
 
virtual void processAmp (EvtComplex c, std::vector< std::string > v, bool conj=false)=0
 
bool isCPModel () const
 
double dm () const
 
void setVerbose ()
 
EvtAmplitudeSum< EvtDalitzPoint > * getAmp () const
 
EvtAmplitude< EvtDalitzPoint > * getAmp (int i) const
 
EvtAmplitudeSum< EvtDalitzPoint > * getAmpConj () const
 
EvtPdfSum< EvtDalitzPoint > * getPC () const
 
EvtPdf< EvtDalitzPoint > * getPC (int i) const
 
const char * compName (int i) const
 
EvtComplex getCoeff (int i) const
 
double getTermCoeff (int i) const
 
double getTermCoeff (int type, int i, int j) const
 

Additional Inherited Members

- Protected Attributes inherited from EvtAmpFactory< EvtDalitzPoint >
EvtAmplitudeSum< EvtDalitzPoint > * _amp
 
EvtAmplitudeSum< EvtDalitzPoint > * _ampConj
 
EvtPdfSum< EvtDalitzPoint > * _pc
 
std::vector< std::string > _names
 
double _dm
 
bool _verbose
 

Detailed Description

Definition at line 27 of file EvtPto3PAmpFactory.hh.

Constructor & Destructor Documentation

◆ EvtPto3PAmpFactory() [1/2]

EvtPto3PAmpFactory::EvtPto3PAmpFactory ( const EvtDalitzPlot dp)
inline

Definition at line 31 of file EvtPto3PAmpFactory.hh.

◆ EvtPto3PAmpFactory() [2/2]

EvtPto3PAmpFactory::EvtPto3PAmpFactory ( const EvtPto3PAmpFactory other)
inline

Definition at line 34 of file EvtPto3PAmpFactory.hh.

35 : EvtAmpFactory<EvtDalitzPoint>(other), _dp(other._dp)
36 {}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ ~EvtPto3PAmpFactory()

virtual EvtPto3PAmpFactory::~EvtPto3PAmpFactory ( )
inlinevirtual

Definition at line 37 of file EvtPto3PAmpFactory.hh.

38 {}

Member Function Documentation

◆ clone()

virtual EvtAmpFactory< EvtDalitzPoint > * EvtPto3PAmpFactory::clone ( ) const
inlinevirtual

Implements EvtAmpFactory< EvtDalitzPoint >.

Definition at line 40 of file EvtPto3PAmpFactory.hh.

41 {
42 return new EvtPto3PAmpFactory(*this);
43 }

◆ processAmp()

void EvtPto3PAmpFactory::processAmp ( EvtComplex  c,
std::vector< std::string >  vv,
bool  conj 
)
virtual

Implements EvtAmpFactory< EvtDalitzPoint >.

Definition at line 42 of file EvtPto3PAmpFactory.cc.

43{
44 if(_verbose) {
45
46 printf("Make amplitude\n");
47 unsigned i;
48 for(i=0;i<vv.size();i++) printf("%s\n",vv[i].c_str());
49 printf("\n");
50 }
51
54 std::string name;
55
56 int i;
57 if(vv[0] == "PHASESPACE") {
58
59 pdf = new EvtDalitzFlatPdf(_dp);
61 name = "NR";
62 }
63 else if(vv[0] == "RESONANCE") {
64
65 EvtPto3PAmp* partAmp = 0;
66
67 // RESONANCE stanza
68
69 Pair pairRes = strToPair(vv[1].c_str());
71 double mR, gR;
72 name = vv[2];
73 EvtId resId = EvtPDL::getId(vv[2]);
74 if(_verbose) printf("Particles %s form resonance %s\n",vv[1].c_str(),vv[2].c_str());
75
76 // If no valid particle name is given, assume that
77 // it is the spin, the mass and the width of the particle.
78
79 if(resId.getId() == -1) {
80
81 switch(atoi(vv[2].c_str())) {
82
83 case 0: { spinR = EvtSpinType::SCALAR; break; }
84 case 1: { spinR = EvtSpinType::VECTOR; break; }
85 case 2: { spinR = EvtSpinType::TENSOR; break; }
86 case 3: { spinR = EvtSpinType::SPIN3; break; }
87 case 4: { spinR = EvtSpinType::SPIN4; break; }
88 default: { assert(0); break; }
89 }
90
91 mR = strtod(vv[3].c_str(),0);
92 gR = strtod(vv[4].c_str(),0);
93 i = 4;
94 }
95 else {
96
97 // For a valid particle get spin, mass and width
98
99 spinR = EvtPDL::getSpinType(resId);
100 mR = EvtPDL::getMeanMass(resId);
101 gR = EvtPDL::getWidth(resId);
102 i = 2;
103
104 // It's possible to specify mass and width of a particle
105 // explicitly
106
107 if(vv[3] != "ANGULAR") {
108
109 if(_verbose)
110 printf("Setting m(%s)=%s g(%s)=%s\n",
111 vv[2].c_str(),vv[3].c_str(),vv[2].c_str(),vv[4].c_str());
112
113 mR = strtod(vv[3].c_str(),0);
114 gR = strtod(vv[4].c_str(),0);
115 i = 4;
116 }
117 }
118
119 // ANGULAR stanza
120
121 if(vv[++i] != "ANGULAR") {
122
123 printf("%s instead of ANGULAR\n",vv[i].c_str());
124 exit(0);
125 }
126 Pair pairAng = strToPair(vv[++i].c_str());
127 if(_verbose) printf("Angle is measured between particles %s\n",vv[i].c_str());
128
129 // TYPE stanza
130
131 assert(vv[++i] == "TYPE");
132 std::string type = vv[++i];
133 if(_verbose) printf("Propagator type %s\n",vv[i].c_str());
134
135 if(type == "NBW") {
136
137 EvtPropBreitWigner prop(mR,gR);
138 partAmp = new EvtPto3PAmp(_dp,pairAng,pairRes,spinR,prop,EvtPto3PAmp::NBW);
139 }
140 else if(type == "RBW_ZEMACH") {
141
142 EvtPropBreitWignerRel prop(mR,gR);
143 partAmp = new EvtPto3PAmp(_dp,pairAng,pairRes,spinR,prop,EvtPto3PAmp::RBW_ZEMACH);
144 }
145 else if(type == "RBW_KUEHN") {
146
147 EvtPropBreitWignerRel prop(mR,gR);
148 partAmp = new EvtPto3PAmp(_dp,pairAng,pairRes,spinR,prop,EvtPto3PAmp::RBW_KUEHN);
149 }
150 else if(type == "RBW_CLEO") {
151
152 EvtPropBreitWignerRel prop(mR,gR);
153 partAmp = new EvtPto3PAmp(_dp,pairAng,pairRes,spinR,prop,EvtPto3PAmp::RBW_CLEO);
154 }
155 else assert(0);
156
157 // Optional DVFF, BVFF stanzas
158
159 if(i < vv.size() - 1) {
160 if(vv[i+1] == "DVFF") {
161 i++;
162 if(vv[++i] == "BLATTWEISSKOPF") {
163
164 double R = strtod(vv[++i].c_str(),0);
165 partAmp->set_fd(R);
166 }
167 else assert(0);
168 }
169 }
170
171 if(i < vv.size() - 1) {
172 if(vv[i+1] == "BVFF") {
173 i++;
174 if(vv[++i] == "BLATTWEISSKOPF") {
175
176 if(_verbose) printf("BVFF=%s\n",vv[i].c_str());
177 double R = strtod(vv[++i].c_str(),0);
178 partAmp->set_fb(R);
179 }
180 else assert(0);
181 }
182 }
183
184 i++;
185
186 pdf = new EvtDalitzResPdf(_dp,mR,gR,pairRes);
187 amp = partAmp;
188 }
189
190 assert(amp);
191 assert(pdf);
192
193 if(!conj) {
194
195 _amp->addOwnedTerm(c,amp);
196 _pc->addOwnedTerm(abs2(c),pdf);
197 }
198 else {
199
200 _ampConj->addOwnedTerm(c,amp);
201 delete pdf;
202 }
203 _names.push_back(name);
204}
Evt3Rank3C conj(const Evt3Rank3C &t2)
Definition: Evt3Rank3C.cc:175
double abs2(const EvtComplex &c)
Definition: EvtComplex.hh:221
EvtPdfSum< EvtDalitzPoint > * _pc
EvtAmplitudeSum< EvtDalitzPoint > * _ampConj
EvtAmplitudeSum< EvtDalitzPoint > * _amp
std::vector< std::string > _names
void addOwnedTerm(EvtComplex c, EvtAmplitude< T > *amp)
Definition: EvtId.hh:27
int getId() const
Definition: EvtId.hh:41
static double getWidth(EvtId i)
Definition: EvtPDL.hh:54
static double getMeanMass(EvtId i)
Definition: EvtPDL.hh:45
static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.hh:61
static EvtId getId(const std::string &name)
Definition: EvtPDL.cc:287
void addOwnedTerm(double c, EvtPdf< T > *pdf)
Definition: EvtPdfSum.hh:35
Definition: EvtPdf.hh:57
void set_fb(double R)
Definition: EvtPto3PAmp.cc:62
void set_fd(double R)
Definition: EvtPto3PAmp.cc:57
Pair strToPair(const char *str)
Definition: EvtCyclic3.cc:243
char * c_str(Index i)
Definition: EvtCyclic3.cc:252
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition: TUtil.h:27

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