Index: /trunk/interface/BFieldProp.h
===================================================================
--- /trunk/interface/BFieldProp.h	(revision 222)
+++ /trunk/interface/BFieldProp.h	(revision 223)
@@ -13,7 +13,7 @@
 
 #include "TLorentzVector.h"
-#include "interface/SmearUtil.h"
-#include "Utilities/ExRootAnalysis/interface/BlockClasses.h"
-#include "Utilities/ExRootAnalysis/interface/TSimpleArray.h"
+#include "SmearUtil.h"
+#include "BlockClasses.h"
+#include "TSimpleArray.h"
 
 using namespace std;
@@ -23,5 +23,11 @@
  public:
   // Constructor
-    TrackPropagation(const string DetDatacard);
+    TrackPropagation();
+    TrackPropagation(const string& DetDatacard);
+    TrackPropagation(const RESOLution * DetDatacard);
+    TrackPropagation(const TrackPropagation & tp);
+    TrackPropagation& operator=(const TrackPropagation & tp);
+    ~TrackPropagation() {delete DET;};
+    void init(); // for constructors
  
     void Propagation(const TRootGenParticle *Part,TLorentzVector &genMomentum);
Index: /trunk/interface/FrogUtil.h
===================================================================
--- /trunk/interface/FrogUtil.h	(revision 222)
+++ /trunk/interface/FrogUtil.h	(revision 223)
@@ -15,53 +15,26 @@
 /// \brief RESOLution class, and some generic definitions
 
-#include <iostream>
-#include <fstream>
-#include <utility>
-#include <vector>
-#include <math.h>
-
-#include "TStyle.h"
-#include "TPad.h"
-#include "TCanvas.h"
-#include "TSystem.h"
-#include "TArrow.h"
-#include "TROOT.h"
-#include "TApplication.h"
-#include "THStack.h"
-#include "stdio.h"
-#include "TChain.h"
-#include "TString.h"
-#include "TGraphErrors.h"
-#include "TClonesArray.h"
-#include "TFile.h"
-#include "TH2.h"
-#include "THStack.h"
-#include "TLegend.h"
-#include "TPaveText.h"
-#include "TLorentzVector.h"
-#include "TTree.h"
-#include "TBranch.h"
-#include "TRandom.h"
-
-#include "interface/SmearUtil.h"
-#include "Utilities/ExRootAnalysis/interface/BlockClasses.h"
-
-#include "Utilities/ExRootAnalysis/interface/ExRootTreeReader.h"
-#include "Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h"
-#include "Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h"
-
-#include "Utilities/FROG/Includes/FROG/FROG_Events.h"
+#include "SmearUtil.h"
+#include "FROG_Events.h"
 
 
 using namespace std;
-class FrogDisplay 
-{
+class FrogDisplay {
+
  public:
-  /// Constructor
-  FrogDisplay();
+   /// Constructor
+   FrogDisplay();
+   FrogDisplay(const string& DetDatacard);
+   FrogDisplay(const RESOLution* DetDatacard);
+   FrogDisplay(const FrogDisplay& frog);
+   FrogDisplay& operator=(const FrogDisplay& frog);
+   ~FrogDisplay() {delete DET;}
 
-  void Build_1Event(FROG_Element_Event* event1);
-  void BuidEvents(string outputfilename,int nEntryFrog);
-  void BuildGeom(string DetDatacard);
+  void BuildEvents(const string& outputfilename);
+  void BuildGeom();
+
+ private:
+   RESOLution *DET;
+   unsigned int nEntryFrog;
 
 };
Index: /trunk/interface/SmearUtil.h
===================================================================
--- /trunk/interface/SmearUtil.h	(revision 222)
+++ /trunk/interface/SmearUtil.h	(revision 223)
@@ -19,13 +19,7 @@
 #include "TLorentzVector.h"
 
-#include "Utilities/ExRootAnalysis/interface/BlockClasses.h"
-#include "Utilities/ExRootAnalysis/interface/TSimpleArray.h"
-
-#include "Utilities/Fastjet/plugins/CDFCones/interface/PhysicsTower.hh"
-
-#include <iostream>
-#include <sstream>
-#include <fstream>
-#include <iomanip>
+#include "BlockClasses.h"
+#include "TSimpleArray.h"
+#include "PhysicsTower.hh"
 
 using namespace std;
@@ -34,18 +28,21 @@
 
  public:
-  ParticleUtil(const TLorentzVector &genMomentum,const int &pid) : TLVector(genMomentum) , Pid(pid) {}
-
-  float E() {return TLVector.E();}    // particle energy [GeV]
-  float Px() {return TLVector.Px();}  // horizontal coordinate of momentum [GeV]
-  float Py() {return TLVector.Py();}  // vertical coordinate of momentum [GeV]
-  float Pz() {return TLVector.Pz();}  // longitudinal coordinate of momentum [GeV]
-  float Pt() {return TLVector.Pt();}  // transverse momentum [GeV]
-  float Eta() {return TLVector.Eta();}  // pseudorapidity [GeV]
-  float Phi() {return TLVector.Phi();}  // azimuthal angle [GeV]
-  float PID() {return Pid;}  // particle energy in [GeV]
+  ParticleUtil(const TLorentzVector &genMomentum, int pid);
+
+  float E() {return _e;}    // particle energy [GeV]
+  float Px() {return _px;}  // horizontal coordinate of momentum [GeV]
+  float Py() {return _py;}  // vertical coordinate of momentum [GeV]
+  float Pz() {return _pz;}  // longitudinal coordinate of momentum [GeV]
+  float Pt() {return _pt;}  // transverse momentum [GeV]
+  float EtaCalo() {return _etaCalo;}  // pseudorapidity 
+  float Eta() {return _eta;}  // pseudorapidity 
+  float PhiCalo() {return _phiCalo;}  // azimuthal angle 
+  float Phi() {return _phi;}  // azimuthal angle 
+  int PID() {return _pid;}  // particle energy in [GeV]
 
  private:
-  TLorentzVector TLVector;
-  int Pid;
+  float _e, _px, _py, _pz, _pt;
+  float _eta, _etaCalo, _phi, _phiCalo; 
+  int _pid;
 };
 
