diff --git a/NPLib/Core/NPOptionManager.cxx b/NPLib/Core/NPOptionManager.cxx
index 7f299c009373b6dbf07397722074694aa954e379..7c797e36a31a8be2919cf8d6cd473227408753a2 100644
--- a/NPLib/Core/NPOptionManager.cxx
+++ b/NPLib/Core/NPOptionManager.cxx
@@ -115,7 +115,7 @@ void NPOptionManager::ReadTheInputArgument(int argc, char** argv){
 
     else if (argument == "-R" && argc >= i + 1)                   fRunToReadFileName   = argv[++i] ;
 
-    else if (argument == "-T" && argc >= i + 2)                   CreateRunToTreatFile(argv[++i],argv[++i]);
+    else if (argument == "-T" && argc >= i + 2)                   { std::string file = argv[++i] ; std::string tree = argv[++i]; CreateRunToTreatFile(file,tree);}
 
     else if (argument == "--cal" && argc >= i + 1)                fCalibrationFileName = argv[++i] ;
 
diff --git a/NPLib/Core/NPSpectraServer.cxx b/NPLib/Core/NPSpectraServer.cxx
index 940c81391e3e9a89275834f49709762c7bf7bbaa..ddfbf1bb1c96c377c86cbfa6b7e20a87fa3ce52f 100644
--- a/NPLib/Core/NPSpectraServer.cxx
+++ b/NPLib/Core/NPSpectraServer.cxx
@@ -1,4 +1,3 @@
-
 /*****************************************************************************
  * Copyright (C) 2009-2016   this file is part of the NPTool Project         *
  *                                                                           *
@@ -68,7 +67,7 @@ void NPL::SpectraServer::CheckRequest(){
     m_Monitor->ResetInterrupt();
     if((s=m_Monitor->Select(1))!=(TSocket*)-1){
       HandleSocket(s);
-      }
+    }
   }
 }
 
@@ -106,8 +105,8 @@ void NPL::SpectraServer::HandleSocket(TSocket* s){
     answer.SetCompressionLevel(1);
     answer.Reset();
     TObject* h =NULL;
-   if (!strcmp(request, "RequestSpectra")){
-     std::cout << "Prepare" << std::endl;
+    if (!strcmp(request, "RequestSpectra")){
+      std::cout << "Prepare" << std::endl;
       answer.WriteObject(m_Spectra);
       std::cout << "Compress" << std::endl;
       answer.Compress();
@@ -115,18 +114,22 @@ void NPL::SpectraServer::HandleSocket(TSocket* s){
       s->Send(answer);
       std::cout << "done" << std::endl;
     }
-  
-    else if (h=m_Spectra->FindObject(request)){
-     answer.WriteObject(h);
-     s->Send(answer);
-    }
 
     else if (!strcmp(request, "RequestClear")){
-     // TO DO 
+      // TO DO 
     }
-    else{ // answer nothing
-      std::cout << "Fail to respond to request : " << request << std::endl; 
-      s->Send(answer);
+
+    else{
+      h = m_Spectra->FindObject(request);
+      if (h){
+        answer.WriteObject(h);
+        s->Send(answer);
+      }
+
+      else{ // answer nothing
+        std::cout << "Fail to respond to request : " << request << std::endl; 
+        s->Send(answer);
+      }
     }
   }
 }
@@ -139,7 +142,7 @@ void NPL::SpectraServer::FillSpectra(const std::string& name,const double& valx)
 void NPL::SpectraServer::FillSpectra(const std::string& name,const double& valx,const double& valy){
   // Fill the local histo
   ((TH2*) m_Spectra->FindObject(name.c_str()))->Fill(valx,valy);
-  
+
 }
 ////////////////////////////////////////////////////////////////////////////////
 void NPL::SpectraServer::AddSpectra(TH1* h){
diff --git a/NPLib/Detectors/Actar/TActarPhysics.cxx b/NPLib/Detectors/Actar/TActarPhysics.cxx
index c1b79c0d872d73695783ca9e8e88e67e239148ac..644cbd4d18fc08766d99fc10ad56abfb4fcab31f 100644
--- a/NPLib/Detectors/Actar/TActarPhysics.cxx
+++ b/NPLib/Detectors/Actar/TActarPhysics.cxx
@@ -302,6 +302,7 @@ vector<TCanvas*> TActarPhysics::GetCanvas() {
     //vector<TCanvas*> empty;
     //return empty;
   //}
+  return vector<TCanvas*>();
 }
 
 
diff --git a/NPLib/Physics/NPDecay.cxx b/NPLib/Physics/NPDecay.cxx
index 68a6eb6dbed984cecc7421e6ed593c3898fa5644..76312bfef694e7ebc7d481aea6a644aadbc865a4 100644
--- a/NPLib/Physics/NPDecay.cxx
+++ b/NPLib/Physics/NPDecay.cxx
@@ -216,7 +216,9 @@ bool NPL::SingleDecay::GenerateEvent(double MEx, double MEK, double MPX, double
    DPx[pos]=NucleiLV.X();
    DPy[pos]=NucleiLV.Y();
    DPz[pos]=NucleiLV.Z();
+   return true;
   }
+  return false;
 }
 ////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////// Decay ///////////////////////////////////////
@@ -388,10 +390,12 @@ void NPL::DecayStore::GenerateEvent(std::string MotherName, double MEx,
 }
 ////////////////////////////////////////////////////////////////////////////////
 bool NPL::DecayStore::AnyAboveThreshold(std::string MotherName, double MEx){
-  if(m_Store.find(MotherName)!=m_Store.end())
+  if(m_Store.find(MotherName)!=m_Store.end()){
     m_Store[MotherName].AnyAboveThreshold(MEx);
-  else
-    return false;
+    return true;
+  }
+    
+  return false;
 }
 ////////////////////////////////////////////////////////////////////////////////
 std::set<std::string> NPL::DecayStore::GetAllMotherName(){
diff --git a/NPSimulation/Detectors/Actar/Actar.cc b/NPSimulation/Detectors/Actar/Actar.cc
index 741f247d34fc5ee8a031fd414568268824864a6c..090dcc5b5b503b02a9373b658b01fbe02987f23f 100644
--- a/NPSimulation/Detectors/Actar/Actar.cc
+++ b/NPSimulation/Detectors/Actar/Actar.cc
@@ -1,18 +1,18 @@
 /*****************************************************************************
- * Copyright (C) 2009-2017   this file is part of the NPTool Project       *
+ * Copyright (C) 2009-2017   this file is part of the NPTool Project         *
  *                                                                           *
  * For the licensing terms see $NPTOOL/Licence/NPTool_Licence                *
  * For the list of contributors see $NPTOOL/Licence/Contributors             *
  *****************************************************************************/
 
 /*****************************************************************************
- * Original Author: Pierre Morfouace  contact address: morfouac@nscl.msu.edu                        *
+ * Original Author: Pierre Morfouace  contact address: morfouac@nscl.msu.edu *
  *                                                                           *
  * Creation Date  : September 2017                                           *
  * Last update    :                                                          *
  *---------------------------------------------------------------------------*
  * Decription:                                                               *
- *  This class describe  Actar simulation                             *
+ *  This class describe  Actar simulation                                    *
  *                                                                           *
  *---------------------------------------------------------------------------*
  * Comment:                                                                  *
@@ -186,8 +186,8 @@ G4LogicalVolume* Actar::BuildDetector(){
                                  1*um*0.5,2*mm*0.5);
 
         // Cathode
-        G4Box* sCathode = new G4Box("Actar_Cathode",26.5*cm*0.5,
-                                    1*um*0.5,25.6*cm*0.5);
+        //G4Box* sCathode = new G4Box("Actar_Cathode",26.5*cm*0.5,
+        //                            1*um*0.5,25.6*cm*0.5);
 
 
 
@@ -244,7 +244,7 @@ G4LogicalVolume* Actar::BuildDetector(){
         G4LogicalVolume* logicGas = new G4LogicalVolume(sCage,DriftGasMaterial,"logic_Gas",0,0,0);
         G4LogicalVolume* logicNose = new G4LogicalVolume(sNose,Al,"logic_Nose",0,0,0);
         G4LogicalVolume* logicPad = new G4LogicalVolume(sPad,Cu,"logic_Pad",0,0,0);
-        G4LogicalVolume* logicCathode = new G4LogicalVolume(sCathode,Cu,"logic_Cathode",0,0,0);
+        //G4LogicalVolume* logicCathode = new G4LogicalVolume(sCathode,Cu,"logic_Cathode",0,0,0);
         G4LogicalVolume* logicWindows = new G4LogicalVolume(sWindows,Mylar,"logic_Windows",0,0,0);
 
         G4RotationMatrix* Rot = new G4RotationMatrix();
diff --git a/NPSimulation/Detectors/Tigress/Tigress.cc b/NPSimulation/Detectors/Tigress/Tigress.cc
index c0aa303e3b724f97366952897b03d64e11c1046f..95d0be9285d315222cea3e943585ba586f904a8a 100644
--- a/NPSimulation/Detectors/Tigress/Tigress.cc
+++ b/NPSimulation/Detectors/Tigress/Tigress.cc
@@ -592,11 +592,11 @@ void Tigress::ReadSensitive(const G4Event* event){
 
 		G4double* Info = *(HPGE_itr->second);
 
-		G4double Energy   =  Info[0]; // RandGauss::shoot(Info[0], ResoEnergy/2.334);
-		G4double Time     =  Info[1];
-		G4int CloverNbr   = (int)Info[7];
+//		G4double Energy   =  Info[0]; // RandGauss::shoot(Info[0], ResoEnergy/2.334);
+//		G4double Time     =  Info[1];
+//		G4int CloverNbr   = (int)Info[7];
 		G4int CrystalNbr  = (int)Info[8];
-    
+   
 		// Figure out segment number, in progress
 		G4int SegmentNbr = 0;
 		G4double zpos = Info[4]; // mm
@@ -604,13 +604,6 @@ void Tigress::ReadSensitive(const G4Event* event){
 		else if(CrystalNbr == 1 || CrystalNbr == 4) { SegmentNbr = 1; } // RIGHT
 		else                                        { SegmentNbr = 3; } // LEFT
 		
-		// To avoid warning for now, in progress
-    Energy=Energy;
-    Time=Time;
-    CloverNbr=CloverNbr;
-    CrystalNbr=CrystalNbr;
-    SegmentNbr=SegmentNbr;
-    
 		//m_TigressData->SetCoreE(CloverNbr, CrystalNbr, Energy/keV);
 		//m_TigressData->SetCoreT(CloverNbr, CrystalNbr, Time/ns);
 		//m_TigressData->SetSegmentE(CloverNbr, SegmentNbr, Energy/keV);
diff --git a/NPSimulation/Detectors/Tigress/Tigress.hh b/NPSimulation/Detectors/Tigress/Tigress.hh
index 807b35640d66c7114c3c6ed2c798edb13c0f0af2..ca56bc9b7f535b40bee52d92d75ae93beffe45c4 100644
--- a/NPSimulation/Detectors/Tigress/Tigress.hh
+++ b/NPSimulation/Detectors/Tigress/Tigress.hh
@@ -161,8 +161,8 @@ private:
   vector<double> m_BetaZ;
     
   // Frame: true if the frame is to be done
-  bool m_LeftFrame;
-  bool m_RightFrame;
+  //  bool m_LeftFrame;
+  //  bool m_RightFrame;
   
 private:/// Visualisation Attribute:
   G4VisAttributes* BlueVisAtt;
diff --git a/NPSimulation/Detectors/Tigress/TigressScorers.cc b/NPSimulation/Detectors/Tigress/TigressScorers.cc
index 2bbf0ca9def2120c5983d19fbd6a3ce23aa22a79..b4b78912a98f1093d0597e0b29a76420676dbdf3 100644
--- a/NPSimulation/Detectors/Tigress/TigressScorers.cc
+++ b/NPSimulation/Detectors/Tigress/TigressScorers.cc
@@ -15,7 +15,7 @@ using namespace TIGRESSSCORERS;
 
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-PS_Tigress::PS_Tigress(G4String name,G4int Level,G4int depth)
+PS_Tigress::PS_Tigress(G4String name,G4int ,G4int depth)
   :G4VPrimitiveScorer(name, depth),HCID(-1){
 	m_Position = G4ThreeVector(-1000,-1000,-1000);
 	m_CloverNumber  = -1;
diff --git a/NPSimulation/Scorers/SiliconScorers.cc b/NPSimulation/Scorers/SiliconScorers.cc
index 961783ee1852f188c182819752d3fdb65d862830..052ccbd3b000a95e63c122e25323ef131290e806 100644
--- a/NPSimulation/Scorers/SiliconScorers.cc
+++ b/NPSimulation/Scorers/SiliconScorers.cc
@@ -23,7 +23,8 @@
 #include "G4UnitsTable.hh"
 using namespace SILICONSCORERS ;
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-PS_Silicon_Images::PS_Silicon_Images(G4String name, string imageFront,string imageBack,double scalingFront, double scalingBack, double centerOffsetX,double centerOffsetY,unsigned int ignoreValue, G4int depth)  :G4VPrimitiveScorer(name, depth),HCID(-1){
+PS_Silicon_Images::PS_Silicon_Images(G4String name, string imageFront,string imageBack,double scalingFront, double scalingBack, double centerOffsetX,double centerOffsetY,unsigned int ignoreValue, G4int depth)  :G4VPrimitiveScorer(name, depth){
+    HCID=-1;
     m_ImageFront = new NPL::Image(imageFront,scalingFront,scalingFront);
     m_ImageBack  = new NPL::Image(imageBack,scalingBack,scalingBack);
     m_ScalingFront = scalingFront;
@@ -61,7 +62,7 @@ G4bool PS_Silicon_Images::ProcessHits(G4Step* aStep, G4TouchableHistory*){
   if(t_PixelFront == m_IgnoreValue && t_PixelBack == m_IgnoreValue)
     return FALSE;
 
-  t_Index =  aStep->GetTrack()->GetTrackID() + t_DetectorNbr * 1e3 ;
+  t_Index = t_DetectorNbr * 1e3 + t_PixelFront * 1e6 + t_PixelBack * 1e9 ;
   // Check if the particle has interact before, if yes, add up the energies.
   map<unsigned int, double>::iterator it;
   it= m_Energy.find(t_Index);
@@ -237,7 +238,7 @@ G4bool PS_Silicon_Rectangle::ProcessHits(G4Step* aStep, G4TouchableHistory*){
     Infos[8] = m_StripLengthNumber;
     Infos[9] = m_StripWidthNumber;
 
-    m_Index =  aStep->GetTrack()->GetTrackID() + m_DetectorNumber * 1e3 + m_StripLengthNumber * 1e6 + m_StripWidthNumber * 1e9;
+    m_Index = m_DetectorNumber * 1e3 + m_StripLengthNumber * 1e6 + m_StripWidthNumber * 1e9;
 
     // Check if the particle has interact before, if yes, add up the energies.
     map<G4int, G4double**>::iterator it;
@@ -357,7 +358,7 @@ G4bool PS_Silicon_Annular::ProcessHits(G4Step* aStep, G4TouchableHistory*){
     Infos[9] = m_StripSectorNumber;
     Infos[10] = m_StripQuadrantNumber;
 
-    m_Index =  aStep->GetTrack()->GetTrackID() + m_DetectorNumber * 1e3 + m_StripRingNumber * 1e6 + m_NumberOfStripSector * 1e9;
+    m_Index = m_DetectorNumber * 1e3 + m_StripRingNumber * 1e6 + m_NumberOfStripSector * 1e9;
 
     // Check if the particle has interact before, if yes, add up the energies.
     map<G4int, G4double**>::iterator it;
@@ -462,7 +463,7 @@ G4bool PS_Silicon_Resistive::ProcessHits(G4Step* aStep, G4TouchableHistory*){
     //Rare case where particle is close to edge of silicon plan
     if (m_StripWidthNumber > m_NumberOfStripWidth) m_StripWidthNumber = m_NumberOfStripWidth;
 
-    m_Index =  aStep->GetTrack()->GetTrackID() + m_DetectorNumber * 1e3 + m_StripWidthNumber * 1e6;
+    m_Index = m_DetectorNumber * 1e3 + m_StripWidthNumber * 1e6;
 
     // Check if the particle has interact before, if yes, add up the energies.
     map<G4int, G4double**>::iterator it;