From e36378e845a073c26f672c2eb5a53f9ef7daddbb Mon Sep 17 00:00:00 2001
From: adrien matta <matta@lpccaen.in2p3.fr>
Date: Tue, 7 May 2019 10:50:13 +0200
Subject: [PATCH] * Fixing things for Charissa and Exogam

---
 Inputs/EventGenerator/proton.source           | 20 ++++++------
 NPLib/Detectors/Charissa/TCharissaPhysics.cxx |  8 ++---
 NPLib/Detectors/Exogam/TExogamPhysics.cxx     | 14 ++++-----
 NPLib/Detectors/MUST2/ressources/Mask.cxx     |  2 +-
 Projects/BeLise/configs/ConfigMust2.dat       | 31 +++++++++++--------
 5 files changed, 39 insertions(+), 36 deletions(-)

diff --git a/Inputs/EventGenerator/proton.source b/Inputs/EventGenerator/proton.source
index 7a4e1e53e..79844f115 100644
--- a/Inputs/EventGenerator/proton.source
+++ b/Inputs/EventGenerator/proton.source
@@ -4,16 +4,16 @@
 %      Energy are given in MeV , Position in mm      % 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 Isotropic
- EnergyLow=  20
- EnergyHigh= 25
-  HalfOpenAngleMin= 0
- HalfOpenAngleMax= 180
- x0= 0 
- y0= 0 
- z0= 0 
-  SigmaX= 0
-  SigmaY= 0
-  Multiplicity= 1
+ EnergyLow= 0 MeV
+ EnergyHigh= 25 MeV 
+ HalfOpenAngleMin= 0 deg 
+ HalfOpenAngleMax= 90 deg
+ x0= 0 mm
+ y0= 0 mm
+ z0= 0 mm
+ SigmaX= 0 mm
+ SigmaY= 0 mm 
+ Multiplicity= 1
  Particle= proton
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Supported particle type: proton, neutron, deuton, triton, He3 , alpha 
diff --git a/NPLib/Detectors/Charissa/TCharissaPhysics.cxx b/NPLib/Detectors/Charissa/TCharissaPhysics.cxx
index af27491f1..20fdbd084 100644
--- a/NPLib/Detectors/Charissa/TCharissaPhysics.cxx
+++ b/NPLib/Detectors/Charissa/TCharissaPhysics.cxx
@@ -745,12 +745,12 @@ void TCharissaPhysics::Clear(){
 
 ///////////////////////////////////////////////////////////////////////////
 void TCharissaPhysics::ReadConfiguration(NPL::InputParser parser){
-  vector<NPL::InputBlock*> blocks = parser.GetAllBlocksWithToken("CharissaTelescope");
+  vector<NPL::InputBlock*> blocks = parser.GetAllBlocksWithToken("Charissa");
   if(NPOptionManager::getInstance()->GetVerboseLevel())
     cout << "//// " << blocks.size() << " Telescope found " << endl; 
   for(unsigned int i  = 0 ; i < blocks.size() ; i++){
     // Cartesian Case
-    vector<string> cart = {"X1_Y1","X1_Y16","X16_Y1","X16_Y16","SI","SILI","CSI"};
+    vector<string> cart = {"X1_Y1","X1_Y16","X16_Y1","X16_Y16"};
     // Spherical Case
     vector<string> sphe= {"R","THETA","PHI","BETA","SI","SILI","CSI"};
 
@@ -1212,8 +1212,8 @@ extern "C"{
 class proxy_charissa{
   public:
     proxy_charissa(){
-      NPL::DetectorFactory::getInstance()->AddToken("CharissaTelescope","Charissa");
-      NPL::DetectorFactory::getInstance()->AddDetector("CharissaTelescope",TCharissaPhysics::Construct);
+      NPL::DetectorFactory::getInstance()->AddToken("Charissa","Charissa");
+      NPL::DetectorFactory::getInstance()->AddDetector("Charissa",TCharissaPhysics::Construct);
     }
 };
 
diff --git a/NPLib/Detectors/Exogam/TExogamPhysics.cxx b/NPLib/Detectors/Exogam/TExogamPhysics.cxx
index ae2bc2946..7ee49f6a8 100644
--- a/NPLib/Detectors/Exogam/TExogamPhysics.cxx
+++ b/NPLib/Detectors/Exogam/TExogamPhysics.cxx
@@ -7,8 +7,8 @@
 
 /*****************************************************************************
  * Original Author: Sandra GIRON  contact address: giron@ipno.in2p3.fr       *
- *                  Benjamin LE CROM		   lecrom@ipno.in2p3.fr                                                        *
- * Creation Date  : march 2014                                            *
+ *                  Benjamin LE CROM		   lecrom@ipno.in2p3.fr              *
+ * Creation Date  : march 2014                                               *
  * Last update    :                                                          *
  *---------------------------------------------------------------------------*
  * Decription:                                                               *
@@ -42,8 +42,6 @@ ClassImp(TExogamPhysics)
 ///////////////////////////////////////////////////////////////////////////
 TExogamPhysics::TExogamPhysics() 
 {
-  // cout << "coconutsssssssssssssssssssssssssssss " << endl;
-
   EventMultiplicity 	= 0 			;  
   ECC_Multiplicity      = 0                     ;
   GOCCE_Multiplicity    = 0                     ;
@@ -460,11 +458,11 @@ void TExogamPhysics::Clear()
 				
 //	Read stream at ConfigFile to pick-up parameters of detector (Position,...) using Token
 void TExogamPhysics::ReadConfiguration(NPL::InputParser parser){
-  vector<NPL::InputBlock*> blocks = parser.GetAllBlocksWithToken("EXOGAMClover");
+  vector<NPL::InputBlock*> blocks = parser.GetAllBlocksWithToken("Exogam");
   if(NPOptionManager::getInstance()->GetVerboseLevel())
     cout << "//// " << blocks.size() << " detectors found " << endl; 
 
-  vector<string> token = {"EXOGAMClover"};
+  vector<string> token = {"ANGLE_FILE"};
 
   for(unsigned int i = 0 ; i < blocks.size() ; i++){
     if(blocks[i]->HasTokenList(token)){
@@ -684,8 +682,8 @@ extern "C"{
 class proxy_exogam{
   public:
     proxy_exogam(){
-      NPL::DetectorFactory::getInstance()->AddToken("EXOGAMArray","Exogam");
-      NPL::DetectorFactory::getInstance()->AddDetector("EXOGAMArray",TExogamPhysics::Construct);
+      NPL::DetectorFactory::getInstance()->AddToken("Exogam","Exogam");
+      NPL::DetectorFactory::getInstance()->AddDetector("Exogam",TExogamPhysics::Construct);
     }
 };
 
diff --git a/NPLib/Detectors/MUST2/ressources/Mask.cxx b/NPLib/Detectors/MUST2/ressources/Mask.cxx
index 33c72bc1d..17e1d15cf 100644
--- a/NPLib/Detectors/MUST2/ressources/Mask.cxx
+++ b/NPLib/Detectors/MUST2/ressources/Mask.cxx
@@ -11,7 +11,7 @@ void Mask(){
 //  double width = 0.5;
 
   // mm per pixel 
-  double scale = 0.01;
+  double scale = 0.005;
   //pitch in pixel
   unsigned int spitch = pitch/scale;
   unsigned int swidth  = width/scale;
diff --git a/Projects/BeLise/configs/ConfigMust2.dat b/Projects/BeLise/configs/ConfigMust2.dat
index d64d9707f..ac244d8c6 100755
--- a/Projects/BeLise/configs/ConfigMust2.dat
+++ b/Projects/BeLise/configs/ConfigMust2.dat
@@ -1,15 +1,20 @@
 ConfigMust2
 	MAX_STRIP_MULTIPLICITY 100
-	STRIP_ENERGY_MATCHING_NUMBER_OF_SIGMA 5
-  STRIP_ENERGY_MATCHING_SIGMA 0.02
-	DISABLE_CHANNEL MM1STRY12
-	DISABLE_CHANNEL MM2STRY12
-	DISABLE_CHANNEL MM3STRY12
-	DISABLE_CHANNEL MM4STRY12
-	DISABLE_CHANNEL MM1STRX12
-  DISABLE_CHANNEL MM2STRX12
-  DISABLE_CHANNEL MM3STRX12
-  DISABLE_CHANNEL MM4STRX12
-	SI_X_E_RAW_THRESHOLD 0
- 	CSI_E_RAW_THRESHOLD 0
-  CSI_SIZE 256
+	STRIP_ENERGY_MATCHING_NUMBER_OF_SIGMA 1
+  STRIP_ENERGY_MATCHING_SIGMA 0.01
+%	DISABLE_CHANNEL MM1STRY12
+%	DISABLE_CHANNEL MM2STRY12
+%	DISABLE_CHANNEL MM3STRY12
+%	DISABLE_CHANNEL MM4STRY12
+%	DISABLE_CHANNEL MM1STRX12
+% DISABLE_CHANNEL MM2STRX12
+% DISABLE_CHANNEL MM3STRX12
+% DISABLE_CHANNEL MM4STRX12
+%	SI_X_E_RAW_THRESHOLD 0
+% CSI_E_RAW_THRESHOLD 0
+% CSI_SIZE 256
+  SI_X_E_RAW_THRESHOLD 0
+  SI_Y_E_RAW_THRESHOLD 30000
+  SI_X_E_THRESHOLD 0
+  SI_Y_E_THRESHOLD 0
+  CSI_E_RAW_THRESHOLD 0
-- 
GitLab