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

#include <EvtCalHelAmp.hh>

Inheritance diagram for EvtCalHelAmp:

Public Member Functions

 EvtCalHelAmp ()
virtual ~EvtCalHelAmp ()
void getName (std::string &name)
EvtDecayBaseclone ()
void initProbMax ()
void init ()
void decay (EvtParticle *p)
std::vector< double > firstder (std::vector< double > vh)
double getBlattRatio (int L, double R, double pmag, double pmag0)
double blattfactor (int L, double R, double pmag)
double phsp (double m0, double m1, double m2)
Public Member Functions inherited from EvtDecayIncoherent
void makeDecay (EvtParticle *p)
virtual ~EvtDecayIncoherent ()
void setDaughterSpinDensity (int daughter)
int isDaughterSpinDensitySet (int daughter)
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 ()

Static Public Attributes

static double _H2 = 0
static double _H1 = 0
static double _H0 = 0
static double _H2err = 0
static double _H1err = 0
static double _H0err = 0
static int nevt = 0

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 EvtDecayBase
bool _daugsDecayedByParentModel

Detailed Description

Definition at line 40 of file EvtCalHelAmp.hh.

Constructor & Destructor Documentation

◆ EvtCalHelAmp()

EvtCalHelAmp::EvtCalHelAmp ( )
inline

Definition at line 43 of file EvtCalHelAmp.hh.

43{}

Referenced by clone().

◆ ~EvtCalHelAmp()

EvtCalHelAmp::~EvtCalHelAmp ( )
virtual

Definition at line 38 of file EvtCalHelAmp.cc.

38{}

Member Function Documentation

◆ blattfactor()

double EvtCalHelAmp::blattfactor ( int L,
double R,
double pmag )

Definition at line 219 of file EvtCalHelAmp.cc.

220 { // pmag is the magnitude of one daughter
221 // particle, instead of difference of
222 // momentum between two daugs.
223 double rp = R * pmag;
224 double rp2 = rp * rp;
225 double rp4 = rp2 * rp2;
226 double rp6 = rp2 * rp4;
227 double rp8 = rp4 * rp4;
228 switch ( L )
229 {
230 case 0: return 1.0; break;
231 case 1: return 1.0 / sqrt( 1 + R * R * pmag * pmag ); break;
232 case 2: return 1.0 / sqrt( 1 + rp2 / 3. + rp4 / 9. ); break;
233 case 3: return 1.0 / sqrt( 225 + 45 * rp2 + 6 * rp4 + rp6 ); break;
234 case 4: return 1.0 / sqrt( 11025 + 1575 * rp2 + 135 * rp4 + 10 * rp6 + rp8 ); break;
235 default:
236 cout << "lineshape::blattfactor: No expression for L>4 is availabe." << endl;
237 ::abort();
238 }
239}
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition TUtil.h:22

Referenced by getBlattRatio().

◆ clone()

EvtDecayBase * EvtCalHelAmp::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 42 of file EvtCalHelAmp.cc.

42{ return new EvtCalHelAmp; }

◆ decay()

void EvtCalHelAmp::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 77 of file EvtCalHelAmp.cc.