@@ -56,5 +53,8 @@
   /// Constructor
   RESOLution();
-  
+  RESOLution(const RESOLution & DET);
+  RESOLution& operator=(const RESOLution& DET);
+  ~RESOLution() { delete [] TOWER_eta_edges; delete [] TOWER_dphi;};
+ 
   // Detector coverage
   float CEN_max_tracker;    // tracker pseudorapidity coverage
@@ -155,9 +155,4 @@
  
  int NEvents_Frog;
-
-
-
-
-
   float PT_QUARKS_MIN;    // minimal pt needed for quarks to reach the tracker, in GeV
 
@@ -169,5 +164,5 @@
  
   /// Create the output log file
-  void Logfile(string LogName);
+  void Logfile(const string& LogName);
   
   /// Provides the smeared TLorentzVector for the electrons
@@ -180,18 +175,18 @@
   void SmearHadron(TLorentzVector &hadron, const float frac);
   
-  //*****************************fonction pour avoir les taus************************************
+  /// For electromagnetic collimation in tau jets
   double EnergySmallCone(const vector<PhysicsTower> &towers, const float eta, const float phi);
 
-  //***************** Fonction pour avoir le nombre de traces pour les taus****************************
+  /// Number of tracks in tau jet algo
   unsigned int NumTracks(const vector<TLorentzVector> &tracks, const float pt_track, const float eta, const float phi);
 
-  //**********************fonction pour avoir les b-jets******************************
+  /// b-jets
   int Bjets(const TSimpleArray<TRootGenParticle> &subarray, const float eta, const float phi);
   
-  //******************** retourne l'efficacite de b-tagging ******************************
+  /// b-tag efficiency and misidentification
   bool Btaggedjet(const TLorentzVector &JET, const TSimpleArray<TRootGenParticle> &subarray);
 
-  //******************************isolation criteria**************************************
-  bool Isolation(Float_t phi,Float_t eta,const vector<TLorentzVector> &tracks,float PT_TRACK2);
+  /// Lepton isolation
+  bool Isolation(const float phi, const float eta,const vector<TLorentzVector> &tracks,float PT_TRACK2);
 
   //********************* returns a segmented value for eta and phi, for calo towers *****
@@ -226,4 +221,6 @@
 
 const double speed_of_light = 299792458; // m/s
+const float UNDEFINED=-9999.;
+
 
 #ifndef __PI__
Index: /trunk/interface/VeryForward.h
===================================================================
--- /trunk/interface/VeryForward.h	(revision 222)
+++ /trunk/interface/VeryForward.h	(revision 223)
@@ -17,19 +17,12 @@
 
 #include <vector>
-#include "TLorentzVector.h"
 
-#include "interface/SmearUtil.h"
-
-#include "Utilities/ExRootAnalysis/interface/BlockClasses.h"
-#include "Utilities/ExRootAnalysis/interface/TSimpleArray.h"
-#include "Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h"
-#include "Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h"
-
+#include "SmearUtil.h"
+#include "BlockClasses.h"
+#include "ExRootTreeBranch.h"
+#include "ExRootTreeWriter.h"
 #include "H_BeamParticle.h"
 #include "H_BeamLine.h"
-#include "H_RomanPot.h"
-
-
-#include "Utilities/Fastjet/plugins/CDFCones/interface/PhysicsTower.hh"
+#include "PhysicsTower.hh"
 
 using namespace std;
@@ -39,18 +32,22 @@
  public:
   /// Constructor
-  VeryForward(string DetDatacard);
+   VeryForward();
+   VeryForward(const string& DetDatacard);
+   VeryForward(const RESOLution * DetDatacard);
+   VeryForward(const VeryForward& vf);
+   VeryForward& operator=(const VeryForward& vf);
+   void init();
+   ~VeryForward() {delete DET; /*delete beamline1; delete beamline2;*/}; //known memory leak in Hector. Should first be fixed in Hector
 
-  void ZDC(ExRootTreeWriter *treeWriter,ExRootTreeBranch *branchZDC,TRootGenParticle *particle);
-  void RomanPots(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchRP220,ExRootTreeBranch *branchFP420,TRootGenParticle *particle) ;
+   void ZDC(ExRootTreeWriter *treeWriter,ExRootTreeBranch *branchZDC,TRootGenParticle *particle);
+   void RomanPots(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchRP220,ExRootTreeBranch *branchFP420,TRootGenParticle *particle) ;
 
-  bool relative_energy;
-  int kickers_on;
-
- H_BeamLine* beamline1;
- H_BeamLine* beamline2;
+   bool relative_energy;
+   int kickers_on;
 
  private:
- 
- RESOLution *DET;
+   H_BeamLine* beamline1;
+   H_BeamLine* beamline2;
+   RESOLution *DET;
 
 };
