Index: /trunk/Delphes.cpp
===================================================================
--- /trunk/Delphes.cpp	(revision 70)
+++ /trunk/Delphes.cpp	(revision 71)
@@ -55,10 +55,11 @@
   char *appargv[] = {appName, "-b"};
   TApplication app(appName, &appargc, appargv);
-  
-  if(argc != 4 && argc != 3) {
-      cout << " Usage: " << argv[0] << " input_file" << " output_file" << " data_card " << endl;
+
+  if(argc != 4 && argc != 3 && argc != 5) {
+      cout << " Usage: " << argv[0] << " input_file output_file [detector_card] [trigger_card] " << endl;
       cout << " input_list - list of files in Ntpl, StdHep of LHEF format," << endl;
       cout << " output_file - output file." << endl;
-      cout << " data_card - Datacard containing resolution variables for the detector simulation (optional) "<<endl;
+      cout << " detector_card - Datacard containing resolution variables for the detector simulation (optional) "<<endl;
+      cout << " trigger_card - Datacard containing the trigger algorithms (optional) "<<endl;
       exit(1);
   }
@@ -93,11 +94,7 @@
   DET->Logfile(LogName);
 
-
   //Trigger information
-  TriggerTable *TRIGT = new TriggerTable();
-  TRIGT->TriggerCardReader("data/trigger.dat");
-  TRIGT->PrintTriggerTable(LogName);
-  //outputFile->Close();
-  
+  //Trigger *TRIG = new Trigger();
+  //TRIG->TriggerReader("data/trigger.dat");
 
   //Propagation of tracks in the B field
@@ -231,5 +228,5 @@
             { 
             genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E);
-            //TRACP->Propagation(particle,genMomentum);
+            TRACP->Propagation(particle,genMomentum);
             float eta=fabs(genMomentum.Eta());
             switch(pid) {
@@ -271,8 +268,9 @@
 		// back of the input_particles vector
 		input_particles.push_back(fastjet::PseudoJet(genMomentum.Px(),genMomentum.Py(),genMomentum.Pz(), genMomentum.E())); 
-  
+                
                 genMomentumCalo.SetPxPyPzE(CaloTower.fourVector.px,CaloTower.fourVector.py,CaloTower.fourVector.pz,CaloTower.fourVector.E);
 		elementCalo = (TRootCalo*) branchCalo->NewEntry();
 		elementCalo->Set(genMomentumCalo);
+		DET->BinEtaPhi(genMomentumCalo.Phi(), genMomentumCalo.Eta(), elementCalo->Phi, elementCalo->Eta);
 	      }
 	    }
@@ -304,19 +302,5 @@
 	  
 	} // while
-
-   // computes the Missing Transverse Momentum
-   TLorentzVector Att(0.,0.,0.,0.);
-   for(unsigned int i=0; i < towers.size(); i++)
-     {
-        Att.SetPxPyPzE(towers[i].fourVector.px,towers[i].fourVector.py,towers[i].fourVector.pz,towers[i].fourVector.E);
-        PTmis = PTmis + Att;
-     }
-   elementEtmis = (TRootETmis*) branchETmis->NewEntry();
-   elementEtmis->ET = (PTmis).Pt();
-   elementEtmis->Phi = (-PTmis).Phi();
-   elementEtmis->Px = (-PTmis).Px();
-   elementEtmis->Py = (-PTmis).Py();
-   //*****************************
-   
+      
       for(unsigned int i=0; i < electron.size(); i++) {
 	if(electron[i].E()!=0 && fabs(electron[i].Eta()) < DET->MAX_TRACKER && electron[i].Pt() > DET->ELEC_pt)
@@ -338,4 +322,20 @@
       }
       
+      // computes the Missing Transverse Momentum
+      TLorentzVector Att(0.,0.,0.,0.);
+      for(unsigned int i=0; i < towers.size(); i++)
+        {
+          Att.SetPxPyPzE(towers[i].fourVector.px,towers[i].fourVector.py,towers[i].fourVector.pz,towers[i].fourVector.E);
+          PTmis = PTmis + Att;
+        }
+      elementEtmis = (TRootETmis*) branchETmis->NewEntry();
+      elementEtmis->ET = (PTmis).Pt();
+      elementEtmis->Phi = (-PTmis).Phi();
+      elementEtmis->Px = (-PTmis).Px();
+      elementEtmis->Py = (-PTmis).Py();
+
+      //*****************************
+      treeWriter->Fill();
+      
       sorted_jets=JETRUN->RunJets(input_particles);
       JETRUN->RunJetBtagging(treeWriter, branchJet,sorted_jets,NFCentralQ);
@@ -344,50 +344,16 @@
       // Add here the trigger
       // Should test all the trigger table on the event, based on reconstructed objects
-      treeWriter->Fill();
-      
+     
     } // Loop over all events
-  
+
   treeWriter->Write();
+  
+  cout << "** Exiting..." << endl;
+  
   delete treeWriter;
-  
-  if(DET->DOTRIGGER == 1) 
-    {
-      TChain chainT("Analysis");
-      chainT.Add(outputfilename.c_str());
-      ExRootTreeReader *treeReaderT = new ExRootTreeReader(&chainT);
-      
-      const TClonesArray *branchElecTrig = treeReaderT->UseBranch("Electron");
-      const TClonesArray *branchMuonTrig = treeReaderT->UseBranch("Muon");
-      const TClonesArray *branchJetTrig = treeReaderT->UseBranch("Jet");
-      const TClonesArray *branchTauJetTrig = treeReaderT->UseBranch("TauJet");
-      const TClonesArray *branchPhotonTrig = treeReaderT->UseBranch("Photon");
-      const TClonesArray *branchETmisTrig = treeReaderT->UseBranch("ETmis");
-      
-      ExRootTreeWriter *treeWriterT = new ExRootTreeWriter(outputfilename, "Trigger");
-      ExRootTreeBranch *branchTrigger = treeWriterT->NewBranch("TrigResult", TRootTrigger::Class());
-      
-      TRootTrigger *elementTrigger;
-      
-      Long64_t entryT, allEntriesT = treeReaderT->GetEntries();
-      cout << "** Chain contains " << allEntriesT << " events" << endl;
-      for(entryT = 0; entryT < allEntriesT; ++entryT)
-        {
-	  treeWriterT->Clear();
-	  treeReaderT->ReadEntry(entry);
-          elementTrigger = (TRootTrigger*) branchTrigger->NewEntry();
-          elementTrigger->Accepted=1;
-          treeWriterT->Fill();
-        }
-      
-      treeWriterT->Write();
-      delete treeWriterT;
-    }
-  
-  cout << "** Exiting..." << endl;
-  
   delete treeReader;
   delete DET;
   if(converter) delete converter;
-  
+
   todo("TODO");
 }
Index: /trunk/Makefile
===================================================================
--- /trunk/Makefile	(revision 70)
+++ /trunk/Makefile	(revision 71)
@@ -62,26 +62,11 @@
 	Utilities/Fastjet/include/fastjet/config.h \
 	interface/TreeClasses.h
-h_bb$(ExeSuf): \
-	tmp/h_bb.$(ObjSuf)
-
-tmp/h_bb.$(ObjSuf): \
-	h_bb.cpp \
-	Utilities/ExRootAnalysis/interface/TSimpleArray.h \
-	Utilities/ExRootAnalysis/interface/TSimpleBranch.h \
-	Utilities/ExRootAnalysis/interface/BlockClasses.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeReader.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
-	interface/TUtil.h \
-	interface/h_bb.h
 EXECUTABLE =  \
 	Delphes$(ExeSuf) \
-	Resolutions$(ExeSuf) \
-	h_bb$(ExeSuf)
+	Resolutions$(ExeSuf)
 
 EXECUTABLE_OBJ =  \
 	tmp/Delphes.$(ObjSuf) \
-	tmp/Resolutions.$(ObjSuf) \
-	tmp/h_bb.$(ObjSuf)
+	tmp/Resolutions.$(ObjSuf)
 
 tmp/Utilities/ExRootAnalysis/src/BlockClassesDict.$(SrcSuf): \
@@ -99,40 +84,10 @@
 	tmp/src/TreeClassesDict.$(ObjSuf)
 
