From f10cf90a9f08092b1af11c88d96e8c2f8bab82a5 Mon Sep 17 00:00:00 2001
From: deserevi <deserevi@nptool>
Date: Wed, 12 Jan 2011 13:57:06 +0000
Subject: [PATCH] * Cosmetic and update some information files

---
 HOWTO                                   | 14 ++++--
 Misc/rootlogon.C                        |  2 +-
 NPDocumentation/Gaspard.tex             | 60 ++++++++++++++++++-------
 NPLib/GASPARD/GaspardTracker.cxx        |  2 -
 NPLib/GASPARD/GaspardTracker.h          |  4 +-
 NPLib/GASPARD/GaspardTrackerAnnular.cxx |  2 +-
 NPLib/GASPARD/GaspardTrackerAnnular.h   | 18 ++++----
 NPLib/GASPARD/GaspardTrackerSquare.cxx  |  6 +--
 NPLib/GASPARD/GaspardTrackerSquare.h    |  4 +-
 NPLib/README                            |  2 +-
 NPLib/scripts/NPToolLogon.C             |  6 ++-
 README                                  | 20 ++++-----
 12 files changed, 88 insertions(+), 52 deletions(-)

diff --git a/HOWTO b/HOWTO
index a4a3a4a4a..8c59c443d 100644
--- a/HOWTO
+++ b/HOWTO
@@ -14,7 +14,8 @@
  * Decription:                                                               *
  *      This file describes how to use the NPTool package                    *
  *---------------------------------------------------------------------------*
- * Comment:                                                                  *
+ * Comment: See the general documentation in NPTool/NPDocumentation          *
+ *                                                                           *
  *                                                                           *
  *                                                                           *
  *****************************************************************************/
@@ -23,8 +24,8 @@ I) NPSIMULATION
 I.a) HOW TO RUN THE G4 SIMULATION
 To invoke the G4 simulation module do the following:
 	cd NPSimulation
-	./bin/Darwin-g++/Simulation xxx.reaction yyy.detector (for Mac OS X platform)
-	./bin/Linux-g++/Simulation  xxx.reaction yyy.detector (for Linux platform)
+	./bin/Darwin-g++/Simulation -E xxx.reaction -D yyy.detector (for Mac OS X platform)
+	./bin/Linux-g++/Simulation  -E xxx.reaction -D yyy.detector (for Linux platform)
 where xxx.reaction is one of the available event generator and 
 yyy.detector is one of the available detector geometry
 
@@ -58,3 +59,10 @@ As the first release of the NPTool package several detectors are available:
 
 
 II) NPANALYSIS
+To invoke the analysis module do the following:
+	cd NPAnalysis/yourAnalysisDirectory
+	./Analysis -E xxx.reaction -D yyy.detector -R RunToTreat.txt 
+where xxx.reaction is one of the available event generator, yyy.detector 
+is one of the available detector geometry and RunToTreat is a file
+specifying the ROOT file to analyse.
+
diff --git a/Misc/rootlogon.C b/Misc/rootlogon.C
index c2591b2a9..154d6056e 100644
--- a/Misc/rootlogon.C
+++ b/Misc/rootlogon.C
@@ -23,7 +23,7 @@
 {
    // Load NPToolLogon.C macro dealing with all the NPLib shared libraries
    TString path = gSystem->Getenv("NPLIB");
-   gROOT->ProcessLine( Form(".L %s/scripts/NPToolLogon.C+", path.Data()) );
+   gROOT->ProcessLine(Form(".L %s/scripts/NPToolLogon.C+", path.Data()));
    
    // No Init Display
    // NPToolLogon(false)
diff --git a/NPDocumentation/Gaspard.tex b/NPDocumentation/Gaspard.tex
index 67d4b1ac1..6a51ea965 100755
--- a/NPDocumentation/Gaspard.tex
+++ b/NPDocumentation/Gaspard.tex
@@ -1,4 +1,6 @@
 \documentclass[a4paper,12pt]{article}
+\usepackage[margin=2cm]{geometry}
+
 \usepackage[T1]{fontenc}
 \usepackage [isolatin]{inputenc}
 \usepackage{graphicx}
@@ -16,14 +18,14 @@
 
 
 \section{Introduction}
-The Gaspard project is developed within the NPTool framework. For the 
-moment only the tracker of charged particles is currently under study.
-Coupling the tracker with a gamma-ray calorimeter such as AGATA or
-PARIS will be considered in the near future. 
+The Gaspard project is developed within the NPTool framework which is a 
+modular package allowing to perform Geant4 simulations and to analyse the 
+results of the simulations. It is strongly encouraged to read the general 
+NPTool documentation that you can find in this directory.
 
-NPTool is a modular package allowing to perform Geant4 simulations and to 
-analyse the results of the simulations. It is strongly encouraged to read 
-the general NPTool documentation that you can find in this directory.
+Concerning the status for Gaspard simulations, the charged particles tracker
+is now finished and the coupling with the PARIS gamma-ray calorimeter is
+done. Both the tracker and the calorimeter have different available geomtries.
 
 
 \section{NPSimulation}
@@ -31,9 +33,9 @@ the general NPTool documentation that you can find in this directory.
 The Gaspard tracker detector, even if it is made of several detectors of
 different shapes (square, trapezoid, annular, ...), is considered as {\it one} 
 detector from the NPSimulation point of view. The Gaspard tracker detector 
-is described in the GaspardTracker class defined in the 
-GaspardTracker.\{hh,cc\} files. Since the Gaspard tracker detector is 
-registered in the DetectorConstructor.cc file it is available for NPSimulation.
+is described in the GaspardTracker class defined in the GaspardTracker.\{hh,cc\} 
+files. Since the Gaspard tracker detector is registered in the 
+DetectorConstructor.cc file it is available for NPSimulation.
 
 In order to manage the different detector shapes (square, trapezoid, annular, 
 ...) of the Gaspard tracker, the GaspardTracker class holds a vector of 
@@ -46,13 +48,13 @@ GaspardTrackerTrapezoid and GaspardTrackerDummyShape classes).
 To run NPSimulation the following command line should be executed: 
 
 \begin{verbatim}
