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

#include <EvtSVSCPiso.hh>

Inheritance diagram for EvtSVSCPiso:

Public Member Functions

 EvtSVSCPiso ()
virtual ~EvtSVSCPiso ()
void getName (std::string &name)
EvtDecayBaseclone ()
void init ()
void initProbMax ()
void decay (EvtParticle *p)
Public Member Functions inherited from EvtDecayAmp
void makeDecay (EvtParticle *p)
void setWeight (double weight)
void vertex (const EvtComplex &amp)
void vertex (int i1, const EvtComplex &amp)
void vertex (int i1, int i2, const EvtComplex &amp)
void vertex (int i1, int i2, int i3, const EvtComplex &amp)
void vertex (int *i1, const EvtComplex &amp)
virtual ~EvtDecayAmp ()
Public Member Functions inherited from EvtDecayBase
virtual std::string commandName ()
virtual void command (std::string cmd)
double getProbMax (double prob)
double resetProbMax (double prob)
 EvtDecayBase ()
virtual ~EvtDecayBase ()
virtual bool matchingDecay (const EvtDecayBase &other) const
EvtId getParentId ()
double getBranchingFraction ()
void disableCheckQ ()
void checkQ ()
int getNDaug ()
EvtIdgetDaugs ()
EvtId getDaug (int i)
int getNArg ()
int getPHOTOS ()
void setPHOTOS ()
void setVerbose ()
void setSummary ()
double * getArgs ()
std::string * getArgsStr ()
double getArg (int j)
std::string getArgStr (int j)
std::string getModelName ()
int getDSum ()
int summary ()
int verbose ()
void saveDecayInfo (EvtId ipar, int ndaug, EvtId *daug, int narg, std::vector< std::string > &args, std::string name, double brfr)
void printSummary ()
void setProbMax (double prbmx)
void noProbMax ()
void checkNArg (int a1, int a2=-1, int a3=-1, int a4=-1)
void checkNDaug (int d1, int d2=-1)
void checkSpinParent (EvtSpinType::spintype sp)
void checkSpinDaughter (int d1, EvtSpinType::spintype sp)
virtual int nRealDaughters ()

Additional Inherited Members

Static Public Member Functions inherited from EvtDecayBase
static void findMasses (EvtParticle *p, int ndaugs, EvtId daugs[10], double masses[10])
static void findMass (EvtParticle *p)
static double findMaxMass (EvtParticle *p)
Protected Member Functions inherited from EvtDecayBase
bool daugsDecayedByParentModel ()
Protected Attributes inherited from EvtDecayAmp
EvtAmp _amp2
Protected Attributes inherited from EvtDecayBase
bool _daugsDecayedByParentModel

Detailed Description

Definition at line 28 of file EvtSVSCPiso.hh.

Constructor & Destructor Documentation

◆ EvtSVSCPiso()

EvtSVSCPiso::EvtSVSCPiso ( )
inline

Definition at line 31 of file EvtSVSCPiso.hh.

31{}

Referenced by clone().

◆ ~EvtSVSCPiso()

EvtSVSCPiso::~EvtSVSCPiso ( )
virtual

Definition at line 38 of file EvtSVSCPiso.cc.

