BOSS 8.0.0
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 ()
virtual ~EvtAmpFactory ()
virtual void build (const EvtMultiChannelParser &parser, int nItg)
bool isCPModel () const
double dm () const
void setVerbose ()
EvtAmplitudeSum< EvtDalitzPoint > * getAmp () const
EvtAmplitudeSum< EvtDalitzPoint > * getAmpConj () const
EvtPdfSum< EvtDalitzPoint > * getPC () const
const char * compName (int i) const
EvtComplex getCoeff (int i) const
double getTermCoeff (int i) 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 30 of file EvtPto3PAmpFactory.hh.

Referenced by clone(), and EvtPto3PAmpFactory().

◆ EvtPto3PAmpFactory() [2/2]

EvtPto3PAmpFactory::EvtPto3PAmpFactory ( const EvtPto3PAmpFactory & other)
inline

Definition at line 31 of file EvtPto3PAmpFactory.hh.

32 : EvtAmpFactory<EvtDalitzPoint>( other ), _dp( other._dp ) {}
Index other(Index i, Index j)

◆ ~EvtPto3PAmpFactory()

virtual EvtPto3PAmpFactory::~EvtPto3PAmpFactory ( )
inlinevirtual

Definition at line 33 of file EvtPto3PAmpFactory.hh.

33{}

Member Function Documentation

◆ clone()

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

Implements EvtAmpFactory< EvtDalitzPoint >.

Definition at line 35 of file EvtPto3PAmpFactory.hh.

35 {
36 return new EvtPto3PAmpFactory( *this );
37 }
EvtPto3PAmpFactory(const EvtDalitzPlot &dp)

◆ 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.

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

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