-   Simulation xxx.reaction yyy.detector
+   Simulation -E xxx.reaction -D yyy.detector
 \end{verbatim}
 
 where xxx.reaction is an input file describing the event generator and
 yyy.detector is an input file describing the detector geometry. All these
-input files are based on keywords and can be found in the 
-\$NPTool/Inputs subdirectories.
+input files are based on keywords and can be found in the \$NPTool/Inputs 
+subdirectories.
 
 \subsubsection{Event Generators}
 All the different kind of event generator files as well as their 
@@ -243,7 +245,7 @@ energy.
 To run NPAnalysis the following command line should be executed:
 
 \begin{verbatim}
-   ./Analysis xxx.reaction yyy.detector RunToTreat.txt
+   ./Analysis -E xxx.reaction -D yyy.detector -R RunToTreat.txt
 \end{verbatim}
 
 where xxx.reaction is the input file describing the event generator used in 
@@ -266,12 +268,38 @@ of such a file is given here:
 
 \subsubsection{Results of the analysis}
 The results of the anaysis are stored in a ROOT file in the \$NPTool/Output/Analysis
-directory. For the moment the main feature available is the reconstructionof the 
+directory. For the moment the main feature available is the reconstruction of the 
 excitation energy.
 
 
 \subsubsection{Structure of the analysis}
-******* to be documented *********
+The analysis package now deals with Gaspard trackers including different shapes.
+The main analysis program is the \$NPTool/NPAnalysis/Gaspard/src/Analysis.cc
+file where the user is in charge to code the specific functionalities he is
+interested in. This includes to treat cases with multiplicity greater than one,
+calculate the excitation energy, check the effect of beam tracker detector
+positioning resolution, ...
+
+However, all the basic treatments of the analysis are done in \$NPTool/NPLib/GASPARD.
+These basic treatments calculate the total energy deposited in the telescope and
+associate for each pixel number the cartesian coordinates of the pixel middle.
+
+The structure in \$NPLib/GASPARD is very similar to the NPSimulation structure
+for Gaspard. The GaspardTracker.\{h,cxx\} class derives from the VDetector class
+and holds ($i$) the GaspardTrackerData object to be analysed, ($ii$) the
+GaspardTrackerPhysics object with the results of the basic treatement and ($iii$)
+a map which associates the detector number read in the geometry file with a pointer
+to the GaspardTrackerModule class. In this way a Gaspard tracker geometry with any 
+kind of shapes is analyzed correctly. Each available shape (square, trapezoid, annular,
+dummyshape, ...) has its own class GaspardTracker*Shape*.\{h,cxx\} deriving from 
+the GaspardTrackerModule class. Each class basically applies the same stripping scheme 
+as defined in the simulation in order to obtain the cartesian coordinates of the center 
+of each pixel. Each class have its own treatement method to calculate the total energy
+deposited in each module.
+
+
+IMPORTANT NOTE: for the moment, only multiplicity one are considered.
+
 
 
 \end{document}
diff --git a/NPLib/GASPARD/GaspardTracker.cxx b/NPLib/GASPARD/GaspardTracker.cxx
index e0e0d5ac0..30ec36a68 100644
--- a/NPLib/GASPARD/GaspardTracker.cxx
+++ b/NPLib/GASPARD/GaspardTracker.cxx
@@ -133,8 +133,6 @@ void GaspardTracker::ReadConfiguration(string Path)
          GPDTrkDummyShape = true;
 
          // instantiate a new "detector" corresponding to the Shape elements