77 {
78 if ( getNArg() != 4 )
79 {
80 cout << "The model have 6 parameters: |g00| phi00 |g22| phi22 |g42| phi42" << endl;
81 abort();
82 }
83
84 double weight = p->initializePhaseSpace( getNDaug(), getDaugs() );
85 // std::cout<<"weight= "<<weight<<std::endl;
86 // std::cout<<p->getP4().mass()<<" "<<p->getDaug(0)->getP4().mass()<<"
87 // "<<p->getDaug(1)->getP4().mass()<<std::endl;
88 std::string p0str = EvtPDL::name( p->getId() );
89 std::string p1str = EvtPDL::name( p->getDaug( 0 )->getId() );
90 std::string p2str = EvtPDL::name( p->getDaug( 1 )->getId() );
91 if ( p1str == "K_2*+" || p2str == "K_2*+" || p1str == "K_2*0" || p2str == "K_2*0" )
92 { flag = 2; }
93 else if ( p1str == "K_3*+" || p2str == "K_3*+" || p1str == "K_3*0" || p2str == "K_3*0" )
94 { flag = 3; }
95 else if ( p1str == "Zc+" || p2str == "pi-" || p1str == "Zc-" || p2str == "pi^+" )
96 { flag = 4; }
97 else if ( p0str == "Zc+" && ( p1str == "J/psi" || p2str == "J/psi" ) ) { flag = 5; }
98 // Helicity amplitude for 2+ -> VP
99 EvtVector4R p1 = p->getDaug( 0 )->getP4();
100 double r = 2 * p1.d3mag(); // to be consistent with PWA HelAmp.cc
101 double R = 3.0;
102 double pi = 3.1415926;
103 double mm0 = EvtPDL::getMeanMass( p->getId() );
104 double mm1 = EvtPDL::getMeanMass( p->getDaug( 0 )->getId() );
105 double mm2 = EvtPDL::getMeanMass( p->getDaug( 1 )->getId() );
106 double pmag = phsp( mm0, mm1, mm2 ); // for normalization Blatt factor, momentum without
107 // factor 2, consistent with the PWA HelAmp.cc
108 double b0 = getBlattRatio( 0, R, r, pmag );
109 double b1 = getBlattRatio( 1, R, r, pmag );
110 double b2 = getBlattRatio( 2, R, r, pmag );
111 double b3 = getBlattRatio( 3, R, r, pmag );
112 double b4 = getBlattRatio( 4, R, r, pmag );
113 // std::cout<<"b0,b1,b2,b3,b4 "<<b0<<" "<<b1<<" "<<b2<<" "<<b3<<" "<<b4<<std::endl;
114 double g02 = getArg( 0 );
115 double phi02 = getArg( 1 ) * 2 * pi;
116 double g22 = getArg( 2 );
117 double phi22 = getArg( 3 ) * 2 * pi;
118 // double g42 = getArg(4);
119 // double phi42 = getArg(5)*2*pi;
120 EvtComplex G02( g02 * cos( phi02 ), g02 * sin( phi02 ) );
121 EvtComplex G22( g22 * cos( phi22 ), g22 * sin( phi22 ) );
122 // EvtComplex G42(g42*cos(phi42),g42*sin(phi42));
123 std::vector<EvtComplex> VG;
124 VG.clear();
125 VG.push_back( G02 );
126 VG.push_back( G22 ); // VG.push_back(G42);
127 std::vector<double> VH2, VH1, VH0;
128 VH2.resize( nd / 2 );
129 VH1.resize( nd / 2 );
130 VH0.resize( nd / 2 );
131 if ( flag == 2 )
132 {
133 VH2[0] = sqrt( 2. / 5. ) * b1 * r;
134 VH2[1] = 1 / sqrt( 10. ) * r * r * r * b3;
135 VH1[0] = -1 / sqrt( 10. ) * b1 * r;
136 VH1[1] = r * r * r * b3 * sqrt( 2. / 5. );
137 }
138 else if ( flag == 3 )
139 {
140 VH2[0] = sqrt( 5. / 14. ) * b2 * r * r;
141 VH2[1] = 1 / sqrt( 7. ) * r * r * r * r * b4;
142 VH1[0] = sqrt( 1. / 7. ) * b2 * r * r;
143 VH1[1] = -sqrt( 5. / 14. ) * r * r * r * r * b4;
144 }
145 else if ( flag == 4 || flag == 5 )
146 {
147 VH2[0] = sqrt( 1. / 3. ) * b0;
148 VH2[1] = 1 / sqrt( 6. ) * r * r * b2;
149 VH1[0] = sqrt( 1. / 3. ) * b0;
150 VH1[1] = -2 / sqrt( 6. ) * r * r * b2;
151 }
152 else
153 {
154 std::cout << "Not allowed mode!" << std::endl;
155 abort();
156 }
157 EvtComplex H2 = G02 * VH2[0] + G22 * VH2[1];
158 EvtComplex H1 = G02 * VH1[0] + G22 * VH1[1];
159
160 _H2 += abs2( H2 );
161 _H1 += abs2( H1 );
162 std::vector<double> DH1, DH2;
163 DH2 = firstder( VH2 );
164 DH1 = firstder( VH1 );
165
166 // std::cout<<DH2[0]<<" "<<DH2[1]<<" "<<DH2[2]<<" "<<DH2[3]<<std::endl;
167 // std::cout<<DH1[0]<<" "<<DH1[1]<<" "<<DH1[2]<<" "<<DH1[3]<<std::endl;
168
169 for ( int i = 0; i < nd; i++ )
170 {
171 for ( int j = 0; j < nd; j++ )
172 {
173 _H2err += DH2[i] * DH2[j] * VC[i][j];
174 _H1err += DH1[i] * DH1[j] * VC[i][j];
175 }
176 }
177
178 nevt++;
179
180 return;
181}
double p1[4]
double abs2(const EvtComplex &c)
double pi
*********Class see also m_nmax DOUBLE PRECISION m_MasPhot DOUBLE PRECISION m_phsu DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_r2 DOUBLE PRECISION m_WtMass INTEGER m_nmax INTEGER m_Nevgen INTEGER m_IsFSR INTEGER m_MarTot *COMMON c_KarFin $ !Output file $ !Event serial number $ !alpha QED at Thomson limit $ !minimum energy at CMS for remooval $ !infrared dimensionless $ !dummy photon IR regulator $ !crude photon multiplicity enhancement factor *EVENT $ !MC crude volume of PhhSpace *Sfactors $ !YFS formfactor IR part only $ !YFS formfactor non IR finite part $ !mass weight
Definition KarFin.h:34
static double _H1err
double getBlattRatio(int L, double R, double pmag, double pmag0)
double phsp(double m0, double m1, double m2)
static int nevt
static double _H1
static double _H2
static double _H2err
std::vector< double > firstder(std::vector< double > vh)
double getArg(int j)
EvtId * getDaugs()
static double getMeanMass(EvtId i)
Definition EvtPDL.hh:43
static std::string name(EvtId i)
Definition EvtPDL.hh:70
EvtId getId() const
const EvtVector4R & getP4() const
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
double d3mag() const