-tmp/src/h_bb.$(ObjSuf): \
-	src/h_bb.$(SrcSuf) \
-	interface/h_bb.h
-tmp/src/HEPEVTConverter.$(ObjSuf): \
-	src/HEPEVTConverter.$(SrcSuf) \
-	Utilities/ExRootAnalysis/interface/BlockClasses.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeReader.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
-	interface/HEPEVTConverter.h
-tmp/src/LHEFConverter.$(ObjSuf): \
-	src/LHEFConverter.$(SrcSuf) \
-	Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
-	Utilities/ExRootAnalysis/interface/BlockClasses.h \
-	interface/LHEFConverter.h \
-	Utilities/ExRootAnalysis/interface/LHEF.h
-tmp/src/STDHEPConverter.$(ObjSuf): \
-	src/STDHEPConverter.$(SrcSuf) \
-	Utilities/ExRootAnalysis/interface/BlockClasses.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeReader.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
-	Utilities/ExRootAnalysis/interface/LHEF.h \
-	Utilities/stdhep/stdhep_mcfio.h \
-	Utilities/stdhep/stdhep_declarations.h \
-	interface/STDHEPConverter.h
+tmp/src/JetUtils.$(ObjSuf): \
+	src/JetUtils.$(SrcSuf) \
+	interface/JetUtils.h
 tmp/src/SmearUtil.$(ObjSuf): \
 	src/SmearUtil.$(SrcSuf) \
 	interface/SmearUtil.h
-tmp/src/TreeClasses.$(ObjSuf): \
-	src/TreeClasses.$(SrcSuf) \
-	interface/TreeClasses.h
-tmp/src/TUtil.$(ObjSuf): \
-	src/TUtil.$(SrcSuf) \
-	interface/TUtil.h
 tmp/src/TriggerUtil.$(ObjSuf): \
 	src/TriggerUtil.$(SrcSuf) \
@@ -141,316 +96,323 @@
 	src/BFieldProp.$(SrcSuf) \
 	interface/BFieldProp.h
-tmp/src/JetUtils.$(ObjSuf): \
-	src/JetUtils.$(SrcSuf) \
-	interface/JetUtils.h
 tmp/src/VeryForward.$(ObjSuf): \
 	src/VeryForward.$(SrcSuf) \
 	interface/VeryForward.h \
 	interface/SmearUtil.h
-tmp/Utilities/ExRootAnalysis/src/BlockClasses.$(ObjSuf): \
-	Utilities/ExRootAnalysis/src/BlockClasses.$(SrcSuf) \
-	Utilities/ExRootAnalysis/interface/BlockClasses.h \
-	Utilities/ExRootAnalysis/interface/BlockCompare.h
+tmp/src/LHEFConverter.$(ObjSuf): \
+	src/LHEFConverter.$(SrcSuf) \
+	Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
+	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
+	Utilities/ExRootAnalysis/interface/BlockClasses.h \
+	interface/LHEFConverter.h \
+	Utilities/ExRootAnalysis/interface/LHEF.h
+tmp/src/STDHEPConverter.$(ObjSuf): \
+	src/STDHEPConverter.$(SrcSuf) \
+	Utilities/ExRootAnalysis/interface/BlockClasses.h \
+	Utilities/ExRootAnalysis/interface/ExRootTreeReader.h \
+	Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
+	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
+	Utilities/ExRootAnalysis/interface/LHEF.h \
+	Utilities/stdhep/stdhep_mcfio.h \
+	Utilities/stdhep/stdhep_declarations.h \
+	interface/STDHEPConverter.h
+tmp/src/HEPEVTConverter.$(ObjSuf): \
+	src/HEPEVTConverter.$(SrcSuf) \
+	Utilities/ExRootAnalysis/interface/BlockClasses.h \
+	Utilities/ExRootAnalysis/interface/ExRootTreeReader.h \
+	Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
+	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
+	interface/HEPEVTConverter.h
+tmp/src/TreeClasses.$(ObjSuf): \
+	src/TreeClasses.$(SrcSuf) \
+	interface/TreeClasses.h
+tmp/Utilities/ExRootAnalysis/src/ExRootTreeReader.$(ObjSuf): \
+	Utilities/ExRootAnalysis/src/ExRootTreeReader.$(SrcSuf) \
+	Utilities/ExRootAnalysis/interface/ExRootTreeReader.h
+tmp/Utilities/ExRootAnalysis/src/ExRootTreeBranch.$(ObjSuf): \
+	Utilities/ExRootAnalysis/src/ExRootTreeBranch.$(SrcSuf) \
+	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h
 tmp/Utilities/ExRootAnalysis/src/ExRootProgressBar.$(ObjSuf): \
 	Utilities/ExRootAnalysis/src/ExRootProgressBar.$(SrcSuf) \
 	Utilities/ExRootAnalysis/interface/ExRootProgressBar.h
-tmp/Utilities/ExRootAnalysis/src/ExRootTreeBranch.$(ObjSuf): \
-	Utilities/ExRootAnalysis/src/ExRootTreeBranch.$(SrcSuf) \
-	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h
-tmp/Utilities/ExRootAnalysis/src/ExRootTreeReader.$(ObjSuf): \
-	Utilities/ExRootAnalysis/src/ExRootTreeReader.$(SrcSuf) \
-	Utilities/ExRootAnalysis/interface/ExRootTreeReader.h
 tmp/Utilities/ExRootAnalysis/src/ExRootTreeWriter.$(ObjSuf): \
 	Utilities/ExRootAnalysis/src/ExRootTreeWriter.$(SrcSuf) \
 	Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
 	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h
-tmp/Utilities/Hector/src/H_AbstractBeamLine.$(ObjSuf): \
-	Utilities/Hector/src/H_AbstractBeamLine.$(SrcSuf)
-tmp/Utilities/Hector/src/H_Aperture.$(ObjSuf): \
-	Utilities/Hector/src/H_Aperture.$(SrcSuf)
-tmp/Utilities/Hector/src/H_Beam.$(ObjSuf): \
-	Utilities/Hector/src/H_Beam.$(SrcSuf)
-tmp/Utilities/Hector/src/H_BeamLine.$(ObjSuf): \
-	Utilities/Hector/src/H_BeamLine.$(SrcSuf)
-tmp/Utilities/Hector/src/H_BeamLineParser.$(ObjSuf): \
-	Utilities/Hector/src/H_BeamLineParser.$(SrcSuf)
-tmp/Utilities/Hector/src/H_BeamParticle.$(ObjSuf): \
-	Utilities/Hector/src/H_BeamParticle.$(SrcSuf)
+tmp/Utilities/ExRootAnalysis/src/BlockClasses.$(ObjSuf): \
+	Utilities/ExRootAnalysis/src/BlockClasses.$(SrcSuf) \
+	Utilities/ExRootAnalysis/interface/BlockClasses.h \
+	Utilities/ExRootAnalysis/interface/BlockCompare.h
+tmp/Utilities/Hector/src/H_Kicker.$(ObjSuf): \
+	Utilities/Hector/src/H_Kicker.$(SrcSuf)
+tmp/Utilities/Hector/src/H_HorizontalQuadrupole.$(ObjSuf): \
+	Utilities/Hector/src/H_HorizontalQuadrupole.$(SrcSuf)
+tmp/Utilities/Hector/src/H_EllipticAperture.$(ObjSuf): \
+	Utilities/Hector/src/H_EllipticAperture.$(SrcSuf)
+tmp/Utilities/Hector/src/H_RomanPot.$(ObjSuf): \
+	Utilities/Hector/src/H_RomanPot.$(SrcSuf)
 tmp/Utilities/Hector/src/H_CircularAperture.$(ObjSuf): \
 	Utilities/Hector/src/H_CircularAperture.$(SrcSuf)
+tmp/Utilities/Hector/src/H_TransportMatrices.$(ObjSuf): \
+	Utilities/Hector/src/H_TransportMatrices.$(SrcSuf)
 tmp/Utilities/Hector/src/H_Dipole.$(ObjSuf): \
 	Utilities/Hector/src/H_Dipole.$(SrcSuf)
 tmp/Utilities/Hector/src/H_Drift.$(ObjSuf): \
 	Utilities/Hector/src/H_Drift.$(SrcSuf)
-tmp/Utilities/Hector/src/H_EllipticAperture.$(ObjSuf): \
-	Utilities/Hector/src/H_EllipticAperture.$(SrcSuf)
+tmp/Utilities/Hector/src/H_Aperture.$(ObjSuf): \
+	Utilities/Hector/src/H_Aperture.$(SrcSuf)
 tmp/Utilities/Hector/src/H_HorizontalKicker.$(ObjSuf): \
 	Utilities/Hector/src/H_HorizontalKicker.$(SrcSuf)