-         // The GaspardTrackerSquare class should be replaced by the
-         // GaspardTrackerShape class you need to define
          GaspardTrackerModule* myDetector = new GaspardTrackerDummyShape(m_ModulesMap, m_EventPhysics);
 
          // Pass the data object to the GaspardTracker*** object
diff --git a/NPLib/GASPARD/GaspardTracker.h b/NPLib/GASPARD/GaspardTracker.h
index c617ef482..e6ef44767 100644
--- a/NPLib/GASPARD/GaspardTracker.h
+++ b/NPLib/GASPARD/GaspardTracker.h
@@ -78,8 +78,8 @@ public:
    void BuildSimplePhysicalEvent();
 
    // Those two method all to clear the Event Physics or Data
-   void ClearEventPhysics()	{m_EventPhysics->Clear();}
-   void ClearEventData()	{m_EventData->Clear();}
+   void ClearEventPhysics()   {m_EventPhysics->Clear();}
+   void ClearEventData()      {m_EventData->Clear();}
 
 
 public:
diff --git a/NPLib/GASPARD/GaspardTrackerAnnular.cxx b/NPLib/GASPARD/GaspardTrackerAnnular.cxx
index 69a5f8cbc..8e3c42838 100644
--- a/NPLib/GASPARD/GaspardTrackerAnnular.cxx
+++ b/NPLib/GASPARD/GaspardTrackerAnnular.cxx
@@ -15,7 +15,7 @@ using namespace std;
 
 
 GaspardTrackerAnnular::GaspardTrackerAnnular(map<int, GaspardTrackerModule*> &Module,
-					     TGaspardTrackerPhysics* &EventPhysics) 
+                                             TGaspardTrackerPhysics* &EventPhysics) 
 	: m_ModuleTest(Module),
 	  m_EventPhysics(EventPhysics),
 	  m_EventData(0),
diff --git a/NPLib/GASPARD/GaspardTrackerAnnular.h b/NPLib/GASPARD/GaspardTrackerAnnular.h
index d3661d841..6e1f538e8 100644
--- a/NPLib/GASPARD/GaspardTrackerAnnular.h
+++ b/NPLib/GASPARD/GaspardTrackerAnnular.h
@@ -40,8 +40,8 @@ public:
    void BuildSimplePhysicalEvent();
 
 private:
-   map<int, GaspardTrackerModule*> 	&m_ModuleTest;
-   TGaspardTrackerPhysics* 		&m_EventPhysics;
+   map<int, GaspardTrackerModule*>  &m_ModuleTest;
+   TGaspardTrackerPhysics*          &m_EventPhysics;
 
 public:
    void SetGaspardDataPointer(TGaspardTrackerData* gaspardData) {m_EventData = gaspardData;};
@@ -61,17 +61,17 @@ public:
    void AddModule(double zpos, double rmin, double rmax);
 
    // Getters to retrieve the (X,Y,Z) coordinates of a pixel defined by strips (X,Y)
-   double GetStripPositionX(int N ,int X ,int Y)        {return m_StripPositionX[N-1-m_index["Annular"]][X-1][Y-1]; }
-   double GetStripPositionY(int N ,int X ,int Y)        {return m_StripPositionY[N-1-m_index["Annular"]][X-1][Y-1]; }
-   double GetStripPositionZ(int N ,int X ,int Y)        {return m_StripPositionZ[N-1-m_index["Annular"]][X-1][Y-1]; }
-   double GetNumberOfModule()                           { return m_NumberOfModule; }
+   double GetStripPositionX(int N ,int X ,int Y)        {return m_StripPositionX[N-1-m_index["Annular"]][X-1][Y-1];}
+   double GetStripPositionY(int N ,int X ,int Y)        {return m_StripPositionY[N-1-m_index["Annular"]][X-1][Y-1];}
+   double GetStripPositionZ(int N ,int X ,int Y)        {return m_StripPositionZ[N-1-m_index["Annular"]][X-1][Y-1];}
+   double GetNumberOfModule()                           { return m_NumberOfModule;}
 
 private:
    // Spatial Position of Strip Calculated on basis of detector position
    int m_NumberOfModule;
-   vector< vector < vector < double > > >       m_StripPositionX;
-   vector< vector < vector < double > > >       m_StripPositionY;
-   vector< vector < vector < double > > >       m_StripPositionZ;
+   vector< vector < vector < double > > >    m_StripPositionX;
+   vector< vector < vector < double > > >    m_StripPositionY;
+   vector< vector < vector < double > > >    m_StripPositionZ;
 
 private:
    //////////////////////////////