◆ firstder()

std::vector< double > EvtCalHelAmp::firstder ( std::vector< double > vh)

Definition at line 183 of file EvtCalHelAmp.cc.

183 {
184 // vh: vector of helicity part
185 double pi = 3.1415926;
186 std::vector<double> fd;
187 double g02 = getArg( 0 );
188 double phi02 = getArg( 1 ) * 2 * pi;
189 double g22 = getArg( 2 );
190 double phi22 = getArg( 3 ) * 2 * pi;
191 std::vector<double> vpar;
192 vpar.push_back( g02 );
193 vpar.push_back( phi02 );
194 vpar.push_back( g22 );
195 vpar.push_back( phi22 );
196 EvtComplex G02( vpar[0] * cos( vpar[1] ), vpar[0] * sin( vpar[1] ) );
197 EvtComplex G22( vpar[2] * cos( vpar[3] ), vpar[2] * sin( vpar[3] ) );
198 EvtComplex H20 = G02 * vh[0] + G22 * vh[1];
199 double hamps0 = abs2( H20 );
200 for ( int i = 0; i < vpar.size(); i++ )
201 {
202 vpar.clear();
203 vpar.push_back( g02 );
204 vpar.push_back( phi02 );
205 vpar.push_back( g22 );
206 vpar.push_back( phi22 );
207 double dev = 0.01;
208 vpar[i] += dev;
209 EvtComplex G02( vpar[0] * cos( vpar[1] ), vpar[0] * sin( vpar[1] ) );
210 EvtComplex G22( vpar[2] * cos( vpar[3] ), vpar[2] * sin( vpar[3] ) );
211 EvtComplex H20 = G02 * vh[0] + G22 * vh[1];
212 double hamps2 = abs2( H20 );
213 double xder = ( hamps2 - hamps0 ) / dev;
214 fd.push_back( xder );
215 }
216 return fd;
217}

Referenced by decay().

◆ getBlattRatio()

double EvtCalHelAmp::getBlattRatio ( int L,
double R,
double pmag,
double pmag0 )

