From 3bec86bcdf993ff6f7581787a418184cb8e075bf Mon Sep 17 00:00:00 2001
From: Unknown <unknown>
Date: Wed, 2 Oct 2013 10:00:25 +0000
Subject: [PATCH]

---
 .../DetectorConfiguration/Riken_30mm.detector |  51 ++++++--
 Licence/Contributor                           |  10 ++
 NPSimulation/include/ThinSi.hh                |   4 +-
 .../src/EventGeneratorTransfertToResonance.cc | 118 +++++++++---------
 NPSimulation/src/ThinSi.cc                    |  52 ++++----
 authors                                       |   9 --
 6 files changed, 136 insertions(+), 108 deletions(-)
 create mode 100644 Licence/Contributor
 delete mode 100644 authors

diff --git a/Inputs/DetectorConfiguration/Riken_30mm.detector b/Inputs/DetectorConfiguration/Riken_30mm.detector
index 9f2657016..241aed072 100644
--- a/Inputs/DetectorConfiguration/Riken_30mm.detector
+++ b/Inputs/DetectorConfiguration/Riken_30mm.detector
@@ -1,3 +1,31 @@
+%%%%%%%%%%%Target%%%%%%%%%%%%%%%%%%%1
+%Thickness in micrometer
+%Radius in mm
+%Temperature in K, Pressure in bar
+%Material name according to the target library
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+GeneralTarget
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Target
+	THICKNESS= 1
+	RADIUS=	45
+	MATERIAL= CD2
+	X= 10
+	Y= -10
+	Z= 50
+	
+CryoTarget
+	THICKNESS= 3000
+	RADIUS=	45
+	TEMPERATURE= 26
+	PRESSURE= 1
+	MATERIAL= D2	
+	WINDOWSTHICKNESS= 15
+	WINDOWSMATERIAL= Mylar
+	X= 0
+	Y= 0
+	Z= 0			
 			
 %%%%%%%%%%%%%%%%%%%%%			
 MUST2Array			
@@ -67,23 +95,22 @@ D=	12.57	56.09	145.14
 			
 %%%%%%%%% Det 2 %%%%%%%%			
 ThinSi			
-A=	-116.04	9.84	154.55
-B=	-22.8	9.84	191.95
-C=	-104.09	105.03	124.76
-D=	-10.85	105.03	162.16
-			
-%%%%%%%%% Det 3 %%%%%%%%			
-ThinSi			
 A=	-12.57	56.09	145.14
 B=	-59.44	56.09	126.34
 C=	-65.26	9.66	140.87
 D=	-18.39	9.66	159.67
 			
-%%%%%%%%% Det 4 %%%%%%%%			
+%%%%%%%%% Det 3 %%%%%%%%			
 ThinSi			
-A=	-10.85	-105.03	162.16
-B=	-22.8	-9.84	191.95
-C=	-104.09	-105.03	124.76
-D=	-116.04	-9.84	154.55
+A=	-18.39	-9.66	159.67
+B=	-65.26	-9.66	140.87
+C=	-59.44	-56.09	126.34
+D=	-12.57	-56.09	145.14
 			
+%%%%%%%%% Det 4 %%%%%%%%			
+ThinSi			
+A=	12.57	-56.09	145.14
+B=	59.44	-56.09	126.34
+C=	65.26	-9.66	140.87
+D=	18.39	-9.66	159.67
 
