Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 399)
+++ trunk/CHANGELOG	(revision 400)
@@ -5,7 +5,8 @@
         - time resolution
 	- E_cut for n/gamma reconstruction
-   - time resolution also for RP220,RP420
+        - gen-level data available
+   - time resolution also for RP220,FP420
    - CaloIsolation ready for muons (defined as in lhco standards)
-      
+   - update of Hector version to Hector_1_5_2   
 
  /-----------------------------------------\
Index: trunk/Utilities/Hector/CREDITS
===================================================================
--- trunk/Utilities/Hector/CREDITS	(revision 399)
+++ trunk/Utilities/Hector/CREDITS	(revision 400)
@@ -1,13 +1,23 @@
----- Hector the simulator ----
-   A fast simulator of particles through generic beamlines.
-   J. de Favereau, X. Rouby ~~~ hector_devel@cp3.phys.ucl.ac.be
+  /* * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *                                                         *
+*                   --<--<--  A fast simulator --<--<--     *
+*                 / --<--<--     of particle   --<--<--     *
+*  ----HECTOR----<                                          *
+*                 \ -->-->-- transport through -->-->--     *
+*                   -->-->-- generic beamlines -->-->--     *
+*                                                           *
+* JINST 2:P09005 (2007)                                     *
+*      X Rouby, J de Favereau, K Piotrzkowski (CP3)         *
+*       http://www.fynu.ucl.ac.be/hector.html               *
+*                                                           *
+* Center for Cosmology, Particle Physics and Phenomenology  *
+*              Universite catholique de Louvain             *
+*                 Louvain-la-Neuve, Belgium                 *
+ *                                                         *
+   * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-        http://www.fynu.ucl.ac.be/hector.html
+   J. de Favereau, X. Rouby ~~~ cp3_hector_devel@listes.uclouvain.be
+	jerome.defavereau@uclouvain.be 
+	xavier.rouby@cern.ch
 
-   Centre de Physique des Particules et de PhÃ©nomÃ©nologie (CP3)
-   UniversitÃ© Catholique de Louvain (UCL)
-
-   HECTOR, a fast simulator for the transport of particles in beamlines, 
-   JINST 2 P09005, X. Rouby, J. de Favereau, K. Piotrzkowski
-
-   arXiv:0707.1198v2 [physics.acc-ph] (CP3-07-13)
+   (C) All rights reserved
Index: trunk/Utilities/Hector/VERSION
===================================================================
--- trunk/Utilities/Hector/VERSION	(revision 399)
+++ trunk/Utilities/Hector/VERSION	(revision 400)
@@ -1,1 +1,1 @@
-_1_5_2pre
+_1_5_2
Index: trunk/Utilities/Hector/include/H_BeamParticle.h
===================================================================
--- trunk/Utilities/Hector/include/H_BeamParticle.h	(revision 399)
+++ trunk/Utilities/Hector/include/H_BeamParticle.h	(revision 400)
@@ -132,5 +132,5 @@
 		/// Returns the particle path in the beamline
 		TGraph * getPath(const int , const int ) const;
-		void getPath(const int , const string& ) const;
+		void getPath(const int x_or_y, const string& filename) const;
 		/// Computes the position of the particle at the end of each element of the beam.
 		void computePath(const H_AbstractBeamLine * beam, const bool NonLinear=true);
Index: trunk/Utilities/Hector/include/H_RecRPObject.h
===================================================================
--- trunk/Utilities/Hector/include/H_RecRPObject.h	(revision 399)
+++ trunk/Utilities/Hector/include/H_RecRPObject.h	(revision 400)
@@ -24,4 +24,5 @@
 
 #include "TF1.h"
+#include <cmath>
 
 #include "H_BeamLine.h"
@@ -34,4 +35,5 @@
 		H_RecRPObject();
 		H_RecRPObject(const float, const float, const H_AbstractBeamLine* );
+		H_RecRPObject(const float, const float, const H_AbstractBeamLine& ); // old-fashioned -- to be deleted
 		H_RecRPObject(const H_RecRPObject&);
 		H_RecRPObject& operator=(const H_RecRPObject&);
@@ -79,2 +81,3 @@
 
 #endif
+
Index: trunk/Utilities/Hector/src/H_BeamParticle.cc
===================================================================
--- trunk/Utilities/Hector/src/H_BeamParticle.cc	(revision 399)
+++ trunk/Utilities/Hector/src/H_BeamParticle.cc	(revision 400)
@@ -461,15 +461,18 @@
 }
 
-void H_BeamParticle::getPath(const int x_or_y, const string& filename) const {
+void H_BeamParticle::getPath(const int x_or_y, const string& filename) const{
+        /// @param x_or_y = 0(1) draws the x(y) component;
 	ofstream outfile(filename.c_str());
-	int index;
+
+        int index;
         if(x_or_y==0) {index = INDEX_X;} else {index = INDEX_Y;}
 
         vector<TVectorD>::const_iterator position_i;
         for(position_i = positions.begin(); position_i < positions.end(); position_i++) {
-                outfile << (*position_i)[INDEX_S] <<"\t\t" << (*position_i)[index] << endl;
+		outfile << (*position_i)[index] << "\t" << (*position_i)[INDEX_S] << endl;
         }
 	outfile.close();
 }
+
 
 // should be removed later, to keep only computePath(const H_AbstractBeamLine & , const bool)
Index: trunk/Utilities/Hector/src/H_RecRPObject.cc
===================================================================
--- trunk/Utilities/Hector/src/H_RecRPObject.cc	(revision 399)
+++ trunk/Utilities/Hector/src/H_RecRPObject.cc	(revision 400)
@@ -64,4 +64,22 @@
 	{if(ss1==ss2) cout<<"<H_RecRPObject> WARNING : detectors are on same position"<<endl;
 }
+
+
+H_RecRPObject::H_RecRPObject(const float ss1, const float ss2, const H_AbstractBeamLine& beam) : emin(0), emax(-1), x1(0), x2(0), y1(0), y2(0), s1(ss1), s2(ss2),
+                                txip(NOT_YET_COMPUTED), tyip(NOT_YET_COMPUTED), energy(NOT_YET_COMPUTED), q2(NOT_YET_COMPUTED), pt(NOT_YET_COMPUTED),
+                                thebeam(beam.clone()),
+                                f_1(new TF1("f_1","[0] + [1]*x + [2]*x*x ",emin,emax)),
+                                f_2(new TF1("f_2","[0] + [1]*x + [2]*x*x ",emin,emax)),
+                                g_1(new TF1("g_1","[0] + [1]*x + [2]*x*x ",emin,emax)),
+                                g_2(new TF1("g_2","[0] + [1]*x + [2]*x*x ",emin,emax)),
+                                d_1(new TF1("d_1","[0] + [1]*x + [2]*x*x ",emin,emax)),
+                                d_2(new TF1("d_2","[0] + [1]*x + [2]*x*x ",emin,emax)),
+                                k_1(new TF1("k_1","[0] + [1]*x + [2]*x*x ",emin,emax)),
+                                k_2(new TF1("k_2","[0] + [1]*x + [2]*x*x ",emin,emax)),
+                                l_1(new TF1("l_1","[0] + [1]*x + [2]*x*x ",emin,emax)),
+                                l_2(new TF1("l_2","[0] + [1]*x + [2]*x*x ",emin,emax))
+        {if(ss1==ss2) cout<<"<H_RecRPObject> WARNING : detectors are on same position"<<endl;
+}
+
 
 H_RecRPObject::H_RecRPObject(const H_RecRPObject& r):
@@ -351,2 +369,3 @@
    return os;
 }
+
