diff --git a/source/branches/CLASSV3/include/CLASSNucleiFiliation.hxx b/source/branches/CLASSV3/include/CLASSNucleiFiliation.hxx index 8fff72da2e340b8fe27dd0a9122b49014a259620..6754f4080c5c0b711a78b2d7554dd0bb766f781c 100644 --- a/source/branches/CLASSV3/include/CLASSNucleiFiliation.hxx +++ b/source/branches/CLASSV3/include/CLASSNucleiFiliation.hxx @@ -36,31 +36,63 @@ public: //@{ CLASSNucleiFiliation(); ///< Default constructor - //} - CLASSNucleiFiliation(CLASSNucleiFiliation CNF); + CLASSNucleiFiliation(CLASSNucleiFiliation CNF); ///< Copy Constructor ~CLASSNucleiFiliation(); ///< Normal Destructor. - void AddDaughterToZAI(ZAI Mother, IsotopicVector Daughter ); + //} + + //********* Get Method *********// + /*! + \name Get Method + */ + //@{ + map<ZAI, IsotopicVector> GetNucleiFIliation() const {return fNucleiFiliation;} + IsotopicVector GetFiliation(ZAI Mother); + + //} + + //********* Add Method *********// + + /*! + \name Adding Method + */ + //@{ + + + void AddDaughterToZAI(ZAI Mother, IsotopicVector Daughter ); + + //} - map<ZAI, IsotopicVector> GetNucleiFIliation() const {return fNucleiFiliation;} + //********* 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 : +protected : map<ZAI, IsotopicVector> fNucleiFiliation; diff --git a/source/branches/CLASSV3/src/CLASSNucleiFiliation.cxx b/source/branches/CLASSV3/src/CLASSNucleiFiliation.cxx index 7bdaa34bda08dbf7c17638fb247514e665d69ea7..785e88a6b05eb3b1e84850071c304c7805c323cb 100644 --- a/source/branches/CLASSV3/src/CLASSNucleiFiliation.cxx +++ b/source/branches/CLASSV3/src/CLASSNucleiFiliation.cxx @@ -65,10 +65,10 @@ IsotopicVector CLASSNucleiFiliation::GetFiliation(ZAI Mother) DBGL map<ZAI, IsotopicVector>::iterator it_Filiation; - it_Filiation = fNucleiFiliation.find(Mother); + it_Filiation = fNucleiFiliation.find(Mother); // search for the ZAI in the map DBGL - if(it_Filiation != fNucleiFiliation.end()) + if(it_Filiation != fNucleiFiliation.end()) // test if it is present in the map return it_Filiation->second; else return ZAI(-1,-1,-1)*1; // return -1 -1 _1 ZAI if unknown nuclei.... @@ -80,11 +80,11 @@ void CLASSNucleiFiliation::FiliationCleanUp(map<ZAI, int> GoodNuclei, CLASSNucle { DBGL map<ZAI, IsotopicVector>::iterator it_Filiation; - for(it_Filiation = fNucleiFiliation.begin(); it_Filiation != fNucleiFiliation.end(); it_Filiation++) + for(it_Filiation = fNucleiFiliation.begin(); it_Filiation != fNucleiFiliation.end(); it_Filiation++) // loop on the filiation map (on the Mother ZAI) { - vector<ZAI> DautherList = it_Filiation->second.GetZAIList(); + vector<ZAI> DautherList = it_Filiation->second.GetZAIList(); // recover for each mother ZAI, the list of its daughter ZAI - for (int i = 0; i < (int)DautherList.size(); i++) + for (int i = 0; i < (int)DautherList.size(); i++) // Loop on the Daughter ZAI { if(GoodNuclei.find(DautherList[i]) == GoodNuclei.end() ) // if the ZAI is not in a dealed nuclei (cutted or unknown) { @@ -113,18 +113,17 @@ void CLASSNucleiFiliation::SelfFiliationCleanUp(map<ZAI, int> GoodNuclei) bool Cleaned = false; - while (!Cleaned) + while (!Cleaned) // loop until all the map is cleaned (all cut have been done) { Cleaned = true; - CLASSNucleiFiliation CuttedNuclei(*this); - + map<ZAI, IsotopicVector>::iterator it_Filiation; - for(it_Filiation = fNucleiFiliation.begin(); it_Filiation != fNucleiFiliation.end(); it_Filiation++) + for(it_Filiation = fNucleiFiliation.begin(); it_Filiation != fNucleiFiliation.end(); it_Filiation++) // Loop on the mother ZAI { - vector<ZAI> DautherList = it_Filiation->second.GetZAIList(); + vector<ZAI> DautherList = it_Filiation->second.GetZAIList(); // Get the list of daughter ZAI - for (int i = 0; i < (int)DautherList.size(); i++) + for (int i = 0; i < (int)DautherList.size(); i++) //Loop on daughter { if(GoodNuclei.find(DautherList[i]) == GoodNuclei.end() ) // if the ZAI is not in a dealed nuclei (cutted or unknown) { @@ -134,7 +133,7 @@ void CLASSNucleiFiliation::SelfFiliationCleanUp(map<ZAI, int> GoodNuclei) it_Filiation->second -= Daughter_BR * DautherList[i]; // Remove it from the daughter list - IsotopicVector FastDecayChain = CuttedNuclei.GetFiliation(DautherList[i]); // Get the fast decay chain of it + IsotopicVector FastDecayChain = (*this).GetFiliation(DautherList[i]); // Get the fast decay chain of it if(FastDecayChain.GetQuantity(-1, -1, -1) != 0) // Check if the FastDecayChain is known it_Filiation->second += Daughter_BR * FastDecayChain; // Add the FastDecayCHain & apply the BR for the cutted Daughter