-tmp/Utilities/Hector/src/H_HorizontalQuadrupole.$(ObjSuf): \
-	Utilities/Hector/src/H_HorizontalQuadrupole.$(SrcSuf)
-tmp/Utilities/Hector/src/H_Kicker.$(ObjSuf): \
-	Utilities/Hector/src/H_Kicker.$(SrcSuf)
+tmp/Utilities/Hector/src/H_RectangularAperture.$(ObjSuf): \
+	Utilities/Hector/src/H_RectangularAperture.$(SrcSuf)
+tmp/Utilities/Hector/src/H_VerticalQuadrupole.$(ObjSuf): \
+	Utilities/Hector/src/H_VerticalQuadrupole.$(SrcSuf)
+tmp/Utilities/Hector/src/H_VerticalKicker.$(ObjSuf): \
+	Utilities/Hector/src/H_VerticalKicker.$(SrcSuf)
+tmp/Utilities/Hector/src/H_Parameters.$(ObjSuf): \
+	Utilities/Hector/src/H_Parameters.$(SrcSuf)
+tmp/Utilities/Hector/src/H_SectorDipole.$(ObjSuf): \
+	Utilities/Hector/src/H_SectorDipole.$(SrcSuf)
+tmp/Utilities/Hector/src/H_BeamLineParser.$(ObjSuf): \
+	Utilities/Hector/src/H_BeamLineParser.$(SrcSuf)
+tmp/Utilities/Hector/src/H_RectangularDipole.$(ObjSuf): \
+	Utilities/Hector/src/H_RectangularDipole.$(SrcSuf)
 tmp/Utilities/Hector/src/H_Marker.$(ObjSuf): \
 	Utilities/Hector/src/H_Marker.$(SrcSuf)
 tmp/Utilities/Hector/src/H_OpticalElement.$(ObjSuf): \
 	Utilities/Hector/src/H_OpticalElement.$(SrcSuf)
-tmp/Utilities/Hector/src/H_Parameters.$(ObjSuf): \
-	Utilities/Hector/src/H_Parameters.$(SrcSuf)
 tmp/Utilities/Hector/src/H_Quadrupole.$(ObjSuf): \
 	Utilities/Hector/src/H_Quadrupole.$(SrcSuf)
+tmp/Utilities/Hector/src/H_BeamLine.$(ObjSuf): \
+	Utilities/Hector/src/H_BeamLine.$(SrcSuf)
+tmp/Utilities/Hector/src/H_RectangularCollimator.$(ObjSuf): \
+	Utilities/Hector/src/H_RectangularCollimator.$(SrcSuf)
+tmp/Utilities/Hector/src/H_BeamParticle.$(ObjSuf): \
+	Utilities/Hector/src/H_BeamParticle.$(SrcSuf)
+tmp/Utilities/Hector/src/H_AbstractBeamLine.$(ObjSuf): \
+	Utilities/Hector/src/H_AbstractBeamLine.$(SrcSuf)
 tmp/Utilities/Hector/src/H_RecRPObject.$(ObjSuf): \
 	Utilities/Hector/src/H_RecRPObject.$(SrcSuf)
+tmp/Utilities/Hector/src/H_Beam.$(ObjSuf): \
+	Utilities/Hector/src/H_Beam.$(SrcSuf)
 tmp/Utilities/Hector/src/H_RectEllipticAperture.$(ObjSuf): \
 	Utilities/Hector/src/H_RectEllipticAperture.$(SrcSuf)
-tmp/Utilities/Hector/src/H_RectangularAperture.$(ObjSuf): \
-	Utilities/Hector/src/H_RectangularAperture.$(SrcSuf)
-tmp/Utilities/Hector/src/H_RectangularCollimator.$(ObjSuf): \
-	Utilities/Hector/src/H_RectangularCollimator.$(SrcSuf)
-tmp/Utilities/Hector/src/H_RectangularDipole.$(ObjSuf): \
-	Utilities/Hector/src/H_RectangularDipole.$(SrcSuf)
-tmp/Utilities/Hector/src/H_RomanPot.$(ObjSuf): \
-	Utilities/Hector/src/H_RomanPot.$(SrcSuf)
-tmp/Utilities/Hector/src/H_SectorDipole.$(ObjSuf): \
-	Utilities/Hector/src/H_SectorDipole.$(SrcSuf)
-tmp/Utilities/Hector/src/H_TransportMatrices.$(ObjSuf): \
-	Utilities/Hector/src/H_TransportMatrices.$(SrcSuf)
-tmp/Utilities/Hector/src/H_VerticalKicker.$(ObjSuf): \
-	Utilities/Hector/src/H_VerticalKicker.$(SrcSuf)
-tmp/Utilities/Hector/src/H_VerticalQuadrupole.$(ObjSuf): \
-	Utilities/Hector/src/H_VerticalQuadrupole.$(SrcSuf)
-tmp/Utilities/Fastjet/src/AreaDefinition.$(ObjSuf): \
-	Utilities/Fastjet/src/AreaDefinition.$(SrcSuf)
+tmp/Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(ObjSuf): \
+	Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(SrcSuf)
+tmp/Utilities/Fastjet/src/ClusterSequenceArea.$(ObjSuf): \
+	Utilities/Fastjet/src/ClusterSequenceArea.$(SrcSuf)
+tmp/Utilities/Fastjet/src/Error.$(ObjSuf): \
+	Utilities/Fastjet/src/Error.$(SrcSuf)
+tmp/Utilities/Fastjet/src/ClusterSequence_Delaunay.$(ObjSuf): \
+	Utilities/Fastjet/src/ClusterSequence_Delaunay.$(SrcSuf)
+tmp/Utilities/Fastjet/src/DnnPlane.$(ObjSuf): \
+	Utilities/Fastjet/src/DnnPlane.$(SrcSuf)
+tmp/Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(ObjSuf): \
+	Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(SrcSuf)
 tmp/Utilities/Fastjet/src/BasicRandom.$(ObjSuf): \
 	Utilities/Fastjet/src/BasicRandom.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClosestPair2D.$(ObjSuf): \
-	Utilities/Fastjet/src/ClosestPair2D.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequence.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequence.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(SrcSuf)
 tmp/Utilities/Fastjet/src/ClusterSequenceActiveArea.$(ObjSuf): \
 	Utilities/Fastjet/src/ClusterSequenceActiveArea.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequenceArea.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequenceArea.$(SrcSuf)
+tmp/Utilities/Fastjet/src/ClusterSequence_N2.$(ObjSuf): \
+	Utilities/Fastjet/src/ClusterSequence_N2.$(SrcSuf)
+tmp/Utilities/Fastjet/src/ClusterSequence_TiledN2.$(ObjSuf): \
+	Utilities/Fastjet/src/ClusterSequence_TiledN2.$(SrcSuf)
+tmp/Utilities/Fastjet/src/JetDefinition.$(ObjSuf): \
+	Utilities/Fastjet/src/JetDefinition.$(SrcSuf)
+tmp/Utilities/Fastjet/src/ClusterSequence_DumbN3.$(ObjSuf): \
+	Utilities/Fastjet/src/ClusterSequence_DumbN3.$(SrcSuf)
 tmp/Utilities/Fastjet/src/ClusterSequenceAreaBase.$(ObjSuf): \
 	Utilities/Fastjet/src/ClusterSequenceAreaBase.$(SrcSuf)
 tmp/Utilities/Fastjet/src/ClusterSequencePassiveArea.$(ObjSuf): \
 	Utilities/Fastjet/src/ClusterSequencePassiveArea.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(SrcSuf)
 tmp/Utilities/Fastjet/src/ClusterSequence_CP2DChan.$(ObjSuf): \
 	Utilities/Fastjet/src/ClusterSequence_CP2DChan.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequence_Delaunay.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequence_Delaunay.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequence_DumbN3.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequence_DumbN3.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequence_N2.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequence_N2.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequence_TiledN2.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequence_TiledN2.$(SrcSuf)
-tmp/Utilities/Fastjet/src/Dnn2piCylinder.$(ObjSuf): \
-	Utilities/Fastjet/src/Dnn2piCylinder.$(SrcSuf)
-tmp/Utilities/Fastjet/src/Dnn3piCylinder.$(ObjSuf): \
-	Utilities/Fastjet/src/Dnn3piCylinder.$(SrcSuf)
+tmp/Utilities/Fastjet/src/ClosestPair2D.$(ObjSuf): \
+	Utilities/Fastjet/src/ClosestPair2D.$(SrcSuf)
 tmp/Utilities/Fastjet/src/Dnn4piCylinder.$(ObjSuf): \
 	Utilities/Fastjet/src/Dnn4piCylinder.$(SrcSuf)
