From c343728988d4be22c5257ed964e0fb1ef53ddd0e Mon Sep 17 00:00:00 2001
From: Baptiste Mouginot <mouginot.baptiste@gmail.com>
Date: Thu, 22 Jan 2015 09:03:55 +0000
Subject: [PATCH] pdating source: step 2a copying the new source : include

git-svn-id: svn+ssh://svn.in2p3.fr/class@477 0e7d625b-0364-4367-a6be-d5be4a48d228
---
 source/trunk/include/CLASSBackEnd.hxx         | 122 +++++++
 source/trunk/include/CLASSConstante.hxx       |  11 +
 source/trunk/include/CLASSFacility.hxx        | 141 ++++++++
 source/trunk/include/CLASSFuel.hxx            |  62 ++++
 source/trunk/include/CLASSFuelPlan.hxx        |  65 ++++
 source/trunk/include/CLASSHeaders.hxx         |  25 ++
 source/trunk/include/CLASSLogger.hxx          | 182 ++++++++++
 source/trunk/include/CLASSNucleiFiliation.hxx | 112 +++++++
 source/trunk/include/CLASSObject.hxx          |  67 ++++
 source/trunk/include/DecayDataBank.hxx        | 192 +++++++++++
 source/trunk/include/DynamicalSystem.hxx      | 127 +++++++
 source/trunk/include/EquivalenceModel.hxx     |  97 ++++++
 source/trunk/include/EvolutionData.hxx        | 251 ++++++++++++++
 source/trunk/include/FabricationPlant.hxx     | 229 +++++++++++++
 source/trunk/include/IrradiationModel.hxx     | 242 ++++++++++++++
 source/trunk/include/IsotopicVector.hxx       | 176 ++++++++++
 source/trunk/include/PhysicsModels.hxx        |  86 +++++
 source/trunk/include/Pool.hxx                 | 173 ++++++++++
 source/trunk/include/Reactor.hxx              | 315 ++++++++++++++++++
 source/trunk/include/Scenario.hxx             | 288 ++++++++++++++++
 source/trunk/include/SeparationPlant.hxx      | 146 ++++++++
 source/trunk/include/Storage.hxx              | 165 +++++++++
 source/trunk/include/StringLine.hxx           | 306 +++++++++++++++++
 source/trunk/include/XSModel.hxx              |  73 ++++
 source/trunk/include/ZAI.hxx                  |  90 +++++
 source/trunk/include/ZAIMass.hxx              |  52 +++
 26 files changed, 3795 insertions(+)
 create mode 100644 source/trunk/include/CLASSBackEnd.hxx
 create mode 100644 source/trunk/include/CLASSConstante.hxx
 create mode 100644 source/trunk/include/CLASSFacility.hxx
 create mode 100644 source/trunk/include/CLASSFuel.hxx
 create mode 100644 source/trunk/include/CLASSFuelPlan.hxx
 create mode 100755 source/trunk/include/CLASSHeaders.hxx
 create mode 100755 source/trunk/include/CLASSLogger.hxx
 create mode 100644 source/trunk/include/CLASSNucleiFiliation.hxx
 create mode 100644 source/trunk/include/CLASSObject.hxx
 create mode 100644 source/trunk/include/DecayDataBank.hxx
 create mode 100755 source/trunk/include/DynamicalSystem.hxx
 create mode 100644 source/trunk/include/EquivalenceModel.hxx
 create mode 100755 source/trunk/include/EvolutionData.hxx
 create mode 100644 source/trunk/include/FabricationPlant.hxx
 create mode 100644 source/trunk/include/IrradiationModel.hxx
 create mode 100755 source/trunk/include/IsotopicVector.hxx
 create mode 100644 source/trunk/include/PhysicsModels.hxx
 create mode 100755 source/trunk/include/Pool.hxx
 create mode 100755 source/trunk/include/Reactor.hxx
 create mode 100755 source/trunk/include/Scenario.hxx
 create mode 100644 source/trunk/include/SeparationPlant.hxx
 create mode 100644 source/trunk/include/Storage.hxx
 create mode 100755 source/trunk/include/StringLine.hxx
 create mode 100644 source/trunk/include/XSModel.hxx
 create mode 100755 source/trunk/include/ZAI.hxx
 create mode 100644 source/trunk/include/ZAIMass.hxx

