176 {
177
179
180 if(istdheppar != 9000443 && istdheppar != 9010443 && istdheppar != 9030443 &&istdheppar != 9020443 ){
181 std::cout<<"EvtGen: EvtOpenCharm cann't not decay the particle pid= "<<istdheppar<<endl;
182 ::abort();
183 }
184
187 double totEn=0;
188
189
190
191
193
194 int i,more;
196 int ndaugjs;
197
198 static int myflag;
201
202 static int themode;
204
206 do{
207
209 std::vector<EvtVector4R> v_p4=theIni.
getDaugP4();
210 std::vector<EvtId> Vid=theIni.
getDaugId();
211 ndaugjs = Vid.size();
212
214
215 for(int i=0;i<ndaugjs;i++){myId[i]=Vid[i];}
216
217
220
221 for(int i=0;i<ndaugjs;i++){
222
224 }
225
226
229
230
231 totEn=0;
232 for(i=0;i<ndaugjs;i++){
236 report(
ERROR,
"EvtGen") <<
"This can not be translated to evt number"<<endl;
237 report(
ERROR,
"EvtGen") <<
"and the decay will be rejected!"<<endl;
238 report(
ERROR,
"EvtGen") <<
"The decay was of particle:"<<ip<<endl;
239
240 }
241
242 }
244
245
246 more=(channel!=-1);
247
248
250
251 }
while( more && (
count<10000) );
252
253 if(fabs(xmp-totEn)>0.01){
254 std::cout<<
"Warning:OPENCHARM generate incomplet final state, "<<
mp<<
" "<<totEn<<endl;
255 ::abort();
256 }
257
259 report(
INFO,
"EvtGen") <<
"Too many loops in EvtOpenCharm!!!"<<endl;
261 }
262
263 fixPolarizations(p);
264
265 return ;
266
267
268}
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()
double double double * p4