From 77d98f600ec6b95414eec03028624bc09380ad7b Mon Sep 17 00:00:00 2001 From: matta <matta@npt> Date: Thu, 2 Dec 2010 10:25:06 +0000 Subject: [PATCH] * Now taking X Energy as default value in TMust2Physics --- NPLib/MUST2/TMust2Physics.cxx | 22 ++++++++-------------- NPLib/SSSD/TSSSDPhysics.cxx | 16 +++++++++++----- NPLib/SSSD/TSSSDPhysics.h | 4 ++-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/NPLib/MUST2/TMust2Physics.cxx b/NPLib/MUST2/TMust2Physics.cxx index 5ec91c1ec..5ccb85577 100644 --- a/NPLib/MUST2/TMust2Physics.cxx +++ b/NPLib/MUST2/TMust2Physics.cxx @@ -100,11 +100,9 @@ void TMust2Physics::BuildPhysicalEvent() } Si_X.push_back(X) ; Si_Y.push_back(Y) ; TelescopeNumber.push_back(N) ; - - // Take maximum Energy - if(Si_X_E >= Si_Y_E) Si_E.push_back(Si_X_E) ; - else Si_E.push_back(Si_Y_E) ; - + + // Take X Energy (better resolution, better zero extrapolation) + Si_E.push_back(Si_X_E); // Take Y Time, better resolution than X. Si_T.push_back(Si_Y_T) ; @@ -465,13 +463,13 @@ void TMust2Physics::ReadAnalysisConfig() check_mult = true; AnalysisConfigFile >> DataBuffer; m_MaximumStripMultiplicityAllowed = atoi(DataBuffer.c_str() ); - cout << "MAX_STRIP_MULTIPLICITY= " << m_MaximumStripMultiplicityAllowed << endl; + cout << "Maximun strip multiplicity= " << m_MaximumStripMultiplicityAllowed << endl; } else if (DataBuffer.compare(0, 31, "STRIP_ENERGY_MATCHING_TOLERANCE") == 0) { check_match = true; AnalysisConfigFile >> DataBuffer; m_StripEnergyMatchingTolerance = atoi(DataBuffer.c_str() ); - cout << "STRIP_ENERGY_MATCHING_TOLERANCE= " << m_StripEnergyMatchingTolerance << endl; + cout << "Strip energy matching tolerance= " << m_StripEnergyMatchingTolerance << endl; } else if (DataBuffer.compare(0, 5, "MUST2") == 0) { AnalysisConfigFile >> DataBuffer; @@ -1101,13 +1099,9 @@ void TMust2Physics::AddParameterToCalibrationManager() void TMust2Physics::InitializeRootInput() { TChain* inputChain = RootInput::getInstance()->GetChain() ; - inputChain->SetBranchStatus( "MUST2" , true ) ; - //added for compatibility with Riken file - inputChain->SetBranchStatus( "Must2" , true ) ; - - inputChain->SetBranchStatus( "fMM_*" , true ) ; - inputChain->SetBranchAddress( "MUST2" , &EventData ) ; - inputChain->SetBranchAddress( "Must2" , &EventData ) ; + inputChain->SetBranchStatus( "MUST2" , true ) ; + inputChain->SetBranchStatus( "fMM_*" , true ) ; + inputChain->SetBranchAddress( "MUST2" , &EventData ) ; } diff --git a/NPLib/SSSD/TSSSDPhysics.cxx b/NPLib/SSSD/TSSSDPhysics.cxx index 9e9c57402..ef7b3ffb8 100644 --- a/NPLib/SSSD/TSSSDPhysics.cxx +++ b/NPLib/SSSD/TSSSDPhysics.cxx @@ -54,8 +54,8 @@ TSSSDPhysics::TSSSDPhysics() EventData = new TSSSDData ; PreTreatedData = new TSSSDData ; EventPhysics = this ; - E_Threshold = 0 ; - Pedestal_Threshold = 0 ; + m_E_Threshold = 0 ; + m_Pedestal_Threshold = 0 ; } /////////////////////////////////////////////////////////////////////////// TSSSDPhysics::~TSSSDPhysics() @@ -251,8 +251,8 @@ void TSSSDPhysics::AddParameterToCalibrationManager() for( int j = 0 ; j < 16 ; j++) { - Cal->AddParameter("SSSD", "Detector"+itoa(i+1)+"_Strip"+itoa(j+1)+"_E","SSSD_Detector"+itoa(i+1)+"_Strip"+itoa(j+1)+"_E") ; - Cal->AddParameter("SSSD", "Detector"+itoa(i+1)+"_Strip"+itoa(j+1)+"_T","SSSD_Detector"+itoa(i+1)+"_Strip"+itoa(j+1)+"_T") ; + Cal->AddParameter("SSSD", "Detector"+itoa(i+1)+"_Strip"+itoa(j+1)+"_E","SSSD_DETECTOR_"+itoa(i+1)+"_STRIP_"+itoa(j+1)+"_E") ; + Cal->AddParameter("SSSD", "Detector"+itoa(i+1)+"_Strip"+itoa(j+1)+"_T","SSSD_DETECTOR_"+itoa(i+1)+"_STRIP_"+itoa(j+1)+"_T") ; } } @@ -312,7 +312,7 @@ void TSSSDPhysics::PreTreat() if(ChannelStatus[EventData->GetEnergyDetectorNbr(i)][EventData->GetEnergyStripNbr(i)]) { double E = fSi_E(EventData , i); - if( E > E_Threshold && EventData->GetEnergy(i) > Pedestal_Threshold) + if( E > m_E_Threshold && EventData->GetEnergy(i) > m_Pedestal_Threshold) { PreTreatedData->SetEnergyDetectorNbr( EventData->GetEnergyDetectorNbr(i) ) ; PreTreatedData->SetEnergyStripNbr( EventData->GetEnergyStripNbr(i) ) ; @@ -379,6 +379,12 @@ void TSSSDPhysics::ReadAnalysisConfig() AnalysisConfigFile.ignore(numeric_limits<streamsize>::max(), '\n' ); } + else if (DataBuffer.compare(0, 18, "PEDESTAL_THRESHOLD") == 0) { + AnalysisConfigFile >> DataBuffer; + m_Pedestal_Threshold = atoi(DataBuffer.c_str() ); + cout << "Pedestal threshold = " << m_Pedestal_Threshold << endl; + } + else if (DataBuffer.compare(0, 4, "SSSD") == 0) { AnalysisConfigFile >> DataBuffer; string whatToDo = DataBuffer; diff --git a/NPLib/SSSD/TSSSDPhysics.h b/NPLib/SSSD/TSSSDPhysics.h index 8490abc50..ff10938ec 100644 --- a/NPLib/SSSD/TSSSDPhysics.h +++ b/NPLib/SSSD/TSSSDPhysics.h @@ -96,8 +96,8 @@ class TSSSDPhysics : public TObject, public NPA::VDetector TSSSDData* PreTreatedData; //! TSSSDPhysics* EventPhysics; //! - double E_Threshold; //! - double Pedestal_Threshold; //! + double m_E_Threshold; //! + double m_Pedestal_Threshold; //! private: // Map of activated Channel -- GitLab