BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtJscont.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: EvtJscont.cc
12//
13// Description: Routine to generate e+e- --> q\barq via Jetset
14//
15// Modification history:
16//
17// PCK August 4, 1997 Module created
18//
19//------------------------------------------------------------------------
20//
21#include "EvtJscont.hh"
28#include "EvtJetSet.hh"
29#include <stdio.h>
30#include <stdlib.h>
31#include <string.h>
32#include <string>
33#include <strstream>
34using std::strstream;
35
36extern "C" {
37extern void continuum_( double*, int*, int*, int*, double*, double*, double*, double* );
38}
39
40extern "C" {
41extern void lugive_( const char* cnfgstr, int length );
42}
43
45
46void EvtJscont::getName( std::string& model_name ) { model_name = "JSCONT"; }
47
49
51
52 // check that there are 1 argument
53
54 checkNArg( 1, 2 );
55}
56
58
60
62 static int first = 1;
63
64 if ( first )
65 {
66 first = 0;
67
68 float val = 0.6;
69 if ( getNArg() > 1 ) { val = getArg( 1 ); }
70 char vak[20];
71 sprintf( vak, "PARJ(13)=%f", val );
72 std::string temp( vak );
73 lugive_( temp.c_str(), strlen( temp.c_str() ) );
74 }
75 EvtVector4R p4[100];
76
77 double energy = p->mass();
78
79 int flavor;
80
81 int i, more;
82 int ndaugjs;
83 int kf[100];
84 EvtId id[100];
85 int type[MAX_DAUG];
86
87 flavor = (int)getArg( 0 );
88
89 double px[100], py[100], pz[100], e[100];
90
91 if ( p->getNDaug() != 0 ) { return; }
92 do {
93
94 continuum_( &energy, &flavor, &ndaugjs, kf, px, py, pz, e );
95
96 for ( i = 0; i < ndaugjs; i++ )
97 {
98
99 id[i] = EvtPDL::evtIdFromStdHep( kf[i] );
100
101 type[i] = EvtPDL::getSpinType( id[i] );
102
103 // have to protect against negative mass^2 for massless particles
104 // i.e. neutrinos and photons.
105 // this is uggly but I need to fix it right now....
106
107 if ( px[i] * px[i] + py[i] * py[i] + pz[i] * pz[i] >= e[i] * e[i] )
108 { e[i] = sqrt( px[i] * px[i] + py[i] * py[i] + pz[i] * pz[i] ) + 0.0000000000001; }
109
110 p4[i].set( e[i], px[i], py[i], pz[i] );
111 }
112
113 int channel = EvtDecayTable::inChannelList( p->getId(), ndaugjs, id );
114
115 more = ( ( channel != -1 ) && ( channel != p->getChannel() ) );
116
117 } while ( more );
118
119 p->makeDaughters( ndaugjs, id );
120
121 for ( i = 0; i < ndaugjs; i++ ) { p->getDaug( i )->init( id[i], p4[i] ); }
122 return;
123}
sprintf(cut, "kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_" "pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)
void lugive_(const char *cnfgstr, int length)
void lugive_(const char *cnfgstr, int length)
void continuum_(double *, int *, int *, int *, double *, double *, double *, double *)
const int MAX_DAUG
************Class m_ypar INTEGER m_KeyWgt INTEGER m_KeyIHVP INTEGER m_KeyGPS INTEGER m_IsBeamPolarized INTEGER m_EvtGenInterface DOUBLE PRECISION m_Emin DOUBLE PRECISION m_sphot DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_q2 DOUBLE PRECISION m_PolBeam2 DOUBLE PRECISION m_xErrPb *COMMON c_KK2f $ !CMS energy average $ !Spin Polarization vector first beam $ !Spin Polarization vector second beam $ !Beam energy spread[GeV] $ !minimum hadronization energy[GeV] $ !input READ never touch them !$ !debug facility $ !maximum weight $ !inverse alfaQED $ !minimum real photon energy
Definition KK2f.h:50
double getArg(int j)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static int inChannelList(EvtId parent, int ndaug, EvtId *daugs)
Definition EvtId.hh:27
static void jetSetInit()
Definition EvtJetSet.cc:713
void init()
Definition EvtJscont.cc:50
void getName(std::string &name)
Definition EvtJscont.cc:46
void initProbMax()
Definition EvtJscont.cc:57
void decay(EvtParticle *p)
Definition EvtJscont.cc:59
EvtDecayBase * clone()
Definition EvtJscont.cc:48
virtual ~EvtJscont()
Definition EvtJscont.cc:44
static EvtId evtIdFromStdHep(int stdhep)
Definition EvtPDL.cc:232
static EvtSpinType::spintype getSpinType(EvtId i)
Definition EvtPDL.hh:66
void makeDaughters(int ndaug, EvtId *id)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtId getId() const
int getNDaug() const
EvtParticle * getDaug(int i)
double mass() const
int getChannel() const
void set(int i, double d)