BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtVectorIsr.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtVectorIsr.cc
12//
13// Description: Model to simulate e+e- -> vector + gamma
14// This is implemented as a decay of the VPHO.
15//
16// Modification history:
17//
18// Joe Izen Dec 16, 2002 Fix cos_theta distribution - prevents boom at cos_theta=+/-1
19// RYD/Adriano June 16, 1998 Module created
20//
21//------------------------------------------------------------------------
22//
24#include <stdlib.h>
27#include "EvtGenBase/EvtPDL.hh"
31#include <string>
33
35
36void EvtVectorIsr::getName(std::string& model_name){
37
38 model_name="VECTORISR";
39
40}
41
43
44 return new EvtVectorIsr;
45
46}
47
49
50 // check that there are 2 arguments
51 checkNArg(2);
52 checkNDaug(2);
53
57
58 //copy the arguments into eaiser to remember names
59
60 csfrmn=getArg(0);
61 csbkmn=getArg(1);
62
63
64}
65
67
68 noProbMax();
69
70}
71
73
74 EvtParticle *phi;
75 EvtParticle *gamma;
76
77 //the elctron mass
78 double electMass=EvtPDL::getMeanMass(EvtPDL::getId("e-"));
79
80
81 //get pointers to the daughters set
82 //get masses/initial phase space - will overwrite the
83 //p4s below to get the kinematic distributions correct
85 phi=p->getDaug(0);
86 gamma=p->getDaug(1);
87
88 double wcm=p->mass();
89 double beta=2.*electMass/wcm; //electMass/Ebeam = betagamma
90 beta=sqrt(1. - beta*beta); //sqrt (1 - (m/ebeam)**2)
91
92 //gamma momentum in the parents restframe
93 double pg=(wcm*wcm-phi->mass()*phi->mass())/(2*wcm);
94
95// //generate kinematics according to Bonneau-Martin article
96// //Nucl. Phys. B27 (1971) 381-397
97
98// double y=pow((1+csmn)/(1-csmn),EvtRandom::Flat(0.0,1.0));
99// double cs=kcs*(y-1)/(y+1);
100
101 // For backward compatibility with .dec files before SP5, the backward cos limit for
102 //the ISR photon is actually given as *minus* the actual limit. Sorry, this wouldn't be
103 //my choice. -Joe
104
105 double ymax=log((1.+beta*csfrmn)/(1.-beta*csfrmn));
106 double ymin=log((1.-beta*csbkmn)/(1.+beta*csbkmn));
107
108 // photon theta distributed as 2*beta/(1-beta**2*cos(theta)**2)
109 double y=(ymax-ymin)*EvtRandom::Flat(0.0,1.0) + ymin;
110 double cs=exp(y);
111 cs=(cs - 1.)/(cs + 1.)/beta;
112 double sn=sqrt(1-cs*cs);
113
115
116 //four-vector for the phi
117 EvtVector4R p4phi(sqrt(phi->mass()*phi->mass()+pg*pg),pg*sn*cos(fi),
118 pg*sn*sin(fi),pg*cs);
119
120 EvtVector4R p4gamma(pg,-p4phi.get(1),-p4phi.get(2),-p4phi.get(3));
121
122 //save momenta for particles
123 phi->init( getDaug(0),p4phi);
124 gamma->init( getDaug(1),p4gamma);
125
126 //try setting the spin density matrix of the phi
127
128
129 //first get the polarization vectors of the gamma and phi
130
131 EvtVector4C phi0=phi->epsParent(0);
132 EvtVector4C phi1=phi->epsParent(1);
133 EvtVector4C phi2=phi->epsParent(2);
134
135 EvtVector4C gamma0=gamma->epsParentPhoton(0);
136 EvtVector4C gamma1=gamma->epsParentPhoton(1);
137
138 EvtComplex r1p=phi0*gamma0;
139 EvtComplex r2p=phi1*gamma0;
140 EvtComplex r3p=phi2*gamma0;
141
142
143 EvtComplex r1m=phi0*gamma1;
144 EvtComplex r2m=phi1*gamma1;
145 EvtComplex r3m=phi2*gamma1;
146
147 EvtComplex rho33=r3p*conj(r3p)+r3m*conj(r3m);
148 EvtComplex rho22=r2p*conj(r2p)+r2m*conj(r2m);
149 EvtComplex rho11=r1p*conj(r1p)+r1m*conj(r1m);
150
151 EvtComplex rho13=r3p*conj(r1p)+r3m*conj(r1m);
152 EvtComplex rho12=r2p*conj(r1p)+r2m*conj(r1m);
153 EvtComplex rho23=r3p*conj(r2p)+r3m*conj(r2m);
154
155 EvtComplex rho31=conj(rho13);
156 EvtComplex rho32=conj(rho23);
157 EvtComplex rho21=conj(rho12);
158
159
160 EvtSpinDensity rho;
161 rho.SetDim(3);
162
163 rho.Set(0,0,rho11);
164 rho.Set(0,1,rho12);
165 rho.Set(0,2,rho13);
166 rho.Set(1,0,rho21);
167 rho.Set(1,1,rho22);
168 rho.Set(1,2,rho23);
169 rho.Set(2,0,rho31);
170 rho.Set(2,1,rho32);
171 rho.Set(2,2,rho33);
172
173
175 phi->setSpinDensityForward(rho);
176
177
178 return ;
179}
180
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
Double_t phi2
Double_t phi1
Evt3Rank3C conj(const Evt3Rank3C &t2)
EvtComplex exp(const EvtComplex &c)
static const double twoPi
Definition EvtConst.hh:29
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(int j)
void checkNDaug(int d1, int d2=-1)
EvtId * getDaugs()
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtId getDaug(int i)
void setDaughterSpinDensity(int daughter)
static double getMeanMass(EvtId i)
Definition EvtPDL.hh:45
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:287
void setSpinDensityForward(const EvtSpinDensity &rho)
virtual EvtVector4C epsParent(int i) const
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
virtual EvtVector4C epsParentPhoton(int i)
EvtParticle * getDaug(int i)
double mass() const
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
static double Flat()
Definition EvtRandom.cc:74
void Set(int i, int j, const EvtComplex &rhoij)
void SetDim(int n)
double get(int i) const
EvtDecayBase * clone()
virtual ~EvtVectorIsr()
void decay(EvtParticle *p)
void getName(std::string &name)
void initProbMax()
double y[1000]