diff --git a/NPLib/Detectors/Foil/CMakeLists.txt b/NPLib/Detectors/Foil/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..045b1b59c893afa542d8a52a2d7ac23f2dce9975
--- /dev/null
+++ b/NPLib/Detectors/Foil/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_custom_command(OUTPUT TFoilPhysicsDict.cxx COMMAND ../../scripts/build_dict.sh TFoilPhysics.h TFoilPhysicsDict.cxx TFoilPhysics.rootmap libNPFoil.dylib DEPENDS TFoilPhysics.h)
+add_custom_command(OUTPUT TFoilDataDict.cxx COMMAND ../../scripts/build_dict.sh TFoilData.h TFoilDataDict.cxx TFoilData.rootmap libNPFoil.dylib DEPENDS TFoilData.h)
+add_library(NPFoil SHARED TFoilData.cxx TFoilPhysics.cxx TFoilDataDict.cxx TFoilPhysicsDict.cxx )
+target_link_libraries(NPFoil ${ROOT_LIBRARIES} NPCore) 
+install(FILES TFoilData.h TFoilPhysics.h DESTINATION ${CMAKE_INCLUDE_OUTPUT_DIRECTORY})
+
diff --git a/NPLib/Detectors/Foil/TFoilData.cxx b/NPLib/Detectors/Foil/TFoilData.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..ff7c105fefdf80b69e27254b9b4101648b50b468
--- /dev/null
+++ b/NPLib/Detectors/Foil/TFoilData.cxx
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (C) 2009-2016   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 :  Adrien MATTA contact address: matta@lpccaen.in2p3.fr   *
+ *                                                                           *
+ * Creation Date   :                                                         *
+ *---------------------------------------------------------------------------*
+ * Decription:                                                               *
+ *                                                                           *
+ *                                                                           *
+ *---------------------------------------------------------------------------*
+ * Comment:                                                                  *
+ *                                                                           *
+ *****************************************************************************/
+#include <iostream>
+#include "TFoilData.h"
+
+
+ClassImp(TFoilData)
+
+TFoilData::TFoilData()
+{
+}
+
+
+
+TFoilData::~TFoilData()
+{
+}
+
+
+
+void TFoilData::Clear()
+{
+    fFoil_Energy.clear();
+    fFoil_Number.clear();
+    fFoil_Time.clear();
+}
+
+
+
+void TFoilData::Dump() const
+{
+   cout << "XXXXXXXXXXXXXXXXXXXXXXXX New Event XXXXXXXXXXXXXXXXX" << endl;
+
+   for(unsigned short i = 0 ; i<fFoil_Energy.size() ; i ++)
+      {
+         cout << "Foil Number " << fFoil_Number[i] << " Energy: " << fFoil_Energy[i]  << " Time: "<< fFoil_Time[i] << endl;
+      
+      }
+   
+}
diff --git a/NPLib/Detectors/Foil/TFoilData.h b/NPLib/Detectors/Foil/TFoilData.h
new file mode 100644
index 0000000000000000000000000000000000000000..c12e26d433558923000e000d4ac087894bc9d6d4
--- /dev/null
+++ b/NPLib/Detectors/Foil/TFoilData.h
@@ -0,0 +1,69 @@
+#ifndef __FoilDATA__
+#define __FoilDATA__
+/*****************************************************************************
+ * Copyright (C) 2009-2016    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:    contact address:                                      *
+ *                                                                           *
+ * Creation Date  :                                                          *
+ * Last update    :                                                          *
+ *---------------------------------------------------------------------------*
+ * Decription:                                                               *
+ *                                                                           *
+ *                                                                           *
+ *---------------------------------------------------------------------------*
+ * Comment:                                                                  *
+ *                                                                           *
+ *****************************************************************************/
+#include <vector>
+
+#include "TObject.h"
+using namespace std ;
+
+
+class TFoilData : public TObject {
+ private:
+   // ADC
+   vector<double>  fFoil_Energy;   
+   vector<double>  fFoil_Time ;
+   vector<short>   fFoil_Number ;
+   
+ public:
+   TFoilData();
+   virtual ~TFoilData();
+
+   void   Clear();
+   void   Clear(const Option_t*) {};
+   void   Dump() const;
+
+   /////////////////////           GETTERS           ////////////////////////
+   // (E)
+   inline double   GetEnergy(const int& i) const { return fFoil_Energy[i] ;}
+   // (T)
+   inline double   GetTime(const int& i)   const { return fFoil_Time[i] ;}
+   // (N)
+   inline int      GetFoilNumber(const int& i) const { return fFoil_Number[i] ;}
+   
+   //Mult
+   // E
+   inline double   GetEnergyMult() const { return fFoil_Energy.size() ;}
+   // (T)
+   inline double   GetTimeMult()   const { return fFoil_Time.size() ;}
+   // (N)
+   inline int      GetFoilNumberMult() const { return fFoil_Number.size() ;}
+   
+   /////////////////////           SETTERS           ////////////////////////
+   // (E)
+   inline void   SetEnergy(const int& N, const double& E)     { fFoil_Number.push_back(N); fFoil_Energy.push_back(E) ;}
+   inline void   SetTime(const int& N, const double&  T)      { fFoil_Number.push_back(N); fFoil_Time.push_back(T) ;}
+   inline void   SetFoilNumber(const int& N) { fFoil_Number.push_back(N) ;}
+   //
+   ClassDef(TFoilData,1)  // PlasticData structure
+};
+
+#endif
diff --git a/NPLib/Detectors/Foil/TFoilPhysics.cxx b/NPLib/Detectors/Foil/TFoilPhysics.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..32ce780de138f839ab4eff100d01f260cd0806b4
--- /dev/null
+++ b/NPLib/Detectors/Foil/TFoilPhysics.cxx
@@ -0,0 +1,220 @@
+/*****************************************************************************
+ * Copyright (C) 2009-2016   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: Adrien MATTA  contact address: matta@lpccaen.in2p3.fr    *
+ *                                                                           *
+ * Creation Date  : november 2009                                            *
+ * Last update    :                                                          *
+ *---------------------------------------------------------------------------*
+ * Decription:                                                               *
+ *  This class hold Foil  Physics                                         *
+ *                                                                           *
+ *---------------------------------------------------------------------------*
+ * Comment:                                                                  *
+ *                                                                           *
+ *                                                                           *
+ *****************************************************************************/
+
+//   NPL
+#include "TFoilPhysics.h"
+#include "RootOutput.h"
+#include "RootInput.h"
+#include "NPDetectorFactory.h"
+#include "NPOptionManager.h"
+
+//   STL
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <limits>
+#include <stdlib.h>
+using namespace std;
+
+//   ROOT
+#include "TChain.h"
+
+//   tranform an integer to a string
+string itoa(int value)
+{
+  char buffer [33];
+  sprintf(buffer,"%d",value);
+  return buffer;
+}
+
+ClassImp(TFoilPhysics)
+  ///////////////////////////////////////////////////////////////////////////
+TFoilPhysics::TFoilPhysics()
+{      
+  NumberOfDetector = 0 ;
+  EventData = new TFoilData ;
+  EventPhysics = this ;
+}
+
+///////////////////////////////////////////////////////////////////////////
+TFoilPhysics::~TFoilPhysics()
+{}
+
+///////////////////////////////////////////////////////////////////////////
+void TFoilPhysics::Clear()
+{
+  DetectorNumber.clear() ;
+  Energy.clear() ;
+  Time.clear() ;
+}
+
+///////////////////////////////////////////////////////////////////////////
+void TFoilPhysics::ReadConfiguration(NPL::InputParser parser) {
+  vector<NPL::InputBlock*> blocks = parser.GetAllBlocksWithToken("Foil");
+  if(NPOptionManager::getInstance()->GetVerboseLevel())
+    cout << "//// " << blocks.size() << " detectors found " << endl; 
+
+  vector<string> cart = {"X","Y","Z"};
+  vector<string> sphe = {"R","Theta","Phi"};
+  vector<string> square= {"Shape","Height","Width","Thickness","Material"};
+  vector<string> cylind= {"Shape","Radius","Thickness","Material"};
+
+  for(unsigned int i = 0 ; i < blocks.size() ; i++){
+    if(blocks[i]->HasTokenList(cart)){
+      if(NPOptionManager::getInstance()->GetVerboseLevel())
+        cout << endl << "////  Foil " << i+1 <<  endl;
+      double X = blocks[i]->GetDouble("X","mm");
+      double Y = blocks[i]->GetDouble("Y","mm");
+      double Z = blocks[i]->GetDouble("Z","mm");
+
+      if(blocks[i]->HasTokenList(square)){
+        string Shape = blocks[i]->GetString("Shape");
+        double H = blocks[i]->GetDouble("Height","mm");
+        double W = blocks[i]->GetDouble("Width","mm");
+        double T = blocks[i]->GetDouble("Thickness","mm");
+        string Mat = blocks[i]->GetString("Material");
+      }
+      
+      else if(blocks[i]->HasTokenList(cylind)){
+        string Shape = blocks[i]->GetString("Shape");
+        double R = blocks[i]->GetDouble("Radius","mm");
+        double T = blocks[i]->GetDouble("Thickness","mm");
+        string Mat = blocks[i]->GetString("Material");
+      }
+
+    }
+    else if(blocks[i]->HasTokenList(sphe)){
+      if(NPOptionManager::getInstance()->GetVerboseLevel())
+        cout << endl << "////  Foil " << i+1 <<  endl;
+      double R = blocks[i]->GetDouble("R","mm");
+      double Theta = blocks[i]->GetDouble("Theta","deg");
+      double Phi = blocks[i]->GetDouble("Phi","deg");
+
+      if(blocks[i]->HasTokenList(square)){
+        string Shape = blocks[i]->GetString("Shape");
+        double H = blocks[i]->GetDouble("Height","mm");
+        double W = blocks[i]->GetDouble("Width","mm");
+        double T = blocks[i]->GetDouble("Thickness","mm");
+        string Mat = blocks[i]->GetString("Material");
+      }
+      
+      else if(blocks[i]->HasTokenList(cylind)){
+        string Shape = blocks[i]->GetString("Shape");
+        double R = blocks[i]->GetDouble("Radius","mm");
+        double T = blocks[i]->GetDouble("Thickness","mm");
+        string Mat = blocks[i]->GetString("Material");
+      }
+
+    }
+
+
+    else{
+      cout << "ERROR: check your input file formatting " << endl;
+      exit(1);
+    }
+  }
+}
+
+///////////////////////////////////////////////////////////////////////////
+void TFoilPhysics::AddParameterToCalibrationManager()
+{
+  CalibrationManager* Cal = CalibrationManager::getInstance();
+
+  for(int i = 0 ; i < NumberOfDetector ; i++)
+  {
+    for( int j = 0 ; j < 16 ; j++)
+    {
+      Cal->AddParameter("Foil", "Detector"+ NPL::itoa(i+1)+"_E","Foil_Detector"+ NPL::itoa(i+1)+"_E")   ;
+      Cal->AddParameter("Foil", "Detector"+ NPL::itoa(i+1)+"_T","Foil_Detector"+ NPL::itoa(i+1)+"_T")   ;   
+    }
+
+  }
+}
+
+///////////////////////////////////////////////////////////////////////////
+void TFoilPhysics::InitializeRootInputRaw() 
+{
+  TChain* inputChain = RootInput::getInstance()->GetChain()     ;
+  inputChain->SetBranchStatus ( "Foil"       , true )        ;
+  inputChain->SetBranchStatus ( "fFoil_*"    , true )        ;
+  inputChain->SetBranchAddress( "Foil"       , &EventData )  ;
+}
+///////////////////////////////////////////////////////////////////////////
+void TFoilPhysics::InitializeRootInputPhysics()
+{
+  TChain* inputChain = RootInput::getInstance()->GetChain();
+  inputChain->SetBranchStatus ( "Foil", true );
+  inputChain->SetBranchStatus ( "DetectorNumber", true );
+  inputChain->SetBranchStatus ( "Energy", true );
+  inputChain->SetBranchStatus ( "Time", true );
+  inputChain->SetBranchAddress( "Foil", &EventPhysics );
+}
+///////////////////////////////////////////////////////////////////////////
+void TFoilPhysics::InitializeRootOutput()
+{
+  TTree* outputTree = RootOutput::getInstance()->GetTree()            ;
+  outputTree->Branch( "Foil" , "TFoilPhysics" , &EventPhysics ) ;
+}
+
+///////////////////////////////////////////////////////////////////////////
+void TFoilPhysics::BuildPhysicalEvent()
+{
+  BuildSimplePhysicalEvent()   ;
+}
+
+///////////////////////////////////////////////////////////////////////////
+void TFoilPhysics::BuildSimplePhysicalEvent()
+{
+  for(unsigned int i = 0 ; i < EventData->GetEnergyMult() ; i++)
+  {
+    DetectorNumber.push_back( EventData->GetFoilNumber(i) )   ;
+    static string str;
+    str = "Foil/Detector" + NPL::itoa( EventData->GetFoilNumber(i) ) +"_E";
+    Energy.push_back(CalibrationManager::getInstance()->ApplyCalibration(str ,EventData->GetEnergy(i) ) );
+    str = "Foil/Detector" + NPL::itoa( EventData->GetFoilNumber(i) ) +"_T";
+    Time.push_back(CalibrationManager::getInstance()->ApplyCalibration(str ,EventData->GetTime(i) ) );
+  }
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//            Construct Method to be pass to the DetectorFactory              //
+////////////////////////////////////////////////////////////////////////////////
+NPL::VDetector* TFoilPhysics::Construct(){
+  return (NPL::VDetector*) new TFoilPhysics();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//            Registering the construct method to the factory                 //
+////////////////////////////////////////////////////////////////////////////////
+extern "C"{
+class proxy_foil{
+  public:
+    proxy_foil(){
+      NPL::DetectorFactory::getInstance()->AddToken("Foil","Foil");
+      NPL::DetectorFactory::getInstance()->AddDetector("Foil",TFoilPhysics::Construct);
+    }
+};
+
+proxy_foil p;
+}
+
diff --git a/NPLib/Detectors/Foil/TFoilPhysics.h b/NPLib/Detectors/Foil/TFoilPhysics.h
new file mode 100644
index 0000000000000000000000000000000000000000..25861fe881cce731839f5fb0bd036dcd23be7f7d
--- /dev/null
+++ b/NPLib/Detectors/Foil/TFoilPhysics.h
@@ -0,0 +1,99 @@
+#ifndef __FoilPhysics__
+#define __FoilPhysics__
+/*****************************************************************************
+ * Copyright (C) 2009-2016    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: Adrien MATTA  contact address: a.matta@surrey.ac.uk      *
+ *                                                                           *
+ * Creation Date  : November 2009                                            *
+ * Last update    :                                                          *
+ *---------------------------------------------------------------------------*
+ * Decription:                                                               *
+ *  This class hold the Foil Detector  Physics                             *
+ *                                                                           *
+ *---------------------------------------------------------------------------*
+ * Comment:                                                                  *
+ *                                                                           *
+ *                                                                           *
+ *****************************************************************************/
+ 
+//   STL
+#include <vector>
+using namespace std ;
+
+//   ROOT
+#include "TObject.h"
+
+//   NPL
+#include "TFoilData.h"
+#include "NPVDetector.h"
+#include "NPCalibrationManager.h"
+#include "NPInputParser.h"
+
+class TFoilPhysics : public TObject, public NPL::VDetector{
+   public:   //   Constructor and Destructor
+      TFoilPhysics();
+      ~TFoilPhysics();
+
+   public:
+      void  Clear();
+      void  Clear(const Option_t*) {};
+   
+   public:   //   Calibrated Data
+      vector<UShort_t>   DetectorNumber ;
+      vector<Double_t>   Energy;
+      vector<Double_t>   Time;
+
+   public:   //   inherrited from VDetector
+      //   Read stream at ConfigFile to pick-up parameters of detector (Position,...) using Token
+      void ReadConfiguration(NPL::InputParser);
+      
+
+      //   Add Parameter to the CalibrationManger
+      void AddParameterToCalibrationManager();      
+
+      //   Activated associated Branches and link it to the private member DetectorData address
+      //   In this method mother Branches (Detector) AND daughter leaf (fDetector_parameter) have to be activated
+      void InitializeRootInputRaw() ;
+      
+      //   Activated associated Branches and link it to the private member DetectorPhysics address
+      //   In this method mother Branches (Detector) AND daughter leaf (parameter) have to be activated
+      void InitializeRootInputPhysics() ;
+
+      //   Create associated branches and associated private member DetectorPhysics address
+      void InitializeRootOutput();
+      
+      //   This method is called at each event read from the Input Tree. Aime is to build treat Raw dat in order to extract physical parameter. 
+      void BuildPhysicalEvent();
+      
+      //   Same as above, but only the simplest event and/or simple method are used (low multiplicity, faster algorythm but less efficient ...).
+      //   This method aimed to be used for analysis performed during experiment, when speed is requiered.
+      //   NB: This method can eventually be the same as BuildPhysicalEvent.
+      void BuildSimplePhysicalEvent();
+
+      // Same as above but for online analysis
+      void BuildOnlinePhysicalEvent()  {BuildPhysicalEvent();};
+
+      // Give and external TFoilData object to TFoilPhysics. Needed for online analysis for example.
+      void SetRawDataPointer(TFoilData* rawDataPointer) {EventData = rawDataPointer;}
+
+      //   Those two method all to clear the Event Physics or Data
+      void ClearEventPhysics() {Clear();}      
+      void ClearEventData()    {EventData->Clear();}      
+
+   private:   // Data not writted in the tree
+      int                   NumberOfDetector ;//!
+      TFoilData*         EventData ;//!
+      TFoilPhysics*      EventPhysics ;//!
+
+      public: // Static constructor to be passed to the Detector Factory
+     static NPL::VDetector* Construct();
+     ClassDef(TFoilPhysics,1)  // FoilPhysics structure
+};
+
+#endif
diff --git a/NPLib/Detectors/Foil/TFoilSpectra.cxx b/NPLib/Detectors/Foil/TFoilSpectra.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b9125c13d73fedda34b2f51824d178460112a417
--- /dev/null
+++ b/NPLib/Detectors/Foil/TFoilSpectra.cxx
@@ -0,0 +1,174 @@
+/*****************************************************************************
+ * 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: Mohamad Moukaddam  contact address: m.moukaddam@surrey.ac.uk                        *
+ *                                                                           *
+ * Creation Date  : July 2017                                           *
+ * Last update    :                                                          *
+ *---------------------------------------------------------------------------*
+ * Decription:                                                               *
+ *  This class hold Foil Spectra                                     *
+ *                                                                           *
+ *---------------------------------------------------------------------------*
+ * Comment:                                                                  *
+ *                                                                           *   
+ *                                                                           *
+ *****************************************************************************/
+
+// class header 
+#include "TFoilSpectra.h"
+
+// STL
+#include <iostream>  
+#include <string>
+using namespace std;
+
+// NPTool header
+#include "NPOptionManager.h"
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+TFoilSpectra::TFoilSpectra() 
+   : fNumberOfDetectors(0) {
+  SetName("Foil");
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+TFoilSpectra::TFoilSpectra(unsigned int NumberOfDetectors) {
+  if(NPOptionManager::getInstance()->GetVerboseLevel()>0)
+    cout << "************************************************" << endl
+      << "TFoilSpectra : Initalizing control spectra for " 
+      << NumberOfDetectors << " Detectors" << endl
+      << "************************************************" << endl ;
+  SetName("Foil");
+  fNumberOfDetectors = NumberOfDetectors;
+
+  InitRawSpectra();
+  InitPreTreatedSpectra();
+  InitPhysicsSpectra();
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+TFoilSpectra::~TFoilSpectra() {
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+void TFoilSpectra::InitRawSpectra() {
+  static string name;
+  for (unsigned int i = 0; i < fNumberOfDetectors; i++) { // loop on number of detectors
+    // Energy 
+    name = "Foil"+NPL::itoa(i+1)+"_ENERGY_RAW";
+    AddHisto1D(name, name, 4096, 0, 16384, "Foil/RAW");
+    // Time 
+    name = "Foil"+NPL::itoa(i+1)+"_TIME_RAW";
+    AddHisto1D(name, name, 4096, 0, 16384, "Foil/RAW");
+  } // end loop on number of detectors
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+void TFoilSpectra::InitPreTreatedSpectra() {
+  static string name;
+  for (unsigned int i = 0; i < fNumberOfDetectors; i++) { // loop on number of detectors
+    // Energy 
+    name = "Foil"+NPL::itoa(i+1)+"_ENERGY_CAL";
+    AddHisto1D(name, name, 500, 0, 25, "Foil/CAL");
+    // Time
+    name = "Foil"+NPL::itoa(i+1)+"_TIME_CAL";
+    AddHisto1D(name, name, 500, 0, 25, "Foil/CAL");
+
+  
+  }  // end loop on number of detectors
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+void TFoilSpectra::InitPhysicsSpectra() {
+  static string name;
+  // Kinematic Plot 
+  name = "Foil_ENERGY_TIME";
+  AddHisto2D(name, name, 500, 0, 500, 500, 0, 50, "Foil/PHY");
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+void TFoilSpectra::FillRawSpectra(TFoilData* RawData) {
+  static string name;
+  static string family;
+
+  // Energy 
+  unsigned int sizeE = RawData->GetMultEnergy();
+  for (unsigned int i = 0; i < sizeE; i++) {
+    name = "Foil"+NPL::itoa(RawData->GetE_DetectorNbr(i))+"_ENERGY_RAW";
+    family = "Foil/RAW";
+
+    GetHisto(family,name) -> Fill(RawData->Get_Energy(i));
+  }
+
+  // Time
+  unsigned int sizeT = RawData->GetMultTime();
+  for (unsigned int i = 0; i < sizeT; i++) {
+    name = "Foil"+NPL::itoa(RawData->GetT_DetectorNbr(i))+"_TIME_RAW";
+    family = "Foil/RAW";
+
+    GetHisto(family,name) -> Fill(RawData->Get_Time(i));
+  }
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+void TFoilSpectra::FillPreTreatedSpectra(TFoilData* PreTreatedData) {
+  static string name;
+  static string family;
+  
+  // Energy 
+  unsigned int sizeE = PreTreatedData->GetMultEnergy();
+  for (unsigned int i = 0; i < sizeE; i++) {
+    name = "Foil"+NPL::itoa(PreTreatedData->GetE_DetectorNbr(i))+"_ENERGY_CAL";
+    family = "Foil/CAL";
+
+    GetHisto(family,name) -> Fill(PreTreatedData->Get_Energy(i));
+  }
+
+  // Time
+  unsigned int sizeT = PreTreatedData->GetMultTime();
+  for (unsigned int i = 0; i < sizeT; i++) {
+    name = "Foil"+NPL::itoa(PreTreatedData->GetT_DetectorNbr(i))+"_TIME_CAL";
+    family = "Foil/CAL";
+
+    GetHisto(family,name) -> Fill(PreTreatedData->Get_Time(i));
+  }
+}
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+void TFoilSpectra::FillPhysicsSpectra(TFoilPhysics* Physics) {
+  static string name;
+  static string family;
+  family= "Foil/PHY";
+
+  // Energy vs time
+  unsigned int sizeE = Physics->Energy.size();
+  for(unsigned int i = 0 ; i < sizeE ; i++){
+    name = "Foil_ENERGY_TIME";
+    GetHisto(family,name) -> Fill(Physics->Energy[i],Physics->Time[i]);
+  }
+}
+
diff --git a/NPLib/Detectors/Foil/TFoilSpectra.h b/NPLib/Detectors/Foil/TFoilSpectra.h
new file mode 100644
index 0000000000000000000000000000000000000000..62f6caef5f5783bd4d0a5610d4d0ac66a55414ae
--- /dev/null
+++ b/NPLib/Detectors/Foil/TFoilSpectra.h
@@ -0,0 +1,62 @@
+#ifndef TFoilSPECTRA_H
+#define TFoilSPECTRA_H
+/*****************************************************************************
+ * 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: Mohamad Moukaddam  contact address: m.moukaddam@surrey.ac.uk                        *
+ *                                                                           *
+ * Creation Date  : July 2017                                           *
+ * Last update    :                                                          *
+ *---------------------------------------------------------------------------*
+ * Decription:                                                               *
+ *  This class hold Foil Spectra                                     *
+ *                                                                           *
+ *---------------------------------------------------------------------------*
+ * Comment:                                                                  *
+ *                                                                           *   
+ *                                                                           *
+ *****************************************************************************/
+
+// NPLib headers
+#include "NPVSpectra.h"
+#include "TFoilData.h"
+#include "TFoilPhysics.h"
+
+// Forward Declaration
+class TFoilPhysics;
+
+
+class TFoilSpectra : public VSpectra {
+  //////////////////////////////////////////////////////////////
+  // constructor and destructor
+  public:
+    TFoilSpectra();
+    TFoilSpectra(unsigned int NumberOfDetectors);
+    ~TFoilSpectra();
+
+  //////////////////////////////////////////////////////////////
+  // Initialization methods
+  private:
+    void InitRawSpectra();
+    void InitPreTreatedSpectra();
+    void InitPhysicsSpectra();
+
+  //////////////////////////////////////////////////////////////
+  // Filling methods
+  public:
+    void FillRawSpectra(TFoilData*);
+    void FillPreTreatedSpectra(TFoilData*);
+    void FillPhysicsSpectra(TFoilPhysics*);
+
+  //////////////////////////////////////////////////////////////
+  // Detector parameters 
+  private:
+    unsigned int fNumberOfDetectors;
+};
+
+#endif
diff --git a/NPSimulation/Detectors/Foil/CMakeLists.txt b/NPSimulation/Detectors/Foil/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..9b9792763654032b14d7e954d173ab41d44b7391
--- /dev/null
+++ b/NPSimulation/Detectors/Foil/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_library(NPSFoil SHARED  Foil.cc)
+target_link_libraries(NPSFoil NPSCore ${ROOT_LIBRARIES} ${Geant4_LIBRARIES} ${NPLib_LIBRARIES} -lNPFoil)
diff --git a/NPSimulation/Detectors/Foil/Foil.cc b/NPSimulation/Detectors/Foil/Foil.cc
new file mode 100644
index 0000000000000000000000000000000000000000..85c1126f901c8a3c16798d6cd669db426bb4138e
--- /dev/null
+++ b/NPSimulation/Detectors/Foil/Foil.cc
@@ -0,0 +1,341 @@
+/*****************************************************************************
+ * 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: Mhd Moukaddam  contact address: m.moukaddam@surrey.ac.uk *
+ *                                                                           *
+ * Creation Date  : July 2017                                                *
+ * Last update    :                                                          *
+ *---------------------------------------------------------------------------*
+ * Decription:                                                               *
+ *  This class describes the simulation of a simple generic foil normally    *
+ *  used in experiments as a catcher before/after target or a screen of      *
+ *  other detectors e.g. the common Aluminum foil placed upstream the        *
+ *  TRIFOIL with SHARC experiments                                           * 
+ *---------------------------------------------------------------------------*
+ * Comment:                                                                  *
+ *                                                                           *
+ *****************************************************************************/
+
+// C++ headers
+#include <sstream>
+#include <cmath>
+#include <limits>
+//G4 Geometry object
+#include "G4Tubs.hh"
+#include "G4Box.hh"
+
+//G4 sensitive
+#include "G4SDManager.hh"
+#include "G4MultiFunctionalDetector.hh"
+
+//G4 various object
+#include "G4Material.hh"
+#include "G4Transform3D.hh"
+#include "G4PVPlacement.hh"
+#include "G4VisAttributes.hh"
+#include "G4Colour.hh"
+
+// NPTool header
+#include "Foil.hh"
+#include "CalorimeterScorers.hh"
+#include "RootOutput.h"
+#include "MaterialManager.hh"
+#include "NPSDetectorFactory.hh"
+#include "NPOptionManager.h"
+#include "NPSHitsMap.hh"
+// CLHEP header
+#include "CLHEP/Random/RandGauss.h"
+
+using namespace std;
+using namespace CLHEP;
+
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+namespace Foil_NS{
+  // Energy and time Resolution
+  const double ResoTime = 4.5*ns ;
+  const double ResoEnergy = 1.0*MeV ;
+  const double EnergyThreshold = 1*keV;
+}
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+// Foil Specific Method
+Foil::Foil(){
+  m_Event = new TFoilData() ;
+  m_FoilScorer = 0;
+  m_SquareDetector = 0;
+  m_CylindricalDetector = 0;
+
+
+  // RGB Color + Transparency
+  m_VisSquare = new G4VisAttributes(G4Colour(0, 1, 0, 0.5));   
+  m_VisCylinder = new G4VisAttributes(G4Colour(0, 0, 1, 0.5));   
+
+}
+
+Foil::~Foil(){
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+void Foil::AddDetector(G4ThreeVector POS, string Shape, double Radius, double Thick, string Material){
+  // Convert the POS value to R theta Phi as Spherical coordinate is easier in G4 
+  m_R.push_back(POS.mag());
+  m_Theta.push_back(POS.theta());
+  m_Phi.push_back(POS.phi());
+  m_Shape.push_back(Shape);
+
+  m_FoilThickness.push_back(Thick) ;
+  m_FoilRadius.push_back(Radius)    ; // cylindrical shape
+  m_FoilHeight.push_back(-1)     ; // squared shape
+  m_FoilWidth.push_back(-1)      ; // squared shape
+  m_FoilMaterial.push_back(Material)  ; 
+
+}
+
+void Foil::AddDetector(G4ThreeVector POS, string Shape, double Height, double Width, double Thick, string Material){
+  // Convert the POS value to R theta Phi as Spherical coordinate is easier in G4 
+  m_R.push_back(POS.mag());
+  m_Theta.push_back(POS.theta());
+  m_Phi.push_back(POS.phi());
+  m_Shape.push_back(Shape);
+
+  m_FoilThickness.push_back(Thick) ;
+  m_FoilRadius.push_back(-1)    ; // cylindrical shape
+  m_FoilHeight.push_back(Height)     ; // squared shape
+  m_FoilWidth.push_back(Width)      ; // squared shape
+  m_FoilMaterial.push_back(Material)  ; 
+
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+G4LogicalVolume* Foil::BuildSquareDetector(double Height, double Width, double Thickness, string Material){
+  if(!m_SquareDetector){
+    G4Box* box = new G4Box("Foil_Box",Height*0.5, Width*0.5,Thickness*0.5);
+
+    G4Material* DetectorMaterial = MaterialManager::getInstance()->GetMaterialFromLibrary(Material);
+    m_SquareDetector = new G4LogicalVolume(box,DetectorMaterial,"logic_Foil_Box",0,0,0);
+    m_SquareDetector->SetVisAttributes(m_VisSquare);
+    m_SquareDetector->SetSensitiveDetector(m_FoilScorer);
+  }
+  return m_SquareDetector;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+G4LogicalVolume* Foil::BuildCylindricalDetector(double Radius, double Thickness, string Material){
+  if(!m_CylindricalDetector){
+    G4Tubs* tub = new G4Tubs("Foil_Cyl",0,Radius,Thickness*0.5,0,360*deg);
+
+    G4Material* DetectorMaterial = MaterialManager::getInstance()->GetMaterialFromLibrary(Material);
+    m_CylindricalDetector = new G4LogicalVolume(tub,DetectorMaterial,"logic_Foil_tub",0,0,0);
+    m_CylindricalDetector->SetVisAttributes(m_VisSquare);
+    m_CylindricalDetector->SetSensitiveDetector(m_FoilScorer);
+
+  }
+  return m_CylindricalDetector;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+// Virtual Method of NPS::VDetector class
+
+// Read stream at Configfile to pick-up parameters of detector (Position,...)
+// Called in DetecorConstruction::ReadDetextorConfiguration Method
+void Foil::ReadConfiguration(NPL::InputParser parser){
+  vector<NPL::InputBlock*> blocks = parser.GetAllBlocksWithToken("Foil");
+  if(NPOptionManager::getInstance()->GetVerboseLevel())
+    cout << "//// " << blocks.size() << " detectors found " << endl; 
+
+  vector<string> cart = {"POS",};
+  vector<string> sphe = {"R","Theta","Phi"};
+  vector<string> square= {"Shape","Height","Width","Thickness","Material"};
+  vector<string> cylind= {"Shape","Radius","Thickness","Material"};
+
+  for(unsigned int i = 0 ; i < blocks.size() ; i++){
+    if(blocks[i]->HasTokenList(cart)){
+      if(NPOptionManager::getInstance()->GetVerboseLevel()){
+        cout << endl << "////  Foil " << i+1 <<  endl;
+        G4ThreeVector Pos = NPS::ConvertVector(blocks[i]->GetTVector3("POS","mm"));
+        if(blocks[i]->HasTokenList(square)){
+          string Shape = blocks[i]->GetString("Shape");
+          double H = blocks[i]->GetDouble("Height","mm");
+          double W = blocks[i]->GetDouble("Width","mm");
+          double T = blocks[i]->GetDouble("Thickness","mm");
+          string Mat = blocks[i]->GetString("Material");
+          AddDetector(Pos,Shape,H,W,T,Mat);
+        }
+
+        else if(blocks[i]->HasTokenList(cylind)){
+          string Shape = blocks[i]->GetString("Shape");
+          double Rd = blocks[i]->GetDouble("Radius","mm");
+          double T = blocks[i]->GetDouble("Thickness","mm");
+          string Mat = blocks[i]->GetString("Material");
+          AddDetector(Pos,Shape,Rd,T,Mat);
+        }
+      }
+    }
+    else if(blocks[i]->HasTokenList(sphe)){
+      if(NPOptionManager::getInstance()->GetVerboseLevel()){
+        cout << endl << "////  Foil " << i+1 <<  endl;
+      
+        double R = blocks[i]->GetDouble("R","mm");
+        double Theta = blocks[i]->GetDouble("Theta","deg");
+        double Phi = blocks[i]->GetDouble("Phi","deg");
+        G4ThreeVector Pos;
+        Pos.setRThetaPhi(R,Theta,Phi);
+
+        if(blocks[i]->HasTokenList(square)){
+          string Shape = blocks[i]->GetString("Shape");
+          double H = blocks[i]->GetDouble("Height","mm");
+          double W = blocks[i]->GetDouble("Width","mm");
+          double T = blocks[i]->GetDouble("Thickness","mm");
+          string Mat = blocks[i]->GetString("Material");
+          AddDetector(Pos,Shape,H,W,T,Mat);
+        }
+        else if(blocks[i]->HasTokenList(cylind)){
+          string Shape = blocks[i]->GetString("Shape");
+          double Rd = blocks[i]->GetDouble("Radius","mm");
+          double T = blocks[i]->GetDouble("Thickness","mm");
+          string Mat = blocks[i]->GetString("Material");
+          AddDetector(Pos,Shape,Rd,T,Mat);
+        }
+      }
+    }
+    else{
+      cout << "ERROR: check your input file formatting " << endl;
+      exit(1);
+    }
+  }
+}
+
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+// Construct detector and inialise sensitive part.
+// Called After DetecorConstruction::AddDetector Method
+void Foil::ConstructDetector(G4LogicalVolume* world){
+
+  for (unsigned short i = 0 ; i < m_R.size() ; i++) {
+
+    double wX = m_R[i] * sin(m_Theta[i] ) * cos(m_Phi[i] ) ;
+    double wY = m_R[i] * sin(m_Theta[i] ) * sin(m_Phi[i] ) ;
+    double wZ = m_R[i] * cos(m_Theta[i] ) ;
+    G4ThreeVector Det_pos = G4ThreeVector(wX, wY, wZ) ;
+    // So the face of the detector is at R instead of the middle
+    Det_pos+=Det_pos.unit()*(m_FoilThickness[i]*0.5);
+    // Building Detector reference frame
+    double ii = cos(m_Theta[i]) * cos(m_Phi[i]);
+    double jj = cos(m_Theta[i]) * sin(m_Phi[i]);
+    double kk = -sin(m_Theta[i]);
+    G4ThreeVector Y(ii,jj,kk);
+    G4ThreeVector w = Det_pos.unit();
+    G4ThreeVector u = w.cross(Y);
+    G4ThreeVector v = w.cross(u);
+    v = v.unit();
+    u = u.unit();
+
+    G4RotationMatrix* Rot = new G4RotationMatrix(u,v,w);
+
+    if(m_Shape[i] == "Cylindrical"){
+      new G4PVPlacement(G4Transform3D(*Rot,Det_pos),
+          BuildCylindricalDetector(m_FoilRadius[i], m_FoilThickness[i], m_FoilMaterial[i]),"Foil",world,false,i+1);
+    }
+
+    else if(m_Shape[i] == "Square"){
+      new G4PVPlacement(G4Transform3D(*Rot,Det_pos),
+          BuildSquareDetector(m_FoilHeight[i], m_FoilWidth[i], m_FoilThickness[i], m_FoilMaterial[i]),"Foil",world,false,i+1);
+    }
+  }
+}  
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+// Add Detector branch to the EventTree.
+// Called After DetecorConstruction::AddDetector Method
+void Foil::InitializeRootOutput(){
+  RootOutput *pAnalysis = RootOutput::getInstance();
+  TTree *pTree = pAnalysis->GetTree();
+  if(!pTree->FindBranch("Foil")){
+    pTree->Branch("Foil", "TFoilData", &m_Event) ;
+  }
+  pTree->SetBranchAddress("Foil", &m_Event) ;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+// Read sensitive part and fill the Root tree.
+// Called at in the EventAction::EndOfEventAvtion
+void Foil::ReadSensitive(const G4Event* event){
+  m_Event->Clear();
+
+  ///////////
+  // Calorimeter scorer
+  NPS::HitsMap<double*>* CaloHitMap;
+  std::map<G4int, double**>::iterator Calo_itr;
+
+  G4int CaloCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("FoilScorer/Calorimeter");
+  CaloHitMap = (NPS::HitsMap<double*>*)(event->GetHCofThisEvent()->GetHC(CaloCollectionID));
+
+  // Loop on the Calo map
+  for (Calo_itr = CaloHitMap->GetMap()->begin() ; Calo_itr != CaloHitMap->GetMap()->end() ; Calo_itr++){
+
+    double* Info = *(Calo_itr->second);
+    double Energy = RandGauss::shoot(Info[0],Foil_NS::ResoEnergy);
+    if(Energy>Foil_NS::EnergyThreshold){
+      double Time = RandGauss::shoot(Info[1],Foil_NS::ResoTime);
+      int DetectorNbr = (int) Info[2];
+      m_Event->SetEnergy(DetectorNbr,Energy);
+      m_Event->SetTime(DetectorNbr,Time); 
+    }
+  }
+  // clear map for next event
+  CaloHitMap->clear();
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+////////////////////////////////////////////////////////////////   
+void Foil::InitializeScorers() { 
+  // This check is necessary in case the geometry is reloaded
+  bool already_exist = false; 
+  m_FoilScorer = CheckScorer("FoilScorer",already_exist) ;
+
+  if(already_exist) 
+    return ;
+
+  // Otherwise the scorer is initialised
+  vector<int> level; level.push_back(0);
+  G4VPrimitiveScorer* Calorimeter= new CALORIMETERSCORERS::PS_Calorimeter("Calorimeter",level, 0) ;
+  //and register it to the multifunctionnal detector
+  m_FoilScorer->RegisterPrimitive(Calorimeter);
+  G4SDManager::GetSDMpointer()->AddNewDetector(m_FoilScorer) ;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+////////////////////////////////////////////////////////////////////////////////
+//            Construct Method to be pass to the DetectorFactory              //
+////////////////////////////////////////////////////////////////////////////////
+NPS::VDetector* Foil::Construct(){
+  return  (NPS::VDetector*) new Foil();
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+////////////////////////////////////////////////////////////////////////////////
+//            Registering the construct method to the factory                 //
+////////////////////////////////////////////////////////////////////////////////
+extern"C" {
+  class proxy_nps_Foil{
+    public:
+      proxy_nps_Foil(){
+        NPS::DetectorFactory::getInstance()->AddToken("Foil","Foil");
+        NPS::DetectorFactory::getInstance()->AddDetector("Foil",Foil::Construct);
+      }
+  };
+
+  proxy_nps_Foil p_nps_Foil;
+}
diff --git a/NPSimulation/Detectors/Foil/Foil.hh b/NPSimulation/Detectors/Foil/Foil.hh
new file mode 100644
index 0000000000000000000000000000000000000000..fd65ba69ba8e446e9b2be7a908e8a75ecafc277d
--- /dev/null
+++ b/NPSimulation/Detectors/Foil/Foil.hh
@@ -0,0 +1,123 @@
+#ifndef Foil_h
+#define Foil_h 1
+/*****************************************************************************
+ * 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: Mhd Moukaddam  contact address: m.moukaddam@surrey.ac.uk *
+ *                                                                           *
+ * Creation Date  : July 2017                                                *
+ * Last update    :                                                          *
+ *---------------------------------------------------------------------------*
+ * Decription:                                                               *
+ *  This class describes the simulation of a simple generic foil normally    *
+ *  used in experiments as a catcher before/after target or a screen of      *
+ *  other detectors e.g. the common Aluminum foil placed upstream the        *
+ *  TRIFOIL with SHARC experiments                                           * 
+ *---------------------------------------------------------------------------*
+ * Comment:                                                                  *
+ *                                                                           *
+ *****************************************************************************/
+
+// C++ header
+#include <string>
+#include <vector>
+using namespace std;
+
+// G4 headers
+#include "G4ThreeVector.hh"
+#include "G4RotationMatrix.hh"
+#include "G4LogicalVolume.hh"
+#include "G4MultiFunctionalDetector.hh"
+
+// NPTool header
+#include "NPSVDetector.hh"
+#include "TFoilData.h"
+#include "NPInputParser.h"
+
+class Foil : public NPS::VDetector{
+  ////////////////////////////////////////////////////
+  /////// Default Constructor and Destructor /////////
+  ////////////////////////////////////////////////////
+  public:
+    Foil() ;
+    virtual ~Foil() ;
+
+    ////////////////////////////////////////////////////
+    /////// Specific Function of this Class ///////////
+    ////////////////////////////////////////////////////
+  public:
+    // Cartesian
+    void AddDetector(G4ThreeVector POS, string Shape, double Radius, double Thick, string Material);
+    void AddDetector(G4ThreeVector POS, string Shape, double Height, double Width, double Thick, string Material);
+   
+    G4LogicalVolume* BuildSquareDetector( double FoilHeight, double FoilWidth, double FoilThickness, string FoilMaterial);
+    G4LogicalVolume* BuildCylindricalDetector( double FoilRadius, double FoilThickness, string FoilMaterial);
+  
+  private:
+    G4LogicalVolume* m_SquareDetector;
+    G4LogicalVolume* m_CylindricalDetector;
+    
+    ////////////////////////////////////////////////////
+    //////  Inherite from NPS::VDetector class /////////
+    ////////////////////////////////////////////////////
+  public:
+    // Read stream at Configfile to pick-up parameters of detector (Position,...)
+    // Called in DetecorConstruction::ReadDetextorConfiguration Method
+    void ReadConfiguration(NPL::InputParser) ;
+
+    // Construct detector and inialise sensitive part.
+    // Called After DetecorConstruction::AddDetector Method
+    void ConstructDetector(G4LogicalVolume* world) ;
+
+    // Add Detector branch to the EventTree.
+    // Called After DetecorConstruction::AddDetector Method
+    void InitializeRootOutput() ;
+
+    // Read sensitive part and fill the Root tree.
+    // Called at in the EventAction::EndOfEventAvtion
+    void ReadSensitive(const G4Event* event) ;
+
+  public:   // Scorer
+    //   Initialize all Scorer used by the MUST2Array
+    void InitializeScorers() ;
+
+    //   Associated Scorer
+    G4MultiFunctionalDetector* m_FoilScorer ;
+    ////////////////////////////////////////////////////
+    ///////////Event class to store Data////////////////
+    ////////////////////////////////////////////////////
+  private:
+    TFoilData* m_Event ;
+
+    ////////////////////////////////////////////////////
+    ///////////////Private intern Data//////////////////
+    ////////////////////////////////////////////////////
+  private: // Geometry
+    // Detector Coordinate 
+    vector<double>  m_R; 
+    vector<double>  m_Theta;
+    vector<double>  m_Phi; 
+   
+   vector<double>   m_FoilThickness ;
+   vector<double>   m_FoilRadius    ; // cylindrical shape
+   vector<double>   m_FoilHeight    ; // squared shape
+   vector<double>   m_FoilWidth     ; // squared shape
+   vector<string>   m_FoilMaterial  ; 
+
+    //   Shape type
+    vector<string> m_Shape ;
+   
+    // Visualisation Attribute
+    G4VisAttributes* m_VisSquare;
+    G4VisAttributes* m_VisCylinder;
+
+  // Needed for dynamic loading of the library
+  public:
+    static NPS::VDetector* Construct();
+};
+#endif
diff --git a/Projects/Foil/Analysis.cxx b/Projects/Foil/Analysis.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..28ffd39f2c8d4254ced2abf29c3379d175002ea0
--- /dev/null
+++ b/Projects/Foil/Analysis.cxx
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (C) 2009-2016    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: XAUTHORX  contact address: XMAILX                        *
+ *                                                                           *
+ * Creation Date  : XMONTHX XYEARX                                           *
+ * Last update    :                                                          *
+ *---------------------------------------------------------------------------*
+ * Decription:                                                               *
+ *  This class describe  Foil analysis project                       *
+ *                                                                           *
+ *---------------------------------------------------------------------------*
+ * Comment:                                                                  *
+ *                                                                           *
+ *****************************************************************************/
+
+#include<iostream>
+using namespace std;
+#include"Analysis.h"
+#include"NPAnalysisFactory.h"
+#include"NPDetectorManager.h"
+////////////////////////////////////////////////////////////////////////////////
+Analysis::Analysis(){
+}
+////////////////////////////////////////////////////////////////////////////////
+Analysis::~Analysis(){
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void Analysis::Init(){
+   Foil= (TFoilPhysicsPhysics*) m_DetectorManager->GetDetector("Foil");
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void Analysis::TreatEvent(){
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void Analysis::End(){
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+//            Construct Method to be pass to the DetectorFactory              //
+////////////////////////////////////////////////////////////////////////////////
+NPL::VAnalysis* Analysis::Construct(){
+  return (NPL::VAnalysis*) new Analysis();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//            Registering the construct method to the factory                 //
+////////////////////////////////////////////////////////////////////////////////
+extern "C"{
+class proxy{
+  public:
+    proxy(){
+      NPL::AnalysisFactory::getInstance()->SetConstructor(Analysis::Construct);
+    }
+};
+
+proxy p;
+}
+
diff --git a/Projects/Foil/Analysis.h b/Projects/Foil/Analysis.h
new file mode 100644
index 0000000000000000000000000000000000000000..11cdcf989e8efca5be93f797e70fb92f1c4f743b
--- /dev/null
+++ b/Projects/Foil/Analysis.h
@@ -0,0 +1,42 @@
+#ifndef Analysis_h 
+#define Analysis_h
+/*****************************************************************************
+ * Copyright (C) 2009-2016    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: XAUTHORX  contact address: XMAILX                        *
+ *                                                                           *
+ * Creation Date  : XMONTHX XYEARX                                           *
+ * Last update    :                                                          *
+ *---------------------------------------------------------------------------*
+ * Decription:                                                               *
+ *  This class describe  Foil analysis project                       *
+ *                                                                           *
+ *---------------------------------------------------------------------------*
+ * Comment:                                                                  *
+ *                                                                           *
+ *****************************************************************************/
+
+#include"NPVAnalysis.h"
+#include"TFoilPhysics.h"
+class Analysis: public NPL::VAnalysis{
+  public:
+    Analysis();
+    ~Analysis();
+
+  public: 
+    void Init();
+    void TreatEvent();
+    void End();
+
+   static NPL::VAnalysis* Construct();
+
+  private:
+   TFoilPhysics* Foil;
+
+};
+#endif
diff --git a/Projects/Foil/CMakeLists.txt b/Projects/Foil/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..22c74affdfc45019bdda2594f8439c52d4ab97ec
--- /dev/null
+++ b/Projects/Foil/CMakeLists.txt
@@ -0,0 +1,5 @@
+cmake_minimum_required (VERSION 2.8) 
+# Setting the policy to match Cmake version
+cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
+# include the default NPAnalysis cmake file
+include("../../NPLib/ressources/CMake/NPAnalysis.cmake")
diff --git a/Projects/Foil/Foil.detector b/Projects/Foil/Foil.detector
new file mode 100644
index 0000000000000000000000000000000000000000..e7100616832cb2ec22d00b3574cfd7ee1dbf1ca3
--- /dev/null
+++ b/Projects/Foil/Foil.detector
@@ -0,0 +1,25 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Target
+ THICKNESS= 10 micrometer
+ RADIUS=	20 mm
+ MATERIAL= CD2
+ ANGLE= 0 deg
+ X= 0 mm
+ Y= 0 mm
+ Z= 0 mm
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Foil
+ POS= 0 0 350 mm
+ Shape= Square
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Foil
+ POS = 35 35 35 cm
+ Shape= Square
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Foil
+ R= 350 mm
+ THETA= 90 deg
+ PHI= 63 deg
+ Shape= Cylindrical
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+