diff --git a/Licence/Contributor b/Licence/Contributor
new file mode 100644
index 000000000..54c4dd9a0
--- /dev/null
+++ b/Licence/Contributor
@@ -0,0 +1,10 @@
+May 2009
+
+Main Contributor:
+Adrien MATTA 
+Nicolas de SEREVILLE
+
+Side Contributor
+Sandra GIRON
+
+Inspired by previous work by Alexis RAMUS and Marc LABICHE.
diff --git a/NPSimulation/include/ThinSi.hh b/NPSimulation/include/ThinSi.hh
index ead5d1337..5b849992d 100644
--- a/NPSimulation/include/ThinSi.hh
+++ b/NPSimulation/include/ThinSi.hh
@@ -37,7 +37,7 @@ public:
    void AddTelescope(G4ThreeVector  TL       ,
          G4ThreeVector  BL       ,
          G4ThreeVector  BR       ,
-         G4ThreeVector  CT       ,
+         G4ThreeVector  TR       ,
          bool        RightOrLeft);
    // By Angle Method
    void AddTelescope(G4double    R        ,
@@ -97,7 +97,7 @@ private:
    vector<G4ThreeVector>   m_TL     ; // Top Left Corner Position Vector
    vector<G4ThreeVector>   m_BL     ; // Bottom Left Corner Position Vector
    vector<G4ThreeVector>   m_BR     ; // Bottom Right Corner Position Vector
-   vector<G4ThreeVector>   m_CT     ; // Center Corner Position Vector
+   vector<G4ThreeVector>   m_TR     ; // Center Corner Position Vector
 
    // Used for "By Angle Definition"
    vector<G4double>  m_R         ; //  |
diff --git a/NPSimulation/src/EventGeneratorTransfertToResonance.cc b/NPSimulation/src/EventGeneratorTransfertToResonance.cc
index a4da42040..e20f160b5 100644
--- a/NPSimulation/src/EventGeneratorTransfertToResonance.cc
+++ b/NPSimulation/src/EventGeneratorTransfertToResonance.cc
@@ -28,12 +28,12 @@ EventGeneratorTransfertToResonance::EventGeneratorTransfertToResonance()
    //------------- Default Constructor -------------
 
 	m_Reaction = new Reaction() ;
-   m_BeamFWHMX       =  0           ;
-   m_BeamFWHMY       =  0           ;
-   m_BeamEmmitanceTheta     =  0           ;
-   m_BeamEmmitancePhi = 0 ;
-   m_ResonanceDecayZ =  0           ;
-   m_ResonanceDecayA =  0           ;
+   m_BeamFWHMX       		=  0 ;
+   m_BeamFWHMY       		=  0 ;
+   m_BeamEmmitanceTheta     =  0 ;
+   m_BeamEmmitancePhi 		=  0 ;
+   m_ResonanceDecayZ 		=  0 ;
+   m_ResonanceDecayA 		=  0 ;
 }
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -45,43 +45,43 @@ EventGeneratorTransfertToResonance::~EventGeneratorTransfertToResonance()
 }
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-EventGeneratorTransfertToResonance::EventGeneratorTransfertToResonance(string  name1          ,
-      string   name2          ,
-      string   name3          ,
-      string   name4          ,
-      double   BeamEnergy        ,
-      double   ExcitationEnergy        ,
-      double   BeamEnergySpread  ,
-      double   BeamFWHMX         ,
-      double   BeamFWHMY         ,
-      double   BeamEmmitanceTheta       ,
-      double   BeamEmmitancePhi       ,
-      int      ResonanceDecayZ      ,
-      int      ResonanceDecayA      ,
-      bool  ShootLight        ,
-      bool  ShootHeavy        ,
-      bool  ShootDecayProduct      ,
-      string   Path)
+EventGeneratorTransfertToResonance::EventGeneratorTransfertToResonance(	  string  	name1          		,
+																	      string   	name2          		,
+																	      string   	name3          		,
+																	      string   	name4          		,
+																	      double   	BeamEnergy        	,
+																	      double   	ExcitationEnergy    ,
+																	      double   	BeamEnergySpread  	,
+																	      double   	BeamFWHMX         	,
+																	      double   	BeamFWHMY         	,
+																	      double   	BeamEmmitanceTheta  ,
+																	      double   	BeamEmmitancePhi    ,
+																	      int      	ResonanceDecayZ     ,
+																	      int      	ResonanceDecayA     ,
+																	      bool  	ShootLight        	,
+																	      bool  	ShootHeavy        	,
+																	      bool  	ShootDecayProduct   ,
+																	      string   	Path				)
 {
    //------------- Constructor with nuclei names and beam energy ------------
 
-   	SetEverything(    name1          ,         //Beam nuclei
-            name2          ,        //Target nuclei
-            name3          ,        //Product of reaction
-            name4          ,        //Product of reaction
-            BeamEnergy        ,        //Beam Energy
-            ExcitationEnergy  ,        //Excitation of Heavy Nuclei
-            BeamEnergySpread  ,
-            BeamFWHMX         ,
-            BeamFWHMY         ,
-            BeamEmmitanceTheta       ,
-            BeamEmmitancePhi       ,
-               ResonanceDecayZ      ,
-               ResonanceDecayA      ,
-           ShootLight        ,
-           ShootHeavy        ,
-           ShootDecayProduct      ,
-            Path);        
+   	SetEverything(  name1          		,        //Beam nuclei
+		            name2          		,        //Target nuclei
+		            name3          		,        //Product of reaction
+		            name4          		,        //Product of reaction
+		            BeamEnergy        	,        //Beam Energy
+		            ExcitationEnergy 	,        //Excitation of Heavy Nuclei
+		            BeamEnergySpread  	,
+		            BeamFWHMX         	,
+		            BeamFWHMY         	,
+		            BeamEmmitanceTheta  ,
+		            BeamEmmitancePhi    ,
+		            ResonanceDecayZ     ,
+		            ResonanceDecayA     ,
+		           	ShootLight        	,
+		           	ShootHeavy        	,
+		           	ShootDecayProduct   ,
+		            Path				);        
 
 }
 