-tmp/Utilities/Fastjet/src/DnnPlane.$(ObjSuf): \
-	Utilities/Fastjet/src/DnnPlane.$(SrcSuf)
-tmp/Utilities/Fastjet/src/Error.$(ObjSuf): \
-	Utilities/Fastjet/src/Error.$(SrcSuf)
-tmp/Utilities/Fastjet/src/GhostedAreaSpec.$(ObjSuf): \
-	Utilities/Fastjet/src/GhostedAreaSpec.$(SrcSuf)
-tmp/Utilities/Fastjet/src/JetDefinition.$(ObjSuf): \
-	Utilities/Fastjet/src/JetDefinition.$(SrcSuf)
 tmp/Utilities/Fastjet/src/MinHeap.$(ObjSuf): \
 	Utilities/Fastjet/src/MinHeap.$(SrcSuf)
 tmp/Utilities/Fastjet/src/PseudoJet.$(ObjSuf): \
 	Utilities/Fastjet/src/PseudoJet.$(SrcSuf)
+tmp/Utilities/Fastjet/src/GhostedAreaSpec.$(ObjSuf): \
+	Utilities/Fastjet/src/GhostedAreaSpec.$(SrcSuf)
 tmp/Utilities/Fastjet/src/RangeDefinition.$(ObjSuf): \
 	Utilities/Fastjet/src/RangeDefinition.$(SrcSuf)
+tmp/Utilities/Fastjet/src/Dnn3piCylinder.$(ObjSuf): \
+	Utilities/Fastjet/src/Dnn3piCylinder.$(SrcSuf)
+tmp/Utilities/Fastjet/src/ClusterSequence.$(ObjSuf): \
+	Utilities/Fastjet/src/ClusterSequence.$(SrcSuf)
+tmp/Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf): \
+	Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(SrcSuf)
+tmp/Utilities/Fastjet/src/AreaDefinition.$(ObjSuf): \
+	Utilities/Fastjet/src/AreaDefinition.$(SrcSuf)
 tmp/Utilities/Fastjet/src/Voronoi.$(ObjSuf): \
 	Utilities/Fastjet/src/Voronoi.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.$(ObjSuf): \
-	Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.$(SrcSuf) \
-	Utilities/Fastjet/include/fastjet/ClusterSequence.hh
+tmp/Utilities/Fastjet/src/Dnn2piCylinder.$(ObjSuf): \
+	Utilities/Fastjet/src/Dnn2piCylinder.$(SrcSuf)
 tmp/Utilities/Fastjet/plugins/CDFCones/CDFMidPointPlugin.$(ObjSuf): \
 	Utilities/Fastjet/plugins/CDFCones/CDFMidPointPlugin.$(SrcSuf) \
 	Utilities/Fastjet/include/fastjet/ClusterSequence.hh \
 	Utilities/Fastjet/include/fastjet/Error.hh
+tmp/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.$(ObjSuf): \
+	Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.$(SrcSuf) \
+	Utilities/Fastjet/include/fastjet/ClusterSequence.hh
+tmp/Utilities/Fastjet/plugins/CDFCones/src/Centroid.$(ObjSuf): \
+	Utilities/Fastjet/plugins/CDFCones/src/Centroid.$(SrcSuf)
 tmp/Utilities/Fastjet/plugins/CDFCones/src/CalTower.$(ObjSuf): \
 	Utilities/Fastjet/plugins/CDFCones/src/CalTower.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/CDFCones/src/Centroid.$(ObjSuf): \
-	Utilities/Fastjet/plugins/CDFCones/src/Centroid.$(SrcSuf)
+tmp/Utilities/Fastjet/plugins/CDFCones/src/PhysicsTower.$(ObjSuf): \
+	Utilities/Fastjet/plugins/CDFCones/src/PhysicsTower.$(SrcSuf)
+tmp/Utilities/Fastjet/plugins/CDFCones/src/MidPointAlgorithm.$(ObjSuf): \
+	Utilities/Fastjet/plugins/CDFCones/src/MidPointAlgorithm.$(SrcSuf)
+tmp/Utilities/Fastjet/plugins/CDFCones/src/LorentzVector.$(ObjSuf): \
+	Utilities/Fastjet/plugins/CDFCones/src/LorentzVector.$(SrcSuf)
+tmp/Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.$(ObjSuf): \
+	Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.$(SrcSuf)
 tmp/Utilities/Fastjet/plugins/CDFCones/src/Cluster.$(ObjSuf): \
 	Utilities/Fastjet/plugins/CDFCones/src/Cluster.$(SrcSuf)
 tmp/Utilities/Fastjet/plugins/CDFCones/src/ClusterComparisons.$(ObjSuf): \
 	Utilities/Fastjet/plugins/CDFCones/src/ClusterComparisons.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.$(ObjSuf): \
-	Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/CDFCones/src/LorentzVector.$(ObjSuf): \
-	Utilities/Fastjet/plugins/CDFCones/src/LorentzVector.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/CDFCones/src/MidPointAlgorithm.$(ObjSuf): \
-	Utilities/Fastjet/plugins/CDFCones/src/MidPointAlgorithm.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/CDFCones/src/PhysicsTower.$(ObjSuf): \
-	Utilities/Fastjet/plugins/CDFCones/src/PhysicsTower.$(SrcSuf)
 tmp/Utilities/Fastjet/plugins/SISCone/SISConePlugin.$(ObjSuf): \
 	Utilities/Fastjet/plugins/SISCone/SISConePlugin.$(SrcSuf) \
 	Utilities/Fastjet/include/fastjet/ClusterSequence.hh
+tmp/Utilities/Fastjet/plugins/SISCone/src/hash.$(ObjSuf): \
+	Utilities/Fastjet/plugins/SISCone/src/hash.$(SrcSuf)
+tmp/Utilities/Fastjet/plugins/SISCone/src/siscone.$(ObjSuf): \
+	Utilities/Fastjet/plugins/SISCone/src/siscone.$(SrcSuf)
+tmp/Utilities/Fastjet/plugins/SISCone/src/reference.$(ObjSuf): \
+	Utilities/Fastjet/plugins/SISCone/src/reference.$(SrcSuf)
+tmp/Utilities/Fastjet/plugins/SISCone/src/ranlux.$(ObjSuf): \
+	Utilities/Fastjet/plugins/SISCone/src/ranlux.$(SrcSuf)
+tmp/Utilities/Fastjet/plugins/SISCone/src/vicinity.$(ObjSuf): \
+	Utilities/Fastjet/plugins/SISCone/src/vicinity.$(SrcSuf)
+tmp/Utilities/Fastjet/plugins/SISCone/src/siscone_error.$(ObjSuf): \
+	Utilities/Fastjet/plugins/SISCone/src/siscone_error.$(SrcSuf)
+tmp/Utilities/Fastjet/plugins/SISCone/src/area.$(ObjSuf): \
+	Utilities/Fastjet/plugins/SISCone/src/area.$(SrcSuf)
+tmp/Utilities/Fastjet/plugins/SISCone/src/protocones.$(ObjSuf): \
+	Utilities/Fastjet/plugins/SISCone/src/protocones.$(SrcSuf)
+tmp/Utilities/Fastjet/plugins/SISCone/src/split_merge.$(ObjSuf): \
+	Utilities/Fastjet/plugins/SISCone/src/split_merge.$(SrcSuf)
 tmp/Utilities/Fastjet/plugins/SISCone/src/geom_2d.$(ObjSuf): \
 	Utilities/Fastjet/plugins/SISCone/src/geom_2d.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/area.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/area.$(SrcSuf)
 tmp/Utilities/Fastjet/plugins/SISCone/src/momentum.$(ObjSuf): \
 	Utilities/Fastjet/plugins/SISCone/src/momentum.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/hash.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/hash.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/protocones.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/protocones.$(SrcSuf)
 tmp/Utilities/Fastjet/plugins/SISCone/src/quadtree.$(ObjSuf): \
 	Utilities/Fastjet/plugins/SISCone/src/quadtree.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/ranlux.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/ranlux.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/reference.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/reference.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/siscone.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/siscone.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/siscone_error.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/siscone_error.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/split_merge.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/split_merge.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/vicinity.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/vicinity.$(SrcSuf)
 SOURCE_OBJ =  \
