Index: trunk/interface/SmearUtil.h
===================================================================
--- trunk/interface/SmearUtil.h	(revision 260)
+++ trunk/interface/SmearUtil.h	(revision 264)
@@ -40,4 +40,6 @@
 #include "TLorentzVector.h"
 
+#include "D_Constants.h"
+#include "CaloUtil.h"
 #include "BlockClasses.h"
 #include "TSimpleArray.h"
@@ -46,30 +48,31 @@
 using namespace std;
 
-class ParticleUtil {
+class D_Particle {
 
  public:
-  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]
+  D_Particle(const TLorentzVector & p, const int pid, const float etacalo, const float phicalo) : 
+	_fourmomentum(p), _pid(pid), _etaCalo(etacalo), _phiCalo(phicalo) {}
+  //D_Particle(const float e, const float eta, const float phi, const float pt, const int pid) : 
+  //    _pid(pid), _etaCalo(UNDEFINED), _phiCalo(UNDEFINED) { TLorentzVector p; p.SetPtEtaPhiE(pt,eta,phi,e); _fourmomentum = p; }
+  D_Particle(const float px, const float py, const float pz, const float e, const int pid) :
+	_fourmomentum(px,py,pz,e), _pid(pid), _etaCalo(UNDEFINED), _phiCalo(UNDEFINED) {}
+
+  const float E() const {return _fourmomentum.E();}    // particle energy [GeV]
+  const float Px() const {return _fourmomentum.Px();}  // horizontal coordinate of momentum [GeV]
+  const float Py() const {return _fourmomentum.Py();}  // vertical coordinate of momentum [GeV]
+  const float Pz() const {return _fourmomentum.Pz();}  // longitudinal coordinate of momentum [GeV]
+  const float Pt() const {return _fourmomentum.Pt();}  // transverse momentum [GeV]
+  const float EtaCalo() const {return _etaCalo;}  // pseudorapidity 
+  const float Eta() const {return _fourmomentum.Eta();}  // pseudorapidity 
+  const float PhiCalo() const {return _phiCalo;}  // azimuthal angle 
+  const float Phi() const  {return _fourmomentum.Phi();}  // azimuthal angle 
+  const int PID() const {return _pid;}  // particle energy in [GeV]
+  const TLorentzVector& getFourMomentum() const {return _fourmomentum;}
 
  private:
-  float _e, _px, _py, _pz, _pt;
-  float _eta, _etaCalo, _phi, _phiCalo; 
+  TLorentzVector _fourmomentum;
   int _pid;
+  float _etaCalo, _phiCalo; 
 };
-
-#ifndef __PI__
-#define __PI__
-extern const float pi = 3.14159265358979312;
-#endif 
 
 class RESOLution
@@ -93,8 +96,8 @@
   float VFD_s_zdc;   // distance of the Zero Degree Calorimeter, from the Interaction poin, in [m]
 
-  float  RP_220_s; // distance of the RP to the IP, in meters
-  float  RP_220_x; // distance of the RP to the beam, in meters
-  float  RP_420_s; // distance of the RP to the IP, in meters
-  float  RP_420_x; // distance of the RP to the beam, in meters
+  float RP_220_s; // distance of the RP to the IP, in meters
+  float RP_220_x; // distance of the RP to the beam, in meters
+  float RP_420_s; // distance of the RP to the IP, in meters
+  float RP_420_x; // distance of the RP to the beam, in meters
   string RP_beam1Card; // 
   string RP_beam2Card; // 
@@ -186,4 +189,5 @@
  int FLAG_bfield;               //flag for bfield propagation
  int FLAG_vfd;                  //flag for very forward detector
+ int FLAG_zdc;                  //flag for very forward detector
  
  int NEvents_Frog;
@@ -191,5 +195,6 @@
 
   // to sort a vector
-  void SortedVector(vector<ParticleUtil> &vect);
+  //void SortedVector(vector<ParticleUtil> &vect);
+  void SortedVector(vector<D_Particle> &vect);
 
   /// Reads the data card for the initialisation of the parameters 
@@ -227,33 +232,4 @@
 
 };
-
-
-// particles PID (PDG ID)
-const int pU   = 1;    // c quark
-const int pD   = 2;    // b quark
-const int pS   = 3;    // s quark
-const int pC   = 4;    // c quark
-const int pB   = 5;    // b quark
-const int pE   = 11;   // e
-const int pNU1 = 12;   // nu_e
-const int pMU  = 13;   // mu
-const int pNU2 = 14;   // nu_mu
-const int pTAU = 15;   // tau
-const int pNU3 = 16;   // nu_tau
-const int pGLUON = 21; // gluon
-const int pGAMMA = 22; // gamma
-const int pW   = 24;   // W
-const int pP   = 2212; // proton
-const int pN   = 2112; // neutron
-const int pPI0 = 111;  // pi_0
-const int pK0L = 130;  // K^0_L
-const int pK0S = 310;  // K^0_S
-const int pLAMBDA = 3122; // Lambda
-const int pSIGMA0 = 3212;  // Sigma^0
-const int pDELTA0 = 2114;  // Delta^0
-
-const double speed_of_light = 299792458; // m/s
-const float UNDEFINED=-9999.;
-
 
 // ** returns the sign (+1 or -1) or an integer
