From e8a9d0ce3bbec35f7cff576c4816d097e17a6fa5 Mon Sep 17 00:00:00 2001
From: Nicolas de Sereville <deserevi@ipno.in2p3.fr>
Date: Fri, 29 Jan 2016 15:16:56 +0100
Subject: [PATCH] + remove obsolete analysis files

---
 Projects/ComptonTelescope/Analysis.cxx |  80 ----------------
 Projects/ComptonTelescope/Analysis.h   | 125 -------------------------
 2 files changed, 205 deletions(-)
 delete mode 100644 Projects/ComptonTelescope/Analysis.cxx
 delete mode 100644 Projects/ComptonTelescope/Analysis.h

diff --git a/Projects/ComptonTelescope/Analysis.cxx b/Projects/ComptonTelescope/Analysis.cxx
deleted file mode 100644
index 02adcb490..000000000
--- a/Projects/ComptonTelescope/Analysis.cxx
+++ /dev/null
@@ -1,80 +0,0 @@
-#include "Analysis.h"
-using namespace std;
-
-int main(int argc, char** argv)
-{
-   // command line parsing
-   NPOptionManager* myOptionManager = NPOptionManager::getInstance(argc,argv);
-
-   // Instantiate RootInput
-   string runToReadfileName = myOptionManager->GetRunToReadFile();
-   RootInput:: getInstance(runToReadfileName);
-
-   // if input files are not given, use those from TAsciiFile
-   if (myOptionManager->IsDefault("DetectorConfiguration")) {
-      string name = RootInput::getInstance()->DumpAsciiFile("DetectorConfiguration");
-      myOptionManager->SetDetectorFile(name);
-   }
-
-   // get input files from NPOptionManager
-   string detectorfileName    = myOptionManager->GetDetectorFile();
-   string calibrationfileName = myOptionManager->GetCalibrationFile();
-   string OutputfileName      = myOptionManager->GetOutputFile();
-   
-   // Instantiate RootOutput
-   RootOutput::getInstance("Analysis/ComptonTelescope_AnalyzedData", "AnalyzedTree");
-   
-   // Instantiate the detector using a file
-   NPA::DetectorManager* myDetector = new DetectorManager();
-   myDetector->ReadConfigurationFile(detectorfileName);
-    
-   // Get the formed Chained Tree and Treat it
-   TChain* Chain = RootInput:: getInstance() -> GetChain();
-
-   // Get number of events to treat
-   cout << endl << "///////// Starting Analysis ///////// "<< endl;
-   int nentries = Chain->GetEntries();
-   cout << " Number of Event to be treated : " << nentries << endl;
-   clock_t begin = clock();
-   clock_t end = begin;
-
-   // main loop on entries
-//   for (int i = 0; i < nentries; i++) {
-   for (int i = 0; i < 10000; i++) {
-      if (i%10000 == 0 && i!=0)  {
-         cout.precision(5);
-         end = clock();
-         double TimeElapsed = (end-begin) / CLOCKS_PER_SEC;
-         double percent = (double)i/nentries;
-         double TimeToWait = (TimeElapsed/percent) - TimeElapsed;
-         cout  << "                                                                                                "<< flush;
-         cout  << "\r Progression:" << percent*100 << " % \t | \t Remaining time : ~" <<  TimeToWait <<"s"<< flush;
-      }
-      else if (i == nentries-1)  cout << "\r Progression:" << " 100% " <<endl;
-
-      // get data
-      Chain -> GetEntry(i);
-
-
-      myDetector->ClearEventPhysics();
-      myDetector->BuildPhysicalEvent();
-
-      /************************************************
-
-      Put your code here
-
-      ************************************************/
-      RootOutput::getInstance()->GetTree()->Fill();
-   }
-
-   cout << "A total of " << nentries << " event has been analyzed " << endl ;
-
-   // write spectra if needed
-   if(NPOptionManager::getInstance()->GetGenerateHistoOption()) myDetector->WriteSpectra();
-
-   RootOutput::getInstance()->Destroy();
-   RootInput::getInstance()->Destroy();
-   NPOptionManager::getInstance()->Destroy();
-
-   return 0 ;
-}
diff --git a/Projects/ComptonTelescope/Analysis.h b/Projects/ComptonTelescope/Analysis.h
deleted file mode 100644
index b4c461b9f..000000000
--- a/Projects/ComptonTelescope/Analysis.h
+++ /dev/null
@@ -1,125 +0,0 @@
-// You can use this file to declare your spectra, file, energy loss , ... and whatever you want.
-// This way you can remove all unnecessary declaration in the main programm.
-// In order to help debugging and organizing we use Name Space.
-
-/////////////////////////////////////////////////////////////////////////////////////////////////
-// -------------------------------------- VARIOUS INCLUDE ---------------------------------------
-
-// NPA
-#include "DetectorManager.h"
-#include "NPOptionManager.h"
-
-// STL C++
-#include <iostream>
-#include <fstream>
-#include <sstream>
-#include <string>
-#include <cmath>
-#include <cstdlib>
-
-// ROOT
-#include <TROOT.h>
-#include <TChain.h>
-#include <TFile.h>
-#include <TLeaf.h>
-#include <TVector3.h>
-#include <TRandom.h>
-
-// NPL
-#include "RootInput.h"
-#include "RootOutput.h"
-#include "NPReaction.h"
-#include "TInitialConditions.h"
-#include "TPlasticData.h"
-#include "TMust2Data.h"
-#include "TMust2Physics.h"
-#include "TExogamPhysics.h"
-#include "TSSSDPhysics.h"
-#include "TPlasticPhysics.h"
-#include "GaspardTracker.h"
-#include "TComptonTelescopePhysics.h"
-
-// Use CLHEP System of unit and Physical Constant
-#include "NPGlobalSystemOfUnits.h"
-#include "NPPhysicalConstants.h"
-
-
-// ----------------------------------------------------------------------------------------------
-double ThetaCalculation (TVector3 A , TVector3 B) ;
-/////////////////////////////////////////////////////////////////////////////////////////////////
-// ----------------------------------- DOUBLE, INT, BOOL AND MORE -------------------------------
-namespace VARIABLE
-	{
-		//	Declare your Variable here:
-		
-			double X1,Y1,Z1				;
-			int N1,N2 = 0				;
-			bool check= false			;
-	
-		//	A Usefull Simple Random Generator
-			TRandom Rand;
-	}
-	 
-using namespace VARIABLE ;
-// ----------------------------------------------------------------------------------------------
-
-
-
-/////////////////////////////////////////////////////////////////////////////////////////////////
-// -----------------------------------GRAPH------------------------------------------------------
-#include <TObject.h>
-#include <TH1.h>
-#include <TH1F.h>
-#include <TH2.h>
-#include <TH2F.h>
-#include <TGraph2D.h>
-
-namespace GRAPH
-	{
-		//	Declare your Spectra here:
-	
-			TH1F *myHist1D = new TH1F("Hist1D","Histogramm 1D ; x ; count", 1000 , -5 , 5 )					;
-	
-			TH2F *myHist2D = new TH2F("Hist2D","Histogramm 2D ; x ; y ", 128 , 1 , 128 , 128 , 1 , 128 )	;
-
-	}
-
-using namespace GRAPH ;
-// --------------------------------------------------------------------------------------------
-
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// -----------------------------------CUT------------------------------------------------------
-#include <TCutG.h>
-namespace CUT
-	{
-		//	Declare your Cut here:
-
-	}
-
-using namespace CUT ;
-// --------------------------------------------------------------------------------------------
-
-
-
-////////////////////////////////////////////////////////////////////////////////////////////////
-// -----------------------------------ENERGY LOSS----------------------------------------------
-#include "NPEnergyLoss.h"
-using namespace NPL ;
-namespace ENERGYLOSS
-	{
-	
-		//	Declare your Energy loss here	:
-	/*		EnergyLoss ProtonTarget = EnergyLoss 	(	"CD2.txt" 	,
-														100 		,
-														1,
-														1			);
-	*/
-	}
-	
-using namespace ENERGYLOSS ;
-// ----------------------------------------------------------------------------------------------
-/////////////////////////////////////////////////////////////////////////////////////////////////
-
-
-- 
GitLab