diff --git a/NPLib/GASPARD/GaspardTrackerSquare.cxx b/NPLib/GASPARD/GaspardTrackerSquare.cxx
index f2930a72d..0b9db4ad5 100644
--- a/NPLib/GASPARD/GaspardTrackerSquare.cxx
+++ b/NPLib/GASPARD/GaspardTrackerSquare.cxx
@@ -13,14 +13,14 @@
 
 
 GaspardTrackerSquare::GaspardTrackerSquare(map<int, GaspardTrackerModule*> &Module,
-					   TGaspardTrackerPhysics* &EventPhysics) 
+                                           TGaspardTrackerPhysics* &EventPhysics) 
 	: m_ModuleTest(Module),
 	  m_EventPhysics(EventPhysics),
 	  m_EventData(0),
 	  m_PreTreatData(new TGaspardTrackerData),
 	  m_NumberOfModule(0),
-          m_FirstStageFace(98), // mm
-          m_NumberOfStrips(128)
+     m_FirstStageFace(98), // mm
+     m_NumberOfStrips(128)
 {
    m_StripPitch = m_FirstStageFace / (double)m_NumberOfStrips;
 }
diff --git a/NPLib/GASPARD/GaspardTrackerSquare.h b/NPLib/GASPARD/GaspardTrackerSquare.h
index e77d17dc7..082530d0e 100644
--- a/NPLib/GASPARD/GaspardTrackerSquare.h
+++ b/NPLib/GASPARD/GaspardTrackerSquare.h
@@ -42,8 +42,8 @@ public:
    void BuildSimplePhysicalEvent();
 
 private:
-   map<int, GaspardTrackerModule*> 	&m_ModuleTest;
-   TGaspardTrackerPhysics* 		&m_EventPhysics;
+   map<int, GaspardTrackerModule*>  &m_ModuleTest;
+   TGaspardTrackerPhysics*          &m_EventPhysics;
 
 public:
    void SetGaspardDataPointer(TGaspardTrackerData* gaspardData) {m_EventData = gaspardData;};
diff --git a/NPLib/README b/NPLib/README
index 9519e85d7..96966b76f 100644
--- a/NPLib/README
+++ b/NPLib/README
@@ -50,7 +50,7 @@ II) lib directory
 
 III) scripts
 	This directory contains several scripts used in the global Makefile and 
-   for ROOT.
+   for initializing ROOT.
 
 IV) IORoot
 	This directory includes one library:
diff --git a/NPLib/scripts/NPToolLogon.C b/NPLib/scripts/NPToolLogon.C
index 97c080641..ab0007dcd 100644
--- a/NPLib/scripts/NPToolLogon.C
+++ b/NPLib/scripts/NPToolLogon.C
@@ -12,7 +12,7 @@
  * Last update    :                                                          *
  *---------------------------------------------------------------------------*
  * Decription: This script loads automatically the NPLib include path and    *
- *             shared.                                                       *
+ *             shared libraries.                                             *
  *                                                                           *
  *---------------------------------------------------------------------------*
  * Comment: This script should be called in your rootlogon.C file            *
@@ -20,13 +20,14 @@
  *                                                                           *
  *                                                                           *
  *****************************************************************************/
- 
+// ROOT headers
 #include "TSystem.h"
 #include "TROOT.h"
 #include "TList.h"
 #include "TSystemDirectory.h"
 #include "TString.h"
  
+// C++ headers
 #include <iostream>
 using namespace std;
 
@@ -55,6 +56,7 @@ void NPToolLogon(bool quietmode = false)
    // objects, the libPhysics.so ROOT library is loaded.
    gSystem->Load("libPhysics.so");
 
+   // Loop on all libraries
    Int_t i = 0;
    while (listfile->At(i)) {
       TString libname = listfile->At(i++)->GetName();
diff --git a/README b/README
index 63df8bcb1..3e3359379 100644
--- a/README
+++ b/README
@@ -27,12 +27,12 @@ module which contains a set of libraries needed both by the
 NPSimulation and NPAnalysis modules.
 
 The detailed structure of the NPTool package is:
-NPTool	/ NPLib
-	/ NPSimulation
-	/ NPAnalysis
-	/ Inputs
-	/ Outputs
-	/ NPDocumentation
+NPTool / NPLib
+	    / NPSimulation
+	    / NPAnalysis
+	    / Inputs
+	    / Outputs
+	    / NPDocumentation
 
 
 I) NPLib
@@ -69,9 +69,9 @@ V) Outputs
 	G4 simulation (NPSimulation) and of the analysis
 	tools (NPAnalysis). It has the following structure:
 	Outputs / Analysis
-		/ Simulation
+		     / Simulation
 
 VI) NPDocumentation
-	You will find here in the (near?) future some detailed 
-	documentation concerning NPSimulation and on how to add
-	a new detector to NPSimulation.
+   This directory contains some detailed documentation
+   concerning NPSimulation and NPAnalysis and on how to 
+   add a new detector to NPSimulation.
-- 
GitLab