From 78001f1b65a1fa79ca2701485fce8b32a6f6e09f Mon Sep 17 00:00:00 2001 From: matta <matta@npt> Date: Thu, 20 Jan 2011 18:26:56 +0000 Subject: [PATCH] * CHange TMust2Physics to fixe bug and made some improvement - replace some lines by equivalent but more simple code in Match_X_Y - Fix bug on SiLi matching - Fix bug on SiLi time research --- Inputs/DetectorConfiguration/e530.detector | 2 +- NPLib/MUST2/TMust2Physics.cxx | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Inputs/DetectorConfiguration/e530.detector b/Inputs/DetectorConfiguration/e530.detector index fbe124019..2a445b016 100644 --- a/Inputs/DetectorConfiguration/e530.detector +++ b/Inputs/DetectorConfiguration/e530.detector @@ -22,7 +22,7 @@ Target THICKNESS= 309.278350515 RADIUS= 7.5 MATERIAL= CD2 - ANGLE= 45 + ANGLE= 0 X= 0 Y= 0 Z= 40 diff --git a/NPLib/MUST2/TMust2Physics.cxx b/NPLib/MUST2/TMust2Physics.cxx index 590f1e09f..30bd323ec 100644 --- a/NPLib/MUST2/TMust2Physics.cxx +++ b/NPLib/MUST2/TMust2Physics.cxx @@ -256,7 +256,7 @@ void TMust2Physics::BuildPhysicalEvent() for(int k =0 ; k < m_PreTreatedData->GetMMSiLiTMult() ; ++k) { // Same Pad, same Detector - if( m_PreTreatedData->GetMMSiLiEPadNbr(j)==m_PreTreatedData->GetMMSiLiEPadNbr(k) && m_PreTreatedData->GetMMSiLiEDetectorNbr(j)==m_PreTreatedData->GetMMSiLiTDetectorNbr(k) ) + if( m_PreTreatedData->GetMMSiLiEPadNbr(j)==m_PreTreatedData->GetMMSiLiTPadNbr(k) && m_PreTreatedData->GetMMSiLiEDetectorNbr(j)==m_PreTreatedData->GetMMSiLiTDetectorNbr(k) ) { SiLi_T.push_back( m_PreTreatedData->GetMMSiLiTTime(k) ) ; break ;} } @@ -475,13 +475,7 @@ vector < TVector2 > TMust2Physics :: Match_X_Y() if ( m_PreTreatedData->GetMMStripXEDetectorNbr(i) == m_PreTreatedData->GetMMStripYEDetectorNbr(j) ) { // Look if energy match - double EX = m_PreTreatedData->GetMMStripXEEnergy(i) ; - double EY = m_PreTreatedData->GetMMStripYEEnergy(j) ; - double mean = abs( EX - EY ) /2. ; - double distX = abs(EX-mean); - double distY = abs(EY-mean); - - if( distX< m_StripEnergyMatchingNumberOfSigma*m_StripEnergyMatchingSigma && distY< m_StripEnergyMatchingNumberOfSigma*m_StripEnergyMatchingSigma ) + if( abs( (m_PreTreatedData->GetMMStripXEEnergy(i)-m_PreTreatedData->GetMMStripYEEnergy(j))/2. ) < m_StripEnergyMatchingNumberOfSigma*m_StripEnergyMatchingSigma ) { // Special Option, if the event is between two CsI cristal, it is rejected. if(m_Ignore_not_matching_CsI) @@ -750,14 +744,14 @@ bool TMust2Physics :: Match_Si_SiLi(int X, int Y , int PadNbr) X < 5 || X > 123 || Y < 5 || Y > 123 // Central Part - || Y < 68 || Y < 60 + || (Y < 68 && Y > 60) ) { return false; } if( abs(m_SiLi_MatchingX[PadNbr-1] - X) < m_SiLi_Size/2.&& - abs(m_SiLi_MatchingY[PadNbr-1] - Y) < m_SiLi_Size/2.) + abs(m_SiLi_MatchingY[PadNbr-1] - Y) < m_SiLi_Size/2.) return true ; -- GitLab