Definition at line 241 of file EvtCalHelAmp.cc.

241 {
242 double blattRatio = blattfactor( L, R, pmag ) / blattfactor( L, R, pmag0 );
243 return blattRatio;
244}
double blattfactor(int L, double R, double pmag)

Referenced by decay().

◆ getName()

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

Implements EvtDecayBase.

Definition at line 40 of file EvtCalHelAmp.cc.

40{ model_name = "CALHELAMP"; }

◆ init()

void EvtCalHelAmp::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 44 of file EvtCalHelAmp.cc.

44 {
45 _H2 = 0;
46 _H1 = 0;
47 _H0 = 0;
48 _H2err = 0;
49 _H1err = 0;
50 _H0err = 0;
51 nevt = 0;
52 // check that there are 1 arguments (the number of parameters)
53 checkNArg( 4 );
54 nd = getNArg();
55 VC.resize( nd );
56 for ( int i = 0; i < nd; i++ ) VC[i].resize( nd );
57 ifstream coverrf( "myerr.dat" );
58 if ( !coverrf )
59 {
60 std::cout << "File of covariant error (myerr.dat)"
61 << " is not found" << endl;
62 abort();
63 }
64 for ( int i = 0; i < nd; i++ )
65 {
66 for ( int j = 0; j < nd; j++ )
67 {
68 double xr;
69 coverrf >> xr;
70 VC[i][j] = xr;
71 }
72 }
73}
static double _H0err
static double _H0
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)

◆ initProbMax()

void EvtCalHelAmp::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 75 of file EvtCalHelAmp.cc.

75{ noProbMax(); }

◆ phsp()

double EvtCalHelAmp::phsp ( double m0,
double m1,
double m2 )

Definition at line 246 of file EvtCalHelAmp.cc.

246 { // phase space for m0->m1 + m2
247 if ( m1 + m2 > m0 )
248 {
249 cout << "HelAmp::phsp: m1(" << m1 << ") + m2(" << m2 << ") > m0(" << m0 << ") " << endl;
250 ::abort();
251 }
252 // if(m1+m2>m0) {return 0;}
253 double m0s = m0 * m0;
254 double m12 = ( m1 + m2 );
255 double m12s = m12 * m12;
256 double md12 = m1 - m2;
257 double md12s = md12 * md12;
258
259 double pmag = sqrt( fabs( ( m0s - m12s ) * ( m0s - md12s ) ) ) / 2 / m0;
260
261 //-- for debugging
262 // cout<<m0<<" ->"<<m1<<" + "<<m2<<", pmag= "<<pmag<<endl;
263 return pmag;
264}
double double * m2
Definition qcdloop1.h:83
double * m1
Definition qcdloop1.h:83

Referenced by decay().

Member Data Documentation

◆ _H0

double EvtCalHelAmp::_H0 = 0
static

Definition at line 55 of file EvtCalHelAmp.hh.

Referenced by EvtDecay::finalize(), and init().

◆ _H0err

double EvtCalHelAmp::_H0err = 0
static

Definition at line 55 of file EvtCalHelAmp.hh.

Referenced by EvtDecay::finalize(), and init().

◆ _H1

double EvtCalHelAmp::_H1 = 0
static

Definition at line 55 of file EvtCalHelAmp.hh.

Referenced by decay(), EvtDecay::finalize(), and init().

◆ _H1err

double EvtCalHelAmp::_H1err = 0
static

Definition at line 55 of file EvtCalHelAmp.hh.

Referenced by decay(), EvtDecay::finalize(), and init().

◆ _H2

double EvtCalHelAmp::_H2 = 0
static

Definition at line 55 of file EvtCalHelAmp.hh.

Referenced by decay(), EvtDecay::finalize(), and init().

◆ _H2err

double EvtCalHelAmp::_H2err = 0
static

Definition at line 55 of file EvtCalHelAmp.hh.

Referenced by decay(), EvtDecay::finalize(), and init().

◆ nevt

int EvtCalHelAmp::nevt = 0
static

Definition at line 56 of file EvtCalHelAmp.hh.

Referenced by decay(), EvtDecay::finalize(), and init().


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