-	tmp/src/h_bb.$(ObjSuf) \
-	tmp/src/HEPEVTConverter.$(ObjSuf) \
+	tmp/src/JetUtils.$(ObjSuf) \
+	tmp/src/SmearUtil.$(ObjSuf) \
+	tmp/src/TriggerUtil.$(ObjSuf) \
+	tmp/src/BFieldProp.$(ObjSuf) \
+	tmp/src/VeryForward.$(ObjSuf) \
 	tmp/src/LHEFConverter.$(ObjSuf) \
 	tmp/src/STDHEPConverter.$(ObjSuf) \
-	tmp/src/SmearUtil.$(ObjSuf) \
+	tmp/src/HEPEVTConverter.$(ObjSuf) \
 	tmp/src/TreeClasses.$(ObjSuf) \
-	tmp/src/TUtil.$(ObjSuf) \
-	tmp/src/TriggerUtil.$(ObjSuf) \
-	tmp/src/BFieldProp.$(ObjSuf) \
-	tmp/src/JetUtils.$(ObjSuf) \
-	tmp/src/VeryForward.$(ObjSuf) \
+	tmp/Utilities/ExRootAnalysis/src/ExRootTreeReader.$(ObjSuf) \
+	tmp/Utilities/ExRootAnalysis/src/ExRootTreeBranch.$(ObjSuf) \
+	tmp/Utilities/ExRootAnalysis/src/ExRootProgressBar.$(ObjSuf) \
+	tmp/Utilities/ExRootAnalysis/src/ExRootTreeWriter.$(ObjSuf) \
 	tmp/Utilities/ExRootAnalysis/src/BlockClasses.$(ObjSuf) \
-	tmp/Utilities/ExRootAnalysis/src/ExRootProgressBar.$(ObjSuf) \
-	tmp/Utilities/ExRootAnalysis/src/ExRootTreeBranch.$(ObjSuf) \
-	tmp/Utilities/ExRootAnalysis/src/ExRootTreeReader.$(ObjSuf) \
-	tmp/Utilities/ExRootAnalysis/src/ExRootTreeWriter.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_AbstractBeamLine.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_Aperture.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_Beam.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_BeamLine.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_BeamLineParser.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_BeamParticle.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_Kicker.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_HorizontalQuadrupole.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_EllipticAperture.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_RomanPot.$(ObjSuf) \
 	tmp/Utilities/Hector/src/H_CircularAperture.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_TransportMatrices.$(ObjSuf) \
 	tmp/Utilities/Hector/src/H_Dipole.$(ObjSuf) \
 	tmp/Utilities/Hector/src/H_Drift.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_EllipticAperture.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_Aperture.$(ObjSuf) \
 	tmp/Utilities/Hector/src/H_HorizontalKicker.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_HorizontalQuadrupole.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_Kicker.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_RectangularAperture.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_VerticalQuadrupole.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_VerticalKicker.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_Parameters.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_SectorDipole.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_BeamLineParser.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_RectangularDipole.$(ObjSuf) \
 	tmp/Utilities/Hector/src/H_Marker.$(ObjSuf) \
 	tmp/Utilities/Hector/src/H_OpticalElement.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_Parameters.$(ObjSuf) \
 	tmp/Utilities/Hector/src/H_Quadrupole.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_BeamLine.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_RectangularCollimator.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_BeamParticle.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_AbstractBeamLine.$(ObjSuf) \
 	tmp/Utilities/Hector/src/H_RecRPObject.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_Beam.$(ObjSuf) \
 	tmp/Utilities/Hector/src/H_RectEllipticAperture.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_RectangularAperture.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_RectangularCollimator.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_RectangularDipole.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_RomanPot.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_SectorDipole.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_TransportMatrices.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_VerticalKicker.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_VerticalQuadrupole.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/AreaDefinition.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/ClusterSequenceArea.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/Error.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/ClusterSequence_Delaunay.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/DnnPlane.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(ObjSuf) \
 	tmp/Utilities/Fastjet/src/BasicRandom.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClosestPair2D.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequence.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(ObjSuf) \
 	tmp/Utilities/Fastjet/src/ClusterSequenceActiveArea.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequenceArea.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/ClusterSequence_N2.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/ClusterSequence_TiledN2.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/JetDefinition.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/ClusterSequence_DumbN3.$(ObjSuf) \
 	tmp/Utilities/Fastjet/src/ClusterSequenceAreaBase.$(ObjSuf) \
 	tmp/Utilities/Fastjet/src/ClusterSequencePassiveArea.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(ObjSuf) \
 	tmp/Utilities/Fastjet/src/ClusterSequence_CP2DChan.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequence_Delaunay.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequence_DumbN3.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequence_N2.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequence_TiledN2.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/Dnn2piCylinder.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/Dnn3piCylinder.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/ClosestPair2D.$(ObjSuf) \
 	tmp/Utilities/Fastjet/src/Dnn4piCylinder.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/DnnPlane.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/Error.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/GhostedAreaSpec.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/JetDefinition.$(ObjSuf) \
 	tmp/Utilities/Fastjet/src/MinHeap.$(ObjSuf) \
 	tmp/Utilities/Fastjet/src/PseudoJet.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/GhostedAreaSpec.$(ObjSuf) \
 	tmp/Utilities/Fastjet/src/RangeDefinition.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/Dnn3piCylinder.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/ClusterSequence.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/AreaDefinition.$(ObjSuf) \
 	tmp/Utilities/Fastjet/src/Voronoi.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/Dnn2piCylinder.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/CDFCones/CDFMidPointPlugin.$(ObjSuf) \
 	tmp/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/CDFCones/CDFMidPointPlugin.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/CDFCones/src/Centroid.$(ObjSuf) \
 	tmp/Utilities/Fastjet/plugins/CDFCones/src/CalTower.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/CDFCones/src/Centroid.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/CDFCones/src/PhysicsTower.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/CDFCones/src/MidPointAlgorithm.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/CDFCones/src/LorentzVector.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.$(ObjSuf) \
 	tmp/Utilities/Fastjet/plugins/CDFCones/src/Cluster.$(ObjSuf) \
 	tmp/Utilities/Fastjet/plugins/CDFCones/src/ClusterComparisons.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/CDFCones/src/LorentzVector.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/CDFCones/src/MidPointAlgorithm.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/CDFCones/src/PhysicsTower.$(ObjSuf) \
 	tmp/Utilities/Fastjet/plugins/SISCone/SISConePlugin.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/SISCone/src/hash.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/SISCone/src/siscone.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/SISCone/src/reference.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/SISCone/src/ranlux.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/SISCone/src/vicinity.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/SISCone/src/siscone_error.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/SISCone/src/area.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/SISCone/src/protocones.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/SISCone/src/split_merge.$(ObjSuf) \
 	tmp/Utilities/Fastjet/plugins/SISCone/src/geom_2d.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/area.$(ObjSuf) \
 	tmp/Utilities/Fastjet/plugins/SISCone/src/momentum.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/hash.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/protocones.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/quadtree.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/ranlux.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/reference.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/siscone.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/siscone_error.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/split_merge.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/vicinity.$(ObjSuf)
-
-tmp/Utilities/mcfio/mcf_NTuIOFiles.$(ObjSuf): \
-	Utilities/mcfio/mcf_NTuIOFiles.c
-tmp/Utilities/mcfio/mcf_NTuIOUtils.$(ObjSuf): \
-	Utilities/mcfio/mcf_NTuIOUtils.c
-tmp/Utilities/mcfio/mcf_evt_xdr.$(ObjSuf): \
-	Utilities/mcfio/mcf_evt_xdr.c
-tmp/Utilities/mcfio/mcf_ntuBldDbinc.$(ObjSuf): \
-	Utilities/mcfio/mcf_ntuBldDbinc.c
-tmp/Utilities/mcfio/mcf_ntubldInit.$(ObjSuf): \
-	Utilities/mcfio/mcf_ntubldInit.c
-tmp/Utilities/mcfio/mcfio_Block.$(ObjSuf): \
-	Utilities/mcfio/mcfio_Block.c
-tmp/Utilities/mcfio/mcfio_Direct.$(ObjSuf): \
-	Utilities/mcfio/mcfio_Direct.c
-tmp/Utilities/mcfio/mcfio_SeqDummy.$(ObjSuf): \
-	Utilities/mcfio/mcfio_SeqDummy.c
+	tmp/Utilities/Fastjet/plugins/SISCone/src/quadtree.$(ObjSuf)
+
 tmp/Utilities/mcfio/mcfio_UserDictionary.$(ObjSuf): \
 	Utilities/mcfio/mcfio_UserDictionary.c
 tmp/Utilities/mcfio/mcfio_Util1.$(ObjSuf): \
 	Utilities/mcfio/mcfio_Util1.c
