diff --git a/NPLib/MUST2/TMust2Physics.cxx b/NPLib/MUST2/TMust2Physics.cxx index 931366732898498c51470bbabedc7b47b16380d9..c9b4a7fa7f418e11113830f569c35f8a289eeabe 100644 --- a/NPLib/MUST2/TMust2Physics.cxx +++ b/NPLib/MUST2/TMust2Physics.cxx @@ -303,6 +303,13 @@ void TMust2Physics::BuildPhysicalEvent(){ } } + + + // Fill the control Histo if requested by user + if(NPOptionManager::getInstance()->GetGenerateHistoOption()){ + m_Spectra -> FillRawSpectra(m_EventData); + m_Spectra -> FillPreTreatedSpectra(m_PreTreatedData); + } return; diff --git a/NPLib/MUST2/TMust2Spectra.cxx b/NPLib/MUST2/TMust2Spectra.cxx index 7ce34589471e11193e148479f5b1910a587e1d4e..2441e66f5318421caabbc9962bbfde5da3650fc4 100644 --- a/NPLib/MUST2/TMust2Spectra.cxx +++ b/NPLib/MUST2/TMust2Spectra.cxx @@ -259,7 +259,7 @@ void TMust2Spectra::FillPreTreatedSpectra(TMust2Data* PreTreatedData){ // STRX_E for (Int_t i = 0; i < PreTreatedData->GetMMStripXEMult(); i++) { name = Form("MM%d_STRX_E_CAL", PreTreatedData->GetMMStripXEDetectorNbr(i) ); - family = "MUST2/CAL/STRIPXE"; + family = "MUST2/CAL/STRXE"; GetHisto(family,name) -> Fill(PreTreatedData->GetMMStripXEStripNbr(i), @@ -295,7 +295,7 @@ void TMust2Spectra::FillPreTreatedSpectra(TMust2Data* PreTreatedData){ // SILI_E for (Int_t i = 0; i < PreTreatedData->GetMMSiLiEMult(); i++) { name = Form("MM%d_SILI_E_CAL", PreTreatedData->GetMMSiLiEDetectorNbr(i) ); - family = "MUST2/CAL/SILIET"; + family = "MUST2/CAL/SILIE"; GetHisto(family,name) -> Fill(PreTreatedData->GetMMSiLiEPadNbr(i), @@ -365,7 +365,7 @@ TH1* TMust2Spectra::GetHisto(TString family, TString name){ vector<TString> index ; index.push_back(family); index.push_back(name); - + // fill map return fMapHisto.at(index); } diff --git a/NPLib/MUST2/TMust2Spectra.h b/NPLib/MUST2/TMust2Spectra.h index 406f714966623d049ff871b8e5839a0aca51978c..cceeb8385ddc2093e4cbe600d136f6c6d9b3bc1f 100644 --- a/NPLib/MUST2/TMust2Spectra.h +++ b/NPLib/MUST2/TMust2Spectra.h @@ -52,12 +52,11 @@ class TMust2Spectra { // Initialization methods void InitRawSpectra(); void InitPreTreatedSpectra(); - void InitPhysicsSpectra(); // Filling methods - void FillRawSpectra(TMust2Data*); - void FillPreTreatedSpectra(TMust2Data*); - + void FillRawSpectra(TMust2Data*); + void FillPreTreatedSpectra(TMust2Data*); + // get map histo which will be used for GSpectra in GUser map< vector<TString>, TH1* > GetMapHisto() const {return fMapHisto;} TH1* GetHisto(TString family,TString name); @@ -72,9 +71,6 @@ class TMust2Spectra { private: // map holding histo pointers and their family names map< vector<TString>, TH1* > fMapHisto; - - -// ClassDef(TMust2Spectra,1) // Must2Spectra structure }; #endif