38{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtSVSCPiso::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 42 of file EvtSVSCPiso.cc.

42{ return new EvtSVSCPiso; }

◆ decay()

void EvtSVSCPiso::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 96 of file EvtSVSCPiso.cc.

96 {
97
98 // added by Lange Jan4,2000
99 static EvtId B0 = EvtPDL::getId( "B0" );
100 static EvtId B0B = EvtPDL::getId( "anti-B0" );
101
102 double t;
103 EvtId other_b;
104 int charged( 0 );
105
106 int first_time = 0;
107 int flip = 0;
108 EvtId ds[2];
109
110 // randomly generate the tag (B0 or B0B)
111
112 double tag = EvtRandom::Flat( 0.0, 1.0 );
113 if ( tag < 0.5 )
114 {
115
116 EvtCPUtil::OtherB( p, t, other_b, 1.0 );
117 other_b = B0;
118 }
119 else
120 {
121
122 EvtCPUtil::OtherB( p, t, other_b, 0.0 );
123 other_b = B0B;
124 }
125
126 if ( p->getNDaug() == 0 ) first_time = 1;
127
128 if ( first_time )
129 {
130 if ( EvtRandom::Flat( 0.0, 1.0 ) < getArg( 3 ) ) flip = 1;
131 }
132 else
133 {
134 if ( getDaug( 0 ) != p->getDaug( 0 )->getId() ) flip = 1;
135 }
136
137 if ( !flip )
138 {
139 ds[0] = getDaug( 0 );
140 ds[1] = getDaug( 1 );
141 }
142 else
143 {
144 ds[0] = EvtPDL::chargeConj( getDaug( 0 ) );
145 ds[1] = EvtPDL::chargeConj( getDaug( 1 ) );
146 }
147
148 p->initializePhaseSpace( getNDaug(), ds );
149
150 EvtParticle *v, *s;
151 v = p->getDaug( 0 );
152 s = p->getDaug( 1 );
153
154 EvtComplex amp;
155
156 EvtComplex A_f, Abar_f;
157 EvtComplex A_fbar, Abar_fbar;
158 EvtComplex Apm, Apm_bar, Amp, Amp_bar;
159
160 EvtComplex Tp0, Tp0_bar, T0p, T0p_bar, Tpm, Tpm_bar, Tmp, Tmp_bar;
161 EvtComplex P1, P1_bar, P0, P0_bar;
162
163 Tp0 = EvtComplex( getArg( 3 ) * cos( getArg( 4 ) ), getArg( 3 ) * sin( getArg( 4 ) ) );
164 Tp0_bar = EvtComplex( getArg( 5 ) * cos( getArg( 6 ) ), getArg( 5 ) * sin( getArg( 6 ) ) );
165 T0p = EvtComplex( getArg( 7 ) * cos( getArg( 8 ) ), getArg( 7 ) * sin( getArg( 8 ) ) );
166 T0p_bar = EvtComplex( getArg( 9 ) * cos( getArg( 10 ) ), getArg( 9 ) * sin( getArg( 10 ) ) );
167 Tpm = EvtComplex( getArg( 11 ) * cos( getArg( 12 ) ), getArg( 11 ) * sin( getArg( 12 ) ) );
168 Tpm_bar =
169 EvtComplex( getArg( 13 ) * cos( getArg( 14 ) ), getArg( 13 ) * sin( getArg( 14 ) ) );
170 Tmp = EvtComplex( getArg( 15 ) * cos( getArg( 16 ) ), getArg( 15 ) * sin( getArg( 16 ) ) );
171 Tmp_bar =
172 EvtComplex( getArg( 17 ) * cos( getArg( 18 ) ), getArg( 17 ) * sin( getArg( 18 ) ) );
173 P0 = EvtComplex( getArg( 19 ) * cos( getArg( 20 ) ), getArg( 19 ) * sin( getArg( 20 ) ) );
174 P0_bar =
175 EvtComplex( getArg( 21 ) * cos( getArg( 22 ) ), getArg( 21 ) * sin( getArg( 22 ) ) );
176 P1 = EvtComplex( getArg( 23 ) * cos( getArg( 24 ) ), getArg( 23 ) * sin( getArg( 24 ) ) );
177 P1_bar =
178 EvtComplex( getArg( 25 ) * cos( getArg( 26 ) ), getArg( 25 ) * sin( getArg( 26 ) ) );
179
180 //***********************charged modes****************************
181
182 if ( ( EvtPDL::chg3( getDaug( 0 ) ) > 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) == 0 ) )
183 {
184
185 // V+ S0, so T+0 + 2 P1
186
187 charged = 1;
188 A_f = Tp0 + 2.0 * P1;
189 }
190
191 if ( ( EvtPDL::chg3( getDaug( 0 ) ) < 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) == 0 ) )
192 {
193
194 // V- S0, so T+0_bar + 2P1_bar
195
196 charged = 1;
197 A_f = Tp0_bar + 2.0 * P1_bar;
198 }
199
200 if ( ( EvtPDL::chg3( getDaug( 0 ) ) == 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) > 0 ) )
201 {
202
203 // V0 S+, so T0+ - 2 P1
204
205 charged = 1;
206 A_f = T0p - 2.0 * P1;
207 }
208
209 if ( ( EvtPDL::chg3( getDaug( 0 ) ) == 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) < 0 ) )
210 {
211
212 // V0 S-, so T0+_bar - 2 P1_bar
213
214 charged = 1;
215 A_f = T0p_bar - 2.0 * P1_bar;
216 }
217
218 //***********************neutral modes***************************
219
220 // V+ S-, so Af = T+- + P1 + P0
221 Apm = Tpm + P1 + P0;
222 Apm_bar = Tpm_bar + P1_bar + P0_bar;
223
224 // V- S+, so Af = T-+ - P1 + P0
225 Amp = Tmp - P1 + P0;
226 Amp_bar = Tmp_bar - P1_bar + P0;
227
228 if ( ( EvtPDL::chg3( getDaug( 0 ) ) > 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) < 0 ) )
229 {
230
231 // V+ S-
232 charged = 0;
233 A_f = Apm;
234 Abar_f = Apm_bar;
235 A_fbar = Amp;
236 Abar_fbar = Amp_bar;
237 }
238
239 if ( ( EvtPDL::chg3( getDaug( 0 ) ) < 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) > 0 ) )
240 {
241
242 // V- S+
243 charged = 0;
244 A_f = Amp;
245 Abar_f = Amp_bar;
246 A_fbar = Apm;
247 Abar_fbar = Apm_bar;
248 }
249
250 if ( ( EvtPDL::chg3( getDaug( 0 ) ) == 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) == 0 ) )
251 {
252
253 // V0 S0
254 charged = 0;
255 A_f = T0p + Tp0 - Tpm - Tmp - 2.0 * P0;
256 Abar_f = T0p_bar + Tp0_bar - Tpm_bar - Tmp_bar - 2.0 * P0_bar;
257 A_fbar = A_f;
258 Abar_fbar = Abar_f;
259 }
260
261 if ( charged == 0 )
262 {
263
264 if ( !flip )
265 {
266 if ( other_b == B0B )
267 {
268
269 amp = A_f * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
270 EvtComplex( cos( -2.0 * getArg( 0 ) ), sin( -2.0 * getArg( 0 ) ) ) *
271 EvtComplex( 0.0, 1.0 ) * Abar_f *
272 sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
273 }
274 if ( other_b == B0 )
275 {
276
277 amp = A_f * EvtComplex( cos( 2.0 * getArg( 0 ) ), sin( 2.0 * getArg( 0 ) ) ) *
278 EvtComplex( 0.0, 1.0 ) * sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
279 Abar_f * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
280 }
281 }
282 else
283 {
284 if ( other_b == B0B )
285 {
286
287 amp = A_fbar * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
288 EvtComplex( cos( -2.0 * getArg( 0 ) ), sin( -2.0 * getArg( 0 ) ) ) *
289 EvtComplex( 0.0, 1.0 ) * Abar_fbar *
290 sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
291 }
292 if ( other_b == B0 )
293 {
294
295 amp = A_fbar * EvtComplex( cos( 2.0 * getArg( 0 ) ), sin( 2.0 * getArg( 0 ) ) ) *
296 EvtComplex( 0.0, 1.0 ) * sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
297 Abar_fbar * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
298 }
299 }
300 }
301 else amp = A_f;
302
303 EvtVector4R p4_parent;
304
305 p4_parent = v->getP4() + s->getP4();
306
307 double norm = 1.0 / v->getP4().d3mag();
308
309 vertex( 0, amp * norm * p4_parent * ( v->epsParent( 0 ) ) );
310 vertex( 1, amp * norm * p4_parent * ( v->epsParent( 1 ) ) );
311 vertex( 2, amp * norm * p4_parent * ( v->epsParent( 2 ) ) );
312
313 return;
314}
XmlRpcServer s
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
static void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition EvtCPUtil.cc:225
static const double c
Definition EvtConst.hh:31
void vertex(const EvtComplex &amp)
double getArg(int j)
EvtId getDaug(int i)
static EvtId chargeConj(EvtId id)
Definition EvtPDL.cc:193
static int chg3(EvtId i)
Definition EvtPDL.hh:65
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:272
EvtId getId() const
int getNDaug() const
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
static double Flat()
Definition EvtRandom.cc:69
int t()
Definition t.c:1

