BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtTauHadnu Class Reference

#include <EvtTauHadnu.hh>

+ Inheritance diagram for EvtTauHadnu:

Public Member Functions

 EvtTauHadnu ()
 
virtual ~EvtTauHadnu ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void initProbMax ()
 
void init ()
 
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 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 ()
 

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 EvtTauHadnu.hh.

Constructor & Destructor Documentation

◆ EvtTauHadnu()

EvtTauHadnu::EvtTauHadnu ( )
inline

Definition at line 32 of file EvtTauHadnu.hh.

32{}

Referenced by clone().

◆ ~EvtTauHadnu()

EvtTauHadnu::~EvtTauHadnu ( )
virtual

Definition at line 36 of file EvtTauHadnu.cc.

36{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtTauHadnu::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 45 of file EvtTauHadnu.cc.

45 {
46
47 return new EvtTauHadnu;
48
49}

◆ decay()

void EvtTauHadnu::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 114 of file EvtTauHadnu.cc.

114 {
115
116 static EvtId TAUM=EvtPDL::getId("tau-");
117
118 EvtIdSet thePis("pi+","pi-","pi0");
119 EvtIdSet theKs("K+","K-");
120
122
123 EvtParticle *nut;
124 nut = p->getDaug(getNDaug()-1);
125
126 //get the leptonic current
127 EvtVector4C tau1, tau2;
128
129 if (p->getId()==TAUM) {
130 tau1=EvtLeptonVACurrent(nut->spParentNeutrino(),p->sp(0));
131 tau2=EvtLeptonVACurrent(nut->spParentNeutrino(),p->sp(1));
132 }
133 else{
134 tau1=EvtLeptonVACurrent(p->sp(0),nut->spParentNeutrino());
135 tau2=EvtLeptonVACurrent(p->sp(1),nut->spParentNeutrino());
136 }
137
138 EvtVector4C hadCurr;
139 bool foundHadCurr=false;
140 if ( getNDaug() == 2 ) {
141 hadCurr = p->getDaug(0)->getP4();
142 foundHadCurr=true;
143 }
144 if ( getNDaug() == 3 ) {
145
146 //pi pi nu with rho and rhopr resonance
147 if ( thePis.contains(getDaug(0)) &&
148 thePis.contains(getDaug(1)) ) {
149
150 EvtVector4R q1 = p->getDaug(0)->getP4();
151 EvtVector4R q2 = p->getDaug(1)->getP4();
152
153 hadCurr = Fpi(q1,q2)*(q1-q2);
154
155 foundHadCurr = true;
156 }
157
158 }
159 if ( getNDaug() == 4 ) {
160 if ( thePis.contains(getDaug(0)) &&
161 thePis.contains(getDaug(1)) &&
162 thePis.contains(getDaug(2)) ) {
163 foundHadCurr = true;
164 //figure out which is the different charged pi
165 //want it to be q3
166
167 int diffPi(0),samePi1(0),samePi2(0);
168 if ( getDaug(0) == getDaug(1) ) {diffPi=2; samePi1=0; samePi2=1;}
169 if ( getDaug(0) == getDaug(2) ) {diffPi=1; samePi1=0; samePi2=2;}
170 if ( getDaug(1) == getDaug(2) ) {diffPi=0; samePi1=1; samePi2=2;}
171
172 EvtVector4R q1=p->getDaug(samePi1)->getP4();
173 EvtVector4R q2=p->getDaug(samePi2)->getP4();
174 EvtVector4R q3=p->getDaug(diffPi)->getP4();
175
176 EvtVector4R Q=q1+q2+q3;
177 double qMass2=Q.mass2();
178
179 double GA1=_gammaA1*pi3G(Q.mass2(),samePi1)/pi3G(_mA1*_mA1,samePi1);
180
181 EvtComplex denBA1(_mA1*_mA1 - Q.mass2(),-1.*_mA1*GA1);
182 EvtComplex BA1 = _mA1*_mA1 / denBA1;
183
184 hadCurr = BA1*( (q1-q3) - (Q*(Q*(q1-q3))/qMass2)*Fpi(q2,q3) +
185 (q2-q3) - (Q*(Q*(q2-q3))/qMass2)*Fpi(q1,q3) );
186
187
188 }
189
190
191 }
192
193
194
195 if ( !foundHadCurr ) {
196 report(ERROR,"EvtGen") << "Have not yet implemented this final state in TAUHADNU model" << endl;
197 report(ERROR,"EvtGen") << "Ndaug="<<getNDaug() << endl;
198 int id;
199 for ( id=0; id<(getNDaug()-1); id++ )
200 report(ERROR,"EvtGen") << "Daug " << id << " "<<EvtPDL::name(getDaug(id)).c_str() << endl;
201
202 }
203
204
205 vertex(0,tau1*hadCurr);
206 vertex(1,tau2*hadCurr);
207
208 return;
209
210}
EvtVector4C EvtLeptonVACurrent(const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
EvtId getDaug(int i)
Definition: EvtDecayBase.hh:66
Definition: EvtId.hh:27
static std::string name(EvtId i)
Definition: EvtPDL.hh:64
static EvtId getId(const std::string &name)
Definition: EvtPDL.cc:287
EvtId getId() const
Definition: EvtParticle.cc:113
virtual EvtDiracSpinor spParentNeutrino() const
Definition: EvtParticle.cc:635
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:121
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:85
virtual EvtDiracSpinor sp(int) const
Definition: EvtParticle.cc:622
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
double mass2() const
Definition: EvtVector4R.hh:116

◆ getName()

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

Implements EvtDecayBase.

Definition at line 38 of file EvtTauHadnu.cc.

38 {
39
40 model_name="TAUHADNU";
41
42}

◆ init()

void EvtTauHadnu::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 51 of file EvtTauHadnu.cc.

51 {
52
53 // check that there are 0 arguments
54
56
57 //the last daughter should be a neutrino
59
60 int i;
61 for ( i=0; i<(getNDaug()-1);i++) {
63 }
64
65 bool validndaug=false;
66
67 if ( getNDaug()==4 ) {
68 //pipinu
69 validndaug=true;
70 checkNArg(7);
71 _beta = getArg(0);
72 _mRho = getArg(1);
73 _gammaRho = getArg(2);
74 _mRhopr = getArg(3);
75 _gammaRhopr = getArg(4);
76 _mA1 = getArg(5);
77 _gammaA1 = getArg(6);
78 }
79 if ( getNDaug()==3 ) {
80 //pipinu
81 validndaug=true;
82 checkNArg(5);
83 _beta = getArg(0);
84 _mRho = getArg(1);
85 _gammaRho = getArg(2);
86 _mRhopr = getArg(3);
87 _gammaRhopr = getArg(4);
88 }
89 if ( getNDaug()==2 ) {
90 //pipinu
91 validndaug=true;
92 checkNArg(0);
93 }
94
95 if ( !validndaug ) {
96 report(ERROR,"EvtGen") << "Have not yet implemented this final state in TAUHADNU model" << endl;
97 report(ERROR,"EvtGen") << "Ndaug="<<getNDaug() << endl;
98 int id;
99 for ( id=0; id<(getNDaug()-1); id++ )
100 report(ERROR,"EvtGen") << "Daug " << id << " "<<EvtPDL::name(getDaug(id)).c_str() << endl;
101
102 }
103
104}
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(int j)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)

◆ initProbMax()

void EvtTauHadnu::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 106 of file EvtTauHadnu.cc.

106 {
107
108 if ( getNDaug()==2 ) setProbMax(90.0);
109 if ( getNDaug()==3 ) setProbMax(2500.0);
110 if ( getNDaug()==4 ) setProbMax(5000.0);
111
112}
void setProbMax(double prbmx)

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