Build A DB from a close one.
261 map<ZAI, pair<double, map< ZAI, double > > > ZAIDecay;
264 map< ZAI, double > toAdd;
265 toAdd.insert(pair<ZAI, double> (
ZAI(-3,-3,-3) , 1) );
266 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(-3,-3,-3), pair<
double, map< ZAI, double > > ( 1e28 ,toAdd )) ) ;
269 map< ZAI, double > toAdd;
270 toAdd.insert(pair<ZAI, double> (
ZAI(-2,-2,-2), 1) );
271 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(-2,-2,-2), pair<
double, map< ZAI, double > > ( 1e28 ,toAdd )) ) ;
274 map< ZAI, double > toAdd;
275 toAdd.insert(pair<ZAI, double> (
ZAI(-3,-3,-3) , 1) );
276 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(90,232,0), pair<
double, map< ZAI, double > > ( 2.37944304000000000e+18 , toAdd ) ) );
279 map< ZAI, double > toAdd;
280 toAdd.insert(pair<ZAI, double> (
ZAI(-3,-3,-3) , 1) );
281 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(92,233,0), pair<
double, map< ZAI, double > > ( 5.02396992000000000e+12, toAdd) ) );
284 map< ZAI, double > toAdd;
285 toAdd.insert(pair<ZAI, double> (
ZAI(-3,-3,-3) , 1) );
286 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(92,234,0), pair<
double, map< ZAI, double > > ( 7.74739080000000000e+12, toAdd) ) );
289 map< ZAI, double > toAdd;
290 toAdd.insert(pair<ZAI, double> (
ZAI(-3,-3,-3) , 1) );
291 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(92,235,0), pair<
double, map< ZAI, double > > ( 2.22165504000000000e+16, toAdd) ) );
294 map< ZAI, double > toAdd;
295 toAdd.insert(pair<ZAI, double> (
ZAI(90,232,0) , 1) );
296 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(92,236,0), pair<
double, map< ZAI, double > > ( 7.39078992000000000e+14, toAdd) ) );
299 map< ZAI, double > toAdd;
300 toAdd.insert(pair<ZAI, double> (
ZAI(-3,-3,-3) , 1) );
301 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(92,238,0), pair<
double, map< ZAI, double > > ( 1.40999356800000000e+17, toAdd) ) );
304 map< ZAI, double > toAdd;
305 toAdd.insert(pair<ZAI, double> (
ZAI(91,233,0) , 1) );
306 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(93,237,0), pair<
double, map< ZAI, double > > ( 6.76594944000000000e+13, toAdd) ) );
309 map< ZAI, double > toAdd;
310 toAdd.insert(pair<ZAI, double> (
ZAI(92,234,0) , 1) );
311 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(94,238,0), pair<
double, map< ZAI, double > > ( 2.76760152000000000e+09, toAdd) ) );
314 map< ZAI, double > toAdd;
315 toAdd.insert(pair<ZAI, double> (
ZAI(92,235,0) , 1) );
316 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(94,239,0), pair<
double, map< ZAI, double > > ( 7.60853736000000000e+11, toAdd) ) );
319 map< ZAI, double > toAdd;
320 toAdd.insert(pair<ZAI, double> (
ZAI(92,236,0) , 1) );
321 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(94,240,0), pair<
double, map< ZAI, double > > ( 2.07049413600000000e+11, toAdd) ) );
324 map< ZAI, double > toAdd;
325 toAdd.insert(pair<ZAI, double> (
ZAI(95,241,0) , 1) );
326 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(94,241,0), pair<
double, map< ZAI, double > > ( 4.52062620000000000e+08, toAdd) ) );
329 map< ZAI, double > toAdd;
330 toAdd.insert(pair<ZAI, double> (
ZAI(92,238,0) , 1) );
331 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(94,242,0), pair<
double, map< ZAI, double > > ( 1.18341000000000000e+13, toAdd) ) );
334 map< ZAI, double > toAdd;
335 toAdd.insert(pair<ZAI, double> (
ZAI(93,237,0) , 1) );
336 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(95,241,0), pair<
double, map< ZAI, double > > ( 1.36518177600000000e+10, toAdd) ) );
339 map< ZAI, double > toAdd;
340 toAdd.insert(pair<ZAI, double> (
ZAI(93,238,0) , 0.00459) );
341 toAdd.insert(pair<ZAI, double> (
ZAI(95,242,0) , 0.99541) );
343 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(95,242,1), pair<
double, map< ZAI, double > > ( 4.44962160000000000e+09, toAdd) ) );
346 map< ZAI, double > toAdd;
347 toAdd.insert(pair<ZAI, double> (
ZAI(94,239,0) , 1) );
348 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(95,243,0), pair<
double, map< ZAI, double > > ( 2.32579512000000000e+11, toAdd) ) );
351 map< ZAI, double > toAdd;
352 toAdd.insert(pair<ZAI, double> (
ZAI(94,238,0) , 1) );
353 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(96,242,0), pair<
double, map< ZAI, double > > ( 1.40659200000000000e+07 , toAdd) ) );
356 map< ZAI, double > toAdd;
357 toAdd.insert(pair<ZAI, double> (
ZAI(94,239,0) , 0.9971) );
358 toAdd.insert(pair<ZAI, double> (
ZAI(95,243,0) , 0.0029) );
359 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(96,243,0), pair<
double, map< ZAI, double > > ( 9.18326160000000000e+08, toAdd) ) );
362 map< ZAI, double > toAdd;
363 toAdd.insert(pair<ZAI, double> (
ZAI(94,240,0) , 1) );
364 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(96,244,0), pair<
double, map< ZAI, double > > ( 5.71192560000000000e+08, toAdd) ) );
367 map< ZAI, double > toAdd;
368 toAdd.insert(pair<ZAI, double> (
ZAI(94,241,0) , 1) );
369 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(96,245,0), pair<
double, map< ZAI, double > > ( 2.65809664800000000e+11, toAdd) ) );
372 map< ZAI, double > toAdd;
373 toAdd.insert(pair<ZAI, double> (
ZAI(94,242,0) , 1) );
374 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(96,246,0), pair<
double, map< ZAI, double > > ( 1.48510065600000000e+11, toAdd) ) );
377 map< ZAI, double > toAdd;
378 toAdd.insert(pair<ZAI, double> (
ZAI(94,243,0) , 1) );
379 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(96,247,0), pair<
double, map< ZAI, double > > ( 4.92298560000000000e+14, toAdd) ) );
382 map< ZAI, double > toAdd;
383 toAdd.insert(pair<ZAI, double> (
ZAI(-3,-3,-3) , 1) );
384 ZAIDecay.insert( pair<
ZAI, pair<
double, map< ZAI, double > > >(
ZAI(96,248,0), pair<
double, map< ZAI, double > > ( 1.09820448000000000e+13, toAdd) ) );
387 map<ZAI, map<ZAI, double> > FastDecay;
389 map<ZAI, double> toAdd ;
390 toAdd.insert(pair<ZAI, double> (
ZAI(-3,-3,-3) , 1) );
392 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(90,231,0), toAdd ) );
395 map<ZAI, double> toAdd ;
396 toAdd.insert(pair<ZAI, double> (
ZAI(92,233,0) , 1) );
398 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(90,233,0), toAdd ) );
401 map<ZAI, double> toAdd ;
402 toAdd.insert(pair<ZAI, double> (
ZAI(92,233,0) , 1) );
403 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(91,233,0), toAdd ) );
406 map<ZAI, double> toAdd ;
407 toAdd.insert(pair<ZAI, double> (
ZAI(93,237,0) , 1) );
408 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(92,237,0), toAdd ) );
411 map<ZAI, double> toAdd ;
412 toAdd.insert(pair<ZAI, double> (
ZAI(94,239,0) , 1) );
413 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(92,239,0), toAdd ) );
416 map<ZAI, double> toAdd ;
417 toAdd.insert(pair<ZAI, double> (
ZAI(94,238,0) , 1) );
418 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(93,238,0), toAdd ) );
421 map<ZAI, double> toAdd ;
422 toAdd.insert(pair<ZAI, double> (
ZAI(94,239,0) , 1) );
423 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(93,239,0), toAdd ) );
426 map<ZAI, double> toAdd ;
427 toAdd.insert(pair<ZAI, double> (
ZAI(94,240,0) , 1) );
428 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(93,240,0), toAdd ) );
431 map<ZAI, double> toAdd ;
432 toAdd.insert(pair<ZAI, double> (
ZAI(94,241,0) , 1) );
433 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(93,241,0), toAdd ) );
436 map<ZAI, double> toAdd ;
437 toAdd.insert(pair<ZAI, double> (
ZAI(93,237,0) , 1) );
438 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(94,237,0), toAdd ) );
441 map<ZAI, double> toAdd ;
442 toAdd.insert(pair<ZAI, double> (
ZAI(95,243,0) , 1) );
443 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(94,243,0), toAdd ) );
446 map<ZAI, double> toAdd ;
447 toAdd.insert(pair<ZAI, double> (
ZAI(94,240,0) , 1) );
448 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(95,240,0), toAdd ) );
451 map<ZAI, double> toAdd ;
452 toAdd.insert(pair<ZAI, double> (
ZAI(96,242,0) , 0.827) );
453 toAdd.insert(pair<ZAI, double> (
ZAI(94,242,0) , 0.173) );
454 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(95,242,0), toAdd ) );
457 map<ZAI, double> toAdd ;
458 toAdd.insert(pair<ZAI, double> (
ZAI(96,244,0) , 1) );
459 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(95,244,0), toAdd ) );
462 map<ZAI, double> toAdd ;
463 toAdd.insert(pair<ZAI, double> (
ZAI(96,245,0) , 1) );
464 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(95,245,0), toAdd ) );
467 map<ZAI, double> toAdd ;
468 toAdd.insert(pair<ZAI, double> (
ZAI(-3,-3,-3) , 1) );
469 FastDecay.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(96,249,0), toAdd ) );
473 map<ZAI, map<ZAI, double> > Capture;
475 map<ZAI, double> toAdd ;
476 toAdd.insert(pair<ZAI, double> (
ZAI(95,242,0) , 0.086) );
477 toAdd.insert(pair<ZAI, double> (
ZAI(95,242,1) , 0.914) );
478 Capture.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(95,241,0), toAdd ) );
481 map<ZAI, double> toAdd ;
482 toAdd.insert(pair<ZAI, double> (
ZAI(95,243,0) , 1) );
483 Capture.insert( pair<
ZAI, map<ZAI, double> > (
ZAI(95,242,1), toAdd ) );
485 map<ZAI, int> index_inver;
489 map<ZAI, pair<double, map< ZAI, double > > >::iterator
it;
490 for(it = ZAIDecay.begin() ; it != ZAIDecay.end(); it++)
492 index.insert( pair<int, ZAI > ( i, (*it).first ) );
493 index_inver.insert( pair<ZAI, int > ( (*it).first , i ));
498 TMatrixT<double> DecayMatrix = TMatrixT<double>(index.size(),index.size());
499 for(
int i = 0; i < (int)index.size(); i++)
500 for(
int j = 0; j < (int)index.size(); j++)
501 DecayMatrix[i][j] = 0;
505 map<ZAI, pair<double, map< ZAI, double > > >::iterator
it;
506 for(it = ZAIDecay.begin() ; it != ZAIDecay.end(); it++)
508 map< ZAI, double >::iterator it2;
509 map< ZAI, double > decaylist = (*it).second.second;
510 for(it2 = decaylist.begin(); it2!= decaylist.end(); it2++)
513 map<ZAI, int >::iterator it3 = index_inver.find( (*it2).first );
514 if( it3 != index_inver.end() )
515 DecayMatrix[(*it3).second][i] = log(2.)/(*it).second.first * (*it2).second;
518 map<ZAI, map<ZAI, double> >::iterator it4 = FastDecay.find( (*it2).first );
520 if( it4 == FastDecay.end() )
522 cout <<
"Problem in FastDecay for nuclei " << (*it2).first.Z() <<
" " << (*it2).first.A() <<
" " << (*it2).first.I() << endl;
526 map< ZAI, double >::iterator it5;
527 map< ZAI, double > decaylist2 = (*it4).second;
528 for(it5 = decaylist2.begin(); it5!= decaylist2.end(); it5++)
530 it3 = index_inver.find( (*it5).first );
531 if( it3 == index_inver.end() )
533 cout <<
"Problem in FastDecay for nuclei " << (*it2).first.Z() <<
" " << (*it2).first.A() <<
" " << (*it2).first.I() << endl;
536 DecayMatrix[(*it3).second][i] = log(2.)/(*it).second.first * (*it2).second * (*it5).second;
541 DecayMatrix[i][i] += -log(2.)/(*it).second.first;
549 vector< TMatrixT<double> > NMatrix ;
550 double NormFactor = 1;
566 NormFactor =
Norme(WantedHMIV)/
Norme(DBHMIV);
571 TMatrixT<double> N_0Matrix = TMatrixT<double>( index.size(),1) ;
573 map<ZAI, double >::iterator
it ;
574 for(
int i = 0; i < (int)index.size(); i++)
577 for(it = isotopicquantity.begin(); it != isotopicquantity.end(); it++)
580 map<ZAI, int >::iterator it2;
582 if( (*it).first.Z() < 90 )
583 it2 = index_inver.find(
ZAI(-2,-2,-2) );
584 else it2 = index_inver.find( (*it).first );
586 if(it2 == index_inver.end() )
587 it2 = index_inver.find(
ZAI(-3,-3,-3) );
589 N_0Matrix[ (*it2).second ][0] = (*it).second ;
593 NMatrix.push_back(N_0Matrix);
604 TMatrixT<double> BatemanMatrix = TMatrixT<double>(index.size(),index.size());
605 BatemanMatrix = DecayMatrix ;
609 fFlux->GetPoint(i, x,y);
612 map<ZAI ,TGraph* >::iterator
it;
616 if( index_inver.find( (*it).first ) != index_inver.end() )
619 (*it).second->GetPoint(i, x,y);
620 BatemanMatrix[ index_inver.find( (*it).first )->second ][index_inver.find( (*it).first )->second] += -y* 1e-24 *Flux;
621 BatemanMatrix[1][ index_inver.find( (*it).first )->second] += 2*y* 1e-24 *Flux;
629 if( index_inver.find( (*it).first ) != index_inver.end() )
632 (*it).second->GetPoint(i, x, y);
634 BatemanMatrix[index_inver.find( (*it).first )->second][ index_inver.find( (*it).first )->second ] += -y* 1e-24 *Flux;
636 map<ZAI, map<ZAI, double> >::iterator it3 = Capture.find( (*it).first );
639 if( it3 == Capture.end() )
641 map<ZAI, int >::iterator it6 = index_inver.find(
ZAI( (*it).first.Z(), (*it).first.A()+1, (*it).first.I()) );
644 if( it6 != index_inver.end() )
646 BatemanMatrix[(*it6).second][index_inver.find( (*it).first )->second] += y* 1e-24 *Flux ;
651 map<ZAI, map<ZAI, double> >::iterator it4 = FastDecay.find(
ZAI( (*it).first.Z(), (*it).first.A()+1, (*it).first.I()) );
653 if( it4 == FastDecay.end() )
655 cout <<
"Problem in FastDecay for nuclei " << (*it).first.Z() <<
" " << (*it).first.A()+1 <<
" " << (*it).first.I() << endl;
659 map< ZAI, double >::iterator it5;
660 map< ZAI, double > decaylist2 = (*it4).second;
661 for(it5 = decaylist2.begin(); it5!= decaylist2.end(); it5++)
664 it6 = index_inver.find( (*it5).first );
665 if( it6 == index_inver.end() )
667 cout <<
"Problem in FastDecay for nuclei " << (*it).first.Z() <<
" " << (*it).first.A() <<
" " << (*it).first.I() << endl;
671 BatemanMatrix[(*it6).second][index_inver.find( (*it).first )->second] += y* 1e-24 *Flux * (*it5).second;
678 map<ZAI, double>::iterator it4;
679 map<ZAI, double> CaptureList = (*it3).second;
680 for(it4 = CaptureList.begin(); it4 != CaptureList.end() ; it4++)
683 map<ZAI, int >::iterator it6 = index_inver.find( (*it4).first );
686 if( it6 != index_inver.end() )
687 BatemanMatrix[(*it6).second][index_inver.find( (*it).first )->second] += y* 1e-24 *Flux * (*it4).second ;
690 map<ZAI, map<ZAI, double> >::iterator it7 = FastDecay.find( (*it4).first );
692 if( it7 == FastDecay.end() )
694 cout <<
"Problem in FastDecay for nuclei " << (*it7).first.Z() <<
" " << (*it7).first.A() <<
" " << (*it7).first.I() << endl;
698 map< ZAI, double >::iterator it5;
699 map< ZAI, double > decaylist2 = (*it7).second;
700 for(it5 = decaylist2.begin(); it5!= decaylist2.end(); it5++)
703 it6 = index_inver.find( (*it5).first );
704 if( it6 == index_inver.end() )
706 cout <<
"Problem in FastDecay for nuclei " << (*it7).first.Z() <<
" " << (*it7).first.A() <<
" " << (*it7).first.I() << endl;
710 BatemanMatrix[(*it6).second][index_inver.find( (*it).first )->second] += y * 1e-24 * Flux * (*it5).second * (*it4).second;
723 if( index_inver.find( (*it).first ) != index_inver.end() )
726 (*it).second->GetPoint(i, x,y);
727 BatemanMatrix[ index_inver.find( (*it).first )->second ][index_inver.find( (*it).first )->second] += -y* 1e-24 *Flux;
730 map<ZAI, int>::iterator it3 = index_inver.find(
ZAI( (*it).first.Z(), (*it).first.A()-1, 0) );
732 if( it3 != index_inver.end() )
733 BatemanMatrix[(*it3).second][index_inver.find( (*it).first )->second] += y* 1e-24 *Flux;
737 map<ZAI, map<ZAI, double> >::iterator it4 = FastDecay.find(
ZAI( (*it).first.Z(), (*it).first.A()-1, 0) );
739 if( it4 == FastDecay.end() )
741 it3 = index_inver.find(
ZAI( -3, -3, -3 ) );
742 BatemanMatrix[(*it3).second][index_inver.find( (*it).first )->second] += y* 1e-24 *Flux;
746 map< ZAI, double >::iterator it5;
747 map< ZAI, double > decaylist2 = (*it4).second;
748 for(it5 = decaylist2.begin(); it5!= decaylist2.end(); it5++)
751 it3 = index_inver.find( (*it5).first );
752 if( it3 == index_inver.end() )
754 cout <<
"Problem in FastDecay for nuclei " << (*it4).first.Z() <<
" " << (*it4).first.A() <<
" " << (*it4).first.I() << endl;
757 BatemanMatrix[(*it3).second][index_inver.find( (*it).first )->second] += y* 1e-24 *Flux * (*it5).second ;
765 TMatrixT<double> NEvolutionMatrix = TMatrixT<double>(index.size(),1);
770 fFissionXS.begin()->second->GetPoint(i+1, x,y);
771 TStepMax = x - timevector[i];
775 BatemanMatrix *= TStepMax;
777 TMatrixT<double> IdMatrix = TMatrixT<double>(index.size(),index.size());
778 for(
int j = 0; j < (int)index.size(); j++)
779 for(
int k = 0; k < (int)index.size(); k++)
781 if(k == j) IdMatrix[j][k] = 1;
782 else IdMatrix[j][k] = 0;
786 TMatrixT<double> BatemanMatrixDL = TMatrixT<double>(index.size(),index.size());
787 TMatrixT<double> BatemanMatrixDLTermN = TMatrixT<double>(index.size(),index.size());
791 BatemanMatrixDLTermN = IdMatrix;
792 BatemanMatrixDL = BatemanMatrixDLTermN;
802 TMatrixT<double> BatemanMatrixDLTermtmp = TMatrixT<double>(index.size(),index.size());
803 BatemanMatrixDLTermtmp = BatemanMatrixDLTermN;
804 BatemanMatrixDLTermN.Mult(BatemanMatrixDLTermtmp, BatemanMatrix );
806 BatemanMatrixDLTermN *= 1./j;
807 BatemanMatrixDL += BatemanMatrixDLTermN;
810 for(
int m = 0; m < (int)index.size(); m++)
811 for(
int n = 0; n < (int)index.size(); n++)
812 NormN += BatemanMatrixDLTermN[m][n]*BatemanMatrixDLTermN[m][n];
814 }
while ( NormN != 0 || j==2);
819 NEvolutionMatrix = BatemanMatrixDL * NMatrix.back() ;
820 NMatrix.push_back(NEvolutionMatrix);
826 for(
int i = 0; i < (int)index.size(); i++)
828 double ZAIQuantity[NMatrix.size()];
829 for(
int j = 0; j < (int)NMatrix.size(); j++)
830 ZAIQuantity[j] = (NMatrix[j])[i][0];
832 GeneratedDB.
NucleiInsert(pair<ZAI, TGraph*> (index.find(i)->second,
new TGraph(NMatrix.size(), timevector, ZAIQuantity) ) );