-tmp/Utilities/stdhep/mcf_Stdhep_xdr.$(ObjSuf): \
-	Utilities/stdhep/mcf_Stdhep_xdr.c \
-	Utilities/mcfio/mcfio_Dict.h \
-	Utilities/mcfio/mcf_xdr.h \
-	Utilities/stdhep/stdhep.h \
-	Utilities/stdhep/stdtmp.h \
-	Utilities/stdhep/stdver.h
-tmp/Utilities/stdhep/mcf_hepev4_xdr.$(ObjSuf): \
-	Utilities/stdhep/mcf_hepev4_xdr.c \
-	Utilities/mcfio/mcfio_Dict.h \
-	Utilities/mcfio/mcf_xdr.h \
-	Utilities/stdhep/stdhep.h \
-	Utilities/stdhep/hepev4.h \
-	Utilities/stdhep/stdtmp.h \
-	Utilities/stdhep/stdver.h
+tmp/Utilities/mcfio/mcf_ntuBldDbinc.$(ObjSuf): \
+	Utilities/mcfio/mcf_ntuBldDbinc.c
+tmp/Utilities/mcfio/mcfio_SeqDummy.$(ObjSuf): \
+	Utilities/mcfio/mcfio_SeqDummy.c
+tmp/Utilities/mcfio/mcfio_Block.$(ObjSuf): \
+	Utilities/mcfio/mcfio_Block.c
+tmp/Utilities/mcfio/mcf_evt_xdr.$(ObjSuf): \
+	Utilities/mcfio/mcf_evt_xdr.c
+tmp/Utilities/mcfio/mcfio_Direct.$(ObjSuf): \
+	Utilities/mcfio/mcfio_Direct.c
+tmp/Utilities/mcfio/mcf_ntubldInit.$(ObjSuf): \
+	Utilities/mcfio/mcf_ntubldInit.c
+tmp/Utilities/mcfio/mcf_NTuIOUtils.$(ObjSuf): \
+	Utilities/mcfio/mcf_NTuIOUtils.c
+tmp/Utilities/mcfio/mcf_NTuIOFiles.$(ObjSuf): \
+	Utilities/mcfio/mcf_NTuIOFiles.c
 tmp/Utilities/stdhep/mcf_hepup_xdr.$(ObjSuf): \
 	Utilities/stdhep/mcf_hepup_xdr.c \
@@ -460,16 +422,4 @@
 	Utilities/stdhep/heprup.h \
 	Utilities/stdhep/stdver.h
-tmp/Utilities/stdhep/mcf_stdcm1_xdr.$(ObjSuf): \
-	Utilities/stdhep/mcf_stdcm1_xdr.c \
-	Utilities/mcfio/mcfio_Dict.h \
-	Utilities/mcfio/mcf_xdr.h \
-	Utilities/stdhep/stdcm1.h \
-	Utilities/stdhep/stdver.h
-tmp/Utilities/stdhep/stdhep_internal_utils.$(ObjSuf): \
-	Utilities/stdhep/stdhep_internal_utils.c \
-	Utilities/stdhep/stdhep.h \
-	Utilities/stdhep/hepev4.h \
-	Utilities/stdhep/stdtmp.h \
-	Utilities/stdhep/hepeup.h
 tmp/Utilities/stdhep/stdhep_mcfio.$(ObjSuf): \
 	Utilities/stdhep/stdhep_mcfio.c \
@@ -487,26 +437,48 @@
 	Utilities/stdhep/stdcnt.h \
 	Utilities/stdhep/stdhep_mcfio.h
+tmp/Utilities/stdhep/mcf_hepev4_xdr.$(ObjSuf): \
+	Utilities/stdhep/mcf_hepev4_xdr.c \
+	Utilities/mcfio/mcfio_Dict.h \
+	Utilities/mcfio/mcf_xdr.h \
+	Utilities/stdhep/stdhep.h \
+	Utilities/stdhep/hepev4.h \
+	Utilities/stdhep/stdtmp.h \
+	Utilities/stdhep/stdver.h
+tmp/Utilities/stdhep/mcf_Stdhep_xdr.$(ObjSuf): \
+	Utilities/stdhep/mcf_Stdhep_xdr.c \
+	Utilities/mcfio/mcfio_Dict.h \
+	Utilities/mcfio/mcf_xdr.h \
+	Utilities/stdhep/stdhep.h \
+	Utilities/stdhep/stdtmp.h \
+	Utilities/stdhep/stdver.h
+tmp/Utilities/stdhep/mcf_stdcm1_xdr.$(ObjSuf): \
+	Utilities/stdhep/mcf_stdcm1_xdr.c \
+	Utilities/mcfio/mcfio_Dict.h \
+	Utilities/mcfio/mcf_xdr.h \
+	Utilities/stdhep/stdcm1.h \
+	Utilities/stdhep/stdver.h
+tmp/Utilities/stdhep/stdhep_internal_utils.$(ObjSuf): \
+	Utilities/stdhep/stdhep_internal_utils.c \
+	Utilities/stdhep/stdhep.h \
+	Utilities/stdhep/hepev4.h \
+	Utilities/stdhep/stdtmp.h \
+	Utilities/stdhep/hepeup.h
 STDHEP_OBJ =  \
-	tmp/Utilities/mcfio/mcf_NTuIOFiles.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcf_NTuIOUtils.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcf_evt_xdr.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcf_ntuBldDbinc.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcf_ntubldInit.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcfio_Block.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcfio_Direct.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcfio_SeqDummy.$(ObjSuf) \
 	tmp/Utilities/mcfio/mcfio_UserDictionary.$(ObjSuf) \
 	tmp/Utilities/mcfio/mcfio_Util1.$(ObjSuf) \
+	tmp/Utilities/mcfio/mcf_ntuBldDbinc.$(ObjSuf) \
+	tmp/Utilities/mcfio/mcfio_SeqDummy.$(ObjSuf) \
+	tmp/Utilities/mcfio/mcfio_Block.$(ObjSuf) \
+	tmp/Utilities/mcfio/mcf_evt_xdr.$(ObjSuf) \
+	tmp/Utilities/mcfio/mcfio_Direct.$(ObjSuf) \
+	tmp/Utilities/mcfio/mcf_ntubldInit.$(ObjSuf) \
+	tmp/Utilities/mcfio/mcf_NTuIOUtils.$(ObjSuf) \
+	tmp/Utilities/mcfio/mcf_NTuIOFiles.$(ObjSuf) \
+	tmp/Utilities/stdhep/mcf_hepup_xdr.$(ObjSuf) \
+	tmp/Utilities/stdhep/stdhep_mcfio.$(ObjSuf) \
+	tmp/Utilities/stdhep/mcf_hepev4_xdr.$(ObjSuf) \
 	tmp/Utilities/stdhep/mcf_Stdhep_xdr.$(ObjSuf) \
-	tmp/Utilities/stdhep/mcf_hepev4_xdr.$(ObjSuf) \
-	tmp/Utilities/stdhep/mcf_hepup_xdr.$(ObjSuf) \
 	tmp/Utilities/stdhep/mcf_stdcm1_xdr.$(ObjSuf) \
-	tmp/Utilities/stdhep/stdhep_internal_utils.$(ObjSuf) \
-	tmp/Utilities/stdhep/stdhep_mcfio.$(ObjSuf)
-
-interface/TUtil.h: \
-	Utilities/ExRootAnalysis/interface/BlockClasses.h \
-	Utilities/ExRootAnalysis/interface/TSimpleArray.h
-	@touch $@
+	tmp/Utilities/stdhep/stdhep_internal_utils.$(ObjSuf)
 
 interface/DataConverter.h: \
@@ -583,13 +555,4 @@
 	Utilities/stdhep/stdcm1.h \
 	Utilities/stdhep/stdver.h
-	@touch $@
-
-interface/h_bb.h: \
-	Utilities/ExRootAnalysis/interface/TSimpleArray.h \
-	Utilities/ExRootAnalysis/interface/TSimpleBranch.h \
-	Utilities/ExRootAnalysis/interface/BlockClasses.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeReader.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
-	interface/TUtil.h
 	@touch $@
 
