From 7ad185d688d3e2b069f9f0afcc823df98ceb65ac Mon Sep 17 00:00:00 2001
From: matta <matta@npt>
Date: Wed, 2 Feb 2011 16:20:44 +0000
Subject: [PATCH] * Fixing bug in TMust2Physics  - IsValidChannel was not
 properly implemented  - Call object Telescope number instead of
 TelescopeNumber-1

---
 Inputs/DetectorConfiguration/e530.detector |  2 +-
 Inputs/EventGenerator/60Fe.reaction        |  4 +--
 NPLib/MUST2/TMust2Physics.cxx              | 36 +++++++++++-----------
 3 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/Inputs/DetectorConfiguration/e530.detector b/Inputs/DetectorConfiguration/e530.detector
index 8bf4603f4..c2afc6058 100644
--- a/Inputs/DetectorConfiguration/e530.detector
+++ b/Inputs/DetectorConfiguration/e530.detector
@@ -47,7 +47,7 @@ CATSDetector
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 MUST2Array
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1
-M2Telescope 
+M2Telescope
 	X128_Y1=	-49.00  126.15 	  -80.75
 	X1_Y1=		48.32   125.69    -80.58
 	X1_Y128=	48.11    63.19    -155.17
diff --git a/Inputs/EventGenerator/60Fe.reaction b/Inputs/EventGenerator/60Fe.reaction
index 9f9338fd7..92f87dfaa 100644
--- a/Inputs/EventGenerator/60Fe.reaction
+++ b/Inputs/EventGenerator/60Fe.reaction
@@ -7,15 +7,15 @@ Transfert
 	Target= 2H
 	Light= 1H
 	Heavy= 61Fe
+	ExcitationEnergyHeavy= 0.0
 	ExcitationEnergyLight= 0.0
-	ExcitationEnergyHeavy= 0.702
 	BeamEnergy= 1628.41
 	BeamEnergySpread= 0
 	SigmaX= 0
 	SigmaY= 0
 	SigmaThetaX= 0 
 	SigmaPhiY= 0
-	CrossSectionPath= fe61_p1_2_702.n
+	CrossSectionPath= fe61_p3_2gs.n
 	ShootLight= 1
 	ShootHeavy= 0
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/NPLib/MUST2/TMust2Physics.cxx b/NPLib/MUST2/TMust2Physics.cxx
index 30bd323ec..143a5449f 100644
--- a/NPLib/MUST2/TMust2Physics.cxx
+++ b/NPLib/MUST2/TMust2Physics.cxx
@@ -89,10 +89,10 @@ TMust2Physics::TMust2Physics()
 		    m_SiLi_MatchingX[5]=48;
 		    m_SiLi_MatchingY[5]=112;
 		    
-		    m_SiLi_MatchingX[6]=12;
+		    m_SiLi_MatchingX[6]=16;
 		    m_SiLi_MatchingY[6]=80;
 		    
-		    m_SiLi_MatchingX[7]=12;
+		    m_SiLi_MatchingX[7]=16;
 		    m_SiLi_MatchingY[7]=112;
 		    //
 		    m_SiLi_MatchingX[8]=112;
@@ -113,10 +113,10 @@ TMust2Physics::TMust2Physics()
 		    m_SiLi_MatchingX[13]=48;
 		    m_SiLi_MatchingY[13]=16;
 		    
-		    m_SiLi_MatchingX[14]=12;
+		    m_SiLi_MatchingX[14]=16;
 		    m_SiLi_MatchingY[14]=48;
 		    
-		    m_SiLi_MatchingX[15]=12;
+		    m_SiLi_MatchingX[15]=16;
 		    m_SiLi_MatchingY[15]=16;
       }
 
@@ -523,16 +523,16 @@ vector < TVector2 > TMust2Physics :: Match_X_Y()
 bool TMust2Physics :: IsValidChannel(const string DetectorType, const int telescope , const int channel) 
 	{
 		if(DetectorType == "CsI")
-			return *(m_CsIChannelStatus[telescope].begin()+channel-1);
+			return *(m_CsIChannelStatus[telescope-1].begin()+channel-1);
 		
 		else if(DetectorType == "SiLi")
-			return *(m_SiLiChannelStatus[telescope].begin()+channel-1);
+			return *(m_SiLiChannelStatus[telescope-1].begin()+channel-1);
 			
 		else if(DetectorType == "X")
-			return *(m_XChannelStatus[telescope].begin()+channel-1);
+			return *(m_XChannelStatus[telescope-1].begin()+channel-1);
 			
 		else if(DetectorType == "Y")
-			return *(m_YChannelStatus[telescope].begin()+channel-1);
+			return *(m_YChannelStatus[telescope-1].begin()+channel-1);
 			
 		else return false;
 	}
@@ -601,11 +601,11 @@ void TMust2Physics::ReadAnalysisConfig()
                int telescope = atoi(DataBuffer.substr(2,1).c_str());
                vector< bool > ChannelStatus;
                ChannelStatus.resize(128,false);
-               m_XChannelStatus[telescope] = ChannelStatus;
-               m_YChannelStatus[telescope] = ChannelStatus;
+               m_XChannelStatus[telescope-1] = ChannelStatus;
+               m_YChannelStatus[telescope-1] = ChannelStatus;
                ChannelStatus.resize(16,false);
-               m_SiLiChannelStatus[telescope] = ChannelStatus;
-               m_CsIChannelStatus[telescope]  = ChannelStatus;
+               m_SiLiChannelStatus[telescope-1] = ChannelStatus;
+               m_CsIChannelStatus[telescope-1]  = ChannelStatus;
             }
             
         else if (whatToDo == "DISABLE_CHANNEL") {
@@ -615,22 +615,22 @@ void TMust2Physics::ReadAnalysisConfig()
            int channel = -1;
            if (DataBuffer.compare(3,4,"STRX") == 0) {
               channel = atoi(DataBuffer.substr(7).c_str());
-              *(m_XChannelStatus[telescope].begin()+channel-1) = false;
+              *(m_XChannelStatus[telescope-1].begin()+channel-1) = false;
            }
            
            else if (DataBuffer.compare(3,4,"STRY") == 0) {
               channel = atoi(DataBuffer.substr(7).c_str());
-              *(m_YChannelStatus[telescope].begin()+channel-1) = false;
+              *(m_YChannelStatus[telescope-1].begin()+channel-1) = false;
            }
            
            else if (DataBuffer.compare(3,4,"SILI") == 0) {
               channel = atoi(DataBuffer.substr(7).c_str());
-              *(m_SiLiChannelStatus[telescope].begin()+channel-1) = false;
+              *(m_SiLiChannelStatus[telescope-1].begin()+channel-1) = false;
            }
            
            else if (DataBuffer.compare(3,3,"CSI") == 0) {
               channel = atoi(DataBuffer.substr(6).c_str());
-              *(m_CsIChannelStatus[telescope].begin()+channel-1) = false;
+              *(m_CsIChannelStatus[telescope-1].begin()+channel-1) = false;
            }
            
            else cout << "Warning: detector type for Must2 unknown!" << endl;
@@ -741,8 +741,8 @@ bool TMust2Physics :: Match_Si_SiLi(int X, int Y , int PadNbr)
 	
 	    //remove the central part and surrounding
       if( // Outter Part
-           X < 5  ||  X > 123
-        || Y < 5  ||  Y > 123   
+           X < 8  ||  X > 120
+        //|| Y < 0  ||  Y > 128   
           // Central Part
         || (Y < 68 &&  Y > 60) 
         )
-- 
GitLab