diff --git a/source/trunk/include/CLASSBackEnd.hxx b/source/trunk/include/CLASSBackEnd.hxx
new file mode 100644
index 000000000..c16166b27
--- /dev/null
+++ b/source/trunk/include/CLASSBackEnd.hxx
@@ -0,0 +1,122 @@
+
+#ifndef _CLASSBACKEND_HXX
+#define _CLASSBACKEND_HXX
+
+
+/*!
+ \file
+ \brief Header file for CLASSFacility class.
+
+ */
+
+#include <string>
+#include <fstream>
+#include <map>
+
+
+#include "CLASSFacility.hxx"
+#include "IsotopicVector.hxx"
+#include "DecayDataBank.hxx"
+
+#include "TNamed.h"
+
+using namespace std;
+
+typedef long long int cSecond;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a CLASS Facility.
+ The aim of these class is synthetyse all the commum properties of the nuclear facilities which are involve in the BackEnd Fuel cycle.
+
+
+ @author BaM
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+class CLASSBackEnd : public CLASSFacility
+{
+	public :
+	///< Normal Constructor.
+	CLASSBackEnd(int type = 0);
+	CLASSBackEnd(CLASSLogger* log,int type = 0);
+	CLASSBackEnd(CLASSLogger* log, cSecond cycletime, int type = 0);
+
+	//********* Get Method *********//
+	/*!
+	 \name Get Function
+	 */
+	//@{
+
+
+	vector<IsotopicVector> GetIVArray()	const	{ return fIVArray; }		//!< Return the IsotopicVector Array
+	vector<cSecond>	GetIVArrayArrivalTime()	const	{ return fIVArrayArrivalTime;}	//!<Return the pointer to the OUtBackEndFacility
+
+	int		GetIVNumber()		const	{ return fIVArray.size();}
+	bool		GetStorageType()	const	{ return fIsStorageType;}	//!< Return the storageType
+	IsotopicVector  GetIV(int i)		const	{ if(i < (int)fIVArray.size()) return fIVArray[i];
+								else return IsotopicVector(); }
+#ifndef __CINT__
+	DecayDataBank*	GetDecayDataBank()		{ return fDecayDataBase;}	//!< Return the pointer to the decay DataBank
+	CLASSBackEnd*	GetOutBackEndFacility()	const	{ return fOutBackEndFacility;}	//!<Return the pointer to the OUtBackEndFacility
+	virtual map<cSecond,int> GetTheBackEndTimePath();
+
+#endif
+
+	//@}
+
+	//********* Set Method *********//
+	/*!
+	 \name Set Function
+	 */
+	//@{
+	void		SetIsStorageType(bool val = true)		{ fIsStorageType = val;}	//! Set the fIsStorage bool
+	virtual	void	SetIVArray(vector<IsotopicVector> ivarray)	{ fIVArray = ivarray; }		//!< Set The isotopicVector Array
+#ifndef __CINT__
+	void		SetDecayDataBank(DecayDataBank* decayDB)	{ fDecayDataBase = decayDB;}	//! Set the Decay DataBank
+	virtual void	SetOutBackEndFacility(CLASSBackEnd* befacility)	{ fOutBackEndFacility = befacility;
+										fIsStorageType = false; } //! Set a Out Facility for the fuel
+
+#endif
+
+	using CLASSFacility::SetName;
+
+	//@}
+
+
+	/*!
+	 \name BackEndFacility specific Method
+	 */
+	//@{
+	virtual void	AddIV(IsotopicVector isotopicvector);	//!< Add an Isotopicvector to the IVArray
+	void		ClearIVArray();					//!< Empty the IVArray removing all fuel stored
+
+	//@}
+	virtual void Evolution(cSecond t)	{}	//!< Performe the Evolution to the Time t
+	void UpdateInsideIV();
+
+
+	protected :
+	IsotopicVector		GetDecay(IsotopicVector isotopicvector, cSecond t);	//!< Get IsotopicVector Decay at the t time
+	vector<IsotopicVector>	fIVArray;					///< Vector containning all the fuel stored.
+	vector<cSecond>		fIVArrayArrivalTime;					///< Vector containning all the fuel stored.
+
+#ifndef __CINT__
+	CLASSBackEnd*		fOutBackEndFacility;					//!< Facility getting the fuel at the end of the cycle
+#endif
+
+	//********* Internal Parameter *********//
+	private :
+	bool		fIsStorageType;		//!< True if there is not OutBAckEndFacility (like a storage...)
+
+#ifndef __CINT__
+	DecayDataBank*	fDecayDataBase;		//!< Pointer to the Decay DataBase
+#endif
+
+	ClassDef(CLASSBackEnd,2);
+};
+
+#endif
+
diff --git a/source/trunk/include/CLASSConstante.hxx b/source/trunk/include/CLASSConstante.hxx
new file mode 100644
index 000000000..92a9a374d
--- /dev/null
+++ b/source/trunk/include/CLASSConstante.hxx
@@ -0,0 +1,11 @@
+#ifndef _CLASSConstante_HXX_
+#define _CLASSConstante_HXX_
+
+//CLASS library
+#include "ZAIMass.hxx"
+
+const double AVOGADRO = 6.02214129e23;
+const ZAIMass cZAIMass;
+
+
+#endif
diff --git a/source/trunk/include/CLASSFacility.hxx b/source/trunk/include/CLASSFacility.hxx
new file mode 100644
index 000000000..35a3a1d73
--- /dev/null
+++ b/source/trunk/include/CLASSFacility.hxx
@@ -0,0 +1,141 @@
+
+#ifndef _CLASSFACILITY_HXX
+#define _CLASSFACILITY_HXX
+
+
+/*!
+ \file
+ \brief Header file for CLASSFacility class.
+
+ */
+
+#include <string>
+#include <fstream>
+
+#include "CLASSObject.hxx"
+#include "IsotopicVector.hxx"
+#include "DecayDataBank.hxx"
+
+#include "TNamed.h"
+
+using namespace std;
+typedef long long int cSecond;
+
+class Scenario;
+//-----------------------------------------------------------------------------//
+/*!
+ Define a CLASS Facility.
+ The aim of these class is to regroup all the commum properties of the nuclear facilities.
+
+
+ @author BaM
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+
+
+class CLASSFacility : public CLASSObject
+{
+public :
+		///< Normal Constructor.
+	CLASSFacility(int type = 0);
+	CLASSFacility(CLASSLogger* log, int type = 0);
+	CLASSFacility(CLASSLogger* log, cSecond cycletime, int type = 0);
+	CLASSFacility(CLASSLogger* log, cSecond creationtime, cSecond lifetime, int type = 0);
+	CLASSFacility(CLASSLogger* log, cSecond startingtime, cSecond lifetime, cSecond cycletime, int type = 0);
+	
+		//********* Get Method *********//
+	/*!
+	 \name Get Function
+	 */
+	//@{
+
+	int 		GetId()			const	{ return fId; }			//!< Return the Facility Parc'Is
+	IsotopicVector 	GetInsideIV()		const	{ return fInsideIV; } 		//!< Return the IV contain in the Facility
+
+	int		GetFacilityType()	const	{ return fFacilityType; }
+
+	cSecond		GetInternalTime()	const	{ return fInternalTime; }	//!< Return Creation Time
+
+	cSecond		GetCycleTime()		const	{ return fCycleTime; } 		//!< Return the cycle time of the Facility
+	cSecond 	GetCreationTime()	const	{ return fCreationTime; }	//!< Return the creation time of the Facility
+	cSecond 	GetLifeTime()		const	{ return fLifeTime; }		//!< Return the life time of the Facility
+	Scenario*	GetParc()			{ return fParc; }		//!< return the pointer to the Park
+
+
+	IsotopicVector GetCumulativeIVIn() { return fCumulativeIVIn;}			//!< return the culative sum of all incoming IV
+	IsotopicVector GetCumulativeIVOut() { return fCumulativeIVOut;}			//!< return the culative sum of all outcoming IV
+	//@}
+	
+		//********* Set Method *********//
+	/*!
+	 \name Set Function
+	 */
+	//@{
+	void	SetId(int id)			{ fId = id; }				//!< Set The Facility Parc'Id
+	void	SetParc(Scenario* parc)		{ fParc = parc; }			//!< Set the Pointer to the Parc
+	void	SetFacilityType(int type)	{ fFacilityType = type; }		//!< Set the facility type :
+											/// \li 2 reactor Studown
+											/// \li 4 start/End of reactor cycle,
+											/// \li 8 end of Cooling,
+											/// \li 16 fuel Fabrication
+	using CLASSObject::SetName;
+	using CLASSObject::GetName;
+
+
+	void SetInsideIV(IsotopicVector isotopicvector)	{ fInsideIV = isotopicvector; }	//!< Set the IV inside the Facility Core
+	void SetCreationTime(double creationtime)	{ fCreationTime = (cSecond)creationtime;} //!< Set the creation Time
+	void SetLifeTime(double lifetime)		{ fLifeTime = (cSecond)lifetime; }	//!< Set the life time of the facility
+	virtual void SetCycleTime(double cycletime)	{ fCycleTime = (cSecond)cycletime; }	//!< Set the cycle time (Cycle of the loading Plan)
+	void SetInCycleTime(double incycletime)		{ fInCycleTime = (cSecond)incycletime; fIsStarted = true; }	//!< Set the cycle time (Cycle of the loading Plan)
+	void SetInternalTime(double internaltime)	{ fInternalTime = (cSecond)internaltime; }	//!< Set the cycle time (Cycle of the loading Plan)
+
+	//@}
+
+
+	/*!
+	 \name Evolution Method
+	 */
+	//@{
+
+	void AddCumulativeIVIn(IsotopicVector IV) { fCumulativeIVIn += IV;}		//!< Add the Input IsotopicVector the The cumulative IV IN
+	void AddCumulativeIVOut(IsotopicVector IV) { fCumulativeIVOut += IV;}		//!< Add the Input IsotopicVector the The cumulative IV OUT
+	virtual void Evolution(cSecond t)	= 0;	//!< Performe the Evolution to the Time t
+	virtual void Dump()			{ }	//!< Write Modification (IV In/Out, filling the TF...)
+		
+	//@}
+protected :
+	bool		fIsStarted;		///< True if Running, False Otherwise
+	bool		fIsShutDown;		///< True if the facility is stoped, False Otherwise
+	bool		fIsAtEndOfCycle;	///< True if Reaching the End of a Facility Cycle
+
+		
+	cSecond		fInternalTime;		///< Internal Clock
+	cSecond		fInCycleTime;		///< Time spend since the beginning of the last Cycle
+	cSecond		fCycleTime;		///< Cycle duration Time
+
+	IsotopicVector	fInsideIV;		///< All IV in the Facility (fuel for reactor, total for all others...)
+	IsotopicVector	fCumulativeIVIn;	///< All IV in the Facility (fuel for reactor, total for all others...)
+	IsotopicVector	fCumulativeIVOut;	///< All IV in the Facility (fuel for reactor, total for all others...)
+
+		//********* Internal Parameter *********//
+private :
+	int		fId;			//!< Identity of the Facility inside the Parc
+	int		fFacilityType;		///< Type of facility :
+						/// \li 4 reactor,
+						/// \li 8 Pool,
+						/// \li 16 FabricationPlant.
+
+
+	Scenario*	fParc;			//!< Pointer to the main Parc
+
+	cSecond		fCreationTime;		///< CLASS Universal Time of Creation
+	cSecond		fLifeTime;		///< Time of life Of the Reactor (Operating's Duration)
+
+	ClassDef(CLASSFacility,1);
+};
+
+#endif
+
diff --git a/source/trunk/include/CLASSFuel.hxx b/source/trunk/include/CLASSFuel.hxx
new file mode 100644
index 000000000..98d320fa6
--- /dev/null
+++ b/source/trunk/include/CLASSFuel.hxx
@@ -0,0 +1,62 @@
+
+#ifndef _CLASSFUEL_HXX
+#define _CLASSFUEL_HXX
+
+
+/*!
+ \file
+ \brief Header file for CLASSFuel class.
+
+
+ @author BaM
+ @version 2.0
+ */
+
+#include <string>
+#include <fstream>
+
+#include "CLASSObject.hxx"
+#include "PhysicsModels.hxx"
+#include "EvolutionData.hxx"
+
+using namespace std;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a CLASS Object.
+ The aim of these class is synthetyse all the commum properties to all CLASS Fuel Element.
+
+
+ @author BaM
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+
+class CLASSFuel : public CLASSObject
+{
+	public :
+	///< Normal Constructor.
+	CLASSFuel(EvolutionData* evo);
+	CLASSFuel(PhysicsModels* evo);
+
+
+	virtual CLASSFuel* Clone()	{ return new CLASSFuel(*this); } //!< Correct way to copy a CLASSFuel in case of derivation
+
+
+	EvolutionData* GetEvolutionData() {return fEvolutionData;}
+	PhysicsModels* GetPhysicsModels() {return fPhysicsModels;}
+	using CLASSObject::SetName;
+	using CLASSObject::GetName;
+	protected :
+
+
+	private :
+
+	EvolutionData* fEvolutionData;
+	PhysicsModels* fPhysicsModels;
+};
+
+#endif
+
diff --git a/source/trunk/include/CLASSFuelPlan.hxx b/source/trunk/include/CLASSFuelPlan.hxx
new file mode 100644
index 000000000..7fabaedd9
--- /dev/null
+++ b/source/trunk/include/CLASSFuelPlan.hxx
@@ -0,0 +1,65 @@
+
+#ifndef _CLASSFUELPLAN_HXX
+#define _CLASSFUELPLAN_HXX
+
+
+/*!
+ \file
+ \brief Header file for CLASSFuelPlan class.
+
+
+ @author BaM
+ @version 2.0
+ */
+
+#include <string>
+#include <fstream>
+#include <map>
+
+#include "CLASSObject.hxx"
+#include "CLASSFuel.hxx"
+
+using namespace std;
+typedef long long int cSecond;
+
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a CLASS Object.
+ The aim of these class is synthetyse all the commum properties to all CLASS Fuel Element.
+
+
+ @author BaM
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+
+class CLASSFuelPlan : public CLASSObject
+{
+	public :
+	///< Normal Constructor.
+	CLASSFuelPlan();
+	CLASSFuelPlan(CLASSLogger* log);
+
+	void AddFuel(cSecond time,  CLASSFuel fuel, double BurnUp);
+	
+	void AddFuel(cSecond time,  EvolutionData* fuel, double BurnUp) {AddFuel( time, CLASSFuel(fuel), BurnUp);}
+	void AddFuel(cSecond time,  PhysicsModels* fuel, double BurnUp) {AddFuel( time, CLASSFuel(fuel), BurnUp);}
+
+	pair< CLASSFuel, double> GetFuelAt(cSecond t);
+
+	using CLASSObject::SetName;
+	using CLASSObject::GetName;
+	protected :
+
+
+	private :
+
+	map< cSecond, pair< CLASSFuel, double > >	fLoadingPlan;	///< Loading PLan to change the EvolutionData (and the associetedBurnup) according to the Plan
+
+};
+
+#endif
+
diff --git a/source/trunk/include/CLASSHeaders.hxx b/source/trunk/include/CLASSHeaders.hxx
new file mode 100755
index 000000000..dbd173fd7
--- /dev/null
+++ b/source/trunk/include/CLASSHeaders.hxx
@@ -0,0 +1,25 @@
+#ifndef _CLASSHEADERS_HXX_
+#define _CLASSHEADERS_HXX_
+
+
+
+
+//CLASS library
+#include "CLASSConstante.hxx"
+#include "Scenario.hxx"
+#include "Reactor.hxx"
+#include "Pool.hxx"
+#include "FabricationPlant.hxx"
+#include "SeparationPlant.hxx"
+#include "Storage.hxx"
+#include "IsotopicVector.hxx"
+#include "ZAI.hxx"
+#include "CLASSLogger.hxx"
+
+#include "EvolutionData.hxx"
+#include "PhysicsModels.hxx"
+#include "DecayDataBank.hxx"
+
+#include "ZAIMass.hxx"
+
+#endif
diff --git a/source/trunk/include/CLASSLogger.hxx b/source/trunk/include/CLASSLogger.hxx
new file mode 100755
index 000000000..621402068
--- /dev/null
+++ b/source/trunk/include/CLASSLogger.hxx
@@ -0,0 +1,182 @@
+#ifndef _LOG_CLASS_
+#define _LOG_CLASS_
+
+
+/*!
+ \file 
+ \brief Header file for CLASSLogger class. 
+
+ 
+ @author BaM
+ @version 2.0
+ */
+
+#include <string>
+#include <fstream>
+
+#include <iostream>
+#include <cstring>
+#include <sstream>
+#include "stdlib.h"
+using namespace std;
+
+
+#ifndef __CINT__
+
+#define ERROR		if(fLog)if(fLog->GetMaxOutPutLVL() >= 0) fLog->E() << "!!!ERROR!!! " << "[" << __FILE__ << ":" << __FUNCTION__ << "] "
+#define WARNING		if(fLog)if(fLog->GetMaxOutPutLVL() >= 1) fLog->W() << "!!WARNING!! " << "[" << __FILE__ << ":" << __FUNCTION__ << "] "
+#define INFO		if(fLog)if(fLog->GetMaxOutPutLVL() >= 2) fLog->I() << "!!!!INFO!!! " << "[" << __FILE__ << "] "
+
+#define DBGL		if(fLog)if(fLog->GetMaxOutPutLVL() >= 3) fLog->D() << __FILE__ << " : " << __LINE__ << " [" << __FUNCTION__ << "]" << endl;
+#define DBGV(x)		{if(fLog)if(fLog->GetMaxOutPutLVL() >= 3) fLog->D() << __FILE__ << " : " << __LINE__ << " [" << __FUNCTION__ << "]" << x << endl;}
+
+#else
+
+#define ERROR		cout
+#define INFO		cout
+#define WARNING		cout
+#define DBGL
+#define DBGV(x)
+
+
+#endif
+
+
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a CLASSLogger.
+ The aim of this class is to centralize the all CLASS software message inside a file.
+
+
+ @author BaM
+ @version 2.0
+ */
+//________________________________________________________________________
+#ifndef _LOGTYPE_CLASS
+#define _LOGTYPE_CLASS
+
+
+
+class LogType
+{
+public:
+	//********* Constructor/Destructor Method *********//
+
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+
+
+	LogType(ostream &Log) { fLog = &Log; fLog2 = 0; }	//!< Normal Constructor
+
+	~LogType()  {}	//!< Normal Destructor
+
+	//@}
+
+	//********* In/Out Method *********//
+
+	/*!
+	 \name In/Out
+	 */
+	//@{
+	string GetCLASSLoggerName() const { return fCLASSLoggerName; }	//!w return the CLASSLogger name
+
+	LogType &operator<<(std::ostream& (*manip)(std::ostream &))
+	{
+		manip( *(this->fLog) );
+		if(fLog2)
+			manip( *(this->fLog2) );
+		return *this;
+	}
+
+
+	template<typename T>
+	inline LogType& operator<<(T something)
+	{
+                *(this->fLog) << something;
+		if(fLog2)
+			*(this->fLog2) << something;
+		 return *this;
+	}
+
+
+	void SetSecondOutput(ostream &log) {fLog2 = &log;}
+
+	private :
+
+	ostream *fLog;
+	ostream *fLog2;
+
+	string fCLASSLoggerName;		//!< Log File name
+};
+
+
+#endif
+
+
+#ifndef _CLASSLogger_CLASS_
+#define _CLASSLogger_CLASS_
+
+
+
+class CLASSLogger
+{
+public:
+
+	//********* Constructor/Destructor Method *********//
+
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+	CLASSLogger();
+
+	CLASSLogger(string CLASSLoggerName, int VerboseLvl = 0, int OutputLvl = 1 );	//!< Normal Constructor
+
+	~CLASSLogger();	//!< Normal Destructor
+
+	//@}
+
+	//********* In/Out Method *********//
+
+	/*!
+	 \name In/Out
+	 */
+	//@{
+	string GetCLASSLoggerName() const { return fCLASSLoggerName; }	//!w return the CLASSLogger name
+	int GetMaxOutPutLVL()	const { return fMaxOutPutLVL; }
+	int GetVerboseLVL()	const { return fVerboseLVL; }
+
+	LogType E() {return *fError;}
+	LogType W() {return *fWarning;}
+	LogType D() {return *fDebug;}
+	LogType I() {return *fInfo;}
+
+//@}
+
+
+
+	
+	private :
+	int fMaxOutPutLVL;
+	int fVerboseLVL;
+
+	LogType* fError;
+	LogType* fInfo;
+	LogType* fWarning;
+	LogType* fDebug;
+
+	ofstream fOutPutFile;
+	string fCLASSLoggerName;		//!< Log File name
+};
+
+#endif
+
+
+
+#endif
+
+
+
diff --git a/source/trunk/include/CLASSNucleiFiliation.hxx b/source/trunk/include/CLASSNucleiFiliation.hxx
new file mode 100644
index 000000000..e28664e55
--- /dev/null
+++ b/source/trunk/include/CLASSNucleiFiliation.hxx
@@ -0,0 +1,112 @@
+#ifndef _CLASSNucleiFiliation_
+#define _CLASSNucleiFiliation_
+
+/*!
+ \file
+ \brief Header file for CLASSNucleiFiliation classes.
+ */
+
+#include "CLASSObject.hxx"
+#include "IsotopicVector.hxx"
+
+using namespace std;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a nuclei as : Z A I.
+ The aim of this class is to discribe each CLASSNucleiFiliation.
+ 
+ @author BaM
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+
+class CLASSNucleiFiliation : public CLASSObject
+{
+public:
+	
+	
+	//********* Constructor/Destructor Method *********//
+	
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+	
+	CLASSNucleiFiliation();	///< Default constructor
+	CLASSNucleiFiliation(CLASSLogger* log);	///< Default constructor
+
+	
+	CLASSNucleiFiliation(const CLASSNucleiFiliation& CNF); ///< Copy Constructor
+	
+	
+	~CLASSNucleiFiliation();	///< Normal Destructor.
+	
+	//}
+
+	
+	//********* Get Method *********//
+	
+	/*!
+	 \name Get Method
+	 */
+	//@{
+	map<ZAI, IsotopicVector> GetNucleiFIliation() const {return fNucleiFiliation;}
+
+	IsotopicVector GetFiliation(ZAI Mother);
+	
+	vector<ZAI> GetZAIList() const;			//!< Return the list of mother ZAI present in the Filiation list
+	
+	
+	int size() const{return (int)fNucleiFiliation.size();}
+	
+	ZAI GetArtificialDecay(ZAI Mother);
+	
+	//}
+	
+	//********* Add Method *********//
+	
+	/*!
+	 \name Adding Method
+	 */
+	//@{
+	
+	
+	void Add(ZAI Mother, IsotopicVector Daughter );
+	
+	//}
+
+
+	//********* Modification Method *********//
+	
+	/*!
+	 \name Modification Method
+	 */
+	//@{
+	
+	
+	void FiliationCleanUp(map<ZAI, int> GoodNuclei, CLASSNucleiFiliation CuttedNuclei);
+
+	void SelfFiliationCleanUp(map<ZAI, int> GoodNuclei);
+	
+	
+	
+
+	void NormalizeBranchingRatio(double Value = 1);
+
+	void NormalizeBranchingRatio(ZAI Mother, double Value);
+
+	//}
+	
+	
+protected :
+	
+	map<ZAI, IsotopicVector> fNucleiFiliation;
+	
+	
+};
+
+
+#endif
diff --git a/source/trunk/include/CLASSObject.hxx b/source/trunk/include/CLASSObject.hxx
new file mode 100644
index 000000000..4a7118861
--- /dev/null
+++ b/source/trunk/include/CLASSObject.hxx
@@ -0,0 +1,67 @@
+
+#ifndef _CLASSOBJECT_HXX
+#define _CLASSOBJECT_HXX
+
+
+/*!
+ \file
+ \brief Header file for CLASSObject class.
+ 
+ 
+ @author BaM
+ @version 2.0
+ */
+
+#include <string>
+#include <fstream>
+
+#include "CLASSLogger.hxx"
+
+#include "TNamed.h"
+
+using namespace std;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a CLASS Object.
+ The aim of these class is synthetyse all the commum properties to all CLASS Element.
+
+
+ @author BaM
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+
+class CLASSObject : public TNamed
+{
+public :
+	///< Normal Constructor.
+	CLASSObject();
+	CLASSObject(CLASSLogger* log);
+
+	
+	virtual CLASSObject* Clone()	{ return new CLASSObject(*this); } //!< Correct way to copy a CLASSObject in case of derivation
+
+#ifndef __CINT__
+	void		SetLog(CLASSLogger* log)	{ fLog = log;}		//!< Set the CLASSLogger
+	CLASSLogger*	GetLog()		{ return fLog; }		//!< Return the Pointer to the Log
+#endif
+
+
+	using TNamed::SetName;
+	using TNamed::GetName;
+protected :
+#ifndef __CINT__
+	CLASSLogger*	fLog;			//!< Pointer to the Log
+#endif
+
+
+private :
+
+	ClassDef(CLASSObject,0);
+};
+
+#endif
+
diff --git a/source/trunk/include/DecayDataBank.hxx b/source/trunk/include/DecayDataBank.hxx
new file mode 100644
index 000000000..af502e18c
--- /dev/null
+++ b/source/trunk/include/DecayDataBank.hxx
@@ -0,0 +1,192 @@
+#ifndef __DecayDataBank_HXX__
+#define __DecayDataBank_HXX__
+
+/*!
+ \file
+ \brief Header file for DecayDataBank class.
+ @version 2.0
+ */
+
+#include "CLASSObject.hxx"
+#include "TMatrix.h"
+#include "EvolutionData.hxx"
+#include "IsotopicVector.hxx"
+#include "DynamicalSystem.hxx"
+
+#include <map>
+#include <vector>
+
+
+using namespace std;
+typedef long long int cSecond;
+
+class ZAI;
+class CLASSLogger;
+
+double ReactionRateWeightedDistance(IsotopicVector IV1, EvolutionData DB );
+double ReactionRateWeightedDistance(EvolutionData DB, IsotopicVector IV1  );
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a DecayDataBank.
+ The aim of these class is describe the evolution of "all" evoluting system in CLASS.
+ 
+ For the Decay Matrix the DecayDataBank iq mainly contain a map of <ZAI,EvolutionData>.This map do the correspondance between a ZAI and its decay evolution (containing all the daughter nuclei comming from the decay a the original ZAI).
+ 
+ @author BaM
+ @author Marc
+ @author PTO for a part the Decay management -- steal from MURE (Even if he does not kown it!! :))
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+
+class DecayDataBank : public CLASSObject
+{
+	
+	public :
+	
+	
+	//********* Constructor/Desctructor *********//
+	
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+	/// Normal Constructor.
+	DecayDataBank();
+	
+
+	//{
+	/// Special Constructor.
+	/*!
+	 Use to load a CLASSLogger
+	 \param CLASSLogger CLASSLogger used for the log...
+	 \param DB_index_file path to the index file
+	 \param setlog if the log are stored in the CLASSLogger
+	 \param olfreadmethod true if the old format of EvolutionData are used (ie without the key word such as Inv, XSFiss...)
+	 */
+	DecayDataBank(string DB_index_file, bool olfreadmethod = false );
+	//}
+	//{
+	/// Special Constructor.
+	/*!
+	 Use to load a CLASSLogger
+	 \param CLASSLogger CLASSLogger used for the log...
+	 \param DB_index_file path to the index file
+	 \param setlog if the log are stored in the CLASSLogger
+	 \param olfreadmethod true if the old format of EvolutionData are used (ie without the key word such as Inv, XSFiss...)
+	 */
+	DecayDataBank(CLASSLogger* Log, string DB_index_file, bool olfreadmethod = false );
+	//}
+	
+	//{
+	/// Normal Destructor.
+	/*!
+	 Delete de DecayDataBank and all associated EvolutionData...
+	 */
+	~DecayDataBank();
+	//}
+	
+	//{
+	/// Reset the DecayDataBank.
+	/*!
+	 Use to reset the DecayDataBank to its default values  whihout deleting the EvolutionData (which contain pointer... ).
+	 it does just clear the different maps
+	 */
+	void Clear();
+	//}
+	//@}
+	
+	
+	
+	
+	//********* Get Method *********//
+	/*!
+	 \name Get Method
+	 */
+	//@{
+	map<ZAI ,EvolutionData >	GetDecayDataBank()	const	{ return fDecayDataBank; }	//!< Return the DecayDataBank
+	string 				GetDataBaseIndex()	const	{ return fDataBaseIndex; }	//!< Return the index Name
+	bool 				IsDefine(const ZAI& zai)	const;					//!< True the key is define, false unstead
+	
+	string	GetDataFileName()	const { return fDataFileName; }
+	string	GetDataDirectoryName()  const { return fDataDirectoryName; }
+	
+	double  GetShorstestHalflife()	const { return fShorstestHalflife; }
+	IsotopicVector		GetDecay(IsotopicVector isotopicvector, cSecond t);	//!< Get IsotopicVector Decay at the t time
+
+	//@}
+	
+	
+	
+	
+	//********* Set Method *********//
+	
+	/*!
+	 \name Set Method
+	 */
+	//@{
+	
+	void SetDecayDataBank(map<ZAI ,EvolutionData > mymap)	{ fDecayDataBank = mymap; }	//!< Set the DecayDataBank map
+	
+	void SetDataBaseIndex(string database) { fDataBaseIndex = database;; ReadDataBase(); }	//!< Set the Name of the database index
+	
+	void SetOldReadMethod(bool val)			{ fOldReadMethod = val; ReadDataBase();}			///< use the old reading method
+	
+	//}
+	
+	
+	
+	
+	//********* Evolution Method *********//
+	
+	//@}
+	/*!
+	 \name Evolution Method
+	 */
+	//@{
+	
+	
+	IsotopicVector	Evolution(const ZAI& zai, double dt);	///< Return the Product IsotopicVector evolution from zai during a dt time
+	
+	//@}
+	
+	
+	
+	
+	//********* Other Method *********//
+	/*!
+	 \name Other Method
+	 */
+	//@{
+	void	ReadDataBase();				///< read the index file and fill the evolutionData map
+	
+	void Print() const;
+	
+	//@}
+	
+	
+	
+	
+	
+	protected :
+	
+	double  fShorstestHalflife;
+	int	fZAIThreshold;	//!< Highest Mass deal bye the evolution (default 90)
+	
+	string			fDataFileName;		///< Name of the decay list
+	string			fDataDirectoryName;	///< Path to the decay list file
+	
+	map<ZAI, EvolutionData>	fDecayDataBank;		///< DataBanck map
+	
+ 	string			fDataBaseIndex;			///< Name of the index
+	
+	bool			fOldReadMethod;		///< use old DB format
+	
+};
+
+
+
+#endif
diff --git a/source/trunk/include/DynamicalSystem.hxx b/source/trunk/include/DynamicalSystem.hxx
new file mode 100755
index 000000000..66880571e
--- /dev/null
+++ b/source/trunk/include/DynamicalSystem.hxx
@@ -0,0 +1,127 @@
+#ifndef _DynamicalSystem_
+#define _DynamicalSystem_ 
+/*!
+ \file 
+  \brief Header file for DynamicalSystem class.
+*/ 
+
+#include <math.h>
+#include <vector>
+
+
+using namespace std; 
+
+//-----------------------------------------------------------------------------//
+
+
+      
+//!	DynamicalSystem class solves system of differential equations.  
+/*!
+//	A DynamicalSystem is a base class thatsolves system of 1st order of differential equations.
+//	\f[ \frac{d\vec{Y}}{dt}=A\vec{Y}\f]
+//	The differential equations are built in DynamicalSystem::BuildEqns ; the method MUST be
+//  defined in the derived classes.
+//	In this first version only Runge-Kutta method is implemented, but the aim of this class
+//	is to provide also other methods such as CRAM (Chebyshev rational approximation method).
+//	
+// 
+// @author PTO.
+// @version 1.0
+*/
+//________________________________________________________________________
+
+class DynamicalSystem
+{
+ public :
+
+	DynamicalSystem();								  //!< Normal Constructor 
+	DynamicalSystem(const DynamicalSystem & DS);	//!< Copy Constructor 
+	virtual ~DynamicalSystem();					   //!< Destructor
+	
+	/*!
+	\name Mains attributes of the DynamicalSystem
+	*/
+	//@{
+	int GetNumberOfEquationSize(){return fNVar;}	//!< return the number of equations.
+	void SetNumberOfEquationSize(int n){fNVar=n;}	//!< set the number of equations.
+	//@}
+
+	/*!
+	\name Runge-Kutta related methods
+	Algorithms are taken from Numerical Receipes.
+	*/
+	//@{
+
+	void SetPrecision(double eps=1e-5){fPrecision=eps;}	//!< set RK precision to change the integration step
+	
+	//!	Forbid negative value during integration. 
+	/*!
+	For some quantities (such as nuclei composition), negative values are forbidden.
+	But, due to integration step and very fast variation of the integrated variables
+	Runge-Kutta wil produce very small negative value. This method is used to force
+	negative value to be zero.
+	*/	
+	void SetForbidNegativeValue(){fIsNegativeValueAllowed=false;}
+	
+	//!	Runge Kutta calling method. 
+	/*!
+	// \param YStart: input : the initial condition Y(t1) ; output the final value Y(t2)
+	// \param t1: initial time 
+	// \param t2: final time
+	*/
+	void RungeKutta(double *YStart, double t1, double t2, int EquationNumber);
+	
+	//!	Builds the equations for integration. 
+	/*!
+	This method is an abstract method ; it MUST be overwritten by derived classes.
+	// \param t: time at which the equations are built 
+	// \param Y: array of variable at time t 
+	// \param dYdt: ode's variable.
+	*/	
+	virtual void BuildEqns(double t, double *Y, double *dYdt){}	
+		
+	//@}
+	
+	/*!
+	\name Miscellaneous methods
+	*/
+	//@{
+
+	//@}
+	
+ protected :
+	//!	Runge Kutta main method. 
+	/*!
+	// Call by RungeKutta
+	// \param y: initial values to integrate
+	// \param dydx: ode's equations (variable is x)
+	// \param x: variable of integration
+	// \param h: step size for integration
+	// \param yout: result after integration
+	*/						
+	void RK4(double *y, double *dydx, double x, double h, double *yout);	
+	//!	Adaptative Step Size method for RK. 
+	/*!
+	// Call by RK4
+	// \param y: initial values to integrate
+	// \param dydx: ode's equations (variable is x)
+	// \param x: new value of the variable after the adaptative step
+	// \param htry: try step size for integration
+	// \param eps: precision
+	// \param yscal: result after hdid step integration
+	// \param hdid: did step size for integration
+	// \param hnext: next step size for integration
+	*/						
+	void AdaptStepSize(double *y, double *dydx, double *x, double htry, double eps, double *yscal, double *hdid, double *hnext); 
+
+	int	fNVar;		 //!< The size of the composition vector and /or number of ZAIs involved. 	 
+	double	fPrecision;	//!< Precision of the RungeKutta										 	 
+	double	fHestimate;	//!< RK Step estimation. 												 	 
+	double	fHmin;		//!< RK minimum Step.													 	 
+	double	fMaxHdid;	//!< store the effective RK max step
+	double	fMinHdid;	//!< store the effective RK min step
+	bool	fIsNegativeValueAllowed; //!< whether or not negative value are physical.
+}; 
+
+#endif
+
diff --git a/source/trunk/include/EquivalenceModel.hxx b/source/trunk/include/EquivalenceModel.hxx
new file mode 100644
index 000000000..7b61b0935
--- /dev/null
+++ b/source/trunk/include/EquivalenceModel.hxx
@@ -0,0 +1,97 @@
+#ifndef _EQUIVALENCEMODEL_HXX
+#define _EQUIVALENCEMODEL_HXX
+
+
+/*!
+ \file
+ \brief Header file for EquivalenceModel class.
+ 
+ 
+ @author BLG,BaM
+ @version 2.0
+ */
+
+#include "IsotopicVector.hxx"
+#include <math.h>
+#include "CLASSObject.hxx"
+
+
+using namespace std;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a EquivalenceModel.
+ The aim of these class is synthetyse all the commum properties to all 
+ Equivalence Model.
+
+ !!!!!!!!!!!!!!!!CAUTION!!!!!!!!!!!!!
+Never instantiate EquivalenceModel in your CLASS input but it's derivated class
+see @../Model/Equivalence/EQM_LIN_PWR_MOX.hxx  
+see @../Model/Equivalence/EQM_QUAD_PWR_MOX.hxx
+see @../Model/Equivalence/EQM_MLP_PWR_MOX.hxx
+
+ @author BLG,BaM
+ @version 3.0
+ */
+//________________________________________________________________________
+
+
+class EquivalenceModel : public CLASSObject
+{
+	public :
+
+	EquivalenceModel();
+	EquivalenceModel(CLASSLogger* log);
+
+	virtual ~EquivalenceModel();
+
+	/// virtual method called to build a reprocessed fuel as a function of the burnup requierement the stock, mass....
+	/*!
+	 Build the fuel following the equivalance model with the proper requierment in term of mass, burnup....
+	 \param double BurnUp desireted burnup reached by the fuel at the end of irradiation
+	 \param double HMMass, needed Heavy metal mass needed
+	 \param vector<double> &lambda, fraction of the stock to take (initialy should be 0)
+	 \param vector<IsotopicVector> FissilArray, isotopicvectors to use to get the fissil part of the fuel
+	 \param vector<IsotopicVector> FertilArray, isotopicvectors to use to get the fertil part of the fuel (if empty take it from the OutIncome)
+	 */
+	
+	virtual	 vector<double> BuildFuel(double BurnUp, double HMMass, vector<IsotopicVector> FissilArray, vector<IsotopicVector> FertilArray );
+	//}
+	virtual void GuessLambda(vector<double>& lambda,int FirstStockID, int LastStockID, double DeltaM, vector<IsotopicVector> Stocks, double  HMMass);
+	virtual double GetFissileMolarFraction(IsotopicVector Fissil,IsotopicVector Fertil,double BurnUp) = 0; /*{return 0;}*/ //!< Return the molar fraction of fissile element in the fuel accodring to the Burnup, and a given fuel composition (this is the heart of the equivalence model) 
+
+	
+
+	IsotopicVector GetFertileList() {return fFertileList;}	//!<return the fertile list
+	IsotopicVector GetFissileList() {return fFissileList;}	//!<return the fissile list
+
+	void SetFertileList(IsotopicVector IV) {fFertileList = IV;}//!<set the fertile list
+	void SetFissileList(IsotopicVector IV) {fFissileList = IV;}//!<set the fissile list
+	/// Check either the IsotopicVector IV is in the validity domain of the models.
+	/*!
+	 return true if IV is in ValidityDomain
+	 return false + a warning if IV is not in ValidityDomain
+	 \param vector<IsotopicVector> IV, Fresh fuel composition
+	 */
+	//virtual  bool isIVInDomain(IsotopicVector IVFiss, double BU = 0 ) =0;
+	
+	protected :
+
+	IsotopicVector fFertileList;	//!< contain the list of zai, needed as fertile, taken in a stock before fabrication
+					//!< if no stock are provided, will take the isotopic vector in the Park income
+
+	IsotopicVector fFissileList;	//!< contain the list of zai, needed as fissile, taken in a stock before fabrication
+					//!< if no stock are provided the fuel will not be made
+
+
+	private :
+
+	void SetLambda(vector<double>& lambda ,int FirstStockID, int LastStockID, double LAMBDA_TOT);	//!< Set individual lambda according to the LAMBDA_TOT (lambda of all stocks)
+	double FindLambdaMax( vector<IsotopicVector> Stocks, double  HMMass);							//!< Find the maximum LAMBDA_TOT of Stocks (ie lambda to reach HMass)
+	double fOld_Lambda_Tot;//!<The old (old iteration) guessed lambda_tot (guessed from GuessLambda)
+	double fLambda_max;//!<Value calculated by FindLambdaMax
+
+};
+
+#endif
+
diff --git a/source/trunk/include/EvolutionData.hxx b/source/trunk/include/EvolutionData.hxx
new file mode 100755
index 000000000..2cb296e50
--- /dev/null
+++ b/source/trunk/include/EvolutionData.hxx
@@ -0,0 +1,251 @@
+#ifndef __EvolutionData_HXX__
+#define __EvolutionData_HXX__
+
+/*!
+ \file
+ \brief Header file for EvolutionData class.
+ @version 2.0
+ */
+
+#include <string>
+#include <map>
+
+#include "IsotopicVector.hxx"
+#include "CLASSObject.hxx"
+#include "ZAI.hxx"
+
+#include "TMatrix.h"
+
+class TGraph;
+class EvolutionData;
+class CLASSLogger;
+
+using namespace std;
+typedef long long int cSecond;
+
+
+EvolutionData operator*(EvolutionData const& evol, double F);
+EvolutionData operator*(double F, EvolutionData const& evol);
+EvolutionData operator/(EvolutionData const& evol, double F);
+EvolutionData Sum(EvolutionData const& evol1, EvolutionData const& evol2);
+EvolutionData Multiply(EvolutionData const& evol, double F);
+EvolutionData Multiply(double F, EvolutionData const& evol);
+
+double 	Distance(IsotopicVector IV1, EvolutionData Evd1 );
+double 	Distance(EvolutionData Evd1, IsotopicVector IV1 );
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a EvolutionData.
+ The aim of these class is describe the evolution of a single evoluting system in CLASS.
+ The system can either be a fuel evolution trough irradiation or a nuclei which produce, trough his decay, a large nuclei tree.
+ 
+ The nuclei tree resulting of the evolution are stored in a map of ZAI and TGraph, each TGraph correspond to the evolution of the quantity of the associeted ZAI.
+
+ @author BaM
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+
+class EvolutionData : public CLASSObject
+{
+	
+public :
+
+//********* Constructor/Destructor Method *********//
+
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+
+	EvolutionData(); 	///< Normal DB Constructor.
+
+
+	//{
+	/// CLASSLogger Constructor.
+	/*!
+	 Use create an empty EvolutionData loading a CLASSLogger
+	 \param CLASSLogger CLASSLogger used for the log...
+	 */
+	EvolutionData(CLASSLogger* log); 	///< Make a new Evolutive Product evolution
+	//}
+
+	//{
+	/// Special Constructor.
+	/*!
+	 Make a new EvolutionData
+	 \param Log CLASSLogger used for the log...
+	 \param DB_file path to the DataBase file
+	 \param oldread true if the oldmethod should be use to read the DatBase File
+	 \param zai set the ZAI if you want to add a stable nuclei.
+	 */
+	EvolutionData(CLASSLogger* log, string DB_file, bool oldread = false, ZAI zai = ZAI(0,0,0) );
+	//}
+
+
+	//{
+	/// Normal Destructor.
+	/*!
+	 Only remove the map without deleting the pointer to TGraph...
+	 One need to call the DeleteEvolutionData() method to fully delete the EvolutionData, and then avoiding memory leak...
+	 */
+	~EvolutionData();
+	//}
+
+	//{
+	/// Delete the EvolutionData.
+	/*!
+	 Use to fully delete the EvolutionData and all associeted TGraph.
+	 In some case needed to be called to avoid memory leak.
+	 */
+	void DeleteEvolutionData();
+	//}
+	
+	//@}
+
+
+	
+
+//********* Set Method *********//
+
+	/*!
+	 \name Set Method
+	 */
+	//@{
+	void	SetHeavyMetalMass(double Mass)			{fHeavyMetalMass = Mass;}	//!< Set the HeavyMetal Mass 
+
+	void 	SetReactorType(string reactortype)	{ fReactorType = reactortype; }		///< Set the reactor Type (string)
+	void	SetFuelType(string fueltype)		{ fFuelType = fueltype; }		///< Set the fuel Type (string)
+	void 	SetPower(double power)			{ fPower = power; }			///< Set the power of the EvolutionData (double)
+	void	SetFlux(TGraph* flux )			{ fFlux = flux; }			///< Set the neutron flux of the EvolutionData (double)
+	void	SetCycleTime(cSecond cycletime)		{ fCycleTime = cycletime; }		///< Set cycletime of the EvolutionData (double)
+
+
+	void	SetInventoryEvolution(map<ZAI, TGraph*> maptoinsert)	{ fInventoryEvolution = maptoinsert;}///< Set EvolutionData map
+	void	SetFissionXS(map<ZAI, TGraph*> maptoinsert)	{ fFissionXS = maptoinsert;}	///< Set fission cross section map
+	void	SetCaptureXS(map<ZAI, TGraph*> maptoinsert)	{ fCaptureXS = maptoinsert;}	///< Set capture cross section map
+	void	Setn2nXS(map<ZAI, TGraph*> maptoinsert)		{ fn2nXS = maptoinsert;}	///< Set (n,2n) cross section map
+
+	//@}
+
+	
+
+
+//********* Get Method *********//
+
+	/*!
+	 \name Get Method
+	 */
+	//@{
+
+#ifndef __CINT__
+	map<ZAI ,TGraph* >	GetInventoryEvolution()	const { return fInventoryEvolution; }	//!< return the EvolutionData map
+	map<ZAI ,TGraph* >	GetFissionXS()		const { return fFissionXS; }		//!< return the fission cross section map
+	map<ZAI ,TGraph* >	GetCaptureXS()		const { return fCaptureXS; }		//!< return the capture cross section map
+	map<ZAI ,TGraph* >	Getn2nXS()		const { return fn2nXS; }		//!< return the (n,2n) cross section map
+	TGraph*			GetKeff()		const { return fKeff; }			//!< return the evolution of the keff (TGraph*)
+	TGraph*			GetFlux()		const { return fFlux; }			//!< return the evolution of the neutron flux (TGraph*)
+#endif
+
+	double	GetFinalTime()		const { return fFinalTime; }			//!< return the final time - last point (double)
+	double	GetCycleTime()		const { return fCycleTime; }			//!< return the cycletime (double)
+	double	GetPower()		const { return fPower; }			//!< return the power (double)
+	string	GetDB_file()		const { return fDB_file; }			//!< return the name of the Database file (string)
+	string	GetReactorType()	const { return fReactorType; }			//!< return the type of reactor (string)
+	TGraph*	GetEvolutionTGraph(const ZAI& zai);					//!< return the evolution of the ZAI quantity (TGraph*)
+
+	IsotopicVector	GetIsotopicVectorAt(double t); 		///< Return the Product IsotopicVector at t time
+
+	double	GetHeavyMetalMass()	const	{ return fHeavyMetalMass; }	//!< Return the HeavyMetal Mass in the Core at the begining of the cycle
+
+
+	//{
+	/// Return the XS for a reactionId on zai at t time
+	/*!
+	 // This method cross section of a reaction for a ZAI at a time
+	 // \param t time
+	 // \param ZAI ZAI for which the cross section if asked
+	 // \param ReactionId ID of the reaction asked
+
+	 // The different reaction ID are :
+		\li 1 fission,
+		\li 2 capture,
+		\li 3 (n,2n).
+	 */
+	double	GetXSForAt(double t, ZAI zai, int ReactionId); 		
+	//}
+
+	//@}
+
+
+
+
+//********* Insertion Method *********//
+
+	//@}
+	/*!
+	 \name Insertion  Method
+	 */
+	//@{
+
+	bool NucleiInsert(pair<ZAI, TGraph*> zaitoinsert);		//!< Add a nuclei evolution to the evolution map
+	bool FissionXSInsert(pair<ZAI, TGraph*> zaitoinsert);		//!< Add a nuclei to the fission cross section map
+	bool CaptureXSInsert(pair<ZAI, TGraph*> zaitoinsert);		//!< Add a nuclei to the capture cross section map
+	bool n2nXSInsert(pair<ZAI, TGraph*> zaitoinsert);		//!< Add a nuclei to the (n,2n) cross section map
+	
+
+	//@}
+	
+
+
+protected :
+	
+	string	fDB_file;			///!< path to the DataBase file
+	
+	
+#ifndef __CINT__
+	map<ZAI ,TGraph* >	fInventoryEvolution;	//!< evolution map
+	map<ZAI ,TGraph* >	fFissionXS;	//!< fission cross section map
+	map<ZAI ,TGraph* >	fCaptureXS;	//!< capture cross section map
+	map<ZAI ,TGraph* >	fn2nXS;		//!< (n,2n) cross section map
+	TGraph*	fKeff;				//!< Keff evolution
+	TGraph*	fFlux;				//!< Flux evolution
+#endif
+	
+	cSecond	fFinalTime;			///< time of the last point
+	bool	fIsCrossSection;		///< true if some cross section are present in the database
+	
+	
+	
+	string	fReactorType;			///< Type of reactor
+	string	fFuelType;			///< Type of fuel
+	double	fPower;				///< Power in W
+	double	fCycleTime;			///< Cycle time of the DataBase
+	double	fHeavyMetalMass;		///< Cycle time of the DataBase
+
+    
+	void	OldReadDB(string DBfile);				//!< Read old format database
+	void	ReadDB(string DBfile, bool oldread = false);		//!< Main function to read database
+	void	ReadKeff(string line, double* time, int NTimeStep);	//!< Read the Keff in the database
+	void	ReadFlux(string line, double* time, int NTimeStep);	//!< Read the Flux in the database
+	void	ReadInv(string line, double* time, int NTimeStep);	//!< Read the Inventory evolution in the database
+	void	ReadXSFis(string line, double* time, int NTimeStep);	//!< Read the fission cross section evolution in the database
+	void	ReadXSCap(string line, double* time, int NTimeStep);	//!< Read the capture cross evolution in the database
+	void	ReadXSn2n(string line, double* time, int NTimeStep);	//!< Read the (n,2n) cross evolution in the database
+	void	ReadInfo();						//!< Read the info file of the database
+
+	
+	double	Interpolate(double t, TGraph& EvolutionGraph);		///< Interpolating the value of EvolutionGraph at the t time
+
+	void	AddAsStable(ZAI zai);					///< USe when adding a EvolutionData of a stable nuclei (for "non" decay)
+
+	ClassDef(EvolutionData,0);
+};
+
+
+
+
+#endif
diff --git a/source/trunk/include/FabricationPlant.hxx b/source/trunk/include/FabricationPlant.hxx
new file mode 100644
index 000000000..0b2684f38
--- /dev/null
+++ b/source/trunk/include/FabricationPlant.hxx
@@ -0,0 +1,229 @@
+#ifndef __FabricationPlant_HXX__
+#define __FabricationPlant_HXX__
+
+/*!
+ \file
+ \brief Header file for FabricationPlant class.
+ @version 2.0
+ */
+
+
+
+#include <vector>
+#include <map>
+
+#include "CLASSFacility.hxx"
+#include "IsotopicVector.hxx"
+#include "EvolutionData.hxx"
+#include "Scenario.hxx"
+#include "Storage.hxx"
+#include "Reactor.hxx"
+#include "CLASSLogger.hxx"
+#include "ZAI.hxx"
+
+using namespace std;
+typedef long long int cSecond;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a FabricationPLant.
+ The aim of these class is describe the deal all the reprocessed fuel.
+ It includes the fabrication of the fuel from a stock of used fuel, using the aproprieted algrorythm, and the storage of this fuel before putting it into a reactor.
+ The parameter used for the fuel fabrication are recover from the DataBank.
+ The Databank MUST include an equivalence model to build the fuel. This model is not necessary provided, each user need to put his own. By default a equivalence model is provided for PWR MOX fuel.
+
+ The FabricationPlant once the fuel is builded, also store the corresponding EvolutionData generated using the DataBank.
+
+ @author BaM
+ @version 2.0
+ */
+//________________________________________________________________________
+
+class DecayDataBank;
+class FuelDataBank;
+
+
+class FabricationPlant : public CLASSFacility
+{
+
+public :
+
+//********* Constructor/Destructor Method *********//
+
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+
+	FabricationPlant();	///< Normal constructor
+
+
+
+	//{
+	/// Special Constructor.
+	/*!
+	 Make a new FabricationPlant evolution
+	 \param CLASSLogger CLASSLogger used for the log...
+	 \param storage storage used to build the reprocessed fuel
+	 \param reusable storage used to store all separated material not used in the fabrication process
+	 \param fabricationtime duration of the fabrication process (2 years by default).
+	 */
+	FabricationPlant(CLASSLogger* log, double fabricationtime = 365.25*24*3600*2);
+	//}
+
+	~FabricationPlant(); 	///< Normal Destructor.
+
+	//@}
+
+
+
+	
+//********* Set Method *********//
+
+	/*!
+	 \name Set Method
+	 */
+	//@{
+
+	void SetDecayDataBank(DecayDataBank* decayDB) {fDecayDataBase = decayDB;}	//! Set the Decay DataBank
+
+	void SetFiFo(bool bval = true)	{ fFiFo = bval;}	//!< Set the chronological priority (true for chronological, false unstead)
+	
+	void SetSubstitutionFuel(EvolutionData fuel);				//!< To use a subtition fuel if the fabrication fail (not enough material in stock)
+	
+	void AddReactor(int reactorid, double creationtime)
+			{ fReactorNextStep.insert( pair<int,cSecond> (reactorid, (cSecond)creationtime-GetCycleTime() ) ); }	//!< Add a new reactor
+
+#ifndef __CINT__
+	void SetReUsableStorage(Storage* store) { fReUsable = store; fIsReusable = true;}
+#endif
+
+	using CLASSFacility::SetName;
+
+	//@}
+
+
+
+
+//********* Get Method *********//
+
+	/*!
+	 \name Get Method
+	 */
+	//@{
+	
+#ifndef __CINT__
+	vector<Storage*>	GetFissileStorage()		{ return fFissileStorage; }		//!< Return the Pointer to the Storage
+	vector<Storage*>	GetFertileStorage()		{ return fFertileStorage; }		//!< Return the Pointer to the Storage
+
+	EvolutionData GetReactorEvolutionDB(int ReactorId);			//!< Return the EvolutionData of Reactor ReactorId
+#endif
+	IsotopicVector GetDecay(IsotopicVector isotopicvector, cSecond t);	//!< Get IsotopicVector Decay at the t time
+
+	map<int, IsotopicVector >	GetReactorFuturIncome() const
+						{ return fReactorFuturIV;}	//!< Return the List of the Futur Fuel IV
+
+
+	//@}
+
+
+
+#ifndef __CINT__
+	void AddFissileStorage(Storage* stock) { fFissileStorage.push_back(stock); } //!< Add a new Storage to the list of Fissile material provider...
+	void AddFertileStorage(Storage* stock) { fFertileStorage.push_back(stock); } //!< Add a new Storage to the list of Fertile material provider...
+#endif
+
+//********* Fabrication & Evolution Method *********//
+
+	/*!
+	 \name Fabrication & Evolution Method
+	 */
+	//@{
+
+	void SetSeparartionEfficiencyIV(ZAI zai, double factor);	///< Add Valorisable Element
+	void Evolution(cSecond t);					//!< Perform the Evolution
+	
+	void DumpStock(vector<double> lambdaArray);			//!< Update the Stock status after building process
+
+	void TakeReactorFuel(int ReactorId) ;				//!< Remove the Fuel of reactor ReactorId
+	void UpdateInsideIV();
+
+	IsotopicVector BuildFuelFromEqModel(vector<double> LambdaArray);
+	void BuildFissileArray();
+	void BuildFertileArray();
+
+#ifndef __CINT__
+	void BuildFuelForReactor(int ReactorId, cSecond t);			//!< Build a Fuel for the reactor ReactorId
+#endif
+
+	void SortArray(int i);
+
+	//@}
+
+
+
+
+protected :
+
+
+
+//********* Internal Parameter *********//
+	IsotopicVector	 fSeparationLostFraction;	///< The lost fraction Table during separation (1- efficiency)
+	map<int, cSecond >	fReactorNextStep;	///< Next Time Step to Build a New Fuel
+
+#ifndef __CINT__
+	map< int,EvolutionData >	fReactorFuturDB; ///< List of the Futur EvolutionData use in the reactor
+#endif
+	map< int,IsotopicVector >	fReactorFuturIV; ///< List of the Futur Fuel Isotopic Vector used in the reactor
+
+
+
+
+	bool	fFiFo;	//!< Set the First In First Out
+
+	bool	fSubstitutionFuel;		//!< true if a subtitution fuel as been set
+
+	void	FabricationPlantEvolution(cSecond t);	//!< Deal the FabricationPlant Evolution
+	void 	ResetArrays(); //!< empty the fFertileArray and fFissileArray
+
+
+#ifndef __CINT__
+	
+	vector<Storage*>	fFissileStorage;		//!< Pointer to the Storage to recycle used to get the fissile part of the fuel
+	vector<IsotopicVector>  fFissileArray;
+	vector<cSecond>		fFissileArrayTime;
+	vector< pair<int,int> > fFissileArrayAdress;
+	IsotopicVector		fFissileList;
+
+	vector<Storage*>	fFertileStorage;		//!< Pointer to the Storage to recycle used to get the fertile part of the fuel
+	vector<IsotopicVector>  fFertileArray;
+	vector<cSecond>		fFertileArrayTime;
+	vector< pair<int,int> > fFertileArrayAdress;
+	IsotopicVector		fFertileList;
+
+	Storage*	fReUsable;			//!< Pointer to the Storage using for recycling unused Product
+	bool		fIsReusable;
+
+	EvolutionData	fSubstitutionEvolutionData;	//!< EvolutionData of the subtitution fuel
+
+	DecayDataBank*	fDecayDataBase;			//!< Pointer to the Decay DataBase
+
+
+	//{
+	/// Separation Method
+	/*!
+	 Make the Separation
+	 \li IV[0] -> To Keep
+	 \li IV[1] -> To Waste
+	 */
+	pair<IsotopicVector, IsotopicVector> Separation(IsotopicVector isotopicvector, IsotopicVector ExtractedList);
+	//}
+
+#endif
+
+	
+	ClassDef(FabricationPlant,3);
+
+};
+
+#endif
diff --git a/source/trunk/include/IrradiationModel.hxx b/source/trunk/include/IrradiationModel.hxx
new file mode 100644
index 000000000..cb221b218
--- /dev/null
+++ b/source/trunk/include/IrradiationModel.hxx
@@ -0,0 +1,242 @@
+#ifndef _IRRADIATIONMODEL_HXX
+#define _IRRADIATIONMODEL_HXX
+
+
+/*!
+ \file
+ \brief Header file for IrradiationModel class.
+ 
+ 
+ @author BaM
+ @version 2.0
+ */
+
+
+#include "CLASSObject.hxx"
+
+#include "IsotopicVector.hxx"
+#include "CLASSNucleiFiliation.hxx"
+#include "EvolutionData.hxx"
+
+#include "TMatrix.h"
+
+
+#include <map>
+#include <vector>
+
+
+using namespace std;
+typedef long long int cSecond;
+
+class ZAI;
+class CLASSLogger;
+//-----------------------------------------------------------------------------//
+/*!
+ Define a IrradiationModel.
+ The aim of these class is synthetyse all the commum properties to all Irradiation Model.
+ 
+ 
+ @author BaM
+ @version 3.0
+ */
+//________________________________________________________________________
+
+class IrradiationModel : public CLASSObject
+{
+	
+	public :
+	
+	IrradiationModel();
+
+	IrradiationModel(CLASSLogger* log);
+
+	/// virtueal method called to perform the irradiation calculation using a set of cross section.
+	/*!
+	 Perform the Irradiation Calcultion using the XSSet data
+	 \param IsotopicVector IV isotopic vector to irradiate
+	 \param EvolutionData XSSet set of corss section to use to perform the evolution calculation
+	 \param double Power, constant power to use for irradation
+	 \param double irradiationtime, time of the irradiation
+	 */
+	virtual	 EvolutionData GenerateEvolutionData(IsotopicVector IV, EvolutionData XSSet, double Power, double cycletime) = 0 ; //{ return EvolutionData();}
+	//}
+
+	
+	
+	
+	//********* Get Method *********//
+	/*!
+	 \name Get Method
+	 */
+	//@{
+	string	GetDataFileName()	const { return fDataFileName; }
+	string	GetDataDirectoryName()  const { return fDataDirectoryName; }
+
+	double  GetShorstestHalflife()	const { return fShorstestHalflife; }
+	
+
+	void GetNuclearProcessMatrix(TMatrixT<double> &myMatrix, ZAI Mother, IsotopicVector ProductedIV, double XSValue = 1);
+	
+	void BuildReactionFiliation();
+
+
+	//@}
+	
+	
+	
+	
+	//********* Set Method *********//
+	
+	/*!
+	 \name Set Method
+	 */
+	//@{
+	
+
+	//{
+	/// set Fission Energy using a file
+	/*!
+	 // This method fill the Fission Energy map using a file
+	 // \param FissionEnergyFile: filename containing the Fission Energy of some nuclei (form : Z A I Energy)
+	 */
+	void SetFissionEnergy(string FissionEnergyFile);
+	//}
+	
+	//{
+	/// set Fission Energy for a ZAI using ZAI(Z,A,I)
+	/*!
+	 // This method fill the Fission Energy map of a set ZAI
+	 // \param zai ZAI
+	 // \param E Fission energy of the ZAI
+	 */
+	void SetFissionEnergy(ZAI zai, double E);
+	//}
+	
+	//{
+	/// set Fission Energy for a ZAI using the Z, A, I
+	/*!
+	 // This method fill the Fission Energy map of a set ZAI
+	 // \param Z Z of the ZAI
+	 // \param A A of the ZAI
+	 // \param I I of the ZAI
+	 // \param E Fission energy of the ZAI
+	 */
+	void SetFissionEnergy(int Z, int A, int I, double E )   { SetFissionEnergy(ZAI(Z,A,I), E);}
+	//}
+	
+	void SetShortestHalfLife(double halflife)	{ fShorstestHalflife = halflife;}	///< Set the Half Life cut
+	void LoadFPYield(string SponfaneusYield, string ReactionYield);				///< Build Fision Yields maps;
+	
+	
+	
+	
+	
+	
+	//********* Evolution Method *********//
+	
+	//@}
+	/*!
+	 \name Evolution Method
+	 */
+	//@{
+	
+
+	void	BuildDecayMatrix();			///w Build the Decay Matrix for the futur evolution...
+	void    LoadDecay();
+
+	void	NuclearDataInitialization(); //Build Decay matrices & read FpYields if any
+	//@}
+	
+
+	//********* Other Method *********//
+	/*!
+	 \name Other Method
+	 */
+	//@{
+	void Print() const;
+	
+	//@}
+	
+	int  GetZAIThreshold(){return fZAIThreshold;}
+
+	
+	
+	
+	protected :
+	
+	double  fShorstestHalflife;	//!< Limit on the half life of nuclei to take it into account
+	int	fZAIThreshold;		//!< Lowest Mass deal by the evolution (default 90)
+	string	fDataFileName;		///< Name of the decay list
+	string	fDataDirectoryName;	///< Path to the decay list file
+
+	map<ZAI, double >	fFissionEnergy;	///< Store the Energy per fission use for the flux normalisation.
+	
+	map<ZAI, int> fMatrixIndex;		///< correspondance matrix from ZAI to the column (or line) of the different Reaction/Decay matrix
+	vector<ZAI> fReverseMatrixIndex;	///< correspondance matrix from the column (or line) of the different Reaction/Decay matrix to the ZAI
+	
+	TMatrixT<double>	fDecayMatrix;	///< Matrix with half life of each nuclei
+	
+	CLASSNucleiFiliation	fFastDecay;	///< Store the cut decay
+	CLASSNucleiFiliation	fNormalDecay;	///< Store the dealed decay
+	IsotopicVector			fDecayConstante;
+	
+	CLASSNucleiFiliation	fSpontaneusYield;	///< Store the Spontaneus fission yield
+	CLASSNucleiFiliation	fReactionYield;		///< Store the reaction fission yield
+
+	CLASSNucleiFiliation	fCaptureReaction;		///< Store the reaction Capture Filiation
+	CLASSNucleiFiliation	fn2nReaction;		///< Store the reaction n,2n Filiation
+	
+	string	fSpontaneusYieldFile;	///< Store the name of the Spontaneus fission yield file
+	string	fReactionYieldFile;		///< Store the name of the reaction fission yield file
+
+	
+	//{
+	/// Return the Fission XS Matrix at the time TStep
+	/*!
+	 // This Method extract the Fission Cross section of an EvolutionData at the set time
+	 // \param EvolutionDataStep: EvolutionData
+	 // \param TStep:  time
+	 */
+	TMatrixT<double> GetFissionXsMatrix(EvolutionData EvolutionDataStep,double TStep);
+	//}
+	
+	//{
+	/// Return the Capture XS Matrix at the time TStep
+	/*!
+	 // This Method extract the capture Cross section of an EvolutionData at the set time
+	 // \param EvolutionDataStep: EvolutionData
+	 // \param TStep:  time
+	 */
+	TMatrixT<double> GetCaptureXsMatrix(EvolutionData EvolutionDataStep,double TStep);
+	//}
+	
+	//{
+	/// Return the n2n XS Matrix at the time TStep
+	/*!
+	 // This Method extract the (n,2n) Cross section of an EvolutionData at the set time
+	 // \param EvolutionDataStep: EvolutionData
+	 // \param TStep:  time
+	 */
+	TMatrixT<double> Getn2nXsMatrix(EvolutionData EvolutionDataStep,double TStep);
+	//}
+	
+	
+	//{
+	//! Returns a particular decay mode.
+	/*!
+	 \param DecayModes : a list of decay modes with their branching ratios and isomeric state of the Daughters.
+	 \param BR : branching ratio of the current decay mode
+	 \param Iso : isomeric state of the Daughter of the current decay mode.
+	 \param StartPos : the current decay mode to extract.
+	 */
+	string GetDecay(string DecayModes, double &BR,int &Iso, int &StartPos);
+	//}
+	
+	CLASSNucleiFiliation ReadFPYield(string Yield);	///< Read a CLASSYield file and return the correpsponding map
+	
+	private :
+ 	
+};
+
+#endif
+
diff --git a/source/trunk/include/IsotopicVector.hxx b/source/trunk/include/IsotopicVector.hxx
new file mode 100755
index 000000000..23479eeeb
--- /dev/null
+++ b/source/trunk/include/IsotopicVector.hxx
@@ -0,0 +1,176 @@
+#ifndef __ISOTOPICVECTOR_HXX__
+#define __ISOTOPICVECTOR_HXX__
+
+
+/*!
+ \file
+ \brief Header file for IsotopicVector class. 
+ @version 2.0
+ */
+#include "ZAI.hxx"
+
+#include "TObject.h"
+#include <string>
+#include <vector>
+#include <map>
+
+using namespace std;
+typedef long long int cSecond;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a Isotopicvector.
+ The aim of this Class is to manage any kind of IsotopicVector, and any operation between them : sum, substraction....
+
+ @author BaM, MArc
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+
+class IsotopicVector : public TObject
+{
+public :
+
+//********* Constructor/Destructor Method *********//
+
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+
+	IsotopicVector();	///< Normal Constructor.
+
+
+ 	~IsotopicVector();	///< Normal Destructor.
+
+	//@}
+
+
+//********* Get Method *********//
+
+	/*!
+	 \name Get Method
+	 */
+	//@{
+
+	map<ZAI ,double>	GetIsotopicQuantity()		const
+						{ return fIsotopicQuantity; }		//!< Return the IVQuantity map
+	map<ZAI ,double>	GetIsotopicQuantityNeeded()	const
+						{ return fIsotopicQuantityNeeded; }	//!< Return the IVQuantityNeeded map
+	IsotopicVector		GetSpeciesComposition(int z)	const;			//!< Return the Species composition of the "z" atom
+	IsotopicVector		GetThisComposition(IsotopicVector IV)	const;		//!< Return the composition according the IV list...
+	vector<ZAI>		GetZAIList()			const;			//!< Return the list of ZAI present in the IV
+	IsotopicVector		GetActinidesComposition()	const;			//!< Return the Actinides composition of the "z" atom
+
+	double	GetZAIIsotopicQuantity(const ZAI& zai)		const;			///< Return the quantity of the ZAI
+	double	GetZAIIsotopicQuantity(const int z, const int a, const int i) const;	///< Return the quantity of the ZAI
+	double	GetQuantity(const int z, const int a, const int i)	const {return GetZAIIsotopicQuantity(z,a,i);}
+	double	GetQuantity(const ZAI& zai)				const {return GetZAIIsotopicQuantity(zai);}
+	
+
+	
+	
+	double	GetTotalMass() const;							//!< Return the mass (in tons) of the isotopic vector
+	double	MeanMolar() const;							//<! Return the mean molar mass of the isotopic vector
+	
+	vector<int>		GetChemicalSpecies()		const;			//!< Return the Species Species contained
+	int			GetZAIQuantity()		const
+						{return  fIsotopicQuantity.size(); }	//!< Return the number of different ZAI in the IsotopicVector
+
+	double			GetSumOfAll()			const;			//!< Return the Sum of nuclei in the IsotopicVector
+
+	//@}
+
+
+
+
+//*********  Internal Operation Method *********//
+
+	/*!
+	 \name Internal Operation Method
+	 */
+	//@{
+
+
+	void 	Clear();					//!< Empty all the IV
+	void 	ClearNeed();					//!< Empty Need componant of the IV 
+
+	void	Add(const ZAI& zai, double quantity); 		//!< Add Quantity gramme of the ZAI Element
+	void	Add(const IsotopicVector& isotopicvector); 	//!< Add IsotopicVector to the existing IsotopicVector
+	void	Add(const map<ZAI ,double>& quantity);		//!< Add IsotopicVector to the existing IsotopicVector
+	void	Add(int Z, int A, int I, double quantity)
+		{ (*this).Add(ZAI(Z,A,I), quantity); } 		//!< Add Quantity gramme of the ZAI Element
+
+
+	void	Need(const ZAI& zai, double quantity);		//!< Fill the fIsotopicQuantityNeeded
+	void	Need(const IsotopicVector& isotopicvector);	//!< Fill the fIsotopicQuantityNeeded
+	void	Need(const map<ZAI ,double>& quantityneeded) { fIsotopicQuantityNeeded = quantityneeded; }	
+								//!< Fill the fIsotopicQuantityNeeded
+
+	void	Remove(const ZAI& zai, double quantity); 	//!< Remove Quantity gramme of the ZAI Element
+	void	Remove(const IsotopicVector& isotopicvector); 	//!< Remove IsotopicVector to the existing IsotopicVector
+
+	void 	Multiply(double factor);			//!< Multiply the IV by a Factor
+
+
+	IsotopicVector& operator+=(IsotopicVector const& IVb);	//!<....
+	IsotopicVector& operator-=(IsotopicVector const& IVb);	//!<....
+	IsotopicVector& operator*=(IsotopicVector const& IVb);	//!<....
+	IsotopicVector& operator*=(double const& factor);	//!<....
+	bool operator <(const IsotopicVector& isotopicvector) const;	//!< IsotopicVector Comparator
+
+	//@}
+
+
+
+//********* In/Out related Method *********//
+
+	/*!
+	 \name  In/Out Method
+	 */
+	//@{
+
+	void	Write(string filename, cSecond time = -1 ) const;	///< Write the Content of the IV in the filename file
+
+	void	Print(string o =" ") const ;				///< Print the composition of the IV in terminal
+	string	sPrint() const ;				///< Print the composition of the IV in a string
+
+	void	PrintList(string o =" ") const ;			///< Print the composition of the IV
+
+	//@}
+	
+
+//***************************************************///< 
+
+	
+	protected :
+
+	map<ZAI ,double>	fIsotopicQuantity;		///< Isotopic vector composition in Atome Number
+	
+	map<ZAI ,double>	fIsotopicQuantityNeeded;	///< Isotopic vector request and not present
+
+	ClassDef(IsotopicVector,1);
+};
+
+IsotopicVector operator/(IsotopicVector const& IVA, double F);
+IsotopicVector operator/(ZAI const& zai, double F);
+IsotopicVector operator*(IsotopicVector const& IVA, double F);
+IsotopicVector operator*(ZAI const& zai, double F);
+IsotopicVector operator*(double F, IsotopicVector const& IVA);
+IsotopicVector operator*(double F, ZAI const& zai);
+IsotopicVector operator+(IsotopicVector const& IVa, IsotopicVector const& IVb);
+IsotopicVector operator-(IsotopicVector const& IVa, IsotopicVector const& IVb);
+
+IsotopicVector operator*(IsotopicVector const& IVa, IsotopicVector const& IVb);
+
+
+double 	RelativDistance(IsotopicVector IV1, IsotopicVector IV2 );
+double 	Distance(IsotopicVector IV1, IsotopicVector IV2 ,int DistanceType=0, IsotopicVector DistanceParameter=IsotopicVector());
+double	DistanceStandard(IsotopicVector IV1, IsotopicVector IV2);
+double	DistanceAdjusted(IsotopicVector IV1, IsotopicVector IV2, IsotopicVector DistanceParameter);
+double 	Norme(IsotopicVector IV1,int DistanceType=0, IsotopicVector DistanceParameter=IsotopicVector());
+
+
+#endif
diff --git a/source/trunk/include/PhysicsModels.hxx b/source/trunk/include/PhysicsModels.hxx
new file mode 100644
index 000000000..8728e6a94
--- /dev/null
+++ b/source/trunk/include/PhysicsModels.hxx
@@ -0,0 +1,86 @@
+
+#ifndef _PhysicsModels_HXX
+#define _PhysicsModels_HXX
+
+
+/*!
+ \file
+ \brief Header file for XS_INTERPOLATOR class.
+ 
+ 
+ @authors BLG,BaM
+ @version 1.0
+ */
+#include "EquivalenceModel.hxx"
+#include "XSModel.hxx"
+#include "IrradiationModel.hxx"
+#include "EvolutionData.hxx"
+
+
+using namespace std;
+typedef long long int cSecond;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define all the physic models used for a specific database 
+	
+	The 2 following are data base related (for one Reactor and one fuel type and one ...) :
+	User can either define his own (see manual) or uses the provided ones ) :
+
+	XS_Interpolator = Closest , MLP  ....
+	Equivalence_Model = Linear,Quadratique, MLP ... 
+
+	this one is bateman solvers related : 
+	(or it may be link to a evolution code (like MURE,DRAGON), not yet
+	implemented but envisaged)
+	IrradiationModel = RK4 or Matrix
+
+
+ @authors BLG,BaM
+ @version 1.0
+ */
+//________________________________________________________________________
+
+
+class PhysicsModels : public CLASSObject
+{
+
+	public : 
+
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+
+	PhysicsModels();
+	PhysicsModels(XSModel* XS, EquivalenceModel* EM, IrradiationModel* IM );
+	PhysicsModels(CLASSLogger* log, XSModel* XS, EquivalenceModel* EM, IrradiationModel* IM );
+
+	~PhysicsModels() {;}
+	//{
+
+	EvolutionData GenerateEvolutionData(IsotopicVector IV, double cycletime, double Power);
+
+	XSModel*		GetXSModel()   {return fXSModel;}
+	EquivalenceModel*	GetEquivalenceModel() {return fEquivalenceModel;}
+	IrradiationModel*	GetIrradiationModel()  {return fIrradiationModel;}
+	
+	PhysicsModels*		GetPhysicsModels()	{return this;}
+
+
+
+
+
+
+ private :
+
+ 	XSModel* 		fXSModel;              //!< The XSModel (Mean cross sections prediction)
+	EquivalenceModel*	fEquivalenceModel; //!< The EquivalenceModel (Fresh fissile content prediction)
+	IrradiationModel*	fIrradiationModel; //!< The IrradiationModel (The Bateman's solver)
+
+
+
+};
+
+#endif
+
diff --git a/source/trunk/include/Pool.hxx b/source/trunk/include/Pool.hxx
new file mode 100755
index 000000000..dd131462b
--- /dev/null
+++ b/source/trunk/include/Pool.hxx
@@ -0,0 +1,173 @@
+#ifndef __Pool_HXX__
+#define __Pool_HXX__
+/*!
+ \file
+ \brief Header file for Pool class.
+ */
+
+#include <string>
+#include <map>
+
+#include "CLASSBackEnd.hxx"
+#include "IsotopicVector.hxx"
+
+using namespace std;
+typedef long long int cSecond;
+
+class CLASSBackEnd;
+class CLASSLogger;
+class DecayDataBank;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a Pool.
+ The aim of the Class is to manage evolution of all out reactor fuel. from Cooling to Waste or storage
+
+
+ @author BaM
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+
+class Pool : public CLASSBackEnd
+{
+public :
+
+
+//********* Constructor/Destructor Method *********//
+
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+	
+	Pool();				///< Normal Constructor.
+
+	//{
+	/// Special Constructor.
+	/*!
+	 Make a new EvolutionData
+	 \param Log CLASSLogger used for the log...
+	 \param abstime time to start the Pool
+	 \param coolingtime duration of the cooling.
+	 */
+	Pool(CLASSLogger* Log, cSecond coolingtime = 5*3600.*24.*365.25); //!<
+	//}
+
+
+	//{
+	/// Special Special Constructor.
+	/*!
+	 Make a new EvolutionData
+	 \param Log CLASSLogger used for the log...
+	 \param Storage storage which get the fuel after the cooling
+	 \param abstime time to start the Pool
+	 \param coolingtime duration of the cooling.
+	 */
+	Pool(CLASSLogger* log, CLASSBackEnd* Storage,
+			 cSecond coolingtime = 5*3600.*24.*365.25); //!<
+	//}
+
+
+	~Pool();	///< Normal Destructor.
+	//@}
+
+
+
+
+//********* Set Method *********//
+
+	/*!
+	 \name Set Method
+	 */
+	//@{
+
+	void SetOutBackEndFacility(CLASSBackEnd* befacility)
+						{  fOutBackEndFacility = befacility;
+						   SetIsStorageType(false);
+						   fPutToWaste = false; }		//!< Set the Pointer to the Storage
+
+	void SetPutToWaste(bool val)		{ fPutToWaste = val; }		//!< Set True if IV goes to waste after cooling false instead
+
+	void SetIVArray(vector<IsotopicVector> ivarray);			//! not use there (Does nothing!!!)
+	void SetIVArray(vector<IsotopicVector> ivarray, vector<cSecond> timearray); //!< Set The isotopicVector Array at the corresponding time
+
+
+	using CLASSBackEnd::SetName;
+
+	//@}
+
+
+
+
+//********* Get Method *********//
+
+	/*!
+	 \name Get Method
+	 */
+	//@{
+
+	bool		GetPutToWaste()	const	{ return fPutToWaste; }		//!< Return True if IV goes to waste after cooling false instead
+
+	//@}
+
+
+
+
+//********* IsotopicVector Managment Method *********//
+
+	/*!
+	 \name IsotopicVector Managment Method
+	 */
+	//@{
+
+	vector<cSecond>	GetCoolingStartingTime() const
+						{ return GetIVArrayArrivalTime(); }	//!< Return the vector of Cooling Sstarting Time
+	void	RemoveIVCooling(int i);					//!< Remove a Cooling IsotopicVector
+
+	void	AddIV(IsotopicVector isotopicvector);			//!< Add an Isotopicvector to the IVArray
+	//@}
+
+
+
+
+//********* Other Method *********//
+
+	//@}
+	/*!
+	 \name Other Method
+	 */
+	//@{
+
+	void Evolution(cSecond t);		//!< Performe the evolution until the Time t
+	void Dump();				//!< Write Modification (exchange between Cooling, Separation and Storage)
+	
+	//@}
+
+protected :
+	
+	
+	
+//********* Internal Parameter *********//
+	bool			fPutToWaste;	//!< True if IV goes to waste after cooling false instead
+
+
+//********* Isotopic Quantity *********//
+//--------- Cooling ---------//
+	vector<int>		fCoolingIndex;		///< Vector of the Cooling Index
+	int			fCoolingLastIndex;	//!< Number of Cooling IV Treated
+	vector<int>		fCoolingEndOfCycle;	//!< Index of the Cooling IV reaching the End of a Cooling Cycle
+
+
+//********* Private Method *********//
+	void	CoolingEvolution(cSecond t);					//!< Deal the cooling and then send it to Separation
+
+
+
+
+	ClassDef(Pool,3);
+};
+
+#endif
diff --git a/source/trunk/include/Reactor.hxx b/source/trunk/include/Reactor.hxx
new file mode 100755
index 000000000..3212d8097
--- /dev/null
+++ b/source/trunk/include/Reactor.hxx
@@ -0,0 +1,315 @@
+#ifndef __Reactor_HXX__
+#define __Reactor_HXX__
+
+/*!
+ \file
+ \brief Header file for reactor classes. 
+ */
+
+#include <string>
+#include <map>
+
+#include "CLASSFacility.hxx"
+#include "IsotopicVector.hxx"
+#include "EvolutionData.hxx"
+#include "PhysicsModels.hxx"
+#include "CLASSFuelPlan.hxx"
+
+using namespace std;
+typedef long long int cSecond;
+
+
+class CLASSBackEnd;
+class EvolutionData;
+class FabricationPlant;
+class Storage;
+class CLASSLogger;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a reactor.
+ The aim of this class is to deal the evolution of the fuel inside a reactor.
+ The fuel state of the reactor is describe in the IsotopicVector. Its evolution is contain in the EvolutionData
+
+ @author BaM
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+
+class Reactor : public CLASSFacility
+{
+public :
+
+
+//********* Constructor/Destructor Method *********//
+
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+
+	Reactor();		///< Normal Constructor.
+
+	//{
+	/// CLASSLogger Constructor.
+	/*!
+	 Use create an empty Reactor loading a CLASSLogger
+	 \param CLASSLogger CLASSLogger used for the log...
+	 */
+	Reactor(CLASSLogger* log);
+	//}
+
+	//{
+	/// Special Constructor for reprocessed fuel using cycletime and Burn-Up.
+	/*!
+	 Make a new reactor
+	 \param CLASSLogger CLASSLogger used for the log...
+	 \param CLASSBAckEnd Pool used facility wich get the fuel after iradiation
+	 \param creationtime creation time
+	 \param lifetime working time duration.
+	 \param cycletime duration of a cycle
+	 \param HMMass Mass of Heavy Metal in the Reactor
+	 \param BurnUp Burnup reach by the fuel at the end of the cycle
+	 */
+	Reactor(CLASSLogger* log, CLASSBackEnd* Pool,
+		cSecond creationtime , cSecond lifetime, double Power,
+		double HMMass, double CapacityFactor = 1);
+	//}
+
+	//{
+	/// Special Constructor for reprocessed fuel using cycletime and Burn-Up.
+	/*!
+	 Make a new reactor
+	 \param CLASSLogger CLASSLogger used for the log...
+	 \param CLASSBAckEnd Pool used facility wich get the fuel after iradiation
+	 \param creationtime creation time
+	 \param lifetime working time duration.
+	 \param cycletime duration of a cycle
+	 \param HMMass Mass of Heavy Metal in the Reactor
+	 \param BurnUp Burnup reach by the fuel at the end of the cycle
+	 */
+	Reactor(CLASSLogger* log,
+		FabricationPlant* fabricationplant, CLASSBackEnd* Pool,
+		cSecond creationtime , cSecond lifetime, double Power,
+		double HMMass, double CapacityFactor = 1);
+	//}
+
+	//{
+	 /// Special Constructor for reprocessed fuel using cycletime and Burn-Up.
+	 /*!
+	  Make a new reactor
+	 \param CLASSLogger CLASSLogger used for the log...
+	 \param fueltypeDB Databank describing the evolution of the fuel
+	 \param CLASSBAckEnd Pool used facility wich get the fuel after iradiation
+	 \param creationtime creation time
+	 \param lifetime working time duration.
+	 \param cycletime duration of a cycle
+	 \param HMMass Mass of Heavy Metal in the Reactor
+	 \param BurnUp Burnup reach by the fuel at the end of the cycle
+	 */
+	Reactor(CLASSLogger* log, PhysicsModels* fueltypeDB,
+		FabricationPlant* fabricationplant, CLASSBackEnd* Pool,
+		cSecond creationtime , cSecond lifetime, cSecond cycletime,
+		double HMMass, double BurnUp);
+	//}
+
+	//{
+	/// Special Constructor for reprocessed fuel using Power and Burn-Up.
+	/*!
+	 Make a new reactor
+	 \param CLASSLogger CLASSLogger used for the log...
+	 \param fueltypeDB Databank describing the evolution of the fuel
+	 \param CLASSBAckEnd Pool used facility wich get the fuel after iradiation
+	 \param creationtime creation time
+	 \param lifetime working time duration.
+	 \param Power Thermal power of the reactor
+	 \param HMMass Mass of Heavy Metal in the Reactor
+	 \param BurnUp Burnup reach by the fuel at the end of the cycle
+	 \param CapacityFactor effective charge of the reactor.
+	 */
+	Reactor(CLASSLogger* log, PhysicsModels* fueltypeDB,
+		FabricationPlant* fabricationplant, CLASSBackEnd* Pool,
+		cSecond creationtime , cSecond lifetime,
+		double Power, double HMMass, double BurnUp, double CapacityFactor);
+	//}
+
+	//{
+	/// Special Constructor for fixed fuel using Power and Burn-Up.
+	/*!
+	 Make a new reactor
+	 \param CLASSLogger CLASSLogger used for the log...
+	 \param evolutivedb EvolutionData describing the evolution of the fuel
+	 \param CLASSBAckEnd Pool used facility wich get the fuel after iradiation
+	 \param creationtime creation time
+	 \param lifetime working time duration.
+	 \param Power Thermal power of the reactor
+	 \param HMMass Mass of Heavy Metal in the Reactor
+	 \param BurnUp Burnup reach by the fuel at the end of the cycle
+	 \param CapacityFactor effective charge of the reactor.
+	 */
+	Reactor(CLASSLogger* log, EvolutionData* evolutivedb, CLASSBackEnd* Pool,
+		cSecond creationtime, cSecond lifetime,
+		double power, double HMMass, double BurnUp, double CapacityFactor);
+	//}
+
+	//{
+	/// Special Constructor for fixed fuel using Power and Burn-Up.
+	/*!
+	 Make a new reactor
+	 \param CLASSLogger CLASSLogger used for the log...
+	 \param evolutivedb EvolutionData describing the evolution of the fuel
+	 \param CLASSBAckEnd Pool used facility wich get the fuel after iradiation
+	 \param creationtime creation time
+	 \param lifetime working time duration.
+	 \param Power Thermal power of the reactor
+	 \param HMMass Mass of Heavy Metal in the Reactor
+	 \param BurnUp Burnup reach by the fuel at the end of the cycle
+	 \param CapacityFactor effective charge of the reactor.
+	 */
+	Reactor(CLASSLogger* log, EvolutionData* evolutivedb, CLASSBackEnd* Pool,
+		cSecond creationtime, cSecond lifetime,
+		cSecond cycletime, double HMMass, double BurnUp);
+	//}
+
+	~Reactor();	///< Normal Destructor
+
+	//@}
+
+
+
+
+//********* Get Method *********//
+
+	/*!
+	 \name Get Method
+	 */
+	//@{
+	
+	IsotopicVector 	GetIVReactor()		const	{ return GetInsideIV(); } 	//!< Return the IV contain in the Reactor
+	IsotopicVector	GetIVBeginCycle()	const	{ return fIVBeginCycle; }	//!< Return the Starting Cycle IV
+											//!< (Note : IVBegin != IVIn, only if using charging plan)
+	
+	IsotopicVector	GetIVOutCycle()		const	{ return fIVOutCycle; }		//!< Return the Out Cycle IV
+	IsotopicVector	GetIVInCycle()		const	{ return fIVInCycle; }		//!< Return the In Cycle IV
+											//!< (Note : IVIn != IVBegin, only if using charging plan)
+	
+
+
+	bool	IsFuelFixed()		const	{ return fFixedFuel; }		//!< True if using fixed Fuel, False otherwise
+	double	GetHeavyMetalMass()	const	{ return fHeavyMetalMass; }	//!< Return the HeavyMetal Mass in the Core at the begining of the cycle
+	double	GetBurnUp()		const	{ return fBurnUp; }		//!< Return the Burn Up of the Fuel at the end of the cycle
+	double	GetPower()		const	{ return fPower; } 		//!< Return the cycle time of the Reactor
+
+#ifndef __CINT__
+
+	EvolutionData	GetEvolutionDB()	const	{ return fEvolutionDB; }	//!< Return the Evolution database of the Fuel
+
+	CLASSBackEnd*		GetOutBackEndFacility()	const	{ return fOutBackEndFacility; }	//!< Return the pointer to Associeted BackEnd Facility
+	FabricationPlant*	GetFabricationPlant()	const	{ return fFabricationPlant; }	//!< Return the Pointer to the FabricationPlant
+
+
+	CLASSFuelPlan*	GetFuelPlan()		const	{ return fFuelPlan; }	//!< return the LoadingPlan
+
+#endif
+	//@}
+
+
+
+
+//********* Set Method *********//
+
+	/*!
+	 \name Set Method
+	 */
+	//@{
+	void	SetFuelPlan(CLASSFuelPlan* fuelplan)	{ fFuelPlan = fuelplan; }	//!< return the LoadingPlan
+
+
+	void	SetHMMass(double Mass)		{fHeavyMetalMass = Mass;}	//!< Set the HeavyMetal Mass in the Core at the begining of the cycle
+
+	void	SetIVReactor(IsotopicVector isotopicvector)
+					{ fInsideIV = isotopicvector; }		//!< Set the IV inside the Reactor Core
+	void	SetIVBeginCycle(IsotopicVector isotopicvector)
+					{ fIVBeginCycle = isotopicvector; }	//!< Set the IV at the Beginging of the Reactor Cycle
+	void	SetIVOutCycle(IsotopicVector isotopicvector)
+					{ fIVOutCycle = isotopicvector; }	//!< Set the IV Going Out at the End of the Cycle
+	void	SetIVInCycle(IsotopicVector isotopicvector)
+					{ fIVInCycle = isotopicvector; }	//!< Set the IV Coming In at the Beginning of the Cycle
+
+
+	void	SetCycleTime(double cycletime);					//!< Set the Cycle time (Power fixed)
+	void	SetPower(double Power);						//!< Set the Power (BurnUp cte)
+	void	SetBurnUp(double BU);						//!< Set the BurnUp reach at end of cycle (Power cte)
+
+
+#ifndef __CINT__
+
+	void	SetOutBackEndFacility(CLASSBackEnd* pool)	{ fOutBackEndFacility = pool; }	//!< Return the pointer to OutBackEnd Facility
+	void	SetStorage(Storage* storage)			{ fStorage = storage; fIsStorage = true;}	//!< Set the Pointer to the Storage
+	void	SetFabricationPlant(FabricationPlant* FP)	{ fFabricationPlant = FP;}	//!< Set the Pointer to the FabricationPlant
+	void	SetEvolutionDB(EvolutionData evolutionDB);			//!< Set the Pointer to the DB Evolution of the Reactor
+#endif
+
+	using CLASSFacility::SetName;
+	using CLASSFacility::GetName;
+
+	//@}
+
+
+
+
+//********* Evolution & Modification Method *********//
+
+	/*!
+	 \name Evolution & Modification Method
+	 */
+	//@{
+	
+	void Evolution(cSecond t);						//!< Performe the Evolution until the Time t
+	void Dump();								//!< Write Modification (IV In/Out, filling the TF...)
+	void SetNewFuel(EvolutionData ivdb);					//!< Change the Evolutive DB of the Reactor
+	
+	//@}
+
+
+
+protected :
+	
+	bool		fFixedFuel;		//!< true if the fuel is fixed (not reprocessed)
+	bool		fIsStorage;		//!< true if a storage has been define (to approximate the reprocessing using fixed fuel)
+	
+//********* Internal Parameter *********//
+
+	double 		fPower;			///< Power (in Watt)
+	
+	IsotopicVector	fIVBeginCycle;		///< Fuel IV at the Beginning of a Cycle
+	IsotopicVector	fIVInCycle;		///< IVBegin add at the Beginning of the Cycle
+	IsotopicVector	fIVOutCycle;		///< IV wich get out at the End of a Cycle
+
+#ifndef __CINT__
+	EvolutionData	fEvolutionDB;		//!< Pointer to the Actual Evolution DataBase
+
+	CLASSBackEnd*	fOutBackEndFacility;	//!< Pointer to the BackEnd Facility which collect the spend fuel
+
+
+	CLASSFuelPlan*	fFuelPlan;
+
+	FabricationPlant*	fFabricationPlant;		//!< Poitner to the FabricationPlant
+
+	Storage*	fStorage;		//!< Pointer to the Stock (only for reprocessing fuel in fixed base...)
+
+
+#endif
+//********* Unfixed Fuel Parameter *********//
+
+
+	double			fHeavyMetalMass;		///< In tons
+	double			fBurnUp;			///< In GWd/tHM
+
+ 	ClassDef(Reactor,3);
+ };
+
+
+#endif
diff --git a/source/trunk/include/Scenario.hxx b/source/trunk/include/Scenario.hxx
new file mode 100755
index 000000000..29d88d5dd
--- /dev/null
+++ b/source/trunk/include/Scenario.hxx
@@ -0,0 +1,288 @@
+#ifndef _SCENARIO_HXX_
+#define _SCENARIO_HXX_
+/*!
+ \file
+ \brief Header file for CLASS classes. 
+ */
+
+#include "CLASSObject.hxx"
+#include "IsotopicVector.hxx"
+
+#include <TFile.h>
+#include <TTree.h>
+#include <vector>
+#include <string>
+#include <map>
+#include <iostream>
+
+
+
+using namespace std;
+typedef long long int cSecond;
+
+class DecayDataBank;
+class FabricationPlant;
+class SeparationPlant;
+class Reactor;
+class Pool;
+class Storage;
+
+//-----------------------------------------------------------------------------//
+/*!
+Define a Scenario .
+The aim of these Scenario is to manage the park and its evolution and to lead all Storage, FabricationPlant, Reactor, Pool.
+
+
+ @author BaM
+ @author Marc
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+class Scenario : public CLASSObject
+{
+public :
+
+//********* Constructor/Destructor Method *********//
+
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+	
+	Scenario();	///< Normal Constructor.
+
+	Scenario(CLASSLogger* Log, cSecond abstime = 0);	///< Log Constructor.
+ 	/*!
+	 Use to load a CLASSLogger
+	 \param CLASSLogger: CLASSLogger used for the log...
+	 */
+	Scenario(cSecond abstime);	///< Time Constructor.
+
+
+	Scenario(cSecond abstime, CLASSLogger* log);	///< Time Constructor.
+ 	/*!
+	 Use to set the starting time of the Parc
+	 \param abstime: Starting time of the Parc in second
+	 */
+
+	~Scenario();	///< Normal Destructor.
+	//@}
+
+
+//********* Get Method *********//
+	/*!
+	 \name Get Function
+	 */
+	//@{
+	cSecond				GetAbsoluteTime()	{ return fAbsoluteTime; }	///< Return the Absolute Clock
+	map<cSecond, int>		GetTimeStep()		{ return fTimeStep; }		///< Return the Time Step Vector
+	vector<Reactor*>		GetReactor()		{ return fReactor; }		///< Return the Reactor Vector
+	vector<Storage*>		GetStorage()		{ return fStorage; }		///< Return the Storage Vector
+	vector<Pool*>			GetPool()		{ return fPool; }		///< Return the Pool Vector
+	vector<FabricationPlant*>	GetFabricationPlant()	{ return fFabricationPlant; }	///< Return the FabricationPlant Vector
+	DecayDataBank*			GetDecayDataBase() 	{ return fDecayDataBase; }	//!< Return the Pointer to the Decay DataBase
+
+	cSecond				GetPrintSet()		{ return fPrintStep; }		///< Return the Print Step Periodicity
+	bool				GetStockManagement()	{ return fStockManagement; }	///< Return the StockManagement method (True or False)
+	string				GetOutputFileName()	{ return fOutputFileName; }	///< Return the Output File name
+	string				GetOutputTreeName()	{ return fOutputTreeName; }	///< Return the Output ROOT TTree name
+
+	IsotopicVector			GetWaste()		{ return fWaste;}		///< Return the waste IsotopicVcetor
+
+	//@}
+
+
+
+
+//********* Set Method *********//
+	/*!
+	 \name Set Function
+	 */
+	//@{
+
+	//{
+	/// Set the Printing Step periodicity
+	/*!
+	 Use to set the periodicity of the output
+	 \param timestep: periodicity of outpout in second
+	 */
+	void	SetTimeStep(cSecond timestep) 				{ fPrintStep = timestep; }
+	//}
+
+	//{
+	/// Set the StockManagement method
+	/*!
+	 Use to define the stock managment method : true all fuel are stored individualy and false all fuel are mixed in a stock, and one can separate each isotope as needed
+	 \param val: true or false depending on the stock management method used
+	 */
+	void	SetStockManagement(bool val)				{ fStockManagement = val; }
+	//}
+
+	//{
+	/// Set the Decay DataBank
+	/*!
+	 Use to define Decay DataBank to be used
+	 \param decaydatabase: a DecayDataBank which should contain the evolution of each nuclei of the chart
+	 */
+	void	SetDecayDataBase(DecayDataBank* decaydatabase) { fDecayDataBase = decaydatabase; }
+	//}
+
+	//{
+	/// Set the Output File Name
+	/*!
+	 Use to define name of the output file
+	 \param name: a string which correspond to the output file name
+	 */
+	void	SetOutputFileName(string name)	{ fOutputFileName = name; }
+	//}
+
+
+	//{
+	/// Set the Output TTree Name
+	/*!
+	 Use to define name of the output ROOT TTree
+	 \param name: a string which correspond to the output ROOT TTree name
+	 */
+	void	SetOutputTreeName(string name)	{ fOutputTreeName = name; }
+	//}
+	//@}
+
+	void SetLogTimeStep(bool val = true)	{fLogTimeStep = true;}
+
+//********* Add Method *********//
+	/*!
+	 \name Adding Facilities
+	 */
+	//@{
+
+	void	AddPool(Pool* Pool);						///< Add a Pool to the Park
+	void	AddReactor(Reactor* reactor);					///< Add a Reactor to the Park 
+	void 	AddStorage(Storage* storage);					///< Add a Storage to the Park
+	void 	AddFabricationPlant(FabricationPlant* fabricationplant);	///< Add a Storage to the Park
+	void	AddSeparationPlant(SeparationPlant* separationplant);
+
+	void	Add(Pool* Pool)					{AddPool(Pool);}	///< Add a Pool to the Park
+	void	Add(Reactor* reactor)				{AddReactor(reactor);}	///< Add a Reactor to the Park
+	void 	Add(Storage* storage)				{AddStorage(storage);}	///< Add a Storage to the Park
+	void 	Add(FabricationPlant* fabricationplant)		{AddFabricationPlant(fabricationplant);}///< Add a Storage to the Park
+	void 	Add(SeparationPlant* separationplant)		{AddSeparationPlant(separationplant);}///< Add a Storage to the Park
+
+	//@}
+
+	
+ 	
+//********* Evolution Method *********//
+	/*!
+	 \name Evolution Method
+	 */
+	//@{
+
+	void	BuildTimeVector(cSecond t);		///< Build the Time Evolution Vector where :
+							/// \li 1 printing,
+							/// \li 2 reactor Studown
+							/// \li 4 start/End of reactor cycle,
+							/// \li 8 end of Cooling,
+							/// \li 16 fuel Fabrication
+
+	void	Evolution(cSecond t);			///< Perform the Evolution
+	void	BackEndEvolution();			///< Perform BackEnd Evolution
+	void	PoolEvolution();			///< Perform Pool Evolution
+	void	PoolDump();
+
+	void	ReactorEvolution();			///< Perform the Reactor Evolution
+	void	FabricationPlantEvolution();		///< Perform the FabricationPlant Evolution
+	void	StorageEvolution();			///< Perform the Storage Evolution
+
+	//@}
+
+
+
+//-------- IsotopicVector --------//
+
+	/*!
+	 \name  IsotopicVector Sum
+	 */
+	//@{
+
+
+	IsotopicVector		GetOutIncome() const		{ return fOutIncome; }		//!< Return the OutIncome Providings IsotopicVector
+	void AddOutIncome(ZAI zai, double quantity)		{ AddOutIncome(zai*quantity); }	//!< Add a ZAI*quantity to OutIncomeIncome
+	void AddOutIncome(IsotopicVector isotopicvector)	{ fOutIncome.Add(isotopicvector); }	//!< Add a isotopicVector to OutIncomeIncome
+	void AddWaste(ZAI zai, double quantity)		{ AddWaste(zai*quantity); }	//!< Add a ZAI*quantity to Waste
+	void AddWaste(IsotopicVector isotopicvector)	{ fWaste.Add(isotopicvector); }	//!< Add a isotopicVector to Waste
+	void AddToPower(double power)			{ fParcPower += power;}		//!< Add power to the installed power in the Parc
+
+	//@}
+
+
+
+//********* In/Out related Method *********//
+
+	/*!
+	 \name  In/Out Method
+	 */
+	//@{
+
+
+	void	ProgressPrintout(cSecond t);		//!< Update the prompt output to the time t
+	
+	void	Print();				//!< Print some information about the Parc
+	void	Write();				//!< Write information in a file
+	void	UpdateParc();				//!< Update the Global IsotopicVector
+	void	OpenOutputTree();			//!< Open and define the Ouput ROOT TTree
+	void	CloseOutputTree();			//!< Close and delete the Ouput ROOT TTree
+	void	OutAttach();				//!< Attach the Branch to the Ouput ROOT TTree
+	void	ResetQuantity();			//!< Reset the values of the GLobal IsotopicVector
+	
+	//@}
+
+	
+	
+protected :
+	bool			fNewTtree;		//!< Tru if we want to define a new TTree in the output File
+	bool			fStockManagement;	///< True if real StockManagement false unstead (Default = true)
+	bool			fLogTimeStep;
+	
+	cSecond			fPrintStep;		///< Time interval between two output update
+	cSecond			fAbsoluteTime;		///< Absolute Clock
+	cSecond			fStartingTime;		///< Starting Time
+	map<cSecond, int>	fTimeStep;		///< Time Step Vector for the evolution :
+							/// \li 1 printing,
+							/// \li 2 reactor Studown
+							/// \li 4 start/End of reactor cycle,
+							/// \li 8 end of Cooling,
+							/// \li 16 fuel Fabrication
+
+	
+	vector<Storage*>		fStorage;		///< Vector of Storages
+	vector<Pool*>			fPool;			///< Vector of Pool
+	vector<Reactor*>		fReactor;		///< Vector of Reactor
+	vector<FabricationPlant*>	fFabricationPlant;	///< Vector of FabricationPlant
+	vector<SeparationPlant*>	fSeparationPlant;	///< Vector of FabricationPlant
+	DecayDataBank*			fDecayDataBase;		//!< Pointer to the Decay DataBase
+
+	
+	TFile*		fOutFile;		///< Pointer to the Root Output File
+	string		fOutputFileName;	//! Name of the Output File
+	TTree*		fOutT;			///< Pointer to the Root Output TTr3ee
+	string		fOutputTreeName;	//! Name of the Output TTree
+	string		fOutputLogName;		///< Name of the Ouput log File
+	
+	IsotopicVector	fWaste;			///< Waste IV
+	IsotopicVector	fTotalStorage;		///< Sum of all IV in Storage IV
+	IsotopicVector	fOutIncome;			///< OutIncomeIncome IV
+	IsotopicVector	fTotalCooling;		///< Sum of all IV in Cooling IV
+	IsotopicVector	fFuelFabrication;	///< Sum of all IV in Fabrication IV
+	IsotopicVector	fTotalInReactor;	///< Sum of all IV in Reactor IV
+
+
+	IsotopicVector	fIVInCycleTotal;	///< Sum of all IV in the cycle (without Waste) IV
+	IsotopicVector	fIVTotal;		///< Sum of all IV in the parc (including Waste) IV
+	double		fParcPower;		///< Sum of the Power of all reactor in the parc
+
+};
+
+
+#endif
diff --git a/source/trunk/include/SeparationPlant.hxx b/source/trunk/include/SeparationPlant.hxx
new file mode 100644
index 000000000..7f972d28a
--- /dev/null
+++ b/source/trunk/include/SeparationPlant.hxx
@@ -0,0 +1,146 @@
+#ifndef __SeparationPlant_HXX__
+#define __SeparationPlant_HXX__
+/*!
+ \file
+ \brief Header file for SeparationPlant class.
+ */
+
+#include <string>
+#include <map>
+
+#include "CLASSBackEnd.hxx"
+#include "Storage.hxx"
+#include "IsotopicVector.hxx"
+
+using namespace std;
+typedef long long int cSecond;
+
+class CLASSBackEnd;
+class CLASSLogger;
+class DecayDataBank;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a SeparationPlant.
+ The aim of the Class is to separate an IV into several IV (MA, Pu, PF, etc...) and to send it to corresponding storage 
+
+ @author NT
+ @version 1.0
+ */
+//________________________________________________________________________
+
+
+
+class SeparationPlant : public CLASSBackEnd
+{
+public :
+
+
+//********* Constructor/Destructor Method *********//
+
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+	
+	SeparationPlant();				///< Normal Constructor.
+
+	//{
+	/// Special Constructor.
+	/*!
+	 Make a new SeparationPlant
+	 \param Log CLASSLogger used for the log...
+	 \param separationtime duration of the SeparationPlant
+	 */
+	SeparationPlant(CLASSLogger* Log); //!<
+	//}
+
+
+
+	~SeparationPlant();	///< Normal Destructor.
+	//@}
+
+
+
+
+//********* Set Method *********//
+
+	/*!
+	 \name Set Method
+	 */
+	//@{
+
+
+	void SetBackEndDestination(CLASSBackEnd*  storagedestination, IsotopicVector isotopicvector, cSecond destinationstartingtime);
+
+	void AddIV(IsotopicVector IV);
+
+	void SetPutToWaste(bool val)		{ fPutToWaste = val; }		//!< Set True if IV goes to waste after cooling false instead
+
+
+	using CLASSBackEnd::SetName;
+
+	//@}
+
+
+
+
+//********* Get Method *********//
+
+	/*!
+	 \name Get Method
+	 */
+	//@{
+
+	bool		GetPutToWaste()	const	{ return fPutToWaste; }		//!< Return True if IV goes to waste after cooling false instead
+
+	//@}
+
+
+	map<cSecond,int> GetTheBackEndTimePath();
+
+
+//********* IsotopicVector Managment Method *********//
+
+	/*!
+	 \name IsotopicVector Managment Method
+	 */
+	//@{
+
+	vector<cSecond>	GetCoolingStartingTime() const
+						{ return GetIVArrayArrivalTime(); }	//!< Return the vector of Cooling Sstarting Time
+	//@}
+
+
+
+
+//********* Other Method *********//
+
+	//@}
+	/*!
+	 \name Other Method
+	 */
+	//@{
+
+	
+	//@}
+
+protected :
+	
+	
+	
+//********* Internal Parameter *********//
+	bool			fPutToWaste;	//!< True if IV goes to waste after cooling false instead
+	vector<CLASSBackEnd* > 	fDestinationStorage;	//!< Vector containing destination storage of the IV in the Separation Plant
+	vector<IsotopicVector >	fDestinationStorageIV;	//!< Vector containing destination storage of the IV in the Separation Plant
+	vector<cSecond>		fDestinationStorageStartingTime; 	//!< Vector containing destination storage starting time of the IV in the Separation Plant
+
+//********* Private Method *********//
+
+
+
+
+	ClassDef(SeparationPlant,3);
+};
+
+#endif
diff --git a/source/trunk/include/Storage.hxx b/source/trunk/include/Storage.hxx
new file mode 100644
index 000000000..e80688e77
--- /dev/null
+++ b/source/trunk/include/Storage.hxx
@@ -0,0 +1,165 @@
+#ifndef __Storage_HXX__
+#define __Storage_HXX__
+
+/*!
+ \file 
+ \brief Header file for Storage class.
+ */
+
+
+#include <vector>
+
+#include "CLASSBackEnd.hxx"
+#include "IsotopicVector.hxx"
+
+
+using namespace std;
+typedef long long int cSecond;
+
+class CLASSLogger;
+class DecayDataBank;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a Storage.
+ The aim of this class is to deal the store used fuel after the cooling dealing the evolution of all radiaoactive nuclei.
+
+ @author BaM
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+
+class Storage : public CLASSBackEnd
+{
+public :
+
+
+//********* Constructor/Destructor Method *********//
+
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+
+ 	Storage();		///< Normal Constructor.
+
+	//{
+	/// CLASSLogger Constructor.
+	/*!
+	 Use create an empty Stotarage loading a CLASSLogger
+	 \param CLASSLogger CLASSLogger used for the log...
+	 */
+ 	Storage(CLASSLogger* log);
+	//}
+
+
+	//{
+	/// Special Constructor.
+	/*!
+	 Make a new reactor
+	 \param CLASSLogger CLASSLogger used for the log...
+	 \param evolutivedb DataBank for decay management
+	 */
+	Storage(CLASSLogger* log, DecayDataBank* evolutivedb);
+	//}
+
+
+ 	~Storage(); 	///< Normal Destructor.
+
+	//@}
+
+
+
+
+//********* Set Method *********//
+
+	/*!
+	 \name Set Method
+	 */
+	//@{
+
+	using CLASSBackEnd::SetName;
+	using CLASSBackEnd::SetIsStorageType;
+
+	//@}
+
+
+//********* Get Method *********//
+
+	/*!
+	 \name Get Method
+	 */
+	//@{
+	//@}
+
+
+
+
+//********* Storage specific Method *********//
+
+	/*!
+	 \name Storage specific Method
+	 */
+	//@{
+		
+	void TakeFractionFromStock(int IVId,double fraction);						//!< Take a part from an IV in sotck;
+	void TakeFromStock(IsotopicVector isotopicvector);						//!<
+
+
+	void AddIV(IsotopicVector isotopicvector);					//!< Add an Isotopicvector to the IVArray
+	void AddToStock(IsotopicVector isotopicvector) {AddIV(isotopicvector);}		//!< Add an Isotopicvector to the IVArray
+	void RemoveEmptyStocks(); //!< delete the empty Isotopicvectors contained in IVArray
+
+	//@}
+
+
+
+
+//********* Evolution Method *********//
+
+	/*!
+	 \name Evolution Method
+	 */
+	//@{
+	
+	void Evolution(cSecond t);		//!< Performe the evolution until the Time t
+
+	//@}
+
+	//********* In/Out Method *********//
+
+	/*!
+	 \name In/Out Method
+	 */
+	//@{
+
+	//{
+	/// Write the Isotope composition of all IsotopicVector stored.
+	/*!
+	 Make a new reactor
+	 \param filenam CLASSLogger used for the log...
+	 \param data only use to srite a date in the file, theyr is not treatment of the date in this method....
+	 */
+	void Write(string filename,cSecond date = -1);
+	//}
+
+	//@}
+
+protected :
+	
+//********* Isotopic Quantity *********//
+
+
+
+//********* Private Method *********//
+	void	StorageEvolution(cSecond t);					//!< Deal the Storage Decay Evolution
+
+
+
+
+	ClassDef(Storage,3);
+};
+
+#endif
diff --git a/source/trunk/include/StringLine.hxx b/source/trunk/include/StringLine.hxx
new file mode 100755
index 000000000..429e560eb
--- /dev/null
+++ b/source/trunk/include/StringLine.hxx
@@ -0,0 +1,306 @@
+#ifndef _STRINGLINE_
+#define _STRINGLINE_
+
+#include <string>
+#include <sstream>
+#include <iostream>
+#include <algorithm>
+#include <cctype>
+using namespace std;
+/*!
+ \file
+ \brief Header file for StingLine class. 
+*/
+
+//! Class extracting fields from a string / line.
+/*!
+ The aim of this class is to provide tools to extract fields ("word") from
+ a string and convert a string in Upper/Lower case. 
+ All methods are static so that it is not necessary to create object to use them
+ 
+ example:
+ \code
+ string line="The temperature is : 300.6 K";
+ int start;
+
+ 1st method: creation of StringLine
+
+ start=0;
+ StringLine SL;
+ string the=SL.NextWord(line,start);
+ string temperature_is=SL.NextWord(line,start,':');
+ string colon=SL.NextWord(line,start);
+ double T=atof(SL.NextWord(line,start).c_str());
+ cout<<the<<endl<<temperature_is<<endl<<T<<endl;
+ 
+ 2nd method: "using" the static methods
+ 
+ start=0;
+ the=StringLine::NextWord(line,start);
+ temperature_is=StringLine::NextWord(line,start,':');
+ colon=StringLine::NextWord(line,start);
+ T=atof(StringLine::NextWord(line,start).c_str());
+ cout<<the<<endl<<temperature_is<<endl<<T<<endl;
+ \endcode
+ @author PTO
+ @version 0.1
+*/
+
+class StringLine
+{
+ public:
+	//! Find the next word in a line.
+	/*!
+	 Find Next word in a line starting from position "start" in the line. If an alternative
+	 separator is given, the word length is defined by the first position of sep or alt_sep found.
+	 The first value of start is in general 0 (i.e. the beginning of the Line)
+	 \param Line : a line containing words
+	 \param start : from where to start to find the begining of a word
+	 \param sep : the separator between 2 words (default=space)
+	 \param alt_sep : the alternative separator between 2 words (default='')
+	*/
+	static string NextWord(string Line,int &start,char sep=' ', char alt_sep='\0');
+	//! Find the previous word in a line.
+	/*!
+	 Find Previous word in a line starting from position "start" in the line. If an alternative
+	 separator is given, the word length is defined by the first position of sep or alt_sep found.
+	 The first value of start is in general the end of the Line.
+	 \param Line : a line containing words
+	 \param start : from where to start to find the begining of a word
+	 \param sep : the separator between 2 words (default=space)
+	 \param alt_sep : the alternative separator between 2 words (default='')
+	*/
+	static string PreviousWord(string Line,int &start,char sep=' ', char alt_sep='\0');
+ 	static void ToLower(string &Line); //!< convert a string to Lower case
+ 	static void ToUpper(string &Line); //!< convert a string to Upper case
+
+	//! Find \p search in \p Line from the begining.
+	/*!
+	 returns the position, starting from the begenning of the first occurence 
+	 of \p search in \p Line if it is found, else returns -1 
+	 \param search : a string to find
+	 \param Line : where to search
+	*/
+	static int Find(const char *search,string Line);
+	//! Find \p search in \p Line from the end.
+	/*!
+	 returns the position, starting from the end of the first occurence 
+	 of \p search in \p Line if it is found, else returns -1 
+	 \param search : a string to find
+	 \param Line : where to search
+	*/
+	static int rFind(const char *search,string Line);
+	 //! convert a input type (\p in_T) to another (\p out_T).
+	/*!
+	 Example: 	
+	 \code
+	 string s="32.12";
+	 double t=StringLine::convert<double>(s);
+	 string temperature=StringLine::convert<string>(300.);
+	 \endcode
+	 \param t : the input value
+	*/
+	template <class out_T, class in_T> static  out_T convert(const in_T & t);
+	 //! try to convert a string to a number.
+	/*!
+	 Example: 	
+	 \code
+	 string s="32.12";
+	 double d;
+	 if(StringLine::ToNumber(d,s,std::dec))
+	 	cout<<"double="<<d<<endl;
+	 string hexanum="ff";
+	 int i;
+	 if(StringLine::ToNumber(i,hexanum,std::hex))
+	 	cout<<"int="<<i<<endl;
+	 \endcode
+	 \param s : the input string
+	 \param t : the output value
+	 \param f : string format (ie hex, dec, oct)
+	*/
+	template <class T> static bool ToNumber(T& t, const std::string& s, std::ios_base& (*f)(std::ios_base&))
+	{
+ 	 if(s.size()==0) return true;
+	 std::istringstream iss(s);
+ 	 return !(iss >> f >> t).fail();
+	}
+	//! Find the start of a word in a line.
+	/*!
+	 \param Line : a line containing words
+	 \param CurrentPosition : from where to start to find the begining of a word
+	 \param sep : the separator between 2 words (default=space)
+	 \param alt_sep : the alternative separator between 2 words (default='')
+	*/
+ 	static int GetStartWord(string Line,int CurrentPosition,char sep=' ', char alt_sep='\0');
+	//! Find the end of a word in a line.
+	/*!
+	 \param Line : a line containing words
+	 \param CurrentPosition : from where to start to find the end of a word
+	 \param sep : the separator between 2 words (default=space)
+	 \param alt_sep : the alternative separator between 2 words (default='')
+	*/
+	static int GetEndWord(string Line,int CurrentPosition,char sep=' ', char alt_sep='\0');
+	//! Replace a sub-string by an other in a string.
+	/*!
+	 \param InLine : the string  which contains the sub-string to replace
+	 \param ToReplace : the sub-string to replace
+	 \param By : the sub-string  ToReplace is replaced by the sub-string By in Inline
+	*/
+	static string ReplaceAll(string InLine, string ToReplace, string By);
+	static bool IsDouble(const std::string& s);
+};
+
+
+//_________________________________________________________________________________
+inline string StringLine::NextWord(string Line,int &start,char sep, char alt_sep)
+{
+	string Word="";
+	if(start>=int(Line.size())) 
+	{
+		return Word;
+	}
+	start=GetStartWord(Line,start,sep,alt_sep);
+	int wordlength=GetEndWord(Line,start,sep,alt_sep)-start;
+	
+	Word=Line.substr(start,wordlength);
+	
+	start+=wordlength;
+	return Word;
+}
+//_________________________________________________________________________________
+inline string StringLine::PreviousWord(string Line,int &start,char sep, char alt_sep)
+{
+	string Word="";
+	if(start<=0) 
+	{
+		return Word;
+	}
+	int pos=Line.rfind(sep,start);
+	int alt_pos=-1;
+	int real_pos=pos;
+	char real_sep=sep;
+	if(alt_sep!='\0')
+	{
+		alt_pos=Line.rfind(alt_sep,start);
+		real_pos=max(pos,alt_pos);
+		if(real_pos!=pos)
+			real_sep=alt_sep;
+	}
+	int wordlength=start-Line.rfind(real_sep,real_pos);
+	if(real_pos<=0)
+	{
+		Word=Line.substr(0,start+1);
+		start=0;
+		return Word;
+	}
+	Word=Line.substr(real_pos+1,wordlength);
+	
+	start-=wordlength+1;
+	return Word;
+}
+	
+//_________________________________________________________________________________
+inline void StringLine::ToLower(string &Line)
+{
+	transform (Line.begin(), Line.end(),	// source
+				Line.begin(),				// destination
+				(int(*)(int))tolower);		// operation
+}
+
+//_________________________________________________________________________________
+inline void StringLine::ToUpper(string &Line)
+{
+	transform (Line.begin(), Line.end(),	// source
+				Line.begin(),				// destination
+				(int(*)(int))toupper);		// operation
+}
+
+//_________________________________________________________________________________
+inline int StringLine::GetStartWord(string Line,int CurrentPosition,char sep, char alt_sep)
+{
+	int pos=Line.find(sep,CurrentPosition);
+	int alt_pos=-1;
+	if(alt_sep!='\0')
+		alt_pos=Line.find(alt_sep,CurrentPosition);
+	int real_pos=pos;
+	char real_sep=sep;
+	if(alt_pos>=0)
+	{
+		real_pos=min(pos,alt_pos);
+		if(pos==int(string::npos))real_pos=alt_pos;
+		if(real_pos!=pos)
+			real_sep=alt_sep;
+	}
+	if(real_pos==int(string::npos)) return CurrentPosition;
+	while(CurrentPosition<int(Line.size()) && Line[CurrentPosition]==real_sep)
+		CurrentPosition++;
+	return CurrentPosition;
+}
+
+//_________________________________________________________________________________
+inline int StringLine::GetEndWord(string Line,int CurrentPosition,char sep, char alt_sep)
+{
+	int pos=Line.find(sep,CurrentPosition);
+	int alt_pos=-1;
+	if(alt_sep!='\0')
+		alt_pos=Line.find(alt_sep,CurrentPosition);
+	int real_pos=pos;
+	if(alt_pos>=0)
+	{
+		real_pos=min(pos,alt_pos);
+		if(pos==int(string::npos))real_pos=alt_pos;
+	}
+	if(real_pos==int(string::npos))
+		return Line.size();
+	return real_pos;
+}
+
+//_________________________________________________________________________________
+inline int StringLine::Find(const char *search,string Line)
+{
+	size_t Pos=Line.find(search);
+	if(Pos != string::npos ) return Pos;
+	return -1;
+}
+
+//_________________________________________________________________________________
+inline int StringLine::rFind(const char *search,string Line)
+{
+	size_t Pos=Line.rfind(search);
+	if(Pos != string::npos) return Pos;
+	return -1;
+}
+
+//_________________________________________________________________________________
+template <class out_T, class in_T>
+inline out_T StringLine::convert(const in_T & t)
+{
+	stringstream stream;
+	stream << t; 		// insert value to stream
+	out_T result; 		// store conversion's result here
+ 	stream >> result; 	// write value to result
+	return result;
+}
+
+//_________________________________________________________________________________
+inline string StringLine::ReplaceAll(string InLine, string ToReplace, string By)
+{
+	int start=0;
+	int pos=InLine.find(ToReplace,start);
+	while(pos!=int(string::npos))
+	{
+		InLine.replace(pos,ToReplace.size(),By);
+		start=0;
+		pos=InLine.find(ToReplace,start);
+	}
+	return InLine;
+}
+//_________________________________________________________________________________
+inline bool StringLine::IsDouble(const std::string& s)
+{
+	std::istringstream i(s);
+	double temp;
+	return ( (i >> temp) ? true : false );
+}
+
+#endif
diff --git a/source/trunk/include/XSModel.hxx b/source/trunk/include/XSModel.hxx
new file mode 100644
index 000000000..2dfe5fd1e
--- /dev/null
+++ b/source/trunk/include/XSModel.hxx
@@ -0,0 +1,73 @@
+#ifndef _XSMODEL_HXX
+#define _XSMODEL_HXX
+
+
+/*!
+ \file
+ \brief Header file for XSMODEL class.
+ 
+ 
+ @author BLG
+ @version 1.0
+ */
+#include "EvolutionData.hxx"
+#include "CLASSObject.hxx"
+
+
+using namespace std;
+
+class IsotopicVector;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a XS Interpolator 
+This is the class for method related to XS prediction
+
+see @../Model/XS/XSM_CLOSEST.hxx 
+see @../Model/XS/XSM_MLP.hxx 
+...
+
+!!!!!!!!!!!!!!!!CAUTION!!!!!!!!!!!!!
+Never instantiate XSModel in your CLASS input but it's derivated class
+
+
+ @author BLG
+ @version 1.0
+ */
+//________________________________________________________________________
+
+
+class XSModel : public CLASSObject
+{
+
+	public : 
+
+	XSModel();
+	XSModel(CLASSLogger* log);
+	/// Pure virtual method called to estimates mean cross sections.
+	/*!
+	 Estimates the mean cross sections evolution according the fresh fuel composition
+	 \param vector<IsotopicVector> IV, Fresh fuel composition
+	 \param double t =0, can be used in XSM_CLOSEST to recalculate 
+	 distance between IV and DataBase at each time step (deprecated)
+	 */
+	virtual  EvolutionData GetCrossSections(IsotopicVector IV,double t=0) = 0 ;
+	
+	/// Check either the IsotopicVector IV is in the validity domain of the models.
+	/*!
+	 return true if IV is in ValidityDomain
+	 return false + a warning if IV is not in ValidityDomain
+	 \param vector<IsotopicVector> IV, Fresh fuel composition
+	 */
+	virtual  bool isIVInDomain(IsotopicVector IV) ;
+	
+	void SetZAIThreshold(int Z_Threshold){fZAIThreshold = Z_Threshold;}//!< Set the Z threshold : ZAI with Z < fZAIThreshold are not manage by CLASS
+	int  GetZAIThreshold(){return fZAIThreshold;}//!< Get the Z threshold
+
+	protected :
+	map< ZAI, pair<double,double> > fFreshFuelDomain; //!< Fresh fuel range : map<ZAI<min edge ,max edge >>
+	int fZAIThreshold;	//!< Z threshold for handling nuclei mean cross section (take only ZAI reaction of Z>=fZAIThresold)
+};
+
+#endif
+
diff --git a/source/trunk/include/ZAI.hxx b/source/trunk/include/ZAI.hxx
new file mode 100755
index 000000000..3aca697e1
--- /dev/null
+++ b/source/trunk/include/ZAI.hxx
@@ -0,0 +1,90 @@
+#ifndef _ZAI_
+#define _ZAI_ 
+
+/*!
+ \file
+ \brief Header file for ZAI classes. 
+ */
+
+#include <string>
+#include "TObject.h"
+#include <iostream>
+
+using namespace std;
+
+//-----------------------------------------------------------------------------//
+/*!
+ Define a nuclei as : Z A I.
+ The aim of this class is to discribe each ZAI.
+
+ @author BaM
+ @version 2.0
+ */
+//________________________________________________________________________
+
+
+
+class ZAI : public TObject
+{
+public:
+
+
+//********* Constructor/Destructor Method *********//
+
+	/*!
+	 \name Constructor/Desctructor
+	 */
+	//@{
+
+	ZAI();	///< Default constructor
+
+	//{
+ 	///< Normal Constructor. 
+ 	/*!
+ 	 Default: No parent
+ 	 \param Z : number of protons
+ 	 \param A : number of nucleons (A=0 means natural isotopes) 
+ 	*/
+	ZAI(int Z, int A, int I=0);
+	//}
+
+
+	~ZAI();	///< Normal Destructor.
+
+
+//********* ZAI main attributes Method *********//
+
+	/*!
+	\name ZAI main attributes 
+	*/
+	//@{
+	int  Z()	const	{ return fZ; } //!< returns the number of protons
+	int  A()	const	{ return fA; } //!< returns the number of nucleons
+	int  I()	const	{ return fI; } //!< returns the Isomeric State
+	int  N()	const	{ return fA-fZ; } //!< returns the number of neutrons
+		
+	//@}
+
+
+
+	ZAI operator=(ZAI IVa);		//!< ...
+	bool operator <(const ZAI& zai)		const	{ return (fZ != zai.Z())?
+							(fZ < zai.Z()) : ( (fA != zai.A())?
+								 (fA < zai.A()) : (fI < zai.I()) ); }
+
+	bool operator !=(const ZAI& zai)	const	{ return ( fZ != zai.Z() ) || ( fA != zai.A() ) || ( fI != zai.I() ); }
+	bool operator ==(const ZAI& zai)	const	{ return ( fZ == zai.Z()  && fA == zai.A() &&  fI == zai.I()); }
+	void Print()				const	{ cout << fZ << " " << fA << " " << fI << endl;}
+
+
+protected :
+ 	
+	short	fZ;		///< number of protons
+	short	fA;		///< number of nucleons (A=0 means natural isotopes) 
+	short	fI;		///< Isomeric state
+
+	ClassDef(ZAI,1);
+};
+
+
+#endif
diff --git a/source/trunk/include/ZAIMass.hxx b/source/trunk/include/ZAIMass.hxx
new file mode 100644
index 000000000..6ae5690de
--- /dev/null
+++ b/source/trunk/include/ZAIMass.hxx
@@ -0,0 +1,52 @@
+#ifndef _ZAIMass_
+#define _ZAIMass_
+
+/*!
+ \file
+ \brief Header file for ZAIMass classes.
+ 
+ 
+ @author BaM & BaL
+ @version 2.0
+ */
+
+#include <map>
+
+#include "ZAI.hxx"
+#include "TObject.h"
+#include <iostream>
+
+using namespace std;
+
+
+class IsotopicVector;
+
+///< A ZAIMass .
+
+class ZAIMass
+{
+	
+	
+public:
+		///< Default constructor
+	ZAIMass();
+		///< Normal Constructor.
+
+		///< Normal Destructor.
+	~ZAIMass();
+	
+
+
+	double GetMass(ZAI zai ) const;
+	double GetMass(const int Z, const int A )    const { return GetMass( ZAI(Z, A, 0) ); }
+
+	double GetMass(const IsotopicVector IV)    const; //return Mass of IV in tons
+
+private:
+	map<ZAI, double> fZAIMass; //! ZAI mass list
+
+
+};
+
+
+#endif
-- 
GitLab