Index: trunk/src/BFieldProp.cc
===================================================================
--- trunk/src/BFieldProp.cc	(revision 261)
+++ trunk/src/BFieldProp.cc	(revision 264)
@@ -36,4 +36,5 @@
 
 //------------------------------------------------------------------------------
+extern const float UNDEFINED;
 
 TrackPropagation::TrackPropagation(){
@@ -315,9 +316,11 @@
 
 
-void TrackPropagation::bfield(const TRootGenParticle *Part, float& etacalo, float& phicalo) {
+void TrackPropagation::bfield(TRootGenParticle *Part) {
 
   // initialisation, valid for z_max==0, R_max==0 and q==0
-  etacalo = Part->Eta;
-  phicalo = -atan2(Part->Px,Part->Py);
+  Part->EtaCalo = Part->Eta;
+  Part->PhiCalo = Part->Phi;//-atan2(Part->Px,Part->Py);
+
+  if (!DET->FLAG_bfield ) return;
 
   q  = Charge(Part->PID);
@@ -386,5 +389,5 @@
 	      Eta_t = - log(tan(Theta_t/2.));
       } else{
-		Theta_t=0; Eta_t = 9999;
+		Theta_t=0; Eta_t = UNDEFINED;
       }
 /*	Not needed here. but these formulae are correct -------
@@ -399,6 +402,6 @@
         momentum.SetPxPyPzE(Px_t,Py_t,Pz_t,E_t);
 */
-	etacalo = Eta_t;
-	phicalo = Phi_t;
+	Part->EtaCalo = Eta_t;
+	Part->PhiCalo = Phi_t;
 	return;
 // test zone ---
@@ -436,5 +439,5 @@
 
   } else { // if B_x or B_y are non zero: longer computation
-
+//cout << "bfield de loic\n";
   float Xvertex1 = Part->X;
   float Yvertex1 = Part->Y;
@@ -511,6 +514,6 @@
   if(x!=0 && y!=0 && z!=0) {
           Theta = atan2(sqrt(r2),z);
-          etacalo  = -log(tan(Theta/2.));
-	  phicalo = atan2(y,x);
+          Part->EtaCalo  = -log(tan(Theta/2.));
+	  Part->PhiCalo = atan2(y,x);
 	  //momentum.SetPtEtaPhiE(Part->PT,eta,phi,Part->E);
   }
Index: trunk/src/CaloUtil.cc
===================================================================
--- trunk/src/CaloUtil.cc	(revision 264)
+++ trunk/src/CaloUtil.cc	(revision 264)
@@ -0,0 +1,217 @@
+/*
+  ---- Delphes ----
+  A Fast Simulator for general purpose LHC detector
+  S. Ovyn ~~~~ severine.ovyn@uclouvain.be
+  
+  Center for Particle Physics and Phenomenology (CP3)
+  Universite Catholique de Louvain (UCL)
+  Louvain-la-Neuve, Belgium
+*/
+
+/// \file D_CaloUtil.cc
+/// \brief Implementation of D_CaloElement, D_CaloResolution and D_CaloList classes
+
+#include "CaloUtil.h"
+#include <cmath>
+#include <algorithm>
+#include <iostream>
+#include "TRandom.h"
+
+D_CaloElement& D_CaloElement::operator=(const D_CaloElement& calo) {
+  if(this == &calo) return *this;
+   _name   = calo._name;
+   _etamin = calo._etamin;
+   _etamax = calo._etamax;
+   _resol_em = calo._resol_em;
+   _resol_had= calo._resol_had;
+  return *this;
+}
+
+D_CaloResolution& D_CaloResolution::operator=(const D_CaloResolution& resolution) {
+  if(this == &resolution) return *this;
+  _c = resolution._c;
+  _n = resolution._n;
+  _s = resolution._s;
+  return *this;
+}
+
+void D_CaloResolution::print() const {
+  std::cout << "C: " << _c << "  N:" << _n << "  S:" << _s << std::endl;
+}
+
+const D_CaloElement& D_CaloList::getElement(const float eta) const {
+   for (unsigned int i=0; i<_calorimeters.size(); i++) {
+      if(_calorimeters[i].getEtamin() < eta && eta < _calorimeters[i].getEtamax()) return _calorimeters[i];
+   } 
+   // if not found
+   return dummyCalo;
+}
+
+void D_CaloList::addElement(const D_CaloElement & calo) {
+  _sorted = false;
+  _calorimeters.push_back(calo);
+}
+
+void D_CaloList::sortElements() {
+  // here: it sorts the elements with respect to their eta
+  sort(_calorimeters.begin(),_calorimeters.end(),ordering());
+ 
+   for (unsigned int i=0; i<_calorimeters.size()-1; i++) {
+	if(_calorimeters[i].getEtamax() > _calorimeters[i+1].getEtamin() ) {
+		_etamin = UNDEFINED;
+		_etamax = UNDEFINED;
+		cerr << "** Error: the calorimeter list should never contain overlapping    **"<< endl;
+		cerr << "**    calorimeters.                                                **"<< endl;
+		return;
+	}		
+   }
+  _etamin = _calorimeters[0].getEtamin();
+  _etamax = _calorimeters[_calorimeters.size()-1].getEtamax();
+  _sorted = true;
+}
+
+D_CaloList& D_CaloList::operator=(const D_CaloList& list) {
+  if(this == &list) return *this;
+    _calorimeters = list._calorimeters;
+    _etamin       = list._etamin;
+    _etamax       = list._etamax;
+    _sorted       = list._sorted;
+  return *this;
+}
+
+void D_CaloList::print() const {
+  if(_sorted) cout << "The list has been sorted\n"; 
+  else cout << "The list has not been sorted\n";
+
+  for (unsigned int i=0; i<_calorimeters.size(); i++) {
+	std::cout << _calorimeters[i].getName() << " " << _calorimeters[i].getEtamin() << 
+                                                   " " << _calorimeters[i].getEtamax() << std::endl;	  
+        _calorimeters[i].getElectromagneticResolution().print();
+        _calorimeters[i].getHadronicResolution().print();
+  }
+
+}
+
+
+
+
+
+
+
+
+D_CaloTower::D_CaloTower(const float iEta, const float iPhi) : 
+	_eta(iEta), _phi(iPhi), _Eem(UNDEFINED), _Ehad(UNDEFINED), _E(UNDEFINED), _ET(UNDEFINED) {}
+
+D_CaloTower::D_CaloTower(const D_CaloTower& tower) : 
+	_eta(tower._eta), _phi(tower._phi), _Eem(tower._Eem), 
+        _Ehad(tower._Ehad), _E(tower._E), _ET(tower._ET) {}
+
+D_CaloTower& D_CaloTower::operator=(const D_CaloTower& tower) {
+   if(this==&tower) return *this;
+	_eta  = tower._eta; 	_phi  = tower._phi; 
+        _Eem  = tower._Eem; 	_Ehad = tower._Ehad;
+        _E    = tower._E; 	_ET   = tower._ET;
+   return *this;
+}
+
+
+const float D_CaloResolution::Smear(const float energy) const {
+    float sE = gRandom->Gaus(energy,
+           sqrt( pow(_n,2) +
+                 pow(_c*energy,2) +
+                 pow(_s*sqrt(energy),2) ));
+    return (sE>0)? sE : 0;
+}
+
+const bool D_CaloTower::operator==(const D_CaloTower& el) const { if (this == &el) return true; return this->_eta==el._eta && this->_phi == el._phi;}
+
+void D_CaloTowerList::addTower(const D_CaloTower& tower) {
+  _calotowers.push_back(tower);
+  _sorted = false;
+  _merged = false;
+}
+
+D_CaloTowerList& D_CaloTowerList::operator=(const D_CaloTowerList& list) {
+  if(this==&list) return *this;
+     _calotowers = list._calotowers;
+     _sorted = list._sorted;
+     _merged = list._merged;
+  return *this;
+}
+
+void D_CaloTowerList::sortElements() {
+  _sorted = true;
+  if(_calotowers.size()==0) return;
+  sort(_calotowers.begin(),_calotowers.end(),ordering());
+}
+
+void D_CaloTowerList::mergeDuplicates() {
+  if(!_sorted) sortElements();
+  _merged = true;
+  if (_calotowers.size() ==0) { return;}
+ 
+ vector<D_CaloTower> temp;
+ temp.push_back(_calotowers[0]);
+ for (unsigned int i=1; i<_calotowers.size(); i++) {
+
+   if(temp[temp.size()-1] == _calotowers[i]) { 
+        //i.e. if towers have the same eta/phi
+	float em = temp[temp.size()-1].getEem() + _calotowers[i].getEem();
+        float had= temp[temp.size()-1].getEhad()+ _calotowers[i].getEhad();
+        temp[temp.size()-1].Set_Eem_Ehad_E_ET(em,had);
+   }
+   else temp.push_back(_calotowers[i]); 
+
+ } 
+   _calotowers = temp;
+}
+
+void D_CaloTowerList::print() const {
+  for (unsigned int i=0; i<_calotowers.size(); i++) {
+      std::cout << _calotowers[i].getEta() << " " <<
+              _calotowers[i].getPhi() << " " <<
+              _calotowers[i].getEem() << " " <<
+              _calotowers[i].getEhad() << std::endl;
+  }
+}
+
+void D_CaloTowerList::smearTowers(const D_CaloList& list_of_calorimeters) {
+   for (unsigned int i=0; i<_calotowers.size(); i++) {
+         // first, finds in which calo the tower is, in order to have its resolution em /had
+         D_CaloElement currentCalo = list_of_calorimeters.getElement(_calotowers[i].getEta() );
+         // then, smears separately the em and had parts
+         float sEem  = currentCalo.getElectromagneticResolution().Smear( _calotowers[i].getEem() );
+         float sEhad = currentCalo.getHadronicResolution().Smear( _calotowers[i].getEhad() );
+         // finally, sets the tower smeared energy
+         _calotowers[i].Set_Eem_Ehad_E_ET(sEem,sEhad);
+   }
+}
+
+
+const bool D_CaloTower::operator>(const D_CaloTower& tocomp) const {
+        if(_eta == tocomp._eta) {
+                if(_phi > tocomp._phi) return true;
+                else return false;
+        }
+        else if(_eta > tocomp._eta)  return true;
+             else  return false;
+};
+
+const bool D_CaloTower::operator<(const D_CaloTower& tocomp) const {
+        if(_eta == tocomp._eta) {
+                if(_phi < tocomp._phi) return true;
+                else return false;
+        }
+        else if(_eta < tocomp._eta)  return true;
+             else  return false;
+};
+
+const D_CaloTower& D_CaloTowerList::getElement(const float eta, const float phi) {
+  if(!_sorted) sortElements();
+  for (unsigned int i=0; i< _calotowers.size(); i++) {
+	if(_calotowers[i].getEta() == eta &&
+	   _calotowers[i].getPhi() == phi )
+		return _calotowers[i];
+  }
+  return dummyTower; // if not found
+}
Index: trunk/src/D_Constants.cc
===================================================================
--- trunk/src/D_Constants.cc	(revision 264)
+++ trunk/src/D_Constants.cc	(revision 264)
@@ -0,0 +1,1 @@
+#include "D_Constants.h"
Index: trunk/src/HEPEVTConverter.cc
===================================================================
--- trunk/src/HEPEVTConverter.cc	(revision 261)
+++ trunk/src/HEPEVTConverter.cc	(revision 264)
@@ -1,2 +1,34 @@
+/***********************************************************************
+**                                                                    **
+**          /----------------------------------------------\          **
+**         |  Delphes, a framework for the fast simulation  |         **
+**         |       of a  generic collider experiment        |         **
+**          \----------------------------------------------/          **
+**                                                                    **
+**                                                                    **
+**   This package uses:                                               **
+**   ------------------                                               **
+**   FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]      ** 
+**   Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]       ** 
+**   FROG: [hep-ex/0901.2718v1]                                       **
+**                                                                    **
+** ------------------------------------------------------------------ **
+**                                                                    **
+**   Main authors:                                                    **
+**   -------------                                                    **
+**                                                                    **
+**                Severine Ovyn                Xavier Rouby           ** 
+**          severine.ovyn@uclouvain.be      xavier.rouby@cern         ** 
+**                                                                    ** 
+**         Center for Particle Physics and Phenomenology (CP3)        ** 
+**                Universite catholique de Louvain (UCL)              **       
+**                     Louvain-la-Neuve, Belgium                      **            
+**                                                                    **
+**                      Copyright (C) 2008-2009,                      **
+**                        All rights reserved.                        **  
+**                                                                    **
+***********************************************************************/
+
+
 #include <iostream>
 #include <utility>
Index: trunk/src/LHEFConverter.cc
===================================================================
--- trunk/src/LHEFConverter.cc	(revision 261)
+++ trunk/src/LHEFConverter.cc	(revision 264)
@@ -1,2 +1,34 @@
+/***********************************************************************
+**                                                                    **
+**          /----------------------------------------------\          **
+**         |  Delphes, a framework for the fast simulation  |         **
+**         |       of a  generic collider experiment        |         **
+**          \----------------------------------------------/          **
+**                                                                    **
+**                                                                    **
+**   This package uses:                                               **
+**   ------------------                                               **
+**   FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]      ** 
+**   Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]       ** 
+**   FROG: [hep-ex/0901.2718v1]                                       **
+**                                                                    **
+** ------------------------------------------------------------------ **
+**                                                                    **
+**   Main authors:                                                    **
+**   -------------                                                    **
+**                                                                    **
+**                Severine Ovyn                Xavier Rouby           ** 
+**          severine.ovyn@uclouvain.be      xavier.rouby@cern         ** 
+**                                                                    ** 
+**         Center for Particle Physics and Phenomenology (CP3)        ** 
+**                Universite catholique de Louvain (UCL)              **       
+**                     Louvain-la-Neuve, Belgium                      **            
+**                                                                    **
+**                      Copyright (C) 2008-2009,                      **
+**                        All rights reserved.                        **  
+**                                                                    **
+***********************************************************************/
+
+
 #include <iostream>
 #include <fstream>
Index: trunk/src/STDHEPConverter.cc
===================================================================
--- trunk/src/STDHEPConverter.cc	(revision 261)
+++ trunk/src/STDHEPConverter.cc	(revision 264)
@@ -1,11 +1,33 @@
-/*
-  ---- Delphes ----
-  A Fast Simulator for general purpose LHC detector
-  S. Ovyn ~~~~ severine.ovyn@uclouvain.be
-
-  Center for Particle Physics and Phenomenology (CP3)
-  Universite Catholique de Louvain (UCL)
-  Louvain-la-Neuve, Belgium
-*/
+/***********************************************************************
+**                                                                    **
+**          /----------------------------------------------\          **
+**         |  Delphes, a framework for the fast simulation  |         **
+**         |       of a  generic collider experiment        |         **
+**          \----------------------------------------------/          **
+**                                                                    **
+**                                                                    **
+**   This package uses:                                               **
+**   ------------------                                               **
+**   FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]      ** 
+**   Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]       ** 
+**   FROG: [hep-ex/0901.2718v1]                                       **
+**                                                                    **
+** ------------------------------------------------------------------ **
+**                                                                    **
+**   Main authors:                                                    **
+**   -------------                                                    **
+**                                                                    **
+**                Severine Ovyn                Xavier Rouby           ** 
+**          severine.ovyn@uclouvain.be      xavier.rouby@cern         ** 
+**                                                                    ** 
+**         Center for Particle Physics and Phenomenology (CP3)        ** 
+**                Universite catholique de Louvain (UCL)              **       
+**                     Louvain-la-Neuve, Belgium                      **            
+**                                                                    **
+**                      Copyright (C) 2008-2009,                      **
+**                        All rights reserved.                        **  
+**                                                                    **
+***********************************************************************/
+
 
 #include <iostream>
Index: trunk/src/SmearUtil.cc
===================================================================
--- trunk/src/SmearUtil.cc	(revision 261)
+++ trunk/src/SmearUtil.cc	(revision 264)
@@ -30,4 +30,5 @@
 ***********************************************************************/
 
+
 /// \file SmearUtil.cc
 /// \brief RESOLution class, and some generic definitions
@@ -42,18 +43,4 @@
 #include <iomanip>
 using namespace std;
-
-
-ParticleUtil::ParticleUtil(const TLorentzVector &genMomentum, int pid) {
-  _pid=pid;
-  _e = genMomentum.E();
-  _px = genMomentum.Px();
-  _py = genMomentum.Py();
-  _pz = genMomentum.Pz();
-  _pt = genMomentum.Pt();
-
-  //_e, _px, _py, _pz, _pt;
-  //float _eta, _etaCalo, _phi, _phiCalo;
-  //int _pid;
-}
 
 //------------------------------------------------------------------------------
@@ -78,8 +65,8 @@
   // Energy resolution for hadrons in ecal/hcal/hf
   // \sigma/E = C + N/E + S/\sqrt{E}
-  HAD_Shcal         = 1.5;               // S term for central HCAL 
+  HAD_Shcal         = 1.5;               // S term for central HCAL
   HAD_Nhcal         = 0.;                // N term for central HCAL
   HAD_Chcal         = 0.05;              // C term for central HCAL
-  HAD_Shf           = 2.7;               // S term for FCAL
+  HAD_Shf           = 2.7;               // S term for FCAL 
   HAD_Nhf           = 0.;                // N term for FCAL
   HAD_Chf           = 0.13;              // C term for FCAL
@@ -128,4 +115,5 @@
   FLAG_bfield      = 1;                       //1 to run the bfield propagation else 0
   FLAG_vfd         = 1;                       //1 to run the very forward detectors else 0
+  FLAG_zdc         = 1;                       //1 to run the zero degree calorimeter else 0
   FLAG_trigger     = 1;                       //1 to run the trigger selection else 0
   FLAG_frog        = 1;                       //1 to run the FROG event display
@@ -186,6 +174,4 @@
   RP_cross_y        = 0.0;
   RP_cross_ang      = 142.5;
-
-
   
 }
@@ -250,4 +236,5 @@
   FLAG_bfield      = DET.FLAG_bfield;
   FLAG_vfd         = DET.FLAG_vfd;
+  FLAG_zdc         = DET.FLAG_zdc;
   FLAG_trigger     = DET.FLAG_trigger;
   FLAG_frog        = DET.FLAG_frog;
@@ -279,5 +266,4 @@
   RP_IP_name        = DET.RP_IP_name;
 
-
   // In case FROG event display allowed
   NEvents_Frog      = DET.NEvents_Frog;
@@ -364,4 +350,5 @@
   FLAG_bfield      = DET.FLAG_bfield;
   FLAG_vfd         = DET.FLAG_vfd;
+  FLAG_zdc         = DET.FLAG_zdc;
   FLAG_trigger     = DET.FLAG_trigger;
   FLAG_frog        = DET.FLAG_frog;
@@ -504,4 +491,5 @@
 
     else if(strstr(temp_string.c_str(),"FLAG_vfd"))         {curstring >> varname >> ivalue; FLAG_vfd         = ivalue;}
+    else if(strstr(temp_string.c_str(),"FLAG_zdc"))         {curstring >> varname >> ivalue; FLAG_zdc         = ivalue;}
     else if(strstr(temp_string.c_str(),"FLAG_trigger"))     {curstring >> varname >> ivalue; FLAG_trigger     = ivalue;}
     else if(strstr(temp_string.c_str(),"FLAG_frog"))        {curstring >> varname >> ivalue; FLAG_frog        = ivalue;}
@@ -604,5 +592,5 @@
   if(FLAG_vfd==1){
     f_out<<"#**********************************                                  *"<<"\n";
-    f_out<<"# Very forward detector switches on                                  *"<<"\n";
+    f_out<<"# Very forward detector switched on                                  *"<<"\n";
     f_out<<"#**********************************                                  *"<<"\n";
     f_out<<"*                                                                    *"<<"\n";
@@ -639,10 +627,9 @@
     f_out << left << setw(44) <<"* Angle of  beam crossing:"<<""
           << left << setw(6) <<RP_cross_ang           <<""<< right << setw(20)<<"! not in datacard  *"<<"\n";
-
     f_out<<"*                                                                    *"<<"\n";
   }
   else {
     f_out<<"#***********************************                                 *"<<"\n";
-    f_out<<"# Very forward detector switches off                                 *"<<"\n";
+    f_out<<"# Very forward detector switched off                                 *"<<"\n";
     f_out<<"#***********************************                                 *"<<"\n";
     f_out<<"*                                                                    *"<<"\n";
@@ -692,5 +679,5 @@
   if(FLAG_bfield==1){
     f_out<<"#***************************                                         *"<<"\n";
-    f_out<<"# Magnetic field switches on                                         *"<<"\n";
+    f_out<<"# Magnetic field switched on                                         *"<<"\n";
     f_out<<"#***************************                                         *"<<"\n";
     f_out<<"*                                                                    *"<<"\n";
@@ -713,5 +700,5 @@
   else {
     f_out<<"#****************************                                        *"<<"\n";
-    f_out<<"# Magnetic field switches off                                        *"<<"\n";
+    f_out<<"# Magnetic field switched off                                        *"<<"\n";
     f_out<<"#****************************                                        *"<<"\n";
     f_out << left << setw(55) <<"* Minimal pT needed to reach the calorimeter [GeV]: "<<""
@@ -953,5 +940,6 @@
 //******************************************************************************************
 
-void RESOLution::SortedVector(vector<ParticleUtil> &vect)
+//void RESOLution::SortedVector(vector<ParticleUtil> &vect)
+void RESOLution::SortedVector(vector<D_Particle> &vect)
 {
   int i,j = 0;
@@ -966,5 +954,6 @@
           if ( vect[j].Pt() > vect[j-1].Pt() )
              {
-               ParticleUtil tmp = vect[j-1];
+               //ParticleUtil tmp = vect[j-1];
+               D_Particle tmp = vect[j-1];
                vect[j-1] = vect[j];
                vect[j] = tmp;
@@ -1062,6 +1051,6 @@
   //********** returns a segmented value for eta and phi, for calo towers *****
 void RESOLution::BinEtaPhi(const float phi, const float eta, float& iPhi, float& iEta){
-   iEta = -100; 
-   int index=-100;
+   iEta = UNDEFINED; 
+   int index= iUNDEFINED;
    for (unsigned int i=1; i< TOWER_number+1; i++) {
 	if(fabs(eta)>TOWER_eta_edges[i-1] && fabs(eta)<TOWER_eta_edges[i]) {
@@ -1072,6 +1061,6 @@
 	}
    }
-   if(index==-100) return; 
-   iPhi = -100;
+   if(index==UNDEFINED) return; 
+   iPhi = UNDEFINED;
    float dphi = TOWER_dphi[index]*pi/180.; 
    for (unsigned int i=1; i < 360/TOWER_dphi[index]; i++ ) {
@@ -1085,4 +1074,6 @@
    if (phi > pi-dphi) iPhi = pi-dphi;
 }
+
+
 
 //**************************** Returns the delta Phi ****************************
Index: trunk/src/TreeClasses.cc
===================================================================
--- trunk/src/TreeClasses.cc	(revision 261)
+++ trunk/src/TreeClasses.cc	(revision 264)
@@ -1,2 +1,34 @@
+/***********************************************************************
+**                                                                    **
+**          /----------------------------------------------\          **
+**         |  Delphes, a framework for the fast simulation  |         **
+**         |       of a  generic collider experiment        |         **
+**          \----------------------------------------------/          **
+**                                                                    **
+**                                                                    **
+**   This package uses:                                               **
+**   ------------------                                               **
+**   FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]      ** 
+**   Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]       ** 
+**   FROG: [hep-ex/0901.2718v1]                                       **
+**                                                                    **
+** ------------------------------------------------------------------ **
+**                                                                    **
+**   Main authors:                                                    **
+**   -------------                                                    **
+**                                                                    **
+**                Severine Ovyn                Xavier Rouby           ** 
+**          severine.ovyn@uclouvain.be      xavier.rouby@cern         ** 
+**                                                                    ** 
+**         Center for Particle Physics and Phenomenology (CP3)        ** 
+**                Universite catholique de Louvain (UCL)              **       
+**                     Louvain-la-Neuve, Belgium                      **            
+**                                                                    **
+**                      Copyright (C) 2008-2009,                      **
+**                        All rights reserved.                        **  
+**                                                                    **
+***********************************************************************/
+
+
 #include "TreeClasses.h"
 
Index: trunk/src/TreeClassesLinkDef.h
===================================================================
--- trunk/src/TreeClassesLinkDef.h	(revision 261)
+++ trunk/src/TreeClassesLinkDef.h	(revision 264)
@@ -1,2 +1,34 @@
+/***********************************************************************
+**                                                                    **
+**          /----------------------------------------------\          **
+**         |  Delphes, a framework for the fast simulation  |         **
+**         |       of a  generic collider experiment        |         **
+**          \----------------------------------------------/          **
+**                                                                    **
+**                                                                    **
+**   This package uses:                                               **
+**   ------------------                                               **
+**   FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]      ** 
+**   Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]       ** 
+**   FROG: [hep-ex/0901.2718v1]                                       **
+**                                                                    **
+** ------------------------------------------------------------------ **
+**                                                                    **
+**   Main authors:                                                    **
+**   -------------                                                    **
+**                                                                    **
+**                Severine Ovyn                Xavier Rouby           ** 
+**          severine.ovyn@uclouvain.be      xavier.rouby@cern         ** 
+**                                                                    ** 
+**         Center for Particle Physics and Phenomenology (CP3)        ** 
+**                Universite catholique de Louvain (UCL)              **       
+**                     Louvain-la-Neuve, Belgium                      **            
+**                                                                    **
+**                      Copyright (C) 2008-2009,                      **
+**                        All rights reserved.                        **  
+**                                                                    **
+***********************************************************************/
+
+
 #include "interface/TreeClasses.h"
 
Index: trunk/src/TriggerUtil.cc
===================================================================
--- trunk/src/TriggerUtil.cc	(revision 261)
+++ trunk/src/TriggerUtil.cc	(revision 264)
@@ -132,4 +132,6 @@
 
 //*************************************************************************
+TriggerBit::TriggerBit() {
+}
 
 TriggerBit::~TriggerBit() {
@@ -143,5 +145,4 @@
 	EtmisValues.clear();
 	GammaValues.clear();
-
 }
 
@@ -153,5 +154,4 @@
         IElecValues.push_back(tb.IElecValues[i]);
 
-
   for(unsigned int i=0; i<tb.MuonValues.size(); i++)
 	MuonValues.push_back(tb.MuonValues[i]);
@@ -165,5 +165,4 @@
   for(unsigned int i=0; i<tb.BjetValues.size(); i++)
         BjetValues.push_back(tb.BjetValues[i]);
-
 
   for(unsigned int i=0; i<tb.TauJetValues.size(); i++)
@@ -218,9 +217,8 @@
       TClonesArray *branchPhotonTrig,  TClonesArray *branchETmisTrig)
 {
-
   TSimpleArray<TRootJet> bjets=SubArrayBjets(branchJetTrig);
   TSimpleArray<TRootElectron> Ielectron=SubArrayIElec(branchElecTrig);
   TSimpleArray<TRootMuon> Imuon=SubArrayIMuon(branchMuonTrig);
- 
+
   int elec_size = ElecValues.size();
   int Ielec_size = IElecValues.size();
@@ -263,5 +261,4 @@
         }
 
-
       if(muon_size!=0){
         TRootMuon *muon;
@@ -287,10 +284,4 @@
            if(jet->PT < JetValues[i])Result=false;}}
 
-      if(jet_size!=0){
-        TRootJet *jet;
-        for(int i=0;i<jet_size;i++){
-           jet = (TRootJet*)branchJetTrig->At(i);
-           if(jet->PT < JetValues[i])Result=false;}}
-
       if(bjet_size!=0)
         {
@@ -304,5 +295,4 @@
         }
 
-
       if(taujet_size!=0){
         TRootTauJet *taujet;
@@ -338,5 +328,4 @@
   vector<string> BjetSequences;
 
-///  char *result =NULL;
   char * result = new char[256];
   result = strtok( (char*) trigger_algorithm.c_str(),"&");
@@ -354,5 +343,5 @@
        result = strtok( NULL,"&");
      }
-  delete result;
+  delete [] result;
 
   ElecValues = GetCuts(ElecSequences);
@@ -368,4 +357,5 @@
 }
 
+
 void TriggerBit::PrintTrigCondition(const string& LogName,const int i) 
 {
@@ -379,5 +369,5 @@
   int etmis_size = TriggerBit::EtmisValues.size();
   int bjets_size = TriggerBit::BjetValues.size();
-  
+
   ofstream f_out(LogName.c_str(),ios::app);
 
@@ -439,4 +429,5 @@
    }
   return OrderedValue;
+
 }
 
@@ -480,3 +471,2 @@
 }
 
-
