BOSS 8.0.0
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
19// cos_theta=+/-1 RYD/Adriano June 16, 1998 Module created
20//
21//------------------------------------------------------------------------
22//
23#include "EvtVectorIsr.hh"
31#include <stdlib.h>
32#include <string>
33
35
36void EvtVectorIsr::getName( std::string& model_name ) { model_name = "VECTORISR"; }
37
39
41
42 // check that there are 2 arguments
43 checkNArg( 2 );
44 checkNDaug( 2 );
45
49
50 // copy the arguments into eaiser to remember names
51
52 csfrmn = getArg( 0 );
53 csbkmn = getArg( 1 );
54}
55
57
59
60 EvtParticle* phi;
61 EvtParticle* gamma;
62
63 // the elctron mass
64 double electMass = EvtPDL::getMeanMass( EvtPDL::getId( "e-" ) );
65
66 // get pointers to the daughters set
67 // get masses/initial phase space - will overwrite the
68 // p4s below to get the kinematic distributions correct
70 phi = p->getDaug( 0 );
71 gamma = p->getDaug( 1 );
72
73 double wcm = p->mass();
74 double beta = 2. * electMass / wcm; // electMass/Ebeam = betagamma
75 beta = sqrt( 1. - beta * beta ); // sqrt (1 - (m/ebeam)**2)
76
77 // gamma momentum in the parents restframe
78 double pg = ( wcm * wcm - phi->mass() * phi->mass() ) / ( 2 * wcm );
79
80 // //generate kinematics according to Bonneau-Martin article
81 // //Nucl. Phys. B27 (1971) 381-397
82
83 // double y=pow((1+csmn)/(1-csmn),EvtRandom::Flat(0.0,1.0));
84 // double cs=kcs*(y-1)/(y+1);
85
86 // For backward compatibility with .dec files before SP5, the backward cos limit for
87 // the ISR photon is actually given as *minus* the actual limit. Sorry, this wouldn't be
88 // my choice. -Joe
89
90 double ymax = log( ( 1. + beta * csfrmn ) / ( 1. - beta * csfrmn ) );
91 double ymin = log( ( 1. - beta * csbkmn ) / ( 1. + beta * csbkmn ) );
92
93 // photon theta distributed as 2*beta/(1-beta**2*cos(theta)**2)
94 double y = ( ymax - ymin ) * EvtRandom::Flat( 0.0, 1.0 ) + ymin;
95 double cs = exp( y );
96 cs = ( cs - 1. ) / ( cs + 1. ) / beta;
97 double sn = sqrt( 1 - cs * cs );
98
99 double fi = EvtRandom::Flat( EvtConst::twoPi );
100
101 // four-vector for the phi
102 EvtVector4R p4phi( sqrt( phi->mass() * phi->mass() + pg * pg ), pg * sn * cos( fi ),
103 pg * sn * sin( fi ), pg * cs );
104
105 EvtVector4R p4gamma( pg, -p4phi.get( 1 ), -p4phi.get( 2 ), -p4phi.get( 3 ) );
106
107 // save momenta for particles
108 phi->init( getDaug( 0 ), p4phi );
109 gamma->init( getDaug( 1 ), p4gamma );
110
111 // try setting the spin density matrix of the phi
112
113 // first get the polarization vectors of the gamma and phi
114
115 EvtVector4C phi0 = phi->epsParent( 0 );
116 EvtVector4C phi1 = phi->epsParent( 1 );
117 EvtVector4C phi2 = phi->epsParent( 2 );
118
119 EvtVector4C gamma0 = gamma->epsParentPhoton( 0 );
120 EvtVector4C gamma1 = gamma->epsParentPhoton( 1 );
121
122 EvtComplex r1p = phi0 * gamma0;
123 EvtComplex r2p = phi1 * gamma0;
124 EvtComplex r3p = phi2 * gamma0;
125
126 EvtComplex r1m = phi0 * gamma1;
127 EvtComplex r2m = phi1 * gamma1;
128 EvtComplex r3m = phi2 * gamma1;
129
130 EvtComplex rho33 = r3p * conj( r3p ) + r3m * conj( r3m );
131 EvtComplex rho22 = r2p * conj( r2p ) + r2m * conj( r2m );
132 EvtComplex rho11 = r1p * conj( r1p ) + r1m * conj( r1m );
133
134 EvtComplex rho13 = r3p * conj( r1p ) + r3m * conj( r1m );
135 EvtComplex rho12 = r2p * conj( r1p ) + r2m * conj( r1m );
136 EvtComplex rho23 = r3p * conj( r2p ) + r3m * conj( r2m );
137
138 EvtComplex rho31 = conj( rho13 );
139 EvtComplex rho32 = conj( rho23 );
140 EvtComplex rho21 = conj( rho12 );
141
142 EvtSpinDensity rho;
143 rho.SetDim( 3 );
144
145 rho.Set( 0, 0, rho11 );
146 rho.Set( 0, 1, rho12 );
147 rho.Set( 0, 2, rho13 );
148 rho.Set( 1, 0, rho21 );
149 rho.Set( 1, 1, rho22 );
150 rho.Set( 1, 2, rho23 );
151 rho.Set( 2, 0, rho31 );
152 rho.Set( 2, 1, rho32 );
153 rho.Set( 2, 2, rho33 );
154
156 phi->setSpinDensityForward( rho );
157
158 return;
159}
Double_t phi2
Double_t phi1
Evt3Rank3C conj(const Evt3Rank3C &t2)
EvtComplex exp(const EvtComplex &c)
static const double twoPi
Definition EvtConst.hh:28
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:43
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:272
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:69
static double Flat(double min, double max)
Definition EvtRandom.cc:55
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()