Index: /trunk/README
===================================================================
--- /trunk/README	(revision 70)
+++ /trunk/README	(revision 71)
@@ -47,2 +47,10 @@
 
 attention Ã  CalTower.hh qui est hyper spÃ©cifiqueÃ  CMS, aprÃšs les changements. comment introduire Ã§a dans la carte?
+
+
+attention : Trigger::
+void TriggerBit::PrintTrigCondition(string LogName,int i)
+ --> il y a a dÃ©jÃ  un i dÃ©fini ailleurs dans la fonction
+
+Dans la lecture de la carte, on ne vÃ©rifie pas qu'il y a NTOWER+1 valeurs pour les TOWER_ETA_EDGE et NTOWER pour TOWER_DPHI
+
Index: /trunk/data/DataCardDet.dat
===================================================================
--- /trunk/data/DataCardDet.dat	(revision 70)
+++ /trunk/data/DataCardDet.dat	(revision 71)
@@ -4,12 +4,12 @@
 MAX_CALO_FWD     5.0      		// forward calorimeter pseudorapidity coverage
 MAX_MU           2.4	     		// muon chambers pseudorapidity coverage
-MIN_CALO_VFWD	 5.2			// very forward calorimeter (if any), like CASTOR
+MIN_CALO_VFWD	 5.2			// very forward calorimeter (if any) like CASTOR
 MAX_CALO_VFWD	 6.6
 MIN_ZDC		 8.3
-ZDC_S		 140			// distance of the ZDC to the IP, in meters
-RP220_S		 220			// distance of the RP to the IP, in meters
-RP220_X		 0.002			// distance of the RP to the beam, in meters
-FP420_S		 420			// distance of the RP to the IP, in meters
-FP420_X		 0.004			// distance of the RP to the beam, in meters
+ZDC_S		 140			// distance of the ZDC to the IP in meters
+RP220_S		 220			// distance of the RP to the IP in meters
+RP220_X		 0.002			// distance of the RP to the beam in meters
+FP420_S		 420			// distance of the RP to the IP in meters
+FP420_X		 0.004			// distance of the RP to the beam in meters
 
 #Magnetic Field 
@@ -26,7 +26,7 @@
 ELG_Ncen         0.25   		// N term for central ECAL
 ELG_Ccen         0.0055 		// C term for central ECAL
-ELG_Sfwd         1.5                    // S term for forward ECAL
+ELG_Cfwd         0.107  		// S term for forward ECAL
+ELG_Sfwd         2.084  		// C term for forward ECAL
 ELG_Nfwd         0.0    		// N term for central ECAL
-ELG_Cfwd         0.06    		// C term for forward ECAL
 
 #energy resolution for hadrons in ecal/hcal/hf
@@ -54,5 +54,5 @@
 
 #Tracker acceptance
-PT_TRACKS_MIN	 0.9 			 // minimal pt needed to reach the calorimeter, in GeV 
+PT_TRACKS_MIN	 0.9 			 // minimal pt needed to reach the calorimeter in GeV 
 TRACKING_EFF	 100			 // efficiency associated to the tracking
 
@@ -63,6 +63,17 @@
 
 #DeltaR cone definition
-CONERADIUS       	0.7
-JETALGO                 1               // 1 for Cone algorithm, 2 for MidPoint algorithm, 3 for SIScone algorithm, 4 for kt algorithm
+CONERADIUS  	0.7
+JETALGO           1               // 1 for Cone algorithm 2 for MidPoint algorithm 3 for SIScone algorithm 4 for kt algorithm
 
-DOTRIGGER               1
+#Calorimetric towers
+NTOWERS		40
+TOWER_ETA_EDGES 0. 0.087 0.174 0.261 0.348 0.435 0.522 0.609 0.696 0.783 0.870 0.957 1.044 1.131 1.218 1.305 1.392 1.479 1.566 1.653 1.740 1.830 1.930 2.043 2.172 2.322 2.500 2.650 2.868 2.950 3.125 3.300 3.475 3.650 3.825 4.000 4.175 4.350 4.525 4.700 5.000
+# list of the edges of each tower in eta for eta>0 assuming a symmetric detector in eta<0
+# the list starts with the lower edge of the most central tower
+# the list ends with the higher edged of the most forward tower
+# there should be NTOWER+1 values
+TOWER_DPHI 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 20 20 
+# list of the tower size in phi (in degrees), assuming that all towers are similar in phi for a given eta value
+# the list starts with the phi-size of the most central tower (eta=0)
+# the list ends with the phi-size of the most forward tower
+# there should be NTOWER values
Index: /trunk/interface/SmearUtil.h
===================================================================
--- /trunk/interface/SmearUtil.h	(revision 70)
+++ /trunk/interface/SmearUtil.h	(revision 71)
@@ -119,5 +119,9 @@
   double PROTOJET_PTMIN;
 
-  int DOTRIGGER;
+  // Define Calorimetric towers
+  unsigned int NTOWERS;
+  float * TOWER_ETA_EDGES;
+  float * TOWER_DPHI; 
+
 
   /// Reads the data card for the initialisation of the parameters 
@@ -150,4 +154,7 @@
   //******************************isolation criteria**************************************
   bool Isolation(Float_t phi,Float_t eta,const vector<TLorentzVector> &tracks,float PT_TRACK2);
+
+  //********************* returns a segmented value for eta and phi, for calo towers *****
+  void BinEtaPhi(const float phi, const float eta, float& iPhi, float& iEta);
 
 };
Index: /trunk/src/SmearUtil.cc
===================================================================
--- /trunk/src/SmearUtil.cc	(revision 70)
+++ /trunk/src/SmearUtil.cc	(revision 71)
@@ -52,7 +52,7 @@
 ELG_Ncen =        0.25 ;                 // N term for central ECAL
 ELG_Ccen =        0.0055 ;                // C term for central ECAL
-ELG_Sfwd =        1.5;                    // S term for forward ECAL
-ELG_Nfwd =        0.0;                    // N term for central ECAL
-ELG_Cfwd =        0.06;                   // C term for forward ECAL
+ELG_Cfwd =        0.107 ;                 // S term for forward ECAL
+ELG_Sfwd =        2.084 ;                 // C term for forward ECAL
+ELG_Nfwd =        0.0   ;                 // N term for central ECAL
 
 HAD_Shcal =       1.5 ;                    // S term for central HCAL // hadronic calorimeter
@@ -104,4 +104,20 @@
 M_MAXITERATIONS     =   100;
 
+// Define Calorimeter Towers
+NTOWERS	= 40;
+
+const float tower_eta_edges[41] = { 
+    0., 0.087, 0.174, 0.261, 0.348, 0.435, 0.522, 0.609, 0.696, 0.783, 0.870, 0.957, 1.044, 1.131, 1.218, 1.305, 1.392, 1.479, 1.566,
+    1.653, 1.740, 1.830, 1.930, 2.043, 2.172, 2.322, 2.500, 2.650, 2.868, 2.950, 3.125, 3.300, 3.475, 3.650, 3.825, 4.000, 4.175,
+    4.350, 4.525,  4.700, 5.000}; // temporary object
+TOWER_ETA_EDGES = new float[NTOWERS+1];
+for(unsigned int i=0; i<NTOWERS+1; i++) TOWER_ETA_EDGES[i] = tower_eta_edges[i];
+
+const float tower_dphi[40] = { 
+     5, 5, 5, 5, 5,  5, 5, 5, 5, 5,  5, 5, 5, 5, 5,  5, 5, 5, 5, 10,
+    10,10,10,10,10, 10,10,10,10,10, 10,10,10,10,10, 10,10,10,20, 20 }; // temporary object
+TOWER_DPHI = new float[NTOWERS];
+for(unsigned int i=0; i<NTOWERS; i++) TOWER_DPHI[i] = tower_dphi[i];
+
 }
 
@@ -122,5 +138,5 @@
     curstring.str(temp_string);
     string varname;
-    float value;
+    float value; int ivalue;
     
     if(strstr(temp_string.c_str(),"#")) { }
@@ -129,6 +145,6 @@
     else if(strstr(temp_string.c_str(),"MAX_CALO_FWD")){curstring >> varname >> value; MAX_CALO_FWD = value;}
     else if(strstr(temp_string.c_str(),"MAX_MU")){curstring >> varname >> value; MAX_MU = value;}
