BOSS 7.0.2
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)
 
- 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 void getName (std::string &name)=0
 
virtual void decay (EvtParticle *p)=0
 
virtual void makeDecay (EvtParticle *p)=0
 
virtual EvtDecayBaseclone ()=0
 
virtual void init ()
 
virtual void initProbMax ()
 
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 42 of file EvtCalHelAmp.hh.

Constructor & Destructor Documentation

◆ EvtCalHelAmp()

EvtCalHelAmp::EvtCalHelAmp ( )
inline

Definition at line 46 of file EvtCalHelAmp.hh.

46{}

Referenced by clone().

◆ ~EvtCalHelAmp()

EvtCalHelAmp::~EvtCalHelAmp ( )
virtual

Definition at line 38 of file EvtCalHelAmp.cc.

38{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtCalHelAmp::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 46 of file EvtCalHelAmp.cc.

46 {
47
48 return new EvtCalHelAmp;
49
50}

◆ decay()

void EvtCalHelAmp::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 78 of file EvtCalHelAmp.cc.

78 {
79 if(getNArg()!=4) {cout<<"The model have 6 parameters: |g00| phi00 |g22| phi22 |g42| phi42"<<endl; abort();}
80
82 // std::cout<<"weight= "<<weight<<std::endl;
83 //std::cout<<p->getP4().mass()<<" "<<p->getDaug(0)->getP4().mass()<<" "<<p->getDaug(1)->getP4().mass()<<std::endl;
84 std::string p0str=EvtPDL::name(p->getId());
85 std::string p1str=EvtPDL::name(p->getDaug(0)->getId());
86 std::string p2str=EvtPDL::name(p->getDaug(1)->getId());
87 if(p1str=="K_2*+" || p2str=="K_2*+" ||p1str=="K_2*0" || p2str=="K_2*0" ) {flag=2;} else
88 if(p1str=="K_3*+" || p2str=="K_3*+" ||p1str=="K_3*0" || p2str=="K_3*0" ) {flag=3;} else
89 if(p1str=="Zc+" || p2str=="pi-" ||p1str=="Zc-" || p2str=="pi^+" ) {flag=4;} else
90 if(p0str=="Zc+" && (p1str=="J/psi" || p2str=="J/psi") ) {flag=5;}
91 //Helicity amplitude for 2+ -> VP
92 EvtVector4R p1= p->getDaug(0)->getP4();
93 double r= 2*p1.d3mag();
94 double R=3.0;
95 double pi=3.1415926;
96 EvtBlattWeisskopf B0(0,R,r/2); double b0=B0.get(r/2);
97 EvtBlattWeisskopf B1(1,R,r/2); double b1=B1.get(r/2);
98 EvtBlattWeisskopf B2(2,R,r/2); double b2=B2.get(r/2);
99 EvtBlattWeisskopf B3(3,R,r/2); double b3=B3.get(r/2);
100 EvtBlattWeisskopf B4(4,R,r/2); double b4=B4.get(r/2);
101 double g02 = getArg(0);
102 double phi02 = getArg(1)*2*pi;
103 double g22 = getArg(2);
104 double phi22 = getArg(3)*2*pi;
105 //double g42 = getArg(4);
106 //double phi42 = getArg(5)*2*pi;
107 EvtComplex G02(g02*cos(phi02),g02*sin(phi02));
108 EvtComplex G22(g22*cos(phi22),g22*sin(phi22));
109 //EvtComplex G42(g42*cos(phi42),g42*sin(phi42));
110 std::vector<EvtComplex> VG; VG.clear();
111 VG.push_back(G02); VG.push_back(G22);// VG.push_back(G42);
112 std::vector<double> VH2,VH1,VH0;
113 VH2.resize(nd/2);VH1.resize(nd/2);VH0.resize(nd/2);
114 if(flag==2){
115 VH2[0]=sqrt(2./5.)*b1*r; VH2[1]= 1/sqrt(10.)*r*r*r*b3;
116 VH1[0]=-1/sqrt(10.)*b1*r; VH1[1]= r*r*r*b3*sqrt(2./5.);
117 }else if(flag==3){
118 VH2[0]=sqrt(5./14.)*b2*r*r; VH2[1]= 1/sqrt(7.)*r*r*r*r*b4;
119 VH1[0]=sqrt(1./7.)*b2*r*r; VH1[1]= -sqrt(5./14.)*r*r*r*r*b4;
120 }else if(flag==4 || flag==5){
121 VH2[0]=sqrt(1./3.)*b0; VH2[1]= 1/sqrt(6.)*r*r*b2;
122 VH1[0]=sqrt(1./3.)*b0; VH1[1]=-2/sqrt(6.)*r*r*b2;
123 }else{std::cout<<"Not allowed mode!"<<std::endl; abort();}
124 EvtComplex H2 = G02*VH2[0] + G22*VH2[1];
125 EvtComplex H1 = G02*VH1[0] + G22*VH1[1];
126
127 _H2 += abs2(H2); _H1 += abs2(H1);
128 std::vector<double> DH1,DH2;
129 DH2=firstder(VH2);
130 DH1=firstder(VH1);
131
132 // std::cout<<DH2[0]<<" "<<DH2[1]<<" "<<DH2[2]<<" "<<DH2[3]<<std::endl;
133 //std::cout<<DH1[0]<<" "<<DH1[1]<<" "<<DH1[2]<<" "<<DH1[3]<<std::endl;
134
135 for(int i=0;i<nd;i++){
136 for(int j=0;j<nd;j++){
137 _H2err += DH2[i]*DH2[j]*VC[i][j];
138 _H1err += DH1[i]*DH1[j]*VC[i][j];
139 }
140 }
141
142 nevt++;
143
144 return ;
145}
double abs2(const EvtComplex &c)
Definition: EvtComplex.hh:221
double sin(const BesAngle a)
double cos(const BesAngle a)
*********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
Definition: EvtCalHelAmp.hh:58
static int nevt
Definition: EvtCalHelAmp.hh:59
static double _H1
Definition: EvtCalHelAmp.hh:58
static double _H2
Definition: EvtCalHelAmp.hh:58
static double _H2err
Definition: EvtCalHelAmp.hh:58
std::vector< double > firstder(std::vector< double > vh)
double getArg(int j)
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
static std::string name(EvtId i)
Definition: EvtPDL.hh:64
EvtId getId() const
Definition: EvtParticle.cc:113
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:121
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:85
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
double d3mag() const
Definition: EvtVector4R.cc:186
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition: TUtil.h:27

◆ firstder()

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

Definition at line 148 of file EvtCalHelAmp.cc.

148 {
149 // vh: vector of helicity part
150 double pi=3.1415926;
151 std::vector<double> fd;
152 double g02 = getArg(0);
153 double phi02 = getArg(1)*2*pi;
154 double g22 = getArg(2);
155 double phi22 = getArg(3)*2*pi;
156 std::vector<double> vpar;
157 vpar.push_back(g02);vpar.push_back(phi02);vpar.push_back(g22);vpar.push_back(phi22);
158 EvtComplex G02(vpar[0]*cos(vpar[1]),vpar[0]*sin(vpar[1]));
159 EvtComplex G22(vpar[2]*cos(vpar[3]),vpar[2]*sin(vpar[3]));
160 EvtComplex H20 = G02*vh[0] + G22*vh[1];
161 double hamps0 = abs2(H20);
162 for(int i=0;i<vpar.size();i++){
163 vpar.clear();
164 vpar.push_back(g02);vpar.push_back(phi02);vpar.push_back(g22);vpar.push_back(phi22);
165 double dev=0.01;
166 vpar[i] += dev;
167 EvtComplex G02(vpar[0]*cos(vpar[1]),vpar[0]*sin(vpar[1]));
168 EvtComplex G22(vpar[2]*cos(vpar[3]),vpar[2]*sin(vpar[3]));
169 EvtComplex H20 = G02*vh[0] + G22*vh[1];
170 double hamps2=abs2(H20);
171 double xder=(hamps2-hamps0)/dev;
172 fd.push_back(xder);
173 }
174 return fd;
175}

Referenced by decay().

◆ getName()

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

Implements EvtDecayBase.

Definition at line 40 of file EvtCalHelAmp.cc.

40 {
41
42 model_name="CALHELAMP";
43
44}

◆ init()

void EvtCalHelAmp::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 53 of file EvtCalHelAmp.cc.

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

◆ initProbMax()

void EvtCalHelAmp::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 72 of file EvtCalHelAmp.cc.

72 {
73
74 noProbMax();
75
76}
void noProbMax()

Member Data Documentation

◆ _H0

double EvtCalHelAmp::_H0 =0
static

Definition at line 58 of file EvtCalHelAmp.hh.

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

◆ _H0err

double EvtCalHelAmp::_H0err =0
static

Definition at line 58 of file EvtCalHelAmp.hh.

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

◆ _H1

double EvtCalHelAmp::_H1 =0
static

Definition at line 58 of file EvtCalHelAmp.hh.

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

◆ _H1err

double EvtCalHelAmp::_H1err =0
static

Definition at line 58 of file EvtCalHelAmp.hh.

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

◆ _H2

double EvtCalHelAmp::_H2 =0
static

Definition at line 58 of file EvtCalHelAmp.hh.

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

◆ _H2err

double EvtCalHelAmp::_H2err =0
static

Definition at line 58 of file EvtCalHelAmp.hh.

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

◆ nevt

int EvtCalHelAmp::nevt =0
static

Definition at line 59 of file EvtCalHelAmp.hh.

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


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