144 {
145
147
148 if ( istdheppar != 9000443 && istdheppar != 9010443 && istdheppar != 9030443 &&
149 istdheppar != 9020443 )
150 {
151 std::cout << "EvtGen: EvtOpenCharm cann't not decay the particle pid= " << istdheppar
152 << endl;
153 ::abort();
154 }
155
158 double totEn = 0;
159
160
161
162
163
164 EvtVector4R p4[20];
165
166 int i, more;
168 int ndaugjs;
169
170 static int myflag;
171 EvtPsi3Sdecay theIni;
172 EvtId pid = p->
getId();
173
174 static int themode;
176 {
179 }
180
182 do {
183
185 std::vector<EvtVector4R> v_p4 = theIni.
getDaugP4();
186 std::vector<EvtId> Vid = theIni.
getDaugId();
187 ndaugjs = Vid.size();
188
189 EvtId myId[3];
190
191 for ( int i = 0; i < ndaugjs; i++ ) { myId[i] = Vid[i]; }
192
195
196 for ( int i = 0; i < ndaugjs; i++ )
197 {
198
200 }
201
204
205 totEn = 0;
206 for ( i = 0; i < ndaugjs; i++ )
207 {
210 {
213 << endl;
214 report(
ERROR,
"EvtGen" ) <<
"This can not be translated to evt number" << endl;
215 report(
ERROR,
"EvtGen" ) <<
"and the decay will be rejected!" << endl;
216 report(
ERROR,
"EvtGen" ) <<
"The decay was of particle:" << ip << endl;
217 }
218 }
220
221
222 more = ( channel != -1 );
223
224
226
227 }
while ( more && (
count < 10000 ) );
228
229 if ( fabs( xmp - totEn ) > 0.01 )
230 {
231 std::cout <<
"Warning:OPENCHARM generate incomplet final state, " <<
mp <<
" " << totEn
232 << endl;
233 ::abort();
234 }
235
237 {
238 report(
INFO,
"EvtGen" ) <<
"Too many loops in EvtOpenCharm!!!" << endl;
240 }
241
242 fixPolarizations( p );
243
244 return;
245}
DOUBLE_PRECISION count[3]
static int inChannelList(EvtId parent, int ndaug, EvtId *daugs)
static int getStdHep(EvtId id)
static std::string name(EvtId i)
void makeDaughters(int ndaug, EvtId *id)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
void setGeneratorFlag(int flag)
const EvtVector4R & getP4() const
EvtParticle * getDaug(int i)
void PHSPDecay(EvtParticle *par)
std::vector< EvtVector4R > getDaugP4()
std::vector< EvtId > getDaugId()