-    else if(strstr(temp_string.c_str(),"TRACKING_RADIUS")){curstring >> varname >> value; TRACKING_RADIUS = (int)value;}
-    else if(strstr(temp_string.c_str(),"TRACKING_LENGTH")){curstring >> varname >> value; TRACKING_LENGTH = (int)value;}
+    else if(strstr(temp_string.c_str(),"TRACKING_RADIUS")){curstring >> varname >> ivalue; TRACKING_RADIUS = ivalue;}
+    else if(strstr(temp_string.c_str(),"TRACKING_LENGTH")){curstring >> varname >> ivalue; TRACKING_LENGTH = ivalue;}
     else if(strstr(temp_string.c_str(),"BFIELD_X")){curstring >> varname >> value; BFIELD_X = value;}
     else if(strstr(temp_string.c_str(),"BFIELD_Y")){curstring >> varname >> value; BFIELD_Y = value;}
@@ -151,14 +167,20 @@
     else if(strstr(temp_string.c_str(),"PT_TRACK_TAU")){curstring >> varname >> value; PT_TRACK_TAU = value;}
     else if(strstr(temp_string.c_str(),"PT_TRACKS_MIN")){curstring >> varname >> value; PT_TRACKS_MIN = value;}
-    else if(strstr(temp_string.c_str(),"TAGGING_B")){curstring >> varname >> value; TAGGING_B = (int)value;}
-    else if(strstr(temp_string.c_str(),"MISTAGGING_C")){curstring >> varname >> value; MISTAGGING_C = (int)value;}
-    else if(strstr(temp_string.c_str(),"MISTAGGING_L")){curstring >> varname >> value; MISTAGGING_L = (int)value;}
+    else if(strstr(temp_string.c_str(),"TAGGING_B")){curstring >> varname >> ivalue; TAGGING_B = ivalue;}
+    else if(strstr(temp_string.c_str(),"MISTAGGING_C")){curstring >> varname >> ivalue; MISTAGGING_C = ivalue;}
+    else if(strstr(temp_string.c_str(),"MISTAGGING_L")){curstring >> varname >> ivalue; MISTAGGING_L = ivalue;}
     else if(strstr(temp_string.c_str(),"CONERADIUS")){curstring >> varname >> value; CONERADIUS = value;}
-    else if(strstr(temp_string.c_str(),"JETALGO")){curstring >> varname >> value; JETALGO = (int)value;}
-    else if(strstr(temp_string.c_str(),"TRACKING_EFF")){curstring >> varname >> value; TRACKING_EFF = (int)value;}
+    else if(strstr(temp_string.c_str(),"JETALGO")){curstring >> varname >> ivalue; JETALGO = ivalue;}
+    else if(strstr(temp_string.c_str(),"TRACKING_EFF")){curstring >> varname >> ivalue; TRACKING_EFF = ivalue;}
     else if(strstr(temp_string.c_str(),"ELEC_pt")){curstring >> varname >> value; ELEC_pt = value;}
     else if(strstr(temp_string.c_str(),"MUON_pt")){curstring >> varname >> value; MUON_pt = value;}
     else if(strstr(temp_string.c_str(),"JET_pt")){curstring >> varname >> value; JET_pt = value;}
     else if(strstr(temp_string.c_str(),"TAUJET_pt")){curstring >> varname >> value; TAUJET_pt = value;}
+    else if(strstr(temp_string.c_str(),"NTOWERS")){curstring >> varname >> ivalue; NTOWERS = ivalue;}
+    else if(strstr(temp_string.c_str(),"TOWER_ETA_EDGES")){
+	curstring >> varname;	for(unsigned int i=0; i<NTOWERS+1; i++) {curstring >> value; TOWER_ETA_EDGES[i] = value;} }
+    else if(strstr(temp_string.c_str(),"TOWER_DPHI")){
+	curstring >> varname;	for(unsigned int i=0; i<NTOWERS; i++) {curstring >> value; TOWER_DPHI[i] = value;} }
+   
 
   }
@@ -182,9 +204,9 @@
  PROTOJET_PTMIN = 0.0; 
 
- DOTRIGGER=1;
 
 }
 
 void RESOLution::Logfile(string LogName) { 
+//void RESOLution::Logfile(string outputfilename) { 
 
   ofstream f_out(LogName.c_str());
@@ -266,4 +288,30 @@
         << left << setw(5) <<BFIELD_Z <<""<< right << setw(10)<<"*"<<"\n";
   f_out<<"*                                                                    *"<<"\n";
+
+
+  f_out<<"*                                                                    *"<<"\n";
+  f_out<<"#********************                                                *"<<"\n";
+  f_out<<"# Calorimetric Towers                                                *"<<"\n";
+  f_out<<"#********************                                                *"<<"\n";
+  f_out << left << setw(55) <<"* Number of calorimetric towers in eta, for eta>0: "<<""
+        << left << setw(5) << NTOWERS <<""<< right << setw(10)<<"*"<<"\n";
+  f_out << left << setw(55) <<"* Tower edges in eta, for eta>0: "<<"" << right << setw(15)<<"*"<<"\n";
+	  f_out << "*   ";
+	  for (unsigned int i=0; i<NTOWERS+1; i++) {
+		f_out << left << setw(7) << TOWER_ETA_EDGES[i];
+		if(!( (i+1) %9 )) f_out << right << setw(3) << "*" << "\n" << "*   ";
+	  }
+	  for (unsigned int i=(NTOWERS+1)%9; i<9; i++) f_out << left << setw(7) << "";
+	  f_out << right << setw(3)<<"*"<<"\n";
+  f_out << left << setw(55) <<"* Tower sizes in phi, for eta>0 [degree]:"<<"" << right << setw(15)<<"*"<<"\n";
+	  f_out << "*   ";
+	  for (unsigned int i=0; i<NTOWERS; i++) {
+		f_out << left << setw(7) << TOWER_DPHI[i];
+		if(!( (i+1) %9 )) f_out << right << setw(3) << "*" << "\n" << "*   ";
+	  }
+	  for (unsigned int i=(NTOWERS)%9; i<9; i++) f_out << left << setw(7) << "";
+	  f_out << right << setw(3)<<"*"<<"\n";
+  f_out<<"*                                                                    *"<<"\n";
+
   f_out<<"#************************************                                *"<<"\n";
   f_out<<"# Electromagnetic smearing parameters                                *"<<"\n";
@@ -446,7 +494,6 @@
   float energy = electron.E();  // before smearing
   float energyS = 0.0;		// after smearing  // \sigma/E = C + N/E + S/\sqrt{E}
-  float eta=fabs(electron.Eta()); 
- 
-  if(eta < MAX_TRACKER) { // if the electron is inside the tracker
+  
+  if(fabs(electron.Eta()) < MAX_TRACKER) { // if the electron is inside the tracker
     energyS = gRandom->Gaus(energy, sqrt( 
 					 pow(ELG_Ncen,2) + 
@@ -454,5 +501,5 @@
 					 pow(ELG_Scen*sqrt(energy),2) ));
   } 
-  if(eta > MAX_TRACKER && eta < MAX_CALO_FWD){
+  if(fabs(electron.Eta()) > MAX_TRACKER && fabs(electron.Eta()) < MAX_CALO_FWD){
     energyS = gRandom->Gaus(energy, sqrt(
 					 pow(ELG_Nfwd,2) +
@@ -609,4 +656,31 @@
 
 
+  //********** 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;
+   for (unsigned int i=1; i< NTOWERS+1; i++) {
+	if(fabs(eta)>TOWER_ETA_EDGES[i-1] && fabs(eta)<TOWER_ETA_EDGES[i]) {
+		iEta = (eta>0) ? TOWER_ETA_EDGES[i-1] : -TOWER_ETA_EDGES[i];
+		index = i-1;
+		//cout << setw(15) << left << eta << "\t" << iEta << endl;
+		break;
+	}
+   }
+   if(index==-100) return; 
+   iPhi = -100;
+   float dphi = TOWER_DPHI[index]*PI/180.; 
+   for (unsigned int i=1; i < 360/TOWER_DPHI[index]; i++ ) {
+	float low = -PI+(i-1)*dphi;
+	float high= low+dphi;
+	if(phi > low && phi < high ){
+		iPhi = low; 
+		break;
+	} 
+   }
+   if (phi > PI-dphi) iPhi = PI-dphi;
+}
+
+
 //**************************** Returns the delta Phi ****************************
 float DeltaPhi(const float phi1, const float phi2) {