@@ -232,14 +232,14 @@ while(ReadingStatus){
 	        else if  (DataBuffer.compare(0, 19, "BeamEmmitanceTheta=") == 0) {
 	        	check_EmmitanceTheta = true ;
 	            ReactionFile >> DataBuffer;
-	            BeamEmmitanceTheta = atof(DataBuffer.c_str()) * deg;
+	            BeamEmmitanceTheta = atof(DataBuffer.c_str()) * rad;
 	            G4cout << "Beam Emmitance Theta " << BeamEmmitanceTheta / deg << " deg" << G4endl;
 	         }
 	         
 	        else if  (DataBuffer.compare(0, 17, "BeamEmmitancePhi=") == 0) {
 	        	check_EmmitancePhi = true ;
 	            ReactionFile >> DataBuffer;
-	            BeamEmmitancePhi = atof(DataBuffer.c_str()) * deg;
+	            BeamEmmitancePhi = atof(DataBuffer.c_str()) * rad;
 	            G4cout << "Beam Emmitance Phi " << BeamEmmitancePhi / deg << " deg" << G4endl;
 	         }
 
@@ -306,23 +306,23 @@ while(ReadingStatus){
 
 	}
    
-   SetEverything(Beam            ,
-         Target            ,
-         Light          ,
-         Heavy          ,
-         BeamEnergy        ,
-         ExcitationEnergy  ,
-         BeamEnergySpread  ,
-         BeamFWHMX         ,
-         BeamFWHMY         ,
-         BeamEmmitanceTheta       ,
-         BeamEmmitancePhi ,
-         ResonanceDecayZ      ,
-         ResonanceDecayA      ,
-         ShootLight        ,
-         ShootHeavy        ,
-         ShootDecayProduct      ,
-         CrossSectionPath);
+   SetEverything(	Beam            	,
+			         Target            	,
+			         Light          	,
+			         Heavy          	,
+			         BeamEnergy       	,
+			         ExcitationEnergy  	,
+			         BeamEnergySpread  	,
+			         BeamFWHMX         	,
+			         BeamFWHMY         	,
+			         BeamEmmitanceTheta ,
+			         BeamEmmitancePhi 	,
+			         ResonanceDecayZ    ,
+			         ResonanceDecayA    ,
+			         ShootLight        	,
+			         ShootHeavy        	,
+			         ShootDecayProduct  ,
+			         CrossSectionPath	);
 
          
    		ReactionFile.close();
diff --git a/NPSimulation/src/ThinSi.cc b/NPSimulation/src/ThinSi.cc
index b2837b0a0..9cf44aa17 100644
--- a/NPSimulation/src/ThinSi.cc
+++ b/NPSimulation/src/ThinSi.cc
@@ -74,7 +74,7 @@ ThinSi::~ThinSi()
 void ThinSi::AddTelescope(G4ThreeVector TL         ,
       G4ThreeVector BL        ,
       G4ThreeVector BR        ,
-      G4ThreeVector CT        ,
+      G4ThreeVector TR        ,
       bool       RightOrLeft)
 {
    m_DefinitionType.push_back(true) ;
@@ -83,7 +83,7 @@ void ThinSi::AddTelescope(G4ThreeVector TL         ,
    m_TL.push_back(TL)               ;
    m_BL.push_back(BL)               ;
    m_BR.push_back(BR)               ;
-   m_CT.push_back(CT)               ;
+   m_TR.push_back(TR)               ;
 
    m_R.push_back(0)              ;
    m_Theta.push_back(0)          ;
@@ -116,7 +116,7 @@ void ThinSi::AddTelescope(G4double R      ,
    m_TL.push_back(empty)            ;
    m_BL.push_back(empty)            ;
    m_BR.push_back(empty)            ;
-   m_CT.push_back(empty)            ;
+   m_TR.push_back(empty)            ;
 
 }
 
@@ -303,8 +303,8 @@ void ThinSi::ReadConfiguration(string Path)
    string LineBuffer          ;
    string DataBuffer          ;
 
-   G4double TLX , BLX , BRX , CTX , TLY , BLY , BRY , CTY , TLZ , BLZ , BRZ , CTZ   ;
-   G4ThreeVector TL , BL , BR , CT                                      ;
+   G4double TLX , BLX , BRX , TRX , TLY , BLY , BRY , TRY , TLZ , BLZ , BRZ , TRZ   ;
+   G4ThreeVector TL , BL , BR , TR                                      ;
    G4double Theta = 0 , Phi = 0 , R = 0 , beta_u = 0 , beta_v = 0 , beta_w = 0                     ;
    bool RightOrLeft = false ;
    bool check_A = false   ;
@@ -403,17 +403,17 @@ void ThinSi::ReadConfiguration(string Path)
 					else if (DataBuffer.compare(0, 3, "D=") == 0) {
 						check_D = true;
 						ConfigFile >> DataBuffer ;
-						CTX = atof(DataBuffer.c_str()) ;
-						CTX = CTX * mm;
+						TRX = atof(DataBuffer.c_str()) ;
+						TRX = TRX * mm;
 						ConfigFile >> DataBuffer ;
-						CTY = atof(DataBuffer.c_str()) ;
-						CTY = CTY * mm;
+						TRY = atof(DataBuffer.c_str()) ;
+						TRY = TRY * mm;
 						ConfigFile >> DataBuffer ;
-						CTZ = atof(DataBuffer.c_str()) ;
-						CTZ = CTZ * mm;
+						TRZ = atof(DataBuffer.c_str()) ;
+						TRZ = TRZ * mm;
 
-						CT = G4ThreeVector(CTX, CTY, CTZ);
-						G4cout << "Center position : (" << CTX << ";" << CTY << ";" << CTZ << ")" << G4endl << G4endl;
+						TR = G4ThreeVector(TRX, TRY, TRZ);
+						G4cout << "Center position : (" << TRX << ";" << TRY << ";" << TRZ << ")" << G4endl << G4endl;
 					}
 
 										
@@ -480,22 +480,22 @@ void ThinSi::ReadConfiguration(string Path)
 					         	///Add The previously define telescope
 			         			//With position method
 					         	 if ((check_A && check_B && check_C && check_D) || !(check_Theta && check_Phi && check_R)) {
-							            	  AddTelescope(TL      ,
-							                  BL    ,
-							                  BR    ,
-							                  CT    ,
-							                  RightOrLeft);
+							            	  AddTelescope(	TL      	,
+							                  				BL    		,
+							                  				BR    		,
+							                  				TR    		,
+							                  				false		);
 							         }
 
 						         //with angle method
 						         else if ((check_Theta && check_Phi && check_R) || !(check_A && check_B && check_C && check_D)) {
-							         		  AddTelescope(R       ,
-							                  Theta    ,
-							                  Phi   ,
-							                  beta_u   ,
-							                  beta_v   ,
-							                  beta_w   ,
-							                  RightOrLeft);
+							         		  AddTelescope(	R       	,
+							                  				Theta    	,
+							                  				Phi   		,
+							                  				beta_u   	,
+							                  				beta_v   	,
+							                  				beta_w   	,
+							                  				RightOrLeft	);
 							         }
 							         
 							        //	Reinitialisation of Check Boolean 
@@ -548,7 +548,7 @@ void ThinSi::ConstructDetector(G4LogicalVolume* world)
          // MUST2
          Det_rot = new G4RotationMatrix(Det_u, Det_v, Det_w);
          // translation to place Telescope
-         Det_pos = m_CT[i] ;
+         Det_pos =  (m_TR[i]+m_TL[i]+m_BL[i]+m_BR[i])/4 ;
       }
 
       // By Angle
diff --git a/authors b/authors
deleted file mode 100644
index 834fd4279..000000000
--- a/authors
+++ /dev/null
@@ -1,9 +0,0 @@
-May 2009
-This code has been develloped for the MUST2 collaboration at IPNOrsay.
-
-Main Contributor:
-Adrien MATTA 
-Nicolas de SEREVILLE
-Sandra GIRON
-
-Based on previous work by Alexis RAMUS and Marc LABICHE.
-- 
GitLab