◆ getName()

void EvtSVSCPiso::getName ( std::string & name)
virtual

Implements EvtDecayBase.

Definition at line 40 of file EvtSVSCPiso.cc.

40{ model_name = "SVS_CP_ISO"; }

◆ init()

void EvtSVSCPiso::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 44 of file EvtSVSCPiso.cc.

44 {
45
46 // check that there are 26 arguments
47 checkNArg( 26 );
48 checkNDaug( 2 );
49
51
54}
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)

◆ initProbMax()

void EvtSVSCPiso::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 56 of file EvtSVSCPiso.cc.

56 {
57
58 // this might need some revision..
59
60 if ( ( EvtPDL::chg3( getDaug( 0 ) ) > 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) == 0 ) )
61 { setProbMax( 2.0 * ( getArg( 3 ) * getArg( 3 ) + 4.0 * getArg( 23 ) * getArg( 23 ) ) ); }
62
63 if ( ( EvtPDL::chg3( getDaug( 0 ) ) < 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) == 0 ) )
64 { setProbMax( 2.0 * ( getArg( 5 ) * getArg( 5 ) + 4.0 * getArg( 25 ) * getArg( 25 ) ) ); }
65
66 if ( ( EvtPDL::chg3( getDaug( 0 ) ) == 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) > 0 ) )
67 { setProbMax( 2.0 * ( getArg( 7 ) * getArg( 7 ) + 4.0 * getArg( 23 ) * getArg( 23 ) ) ); }
68
69 if ( ( EvtPDL::chg3( getDaug( 0 ) ) == 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) < 0 ) )
70 { setProbMax( 2.0 * ( getArg( 9 ) * getArg( 9 ) + 4.0 * getArg( 25 ) * getArg( 25 ) ) ); }
71
72 if ( ( EvtPDL::chg3( getDaug( 0 ) ) > 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) < 0 ) )
73 {
74 setProbMax( 2.0 * ( getArg( 11 ) * getArg( 11 ) + getArg( 23 ) * getArg( 23 ) +
75 getArg( 19 ) * getArg( 19 ) + getArg( 13 ) * getArg( 13 ) +
76 getArg( 25 ) * getArg( 25 ) + getArg( 21 ) * getArg( 21 ) ) );
77 }
78
79 if ( ( EvtPDL::chg3( getDaug( 0 ) ) < 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) > 0 ) )
80 {
81 setProbMax( 2.0 * ( getArg( 15 ) * getArg( 15 ) + getArg( 23 ) * getArg( 23 ) +
82 getArg( 19 ) * getArg( 19 ) + getArg( 17 ) * getArg( 17 ) +
83 getArg( 25 ) * getArg( 25 ) + getArg( 21 ) * getArg( 21 ) ) );
84 }
85
86 if ( ( EvtPDL::chg3( getDaug( 0 ) ) == 0 ) && ( EvtPDL::chg3( getDaug( 1 ) ) == 0 ) )
87 {
88 setProbMax( 2.0 * ( getArg( 7 ) * getArg( 7 ) + getArg( 3 ) * getArg( 3 ) +
89 getArg( 11 ) * getArg( 11 ) + getArg( 15 ) * getArg( 15 ) +
90 4.0 * getArg( 19 ) * getArg( 19 ) + getArg( 9 ) * getArg( 9 ) +
91 getArg( 5 ) * getArg( 5 ) + getArg( 13 ) * getArg( 13 ) +
92 getArg( 17 ) * getArg( 17 ) + 4.0 * getArg( 21 ) * getArg( 21 ) ) );
93 }
94}
void setProbMax(double prbmx)

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