Index: /trunk/Delphes.cpp
===================================================================
--- /trunk/Delphes.cpp	(revision 99)
+++ /trunk/Delphes.cpp	(revision 100)
@@ -105,11 +105,11 @@
   
   //Propagation of tracks in the B field
-  TrackPropagation *TRACP = new TrackPropagation(); 
+  TrackPropagation *TRACP = new TrackPropagation(DetDatacard); 
   
   //Jet information
-  JetsUtil *JETRUN = new JetsUtil();
+  JetsUtil *JETRUN = new JetsUtil(DetDatacard);
   
   //VFD information
-  VeryForward * VFD = new VeryForward();
+  VeryForward * VFD = new VeryForward(DetDatacard);
   
   //todo(LogName.c_str());
@@ -189,5 +189,6 @@
   
   
-  
+  float iPhi=0,iEta=0;
+
   // Loop over all events
   Long64_t entry, allEntries = treeReader->GetEntries();
@@ -266,19 +267,20 @@
 	      
 	      // all final particles but muons and neutrinos	
-	      // for calorimetric towers and mission PT
+	      // for calorimetric towers and missing PT
 	      int charge=Charge(pid); 
 	      if(genMomentum.E() !=0 && pid != pMU) {
 		if(charge == 0 || (charge !=0 && genMomentum.Pt() >= DET->TRACK_ptmin)){
-		  PhysicsTower CaloTower = PhysicsTower(LorentzVector(genMomentum.Px(),genMomentum.Py(),genMomentum.Pz(), genMomentum.E()));
-		  towers.push_back(CaloTower);
-		  // create a fastjet::PseudoJet with these components and put it onto
-		  // 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);
+		  DET->BinEtaPhi(genMomentum.Phi(), genMomentum.Eta(), iPhi, iEta);
+                  if(iEta != -100 && iPhi != -100) 
+                    {
+                      genMomentumCalo.SetPtEtaPhiE(genMomentum.Pt(),iEta,iPhi,genMomentum.E());
+                      elementCalo = (TRootCalo*) branchCalo->NewEntry();
+                      elementCalo->Set(genMomentumCalo);
+
+//		      CalTower     myCaloTower(genMomentumCalo.Et,genMomentumCalo.Eta,genMomentumCalo.Phi,iEta,iPhi);
+//		      PhysicsTower Tower(LorentzVector(genMomentumCalo.Px(),genMomentumCalo.Py(),genMomentumCalo.Pz(), genMomentumCalo.E()),myCaloTower);
+		      PhysicsTower Tower(LorentzVector(genMomentumCalo.Px(),genMomentumCalo.Py(),genMomentumCalo.Pz(), genMomentumCalo.E()));
+                      towers.push_back(Tower);
+                    }
 		}
 	      }
@@ -302,6 +304,6 @@
 	  if(DET->FLAG_vfd==1)
 	    {  
-	      VFD->ZDC(treeWriter,branchZDC,particle);
-	      VFD->RomanPots(treeWriter,branchRP220,branchFP420,particle);
+	     VFD->ZDC(treeWriter,branchZDC,particle);
+	     VFD->RomanPots(treeWriter,branchRP220,branchFP420,particle);
 	    }
 	  
@@ -332,6 +334,12 @@
       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);
+Att.SetPxPyPzE(towers[i].fourVector.px, towers[i].fourVector.py, towers[i].fourVector.pz, towers[i].fourVector.E);
+if(fabs(Att.Eta())<DET->CEN_max_calo_fwd)
+{
           PTmis = PTmis + Att;
+          // create a fastjet::PseudoJet with these components and put it onto
+          // back of the input_particles vector
+          input_particles.push_back(fastjet::PseudoJet(towers[i].fourVector.px,towers[i].fourVector.py,towers[i].fourVector.pz,towers[i].fourVector.E));
+}
         }
       elementEtmis = (TRootETmis*) branchETmis->NewEntry();
Index: /trunk/Makefile
===================================================================
--- /trunk/Makefile	(revision 99)
+++ /trunk/Makefile	(revision 100)
@@ -28,4 +28,22 @@
 
 
+Delphes$(ExeSuf): \
+	tmp/Delphes.$(ObjSuf)
+
+tmp/Delphes.$(ObjSuf): \
+	Delphes.cpp \
+	Utilities/ExRootAnalysis/interface/ExRootTreeReader.h \
+	Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
+	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
+	interface/DataConverter.h \
+	interface/HEPEVTConverter.h \
+	interface/LHEFConverter.h \
+	interface/STDHEPConverter.h \
+	interface/SmearUtil.h \
+	interface/BFieldProp.h \
+	interface/TriggerUtil.h \
+	interface/VeryForward.h \
+	interface/JetUtils.h \
+	interface/FrogUtil.h
 Resolutions$(ExeSuf): \
 	tmp/Resolutions.$(ObjSuf)
@@ -46,21 +64,4 @@
 	Utilities/Fastjet/include/fastjet/ClusterSequence.hh \
 	interface/TreeClasses.h
-Delphes$(ExeSuf): \
-	tmp/Delphes.$(ObjSuf)
-
-tmp/Delphes.$(ObjSuf): \
-	Delphes.cpp \
-	Utilities/ExRootAnalysis/interface/ExRootTreeReader.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
-	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
-	interface/DataConverter.h \
-	interface/HEPEVTConverter.h \
-	interface/LHEFConverter.h \
-	interface/STDHEPConverter.h \
-	interface/SmearUtil.h \
-	interface/BFieldProp.h \
-	interface/TriggerUtil.h \
-	interface/VeryForward.h \
-	interface/JetUtils.h
 Analysis_Ex$(ExeSuf): \
 	tmp/Examples/Analysis_Ex.$(ObjSuf)
@@ -85,12 +86,12 @@
 	Utilities/ExRootAnalysis/interface/BlockClasses.h
 EXECUTABLE =  \
+	Delphes$(ExeSuf) \
 	Resolutions$(ExeSuf) \
-	Delphes$(ExeSuf) \
 	Analysis_Ex$(ExeSuf) \
 	Trigger_Only$(ExeSuf)
 
 EXECUTABLE_OBJ =  \
+	tmp/Delphes.$(ObjSuf) \
 	tmp/Resolutions.$(ObjSuf) \
-	tmp/Delphes.$(ObjSuf) \
 	tmp/Examples/Analysis_Ex.$(ObjSuf) \
 	tmp/Examples/Trigger_Only.$(ObjSuf)
@@ -118,4 +119,33 @@
 	src/BFieldProp.$(SrcSuf) \
 	interface/BFieldProp.h
+tmp/src/FrogUtil.$(ObjSuf): \
+	src/FrogUtil.$(SrcSuf) \
+	interface/FrogUtil.h \
+	Utilities/FROG/Includes/FROG/FROG_DetId.h \
+	Utilities/FROG/Includes/FROG/FROG_Geometry.h \
+	Utilities/FROG/Includes/FROG/FROG_Events.h \
+	Utilities/FROG/Includes/FROG/FROG_Element_Tools.h \
+	Utilities/FROG/Includes/FROG/FROG_Net_Tools.h \
+	Utilities/FROG/Includes/FROG/FROG_Path.h \
+	Utilities/FROG/Includes/FROG/FROG_Coord.h \
+	Utilities/FROG/Includes/FROG/FROG_ReadCards.h \
+	Utilities/FROG/Includes/FROG/FROG_ZLib.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/JetUtils.$(ObjSuf): \
+	src/JetUtils.$(SrcSuf) \
+	interface/JetUtils.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) \
@@ -128,159 +158,140 @@
 	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/TriggerUtil.$(ObjSuf): \
+	src/TriggerUtil.$(SrcSuf) \
+	interface/TriggerUtil.h
 tmp/src/VeryForward.$(ObjSuf): \
 	src/VeryForward.$(SrcSuf) \
 	interface/VeryForward.h \
 	interface/SmearUtil.h
-tmp/src/TriggerUtil.$(ObjSuf): \
-	src/TriggerUtil.$(SrcSuf) \
-	interface/TriggerUtil.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/SmearUtil.$(ObjSuf): \
-	src/SmearUtil.$(SrcSuf) \
-	interface/SmearUtil.h
-tmp/src/FrogUtil.$(ObjSuf): \
-	src/FrogUtil.$(SrcSuf)
-tmp/src/TreeClasses.$(ObjSuf): \
-	src/TreeClasses.$(SrcSuf) \
-	interface/TreeClasses.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/Utilities/ExRootAnalysis/src/BlockClasses.$(ObjSuf): \
+	Utilities/ExRootAnalysis/src/BlockClasses.$(SrcSuf) \
+	Utilities/ExRootAnalysis/interface/BlockClasses.h \
+	Utilities/ExRootAnalysis/interface/BlockCompare.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/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/ExRootTreeWriter.$(ObjSuf): \
 	Utilities/ExRootAnalysis/src/ExRootTreeWriter.$(SrcSuf) \
 	Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
 	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h
-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_Parameters.$(ObjSuf): \
-	Utilities/Hector/src/H_Parameters.$(SrcSuf)
+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/Hector/src/H_CircularAperture.$(ObjSuf): \
+	Utilities/Hector/src/H_CircularAperture.$(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_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_SectorDipole.$(ObjSuf): \
-	Utilities/Hector/src/H_SectorDipole.$(SrcSuf)
+tmp/Utilities/Hector/src/H_Kicker.$(ObjSuf): \
+	Utilities/Hector/src/H_Kicker.$(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_RecRPObject.$(ObjSuf): \
 	Utilities/Hector/src/H_RecRPObject.$(SrcSuf)
-tmp/Utilities/Hector/src/H_CircularAperture.$(ObjSuf): \
-	Utilities/Hector/src/H_CircularAperture.$(SrcSuf)
 tmp/Utilities/Hector/src/H_RectEllipticAperture.$(ObjSuf): \
 	Utilities/Hector/src/H_RectEllipticAperture.$(SrcSuf)
-tmp/Utilities/Hector/src/H_AbstractBeamLine.$(ObjSuf): \
-	Utilities/Hector/src/H_AbstractBeamLine.$(SrcSuf)
-tmp/Utilities/Hector/src/H_TransportMatrices.$(ObjSuf): \
-	Utilities/Hector/src/H_TransportMatrices.$(SrcSuf)
-tmp/Utilities/Hector/src/H_Aperture.$(ObjSuf): \
-	Utilities/Hector/src/H_Aperture.$(SrcSuf)
-tmp/Utilities/Hector/src/H_OpticalElement.$(ObjSuf): \
-	Utilities/Hector/src/H_OpticalElement.$(SrcSuf)
-tmp/Utilities/Hector/src/H_BeamLine.$(ObjSuf): \
-	Utilities/Hector/src/H_BeamLine.$(SrcSuf)
-tmp/Utilities/Hector/src/H_BeamParticle.$(ObjSuf): \
-	Utilities/Hector/src/H_BeamParticle.$(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_BeamLineParser.$(ObjSuf): \
-	Utilities/Hector/src/H_BeamLineParser.$(SrcSuf)
-tmp/Utilities/Hector/src/H_Beam.$(ObjSuf): \
-	Utilities/Hector/src/H_Beam.$(SrcSuf)
-tmp/Utilities/Hector/src/H_Marker.$(ObjSuf): \
-	Utilities/Hector/src/H_Marker.$(SrcSuf)
-tmp/Utilities/Hector/src/H_Kicker.$(ObjSuf): \
-	Utilities/Hector/src/H_Kicker.$(SrcSuf)
 tmp/Utilities/Hector/src/H_RomanPot.$(ObjSuf): \
 	Utilities/Hector/src/H_RomanPot.$(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_RectangularAperture.$(ObjSuf): \
-	Utilities/Hector/src/H_RectangularAperture.$(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/Hector/src/H_Dipole.$(ObjSuf): \
-	Utilities/Hector/src/H_Dipole.$(SrcSuf)
-tmp/Utilities/Hector/src/H_VerticalKicker.$(ObjSuf): \
-	Utilities/Hector/src/H_VerticalKicker.$(SrcSuf)
-tmp/Utilities/Hector/src/H_Quadrupole.$(ObjSuf): \
-	Utilities/Hector/src/H_Quadrupole.$(SrcSuf)
+tmp/Utilities/Fastjet/src/AreaDefinition.$(ObjSuf): \
+	Utilities/Fastjet/src/AreaDefinition.$(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/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/ClusterSequenceActiveArea.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequenceActiveArea.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequence_TiledN2.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequence_TiledN2.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequence_CP2DChan.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequence_CP2DChan.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequence_N2.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequence_N2.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequencePassiveArea.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequencePassiveArea.$(SrcSuf)
+tmp/Utilities/Fastjet/src/Dnn3piCylinder.$(ObjSuf): \
+	Utilities/Fastjet/src/Dnn3piCylinder.$(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/ClusterSequence.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequence.$(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/RangeDefinition.$(ObjSuf): \
 	Utilities/Fastjet/src/RangeDefinition.$(SrcSuf)
-tmp/Utilities/Fastjet/src/BasicRandom.$(ObjSuf): \
-	Utilities/Fastjet/src/BasicRandom.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequenceArea.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequenceArea.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(SrcSuf)
-tmp/Utilities/Fastjet/src/PseudoJet.$(ObjSuf): \
-	Utilities/Fastjet/src/PseudoJet.$(SrcSuf)
-tmp/Utilities/Fastjet/src/AreaDefinition.$(ObjSuf): \
-	Utilities/Fastjet/src/AreaDefinition.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequence_DumbN3.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequence_DumbN3.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(SrcSuf)
-tmp/Utilities/Fastjet/src/Dnn3piCylinder.$(ObjSuf): \
-	Utilities/Fastjet/src/Dnn3piCylinder.$(SrcSuf)
-tmp/Utilities/Fastjet/src/Error.$(ObjSuf): \
-	Utilities/Fastjet/src/Error.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequenceAreaBase.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequenceAreaBase.$(SrcSuf)
-tmp/Utilities/Fastjet/src/Dnn4piCylinder.$(ObjSuf): \
-	Utilities/Fastjet/src/Dnn4piCylinder.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(SrcSuf)
-tmp/Utilities/Fastjet/src/JetDefinition.$(ObjSuf): \
-	Utilities/Fastjet/src/JetDefinition.$(SrcSuf)
-tmp/Utilities/Fastjet/src/DnnPlane.$(ObjSuf): \
-	Utilities/Fastjet/src/DnnPlane.$(SrcSuf)
-tmp/Utilities/Fastjet/src/ClusterSequence_Delaunay.$(ObjSuf): \
-	Utilities/Fastjet/src/ClusterSequence_Delaunay.$(SrcSuf)
-tmp/Utilities/Fastjet/src/MinHeap.$(ObjSuf): \
-	Utilities/Fastjet/src/MinHeap.$(SrcSuf)
 tmp/Utilities/Fastjet/src/Voronoi.$(ObjSuf): \
 	Utilities/Fastjet/src/Voronoi.$(SrcSuf)
@@ -292,47 +303,47 @@
 	Utilities/Fastjet/include/fastjet/ClusterSequence.hh \
 	Utilities/Fastjet/include/fastjet/Error.hh
+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/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/ClusterComparisons.$(ObjSuf): \
-	Utilities/Fastjet/plugins/CDFCones/src/ClusterComparisons.$(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/CDFCones/src/CalTower.$(ObjSuf): \
-	Utilities/Fastjet/plugins/CDFCones/src/CalTower.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/CDFCones/src/LorentzVector.$(ObjSuf): \
-	Utilities/Fastjet/plugins/CDFCones/src/LorentzVector.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/CDFCones/src/Centroid.$(ObjSuf): \
-	Utilities/Fastjet/plugins/CDFCones/src/Centroid.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/CDFCones/src/MidPointAlgorithm.$(ObjSuf): \
-	Utilities/Fastjet/plugins/CDFCones/src/MidPointAlgorithm.$(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/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/protocones.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/protocones.$(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)
-tmp/Utilities/Fastjet/plugins/SISCone/src/siscone_error.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/siscone_error.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/siscone.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/siscone.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/area.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/area.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/hash.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/hash.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/reference.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/reference.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/momentum.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/momentum.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/geom_2d.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/geom_2d.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/split_merge.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/split_merge.$(SrcSuf)
-tmp/Utilities/Fastjet/plugins/SISCone/src/quadtree.$(ObjSuf): \
-	Utilities/Fastjet/plugins/SISCone/src/quadtree.$(SrcSuf)
 tmp/Examples/src/Analysis_Ex.$(ObjSuf): \
 	Examples/src/Analysis_Ex.$(SrcSuf) \
@@ -340,123 +351,123 @@
 SOURCE_OBJ =  \
 	tmp/src/BFieldProp.$(ObjSuf) \
+	tmp/src/FrogUtil.$(ObjSuf) \
+	tmp/src/HEPEVTConverter.$(ObjSuf) \
+	tmp/src/JetUtils.$(ObjSuf) \
+	tmp/src/LHEFConverter.$(ObjSuf) \
 	tmp/src/STDHEPConverter.$(ObjSuf) \
-	tmp/src/JetUtils.$(ObjSuf) \
+	tmp/src/SmearUtil.$(ObjSuf) \
+	tmp/src/TreeClasses.$(ObjSuf) \
+	tmp/src/TriggerUtil.$(ObjSuf) \
 	tmp/src/VeryForward.$(ObjSuf) \
-	tmp/src/TriggerUtil.$(ObjSuf) \
-	tmp/src/HEPEVTConverter.$(ObjSuf) \
-	tmp/src/SmearUtil.$(ObjSuf) \
-	tmp/src/FrogUtil.$(ObjSuf) \
-	tmp/src/TreeClasses.$(ObjSuf) \
-	tmp/src/LHEFConverter.$(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/ExRootTreeBranch.$(ObjSuf) \
-	tmp/Utilities/ExRootAnalysis/src/ExRootProgressBar.$(ObjSuf) \
 	tmp/Utilities/ExRootAnalysis/src/ExRootTreeWriter.$(ObjSuf) \
-	tmp/Utilities/ExRootAnalysis/src/BlockClasses.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_Parameters.$(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_CircularAperture.$(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_HorizontalKicker.$(ObjSuf) \
 	tmp/Utilities/Hector/src/H_HorizontalQuadrupole.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_SectorDipole.$(ObjSuf) \
+	tmp/Utilities/Hector/src/H_Kicker.$(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_RecRPObject.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_CircularAperture.$(ObjSuf) \
 	tmp/Utilities/Hector/src/H_RectEllipticAperture.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_AbstractBeamLine.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_TransportMatrices.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_Aperture.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_OpticalElement.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_BeamLine.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_BeamParticle.$(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_BeamLineParser.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_Beam.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_Marker.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_Kicker.$(ObjSuf) \
 	tmp/Utilities/Hector/src/H_RomanPot.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_Drift.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_EllipticAperture.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_RectangularAperture.$(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/Hector/src/H_Dipole.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_VerticalKicker.$(ObjSuf) \
-	tmp/Utilities/Hector/src/H_Quadrupole.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/AreaDefinition.$(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/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/ClusterSequenceActiveArea.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequence_TiledN2.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequence_CP2DChan.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequence_N2.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequencePassiveArea.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/Dnn3piCylinder.$(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/ClusterSequence.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/JetDefinition.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/MinHeap.$(ObjSuf) \
+	tmp/Utilities/Fastjet/src/PseudoJet.$(ObjSuf) \
 	tmp/Utilities/Fastjet/src/RangeDefinition.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/BasicRandom.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequenceArea.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/PseudoJet.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/AreaDefinition.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequence_DumbN3.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequenceVoronoiArea.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/Dnn3piCylinder.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/Error.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequenceAreaBase.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/Dnn4piCylinder.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequence1GhostPassiveArea.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/JetDefinition.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/DnnPlane.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/ClusterSequence_Delaunay.$(ObjSuf) \
-	tmp/Utilities/Fastjet/src/MinHeap.$(ObjSuf) \
 	tmp/Utilities/Fastjet/src/Voronoi.$(ObjSuf) \
 	tmp/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.$(ObjSuf) \
 	tmp/Utilities/Fastjet/plugins/CDFCones/CDFMidPointPlugin.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/CDFCones/src/CalTower.$(ObjSuf) \
+	tmp/Utilities/Fastjet/plugins/CDFCones/src/Centroid.$(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/ClusterComparisons.$(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/CDFCones/src/CalTower.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/CDFCones/src/LorentzVector.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/CDFCones/src/Centroid.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/CDFCones/src/MidPointAlgorithm.$(ObjSuf) \
 	tmp/Utilities/Fastjet/plugins/SISCone/SISConePlugin.$(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/protocones.$(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/Fastjet/plugins/SISCone/src/siscone_error.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/siscone.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/area.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/hash.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/reference.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/momentum.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/geom_2d.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/split_merge.$(ObjSuf) \
-	tmp/Utilities/Fastjet/plugins/SISCone/src/quadtree.$(ObjSuf) \
 	tmp/Examples/src/Analysis_Ex.$(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_Block.$(ObjSuf): \
-	Utilities/mcfio/mcfio_Block.c
-tmp/Utilities/mcfio/mcf_evt_xdr.$(ObjSuf): \
-	Utilities/mcfio/mcf_evt_xdr.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/mcfio/mcfio_SeqDummy.$(ObjSuf): \
+	Utilities/mcfio/mcfio_SeqDummy.c
+tmp/Utilities/mcfio/mcfio_UserDictionary.$(ObjSuf): \
+	Utilities/mcfio/mcfio_UserDictionary.c
 tmp/Utilities/mcfio/mcfio_Util1.$(ObjSuf): \
 	Utilities/mcfio/mcfio_Util1.c
-tmp/Utilities/mcfio/mcf_ntubldInit.$(ObjSuf): \
-	Utilities/mcfio/mcf_ntubldInit.c
-tmp/Utilities/mcfio/mcfio_UserDictionary.$(ObjSuf): \
-	Utilities/mcfio/mcfio_UserDictionary.c
-tmp/Utilities/mcfio/mcf_ntuBldDbinc.$(ObjSuf): \
-	Utilities/mcfio/mcf_ntuBldDbinc.c
-tmp/Utilities/mcfio/mcfio_SeqDummy.$(ObjSuf): \
-	Utilities/mcfio/mcfio_SeqDummy.c
-tmp/Utilities/stdhep/mcf_hepup_xdr.$(ObjSuf): \
-	Utilities/stdhep/mcf_hepup_xdr.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/hepeup.h \
-	Utilities/stdhep/heprup.h \
+	Utilities/stdhep/stdhep.h \
+	Utilities/stdhep/stdtmp.h \
 	Utilities/stdhep/stdver.h
 tmp/Utilities/stdhep/mcf_hepev4_xdr.$(ObjSuf): \
@@ -467,4 +478,11 @@
 	Utilities/stdhep/hepev4.h \
 	Utilities/stdhep/stdtmp.h \
+	Utilities/stdhep/stdver.h
+tmp/Utilities/stdhep/mcf_hepup_xdr.$(ObjSuf): \
+	Utilities/stdhep/mcf_hepup_xdr.c \
+	Utilities/mcfio/mcfio_Dict.h \
+	Utilities/mcfio/mcf_xdr.h \
+	Utilities/stdhep/hepeup.h \
+	Utilities/stdhep/heprup.h \
 	Utilities/stdhep/stdver.h
 tmp/Utilities/stdhep/mcf_stdcm1_xdr.$(ObjSuf): \
@@ -495,28 +513,21 @@
 	Utilities/stdhep/stdcnt.h \
 	Utilities/stdhep/stdhep_mcfio.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
 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_Block.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcf_evt_xdr.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcf_NTuIOUtils.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcf_NTuIOFiles.$(ObjSuf) \
+	tmp/Utilities/mcfio/mcfio_SeqDummy.$(ObjSuf) \
+	tmp/Utilities/mcfio/mcfio_UserDictionary.$(ObjSuf) \
 	tmp/Utilities/mcfio/mcfio_Util1.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcf_ntubldInit.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcfio_UserDictionary.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcf_ntuBldDbinc.$(ObjSuf) \
-	tmp/Utilities/mcfio/mcfio_SeqDummy.$(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_hepev4_xdr.$(ObjSuf) \
 	tmp/Utilities/stdhep/mcf_stdcm1_xdr.$(ObjSuf) \
 	tmp/Utilities/stdhep/stdhep_internal_utils.$(ObjSuf) \
-	tmp/Utilities/stdhep/stdhep_mcfio.$(ObjSuf) \
-	tmp/Utilities/stdhep/mcf_Stdhep_xdr.$(ObjSuf)
+	tmp/Utilities/stdhep/stdhep_mcfio.$(ObjSuf)
 
 interface/TriggerUtil.h: \
@@ -531,7 +542,46 @@
 	@touch $@
 
+Utilities/Fastjet/include/fastjet/Error.hh: \
+	Utilities/Fastjet/include/fastjet/internal/base.hh
+	@touch $@
+
+interface/STDHEPConverter.h: \
+	Utilities/ExRootAnalysis/interface/BlockClasses.h \
+	Utilities/ExRootAnalysis/interface/TSimpleArray.h \
+	Utilities/ExRootAnalysis/interface/LHEF.h \
+	interface/DataConverter.h
+	@touch $@
+
+Utilities/ExRootAnalysis/interface/BlockClasses.h: \
+	Utilities/ExRootAnalysis/interface/BlockCompare.h
+	@touch $@
+
+Utilities/Fastjet/include/fastjet/PseudoJet.hh: \
+	Utilities/Fastjet/include/fastjet/internal/numconsts.hh
+	@touch $@
+
 interface/HEPEVTConverter.h: \
 	Utilities/ExRootAnalysis/interface/BlockClasses.h \
 	Utilities/ExRootAnalysis/interface/TSimpleArray.h \
+	interface/DataConverter.h
+	@touch $@
+
+interface/FrogUtil.h: \
+	interface/SmearUtil.h \
+	Utilities/ExRootAnalysis/interface/BlockClasses.h \
+	Utilities/ExRootAnalysis/interface/ExRootTreeReader.h \
+	Utilities/ExRootAnalysis/interface/ExRootTreeWriter.h \
+	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
+	Utilities/FROG/Includes/FROG/FROG_Events.h
+	@touch $@
+
+interface/TreeClasses.h: \
+	Utilities/ExRootAnalysis/interface/BlockCompare.h \
+	Utilities/ExRootAnalysis/interface/BlockClasses.h
+	@touch $@
+
+interface/LHEFConverter.h: \
+	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
+	Utilities/ExRootAnalysis/interface/LHEF.h \
 	interface/DataConverter.h
 	@touch $@
@@ -550,4 +600,10 @@
 	@touch $@
 
+interface/SmearUtil.h: \
+	Utilities/ExRootAnalysis/interface/BlockClasses.h \
+	Utilities/ExRootAnalysis/interface/TSimpleArray.h \
+	Utilities/Fastjet/plugins/CDFCones/interface/PhysicsTower.hh
+	@touch $@
+
 Examples/interface/Analysis_Ex.h: \
 	Utilities/ExRootAnalysis/interface/ExRootTreeReader.h \
@@ -558,36 +614,8 @@
 	@touch $@
 
-interface/TreeClasses.h: \
-	Utilities/ExRootAnalysis/interface/BlockCompare.h \
-	Utilities/ExRootAnalysis/interface/BlockClasses.h
-	@touch $@
-
-interface/SmearUtil.h: \
-	Utilities/ExRootAnalysis/interface/BlockClasses.h \
-	Utilities/ExRootAnalysis/interface/TSimpleArray.h \
-	Utilities/Fastjet/plugins/CDFCones/interface/PhysicsTower.hh
-	@touch $@
-
-interface/LHEFConverter.h: \
-	Utilities/ExRootAnalysis/interface/ExRootTreeBranch.h \
-	Utilities/ExRootAnalysis/interface/LHEF.h \
-	interface/DataConverter.h
-	@touch $@
-
 interface/BFieldProp.h: \
 	interface/SmearUtil.h \
 	Utilities/ExRootAnalysis/interface/BlockClasses.h \
 	Utilities/ExRootAnalysis/interface/TSimpleArray.h
-	@touch $@
-
-Utilities/Fastjet/include/fastjet/Error.hh: \
-	Utilities/Fastjet/include/fastjet/internal/base.hh
-	@touch $@
-
-Utilities/Fastjet/include/fastjet/ClusterSequence.hh: \
-	Utilities/Fastjet/include/fastjet/internal/DynamicNearestNeighbours.hh \
-	Utilities/Fastjet/include/fastjet/PseudoJet.hh \
-	Utilities/Fastjet/include/fastjet/Error.hh \
-	Utilities/Fastjet/include/fastjet/JetDefinition.hh
 	@touch $@
 
@@ -613,17 +641,9 @@
 	@touch $@
 
-Utilities/ExRootAnalysis/interface/BlockClasses.h: \
-	Utilities/ExRootAnalysis/interface/BlockCompare.h
-	@touch $@
-
-interface/STDHEPConverter.h: \
-	Utilities/ExRootAnalysis/interface/BlockClasses.h \
-	Utilities/ExRootAnalysis/interface/TSimpleArray.h \
-	Utilities/ExRootAnalysis/interface/LHEF.h \
-	interface/DataConverter.h
-	@touch $@
-
-Utilities/Fastjet/include/fastjet/PseudoJet.hh: \
-	Utilities/Fastjet/include/fastjet/internal/numconsts.hh
+Utilities/Fastjet/include/fastjet/ClusterSequence.hh: \
+	Utilities/Fastjet/include/fastjet/internal/DynamicNearestNeighbours.hh \
+	Utilities/Fastjet/include/fastjet/PseudoJet.hh \
+	Utilities/Fastjet/include/fastjet/Error.hh \
+	Utilities/Fastjet/include/fastjet/JetDefinition.hh
 	@touch $@
 
Index: /trunk/Resolutions.cpp
===================================================================
--- /trunk/Resolutions.cpp	(revision 99)
+++ /trunk/Resolutions.cpp	(revision 100)
@@ -189,8 +189,8 @@
 
   //Jet information
-  JetsUtil *JETRUN = new JetsUtil();
+  JetsUtil *JETRUN = new JetsUtil(DetDatacard);
 
   //Propagation of tracks in the B field
-  TrackPropagation *TRACP = new TrackPropagation();
+  TrackPropagation *TRACP = new TrackPropagation(DetDatacard);
    
   TLorentzVector genMomentum(0,0,0,0);//TLorentzVector containing generator level information
Index: /trunk/Utilities/FROG/Includes/FROG/FROG_Chunk.h
===================================================================
--- /trunk/Utilities/FROG/Includes/FROG/FROG_Chunk.h	(revision 99)
+++ /trunk/Utilities/FROG/Includes/FROG/FROG_Chunk.h	(revision 100)
@@ -114,4 +114,5 @@
 #define	C_PRIMITIVE_PARTIALSPHERE	41031   // Contains a sphere
 #define	C_PRIMITIVE_CYLINDER		41040	// Contains a cylinder
+#define	C_PRIMITIVE_CONE		41080	// Contains a cylinder
 
 #define	C_PRIMITIVE_SURFACE			42000	// Contains Chunks related to Surface Primtive (Plane, Disc, ...)
Index: /trunk/Utilities/FROG/Includes/FROG/FROG_Element_Tools.cpp
===================================================================
--- /trunk/Utilities/FROG/Includes/FROG/FROG_Element_Tools.cpp	(revision 99)
+++ /trunk/Utilities/FROG/Includes/FROG/FROG_Element_Tools.cpp	(revision 100)
@@ -139,4 +139,13 @@
 				}				
 			break;
+
+                       case C_PRIMITIVE_CONE :
+                                NObjs = (chunk_size-chunk_read)/(FROG_Element_Primitive_Cone::sizeOf()-6);
+                                for(int i=0;i<NObjs;i++){
+                                        mother->addDaughter(new FROG_Element_Primitive_Cone(pFile));
+                                        chunk_read += FROG_Element_Primitive_Cone::sizeOf()-6;
+                                }
+                        break;
+
 
 			case C_PRIMITIVE_CUSTOM_SURFACE :
Index: /trunk/Utilities/FROG/Includes/FROG/FROG_Element_Tools.h
===================================================================
--- /trunk/Utilities/FROG/Includes/FROG/FROG_Element_Tools.h	(revision 99)
+++ /trunk/Utilities/FROG/Includes/FROG/FROG_Element_Tools.h	(revision 100)
@@ -25,4 +25,5 @@
 #include "FROG_Element_Primitive_PartialSphere.h"
 #include "FROG_Element_Primitive_Cylinder.h"
+#include "FROG_Element_Primitive_Cone.h"
 
 #include "FROG_Element_Primitive_CustomSurface.h"
Index: /trunk/Utilities/FROG/main.cpp
===================================================================
--- /trunk/Utilities/FROG/main.cpp	(revision 99)
+++ /trunk/Utilities/FROG/main.cpp	(revision 100)
@@ -5,4 +5,6 @@
 void Loading()
 {
+	char Buffer[1024];
+
 	switch(mLoading_I)
 	{	
@@ -43,11 +45,12 @@
 			ViewScreen = new FROG_View_Screen("Screen");
 			ViewScreen->Reshape(WINDOW_WIDTH,WINDOW_HEIGHT);
-			ViewScreen->LoadingInProgress(0.0f,"Reading config.txt",Fonts,LogoTexture);
+			sprintf(Buffer,"Reading %s",inputConfig.c_str());
+			ViewScreen->LoadingInProgress(0.0f,Buffer,Fonts,LogoTexture);
 		
 
-			LoadCard("config.txt");
+			LoadCard(inputConfig.c_str());
 			if(!Card->IsTagPresent("InputGeom") && !Card->IsTagPresent("InputVisFile")){
 			   printf("There is no .geom file neither than .vis file in the Config card\n");
-			   printf("FROG will stop.  Please update the Config card (config.txt)\n");
+			   printf("FROG will stop.  Please update the Config card (%s)\n",inputConfig.c_str());
 			   exit(0);
 			}			
@@ -61,5 +64,5 @@
 			   inputGeom = Card->GetStringVector("InputGeom");	   
 			   for(unsigned int g=0;g<inputGeom.size();g++){
-				   inputGeom[g] = string((char*)DownLoadFile( (char*)inputGeom[g].c_str() ) );
+				   inputGeom[g] = string((char*)DownLoadFile( (char*)inputGeom[g].c_str(), AbsolutePath.c_str() ) );
 			   }
 			}						
@@ -67,4 +70,5 @@
 
 		case 2:
+			/*
 			ViewScreen->LoadingInProgress(10.0f,"Downloading Events\n(if necessary)",Fonts,LogoTexture);			
 
@@ -72,5 +76,6 @@
 				inputVisFileFromCard = Card->GetString("InputVisFile");			   	
 			}
-			inputVisFile = string((char*)DownLoadFile( (char*)inputVisFileFromCard.c_str() ) );
+			inputVisFile = string((char*)DownLoadFile( (char*)inputVisFileFromCard.c_str(), AbsolutePath.c_str() ) );
+			*/
 			break;
 
@@ -87,37 +92,32 @@
 			}			
 			frogObjects_ = new FROG_Objects_Extended(geom,NULL,Card, Fonts);
+
 			
 			}break;
 
 		case 4:{
-			if(strcmp(inputVisFile.c_str(),"")==0){
-				ViewScreen->LoadingInProgress(80.0f,"No Event Files has been Given",Fonts,LogoTexture);
-			}else{
-				ViewScreen->LoadingInProgress(80.0f,(char*)inputVisFile.c_str(),Fonts,LogoTexture);
-			}
+			ViewScreen->LoadingInProgress(80.0f,"Loading .vis Files",Fonts,LogoTexture);
 
 			if(events)delete events;
-			events = new FROG_Events();				
-			events->Load(inputVisFile.c_str());
-			events->frogObjects_ = frogObjects_;
-			events->Init(frogObjects_);
+			events = new FROG_Events(frogObjects_);						
+			events->Load(inputVisFileFromCommand);				
 			events->readEventToDisplay(Card);
-			if(SCREENSAVER)eventNumber = rand()%((int)events->NumberOfEvents());
+			if(SCREENSAVER)eventNumber = rand()%((int)events->NumberOfEvents());			
 			event = events->GoToEvent(eventNumber);	
-
 			}break;
 
-		case 5:{
+		case 5:{			
 			ViewScreen->LoadingInProgress(95.0f,"Views Initialisation",Fonts,LogoTexture);
 
 			ViewScreen->displayFunc_ = displaytext;
 			std::vector<string> ViewsName = Card->GetStringVector("ActiveViews");
-			ViewMain = ViewScreen;			
-			for(unsigned int i=0;i<ViewsName.size();i++){				
+			ViewMain = ViewScreen;						
+			for(unsigned int i=0;i<ViewsName.size();i++){								
 				char* tmp = new char[ViewsName[i].size()+1];				
 				strcpy(tmp,ViewsName[i].c_str());				
-				ActiveViews.push_back(FROG_VIEW::Create(tmp,frogObjects_));								
-			}						
+				ActiveViews.push_back(FROG_VIEW::Create(tmp,frogObjects_));												
+			}							
 			ViewScreen->Reshape(WINDOW_WIDTH,WINDOW_HEIGHT);
+			
 			for(unsigned int j=0;j<ActiveViews.size();j++){
 				if(ViewMain==ViewScreen && ActiveViews[j]->IsSwapPossible()){ViewMain = ActiveViews[j];}
@@ -125,9 +125,9 @@
 				ActiveViews[j]->displayFunc_ = &display2;
 			}				
-			ViewMain->IsActive = true;
+			ViewMain->IsActive = true;			
 			geom->updateGeomToDisplay((void*)frogObjects_);
 
 			ViewMenu = new FROG_View_Menu("ViewMenu2",frogObjects_);
-			ViewMenu->Reshape(WINDOW_WIDTH,WINDOW_HEIGHT);			
+			ViewMenu->Reshape(WINDOW_WIDTH,WINDOW_HEIGHT);						
 			}break;
 
@@ -155,4 +155,5 @@
 			glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) ;		
 
+
 			mLoading   = false;
 			end = time ( NULL );
@@ -161,4 +162,16 @@
 			glutDisplayFunc (display);
 			glutIdleFunc    (display);
+
+			glutKeyboardFunc (processNormalKeys);
+			glutSpecialFunc  (processSpecialKeys);
+		 
+			glutMouseFunc(processMouse);
+			glutMotionFunc(processMotion);
+			if(SCREENSAVER){
+				eventTime = 20;
+				glutPassiveMotionFunc(processPassiveMotion);		
+				glutFullScreen();
+			}
+
 
 			if(SHOOTER){
@@ -207,38 +220,43 @@
 	Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH-126,WINDOW_HEIGHT - 30,"% 10i FPS", ViewScreen->FPS);
 	if(mHelpScreen){		
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 45	,"F1     = Open this Screen for Help");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 60	,"F2     = Open the Display Menu");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 75	,"F3     = use only for debug");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 90	,"F4     = Automatic ScreenShooter (Warning)");
-
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 125	,"F5     = SimTrack       : ON/OFF");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 140	,"F6     = SimVertex      : ON/OFF");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 155	,"F7     = PSimHits       : ON/OFF");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 170	,"F8     = RecoTrack      : ON/OFF");
-
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 205	,"F9     = SiStripCluster : ON/OFF");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 220	,"F10    = EcalHits       : ON/OFF");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 235	,"F11    = HcalHits       : ON/OFF");		
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 250	,"F12    = MuonHit/Seg    : ON/OFF");
-
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 285	,"0      = Geometry to Display : NONE");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 300	,"9      = Geometry to Display : FULL");
-
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 335	,"LEFT   = Previous Event");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 350	,"RIGHT  = Next     Event");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 375	,"UP     = Increase Rotation");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 390	,"DOWN   = Decrease Rotation");
-
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 425	,"p      = Zoom In");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 440	,"m      = Zoom Out");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 455	,"f      = Maximize the active view");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 470	,"s      = SlideShow      : ON/OFF");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 485	,"t      = TreeMenu       : ON/OFF");
-
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 515   ,"ENTER  = Screenshot");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 530   ,"SPACE  = Rotation       : ON/OFF");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 545   ,"ESCAPE = Exit");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 560   ,"q      = Exit");
-		Fonts->Font_Fixed_9_by_15->glPrint(WINDOW_WIDTH/3,WINDOW_HEIGHT - 575   ,"a      = Full Screen");
+		if(events) Fonts->Font_Fixed_9_by_15->glPrint(0,WINDOW_HEIGHT - 14,"CurrentFile = ...%s",events->CurrentFile());
+
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 45	,"F1     = Open this Screen for Help");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 60	,"F2     = Open the Display Menu");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 75	,"F3     = use only for debug");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 90	,"F4     = Automatic ScreenShooter (Warning)");
+
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 125	,"F5     = SimTrack       : ON/OFF");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 140	,"F6     = SimVertex      : ON/OFF");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 155	,"F7     = PSimHits       : ON/OFF");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 170	,"F8     = RecoTrack      : ON/OFF");
+
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 205	,"F9     = SiStripCluster : ON/OFF");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 220	,"F10    = EcalHits       : ON/OFF");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 235	,"F11    = HcalHits       : ON/OFF");		
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 250	,"F12    = MuonHit/Seg    : ON/OFF");
+
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 285	,"0      = Geometry to Display : NONE");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 300	,"9      = Geometry to Display : FULL");
+
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 335	,"LEFT   = Previous Event");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 350	,"RIGHT  = Next     Event");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 375	,"UP     = Increase Rotation");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 390	,"DOWN   = Decrease Rotation");
+
+		Fonts->Font_Fixed_9_by_15->glPrint(500,WINDOW_HEIGHT - 375	,"PAGE UP   = Previous VisFile");
+		Fonts->Font_Fixed_9_by_15->glPrint(500,WINDOW_HEIGHT - 390	,"PAGE DOWN = Next     VisFile");
+
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 425	,"p      = Zoom In");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 440	,"m      = Zoom Out");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 455	,"f      = Maximize the active view");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 470	,"s      = SlideShow      : ON/OFF");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 485	,"t      = TreeMenu       : ON/OFF");
+
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 515   ,"ENTER  = Screenshot");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 530   ,"SPACE  = Rotation       : ON/OFF");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 545   ,"ESCAPE = Exit");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 560   ,"q      = Exit");
+		Fonts->Font_Fixed_9_by_15->glPrint(150,WINDOW_HEIGHT - 575   ,"a      = Full Screen");
 		
 		Fonts->Font_Fixed_9_by_15->glPrint(120,3,"This program has been created by Loic Quertenmont, loic.quertenmont@cern.ch");		
@@ -334,51 +352,6 @@
 // if required by the variable updateVisFileTime
 
-#ifdef linux        
-	if( updateVisFileTime>0 && !Thread_Run) {
-		char* argtosend = (char*)inputVisFileFromCard.c_str();
-		if (pthread_create (&Thread_H, NULL, DownLoadFile, (void*)argtosend) < 0) {
-		   printf("pthread_create error for Thread_H\n");
-		   exit (1);
-		}		
-		Thread_Run=true;
-	}
-
-	static time_t upstart = time (NULL );
-	time_t upstop = time( NULL );
-	if(upstop - upstart > updateVisFileTime && Thread_Run) {
-		(void)pthread_join (Thread_H, NULL);
-
-		Thread_Run=false;
-		glutDisplayFunc (Loading);
-		glutIdleFunc    (Loading);
-
-		mLoading_I = 30;
-		mLoading   = true;
-		start = time ( NULL );
-	}
-#elif macos
-	if( updateVisFileTime>0 && !Thread_Run) {
-		char* argtosend = (char*)inputVisFileFromCard.c_str();
-		if (pthread_create (&Thread_H, NULL, DownLoadFile, (void*)argtosend) < 0) {
-		   printf("pthread_create error for Thread_H\n");
-		   exit (1);
-		}		
-		Thread_Run=true;
-	}
-
-	static time_t upstart = time (NULL );
-	time_t upstop = time( NULL );
-	if(upstop - upstart > updateVisFileTime && Thread_Run) {
-		(void)pthread_join (Thread_H, NULL);
-
-		Thread_Run=false;
-		glutDisplayFunc (Loading);
-		glutIdleFunc    (Loading);
-
-		mLoading_I = 30;
-		mLoading   = true;
-		start = time ( NULL );
-	}
-#else	
+/*
+#ifdef windows        
 	if( updateVisFileTime>0 && !Thread_Run) {
 		char* argtosend = (char*)inputVisFileFromCard.c_str();
@@ -408,6 +381,30 @@
 		upstart = time (NULL );
 	}
+#else
+	if( updateVisFileTime>0 && !Thread_Run) {
+		char* argtosend = (char*)inputVisFileFromCard.c_str();
+		if (pthread_create (&Thread_H, NULL, DownLoadFile, (void*)argtosend) < 0) {
+		   printf("pthread_create error for Thread_H\n");
+		   exit (1);
+		}		
+		Thread_Run=true;
+	}
+
+	static time_t upstart = time (NULL );
+	time_t upstop = time( NULL );
+	if(upstop - upstart > updateVisFileTime && Thread_Run) {
+		(void)pthread_join (Thread_H, NULL);
+
+		Thread_Run=false;
+		glutDisplayFunc (Loading);
+		glutIdleFunc    (Loading);
+
+		mLoading_I = 30;
+		mLoading   = true;
+		start = time ( NULL );
+	}
+
 #endif
-
+*/
 
 }
@@ -424,5 +421,5 @@
 			break;
 		case 13 :{			
-			char temp[255]; sprintf(temp,"screenshot%02i.%s",SCREENSHOT,SCREENSHOT_FORMAT);			
+			char temp[255]; sprintf(temp,"%s%02i.%s",ScreenShotName,SCREENSHOT,SCREENSHOT_FORMAT);			
 			SaveScreenshot(temp,WINDOW_WIDTH,WINDOW_HEIGHT, displayForScreenShot );			
 			SCREENSHOT++;
@@ -439,5 +436,5 @@
 		case 'r' :
         case 'R' :
-            LoadCard("config.txt");
+            LoadCard(inputConfig.c_str());
 /*			geom->updateGeomToDisplay(Card);
 			events->prim->setDisplay(0);
@@ -586,4 +583,14 @@
 			}
 			break;
+
+		case GLUT_KEY_PAGE_UP : 
+			events->NextFile();
+			event = events->GoToEvent(0);
+			break;
+		case GLUT_KEY_PAGE_DOWN : 
+			events->PreviousFile();
+			event = events->GoToEvent(0);
+			break;
+
 		case GLUT_KEY_HOME :
 			if(ViewMain->Type_==VIEW3D)	ViewMain->cam_->Reset();			
@@ -681,8 +688,8 @@
 	ViewMain->Display_Begin();
 
-	GLuint buff[256] = {0};
+	GLuint buff[1024] = {0};
 	GLint hits, view[4];
 
-	glSelectBuffer(256, buff);
+	glSelectBuffer(1024, buff);
 	glGetIntegerv(GL_VIEWPORT, view);
 	glRenderMode(GL_SELECT);
@@ -693,5 +700,5 @@
  	glPushMatrix();
  		glLoadIdentity();
-		gluPickMatrix(x-2, y-2, 4.0, 4.0, view); 		        
+		gluPickMatrix(x-4, y-4, 8.0, 8.0, view); 		        
 		ViewMain->ProjectionMatrix();
  		glMatrixMode(GL_MODELVIEW);
@@ -723,5 +730,5 @@
 	for (i = 0; (int)i < hits; i++) {
 		unsigned int tmp = names[i * 4 + 3];
-		//printf("--> %i > %i\n",i,tmp);		
+		//printf("--> %i/%i > %i\n",i,hits,tmp);		
 		if(i == NearestHit && tmp!=0){				
 			if(tmp>1000000){
@@ -734,8 +741,8 @@
  }
 
-void LoadCard(const char* inputCard ) {
+void LoadCard(const char* inputCard ){
 	if(Card)delete Card;
-	Card = new FROG_ReadCards(inputCard);
-	
+	Card = new FROG_ReadCards(AbsolutePath.c_str(),inputCard);
+		
 	Card->GetInt  (&updateVisFileTime   , "updateVisFileTime");	
 
@@ -745,4 +752,5 @@
 
 	Card->GetChar (SCREENSHOT_FORMAT,256, "Screenshot_Format");
+	Card->GetChar (ScreenShotName,1024  , "Screenshot_Name");
 
 	Card->GetColor(BackGround_Color     , "BackGround_Color");
@@ -778,5 +786,5 @@
 	}
 	if(!mAutomaticShooter){				
-		if(eventTime>0)glutTimerFunc(1+eventTime*1000,AutomaticEventChanging, 0);	
+		if(eventTime>=0)glutTimerFunc(1+eventTime*1000,AutomaticEventChanging, 0);	
 	}else{		
 		if(mAutomaticShooter_LastEvent == events->Current_Event){
@@ -788,5 +796,5 @@
 
 	EventI++;
-	if(event && events)printf("%8u | Run %4i Event %4i | Event %4i in File Containing %4i Events\n",EventI,event->NRun_,event->NEvent_,events->Current_Event, (int)events->NumberOfEvents()-1);
+	if(event && events)printf("%8u | Run %4i Event %4i | Event %4i in File Containing %4i Events\n",EventI,event->NRun_,event->NEvent_,events->Current_Event, (int)events->NumberOfEvents());
 }
 
@@ -794,17 +802,7 @@
 int main (int argc, char *argv[])
 {	
-	#ifdef linux
-	#elif macos
-
-    #else
-		string ExePath = string(argv[0]);
-		unsigned int n = ExePath.rfind("frog");
-		ExePath = ExePath.substr(0,n);
-
-		USES_CONVERSION;
-		if(SetCurrentDirectory(A2W(ExePath.c_str()))==0){
-			printf("Was not able to change directory to %s\n",ExePath.c_str());
-		}
-    #endif
+	string ExePath = string(argv[0]);
+	unsigned int n = ExePath.rfind("frog");
+	AbsolutePath = ExePath.substr(0,n);
 
 	
@@ -821,23 +819,33 @@
 		if(      strcmp(LowCase,"-shooter"				 )==0){SHOOTER		= true;
 		}else if(strcmp(LowCase,"-s"					 )==0){SCREENSAVER	= true;
-		}else if(len>=4 && strcmp(LowCase+len-4,".vis"	 )==0){inputVisFileFromCard = string(argv[i]);
-		}else if(len>=7 && strcmp(LowCase+len-7,".vis.gz")==0){inputVisFileFromCard = string(argv[i]);
+		}else if(strcmp(LowCase,"-v"					 )==0){
+			printf("Fast and Realistic OpenGl Event Display : FROG\n");
+			printf("Version      : %6.3f of %s\n",FROG_VERSION,__DATE__);
+			printf("Authors List : \n");
+			printf("%s\n",FROG_AUTHORLIST);	
+			exit(0);
+		}else if(strcmp(LowCase,"-c"					 )==0 && i+1<argc){ 
+			i++;	inputConfig = string(argv[i]);
+		}else if(len>=4 && strcmp(LowCase+len-4,".vis"	 )==0){inputVisFileFromCommand.push_back(string(argv[i]));
+		}else if(len>=7 && strcmp(LowCase+len-7,".vis.gz")==0){inputVisFileFromCommand.push_back(string(argv[i]));
 		}else{
 			printf("\n");
-			printf("######################################################################\n");
-			printf("#                 http://projects.hepforge.org/frog/                 #\n");
-			printf("#   Please have a look at the website for latest versions and news   #\n");
-			printf("# Also register to the Frog mailing list if you are not a member yet #\n");			
-			printf("######################################################################\n");
-			printf("#                             HELP SCREEN                            #\n");
-			printf("######################################################################\n");
-			printf("#  Supported Commands are :                                          #\n");
-			printf("#  filename.vis        --> open the file : filename.vis              #\n");
-			printf("#  filename.vis.gz     --> open the file : filename.vis.gz           #\n");
-			printf("#  -help               --> Print this screen                         #\n");
-			printf("#  -s                  --> ScreenSaver Mode                          #\n");
-			printf("#  -shooter            --> Scan events, make a screenshot and exit   #\n");
-			printf("######################################################################\n");
-			printf("\n");
+			printf("#######################################################################\n");
+			printf("#                  http://projects.hepforge.org/frog/                 #\n");
+			printf("#   Please have a look at the website for latest versions and news    #\n");
+			printf("# Also register to the Frog mailing list if you are not a member yet  #\n");			
+			printf("#######################################################################\n");
+			printf("#                             HELP SCREEN                             #\n");
+			printf("#######################################################################\n");
+			printf("#  Supported Commands are :                                           #\n");
+			printf("#  filename.vis        --> open the file : filename.vis               #\n");
+			printf("#  filename.vis.gz     --> open the file : filename.vis.gz            #\n");
+			printf("#  -help               --> Print this screen                          #\n");
+			printf("#  -v                  --> Print Version and Other Info               #\n");
+			printf("#  -s                  --> ScreenSaver Mode                           #\n");
+			printf("#  -c <config.txt>     --> Specify the Frog Configuration Card to use #\n");
+			printf("#  -shooter            --> Scan events, make a screenshot and exit    #\n");
+			printf("#######################################################################\n");
+			printf("\n");			
 			exit(0);
 		}
@@ -854,6 +862,6 @@
 
 	// Charge le logo en mémoire
-	LoadTexture((unsigned int*)&LogoTexture     ,"Resources/Frog_Logo.png");
-	LoadTexture((unsigned int*)&LogoTxtTexture  ,"Resources/Frog_LogoTxt.png");
+	LoadTexture((unsigned int*)&LogoTexture     ,FROG_PATH::GetGlobalPath("Resources/Frog_Logo.png"   ,AbsolutePath.c_str()).c_str());
+	LoadTexture((unsigned int*)&LogoTxtTexture  ,FROG_PATH::GetGlobalPath("Resources/Frog_LogoTxt.png",AbsolutePath.c_str()).c_str());
 
 	// initialisation des fonctions callback appelées par glut 
@@ -864,15 +872,4 @@
 	glutIdleFunc    (Loading);
 
-	// here are the new entries
-	glutKeyboardFunc (processNormalKeys);
-	glutSpecialFunc  (processSpecialKeys);
- 
-	glutMouseFunc(processMouse);
-	glutMotionFunc(processMotion);
-	if(SCREENSAVER){
-		eventTime = 20;
-		glutPassiveMotionFunc(processPassiveMotion);		
-		glutFullScreen();
-	}
 	
 	// initialisation of GLEW (OpenGL Extension Wrangler Library)
Index: /trunk/Utilities/FROG/main.h
===================================================================
--- /trunk/Utilities/FROG/main.h	(revision 99)
+++ /trunk/Utilities/FROG/main.h	(revision 100)
@@ -7,5 +7,5 @@
 #define _MAIN_H__
 
-#define FROG_VERSION 1.105
+#define FROG_VERSION 1.106
 #define FROG_AUTHORLIST "Loic.Quertenmont@cern.ch\nVincent.Roberfroid@cern.ch"
 
@@ -89,6 +89,10 @@
 GLuint LogoTxtTexture;
 
+char ScreenShotName[1024] = {"screenshot"};
+std::string AbsolutePath;
+std::string inputConfig = "config.txt";
 std::string inputVisFile;
 std::string inputVisFileFromCard;
+std::vector<string> inputVisFileFromCommand;
 std::vector<std::string> inputGeom;
 
@@ -151,4 +155,9 @@
 void displayForScreenShot();
 void displaytext();
+void processNormalKeys(unsigned char key, int x, int y);
+void processSpecialKeys(int key, int x, int y) ;
+void processMouse(int button, int state, int x, int y);
+void processMotion(int x, int y);
+void processPassiveMotion(int x, int y);
 
 void LoadCard(const char* inputCard );
@@ -161,5 +170,4 @@
 void updateEventsFile();
 
-
 #endif
 
Index: /trunk/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.cc
===================================================================
--- /trunk/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.cc	(revision 99)
+++ /trunk/Utilities/Fastjet/plugins/CDFCones/CDFJetCluPlugin.cc	(revision 100)
@@ -1,4 +1,4 @@
 //STARTHEADER
-// $Id: CDFJetCluPlugin.cc,v 1.1 2008-11-06 14:32:10 ovyn Exp $
+// $Id: CDFJetCluPlugin.cc,v 1.2 2008-12-18 13:38:29 ovyn Exp $
 //
 // Copyright (c) 2005-2006, Matteo Cacciari and Gavin Salam
@@ -72,5 +72,12 @@
     LorentzVector fourvect(particle.px(), particle.py(),
 			   particle.pz(), particle.E());
+//std::cout<<"avant la reconstruction "<<particle.eta()<<std::endl;
+    //PhysicsTower tower(fourvect);
     PhysicsTower tower(fourvect);
+
+std::cout<<"apres la reconstruction "<<tower.eta()<<std::endl;
+//std::cout<<"apres la reconstruction ieta "<<tower.iEta()<<std::endl;
+
+
     // add tracking information for later
     tower.fjindex = i;
Index: /trunk/Utilities/Fastjet/plugins/CDFCones/interface/CalTower.hh
===================================================================
--- /trunk/Utilities/Fastjet/plugins/CDFCones/interface/CalTower.hh	(revision 99)
+++ /trunk/Utilities/Fastjet/plugins/CDFCones/interface/CalTower.hh	(revision 100)
@@ -7,4 +7,5 @@
 
 #include <cmath>
+#include <iostream>
 
 #ifndef M_PI
@@ -14,9 +15,10 @@
 const double pi = acos(-1);
 
-/*
- // CDF data : 22 towers. step=2.7Â° at the beginning, and after, it changes
-const unsigned int ntower = 22;
-const double TOWER_THETA[ntower+1] = {3.000,  5.700,  8.400, 11.100, 13.800, 16.500, 19.200, 21.900, 24.600, 27.300, 30.000,// step=2.7Â°
-          33.524,  36.822, 40.261, 43.614, 47.436, 51.790, 56.735, 62.310, 68.516, 75.297, 82.526, 90.000 };
+
+/* // CDF data : 22 towers. step=2.7Â° at the beginning, and after, it changes
+const unsigned int ntower = 0;
+const double TOWER_THETA[ntower+1] = {0},// step=2.7Â°
+//const double TOWER_THETA[ntower+1] = {3.000,  5.700,  8.400, 11.100, 13.800, 16.500, 19.200, 21.900, 24.600, 27.300, 30.000,// step=2.7Â°
+//          33.524,  36.822, 40.261, 43.614, 47.436, 51.790, 56.735, 62.310, 68.516, 75.297, 82.526, 90.000 };
 const double tower_eta_edges[ntower+1] = {
     0.0,   0.130817437415,   0.259479460739,   0.384075299436,   0.503273260393,   0.616250691646,   0.72264587494,   0.822472442947,   
@@ -29,6 +31,8 @@
 */
 
+
 // CMS data
 const unsigned int ntower = 40;
+//const double tower_eta_edges[ntower+1] = {0}; // list of the edges of each tower, in eta, for eta>0, assuming a symmetric detector in eta<0 
 const double tower_eta_edges[ntower+1] = { // list of the edges of each tower, in eta, for eta>0, assuming a symmetric detector in eta<0 
     0., // lower limit of the most central tower
@@ -39,4 +43,5 @@
     5.000}; // higher limit of the most forward tower
 
+//const double tower_dphi[ntower] = {}; // list of the tower size in phi (in degrees)
 const double tower_dphi[ntower] = { // list of the tower size in phi (in degrees)
      5, 5, 5, 5, 5,  5, 5, 5, 5, 5,  5, 5, 5, 5, 5,  5, 5, 5, 5, 10,
Index: /trunk/Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.cc
===================================================================
--- /trunk/Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.cc	(revision 99)
+++ /trunk/Utilities/Fastjet/plugins/CDFCones/src/JetCluAlgorithm.cc	(revision 100)
@@ -1,2 +1,3 @@
+#include "../interface/CalTower.hh"
 #include "../interface/JetCluAlgorithm.hh"
 #include "../interface/ClusterComparisons.hh"
@@ -4,6 +5,8 @@
 #include <algorithm>
 #include <cmath>
-
-void JetCluAlgorithm::makeSeedTowers(std::vector<PhysicsTower>& towers, std::vector<Cluster>& seedTowers)
+#include <iostream>
+
+using namespace std;
+/*void JetCluAlgorithm::makeSeedTowers(std::vector<PhysicsTower>& towers, std::vector<Cluster>& seedTowers)
 {
   for(int iEta = 4; iEta < 48; iEta++){
@@ -22,5 +25,26 @@
   }
   sort(seedTowers.begin(),seedTowers.end(),ClusterCentroidEtGreater());
-}
+}*/
+
+void JetCluAlgorithm::makeSeedTowers(std::vector<PhysicsTower>& towers, std::vector<Cluster>& seedTowers)
+{
+  for(int iEta = 0; iEta < 2*ntower; iEta++){
+
+    int myphiindex = (iEta<ntower) ? iEta : iEta-ntower;
+    int nphi =  (int) 360/tower_dphi[myphiindex]; // number of phi segments for this eta
+    for(int iPhi = 0; iPhi < nphi; iPhi++){
+      Cluster seed;
+      for(std::vector<PhysicsTower>::iterator towerIter = towers.begin(); towerIter != towers.end(); towerIter++)
+        if(towerIter->iEta() == iEta && towerIter->iPhi() == iPhi ) {
+          seed.addTower(*towerIter);
+	}
+      if(seed.centroid.Et > _seedThreshold) {
+        seedTowers.push_back(seed);
+      }
+    }
+  }
+  sort(seedTowers.begin(),seedTowers.end(),ClusterCentroidEtGreater());
+}
+
 
 void JetCluAlgorithm::buildPreClusters(std::vector<Cluster>& seedTowers, std::vector<PhysicsTower>& towers,
@@ -40,6 +64,6 @@
 	int iEtaSeedTower = seedTowerIter->towerList.begin()->iEta();
 	int iPhiSeedTower = seedTowerIter->towerList.begin()->iPhi();
-	if(iEtaSeedTower >= 8 && iEtaSeedTower < 14 || iEtaSeedTower >= 38 && iEtaSeedTower < 44)
-	  iPhiSeedTower = iPhiSeedTower/2;
+//	if(iEtaSeedTower >= 8 && iEtaSeedTower < 14 || iEtaSeedTower >= 38 && iEtaSeedTower < 44)
+//	  iPhiSeedTower = iPhiSeedTower/2;
  	for(std::vector<PhysicsTower>::iterator preClusterTowerIter = preClusterIter->towerList.begin();
 	    preClusterTowerIter != preClusterIter->towerList.end() && !seedTowerAddedToPreCluster;
@@ -47,10 +71,10 @@
 	  int iEtaPreClusterTower = preClusterTowerIter->iEta();
 	  int iPhiPreClusterTower = preClusterTowerIter->iPhi();
-	  if(iEtaPreClusterTower >= 8 && iEtaPreClusterTower < 14 || iEtaPreClusterTower >= 38 && iEtaPreClusterTower < 44)
-	    iPhiPreClusterTower = iPhiPreClusterTower/2;
+//	  if(iEtaPreClusterTower >= 8 && iEtaPreClusterTower < 14 || iEtaPreClusterTower >= 38 && iEtaPreClusterTower < 44)
+//	    iPhiPreClusterTower = iPhiPreClusterTower/2;
 	  int dIEta = abs(iEtaSeedTower - iEtaPreClusterTower);
 	  int dIPhi = abs(iPhiSeedTower - iPhiPreClusterTower);
-	  if(dIPhi > 12)
-	    dIPhi = 24 - dIPhi;
+//	  if(dIPhi > 12)
+//	    dIPhi = 24 - dIPhi;
 	  int adj = dIPhi*dIPhi + dIEta*dIEta;
 	  if(adj <= _adjacencyCut){
Index: /trunk/interface/BFieldProp.h
===================================================================
--- /trunk/interface/BFieldProp.h	(revision 99)
+++ /trunk/interface/BFieldProp.h	(revision 100)
@@ -16,4 +16,5 @@
 
 #include "interface/SmearUtil.h"
+
 #include "Utilities/ExRootAnalysis/interface/BlockClasses.h"
 #include "Utilities/ExRootAnalysis/interface/TSimpleArray.h"
@@ -21,9 +22,9 @@
 using namespace std;
 
-class TrackPropagation : public RESOLution{
+class TrackPropagation {
 
  public:
   // Constructor
-    TrackPropagation();
+    TrackPropagation(string DetDatacard);
  
     void Propagation(const TRootGenParticle *Part,TLorentzVector &genMomentum);
@@ -31,5 +32,8 @@
     int MAXITERATION;
     int MINSEGLENGTH;
-  
+
+ private:
+
+   RESOLution *DET;  
 };
   
Index: /trunk/interface/JetUtils.h
===================================================================
--- /trunk/interface/JetUtils.h	(revision 99)
+++ /trunk/interface/JetUtils.h	(revision 100)
@@ -56,9 +56,9 @@
 using namespace std;
 
-class JetsUtil: public RESOLution
+class JetsUtil
 {
  public:
   /// Constructor
-  JetsUtil();
+  JetsUtil(const string DetDatacard);
 
 
@@ -68,5 +68,5 @@
   vector<fastjet::PseudoJet> inclusive_jets;
   vector<fastjet::PseudoJet> sorted_jets;
-  vector<fastjet::PseudoJet> RunJets(const vector<fastjet::PseudoJet> & input_particles);
+  vector<fastjet::PseudoJet> RunJets(const vector<fastjet::PseudoJet>&  input_particles);
   
   void RunJetBtagging(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchJet,const vector<fastjet::PseudoJet> & sorted_jets,const TSimpleArray<TRootGenParticle> & NFCentralQ);
@@ -74,4 +74,7 @@
   void RunTauJets(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchTauJet,const vector<fastjet::PseudoJet> & sorted_jets,const vector<PhysicsTower> & towers, const vector<TLorentzVector> & TrackCentral);
 
+ private:
+
+  RESOLution *DET;
 };
 
Index: /trunk/interface/VeryForward.h
===================================================================
--- /trunk/interface/VeryForward.h	(revision 99)
+++ /trunk/interface/VeryForward.h	(revision 100)
@@ -35,9 +35,9 @@
 using namespace std;
 
-class VeryForward : public RESOLution{
+class VeryForward {
 
  public:
   /// Constructor
-  VeryForward();
+  VeryForward(string DetDatacard);
 
   void ZDC(ExRootTreeWriter *treeWriter,ExRootTreeBranch *branchZDC,TRootGenParticle *particle);
@@ -50,4 +50,8 @@
  H_BeamLine* beamline2;
 
+ private:
+ 
+ RESOLution *DET;
+
 };
 #endif
Index: /trunk/paper/notes.tex
===================================================================
--- /trunk/paper/notes.tex	(revision 99)
+++ /trunk/paper/notes.tex	(revision 100)
@@ -1,3 +1,3 @@
-\documentclass[a4paper,11pt,oneside,twocolumn]{article}
+\documentclass[a4paper,11pt,oneside,onecolumn]{article}
 \usepackage[english]{babel}
 \usepackage[ansinew]{inputenc}
@@ -11,4 +11,5 @@
 \usepackage{latexsym}
 \usepackage{array}
+\usepackage{multicol}
 
 \usepackage{fancyhdr}
@@ -18,4 +19,6 @@
 \usepackage{ifpdf}
 \usepackage{cite}
+
+\newcommand{\dollar}{\$}
 
 \ifpdf
@@ -39,14 +42,9 @@
 \date{}
 
-
-% The \textsc{Delphes} software provides a framework for fast simulation of particle interactions in a generic high-energy physics collider detector containing a tracking system, electromagnetic and hadronic calorimeters, and a muon system. It is an object-oriented system writen using the C++ programming language. Using input files originating from a Monte-Carlo event generator such as \textsc{pythia} and \textsc{herwig}, \textsc{Delphes} creates ``high-level" analysis objects.\\ 
-% 
 \begin{document}
 
 
-\twocolumn[ 
 \maketitle
-% \begin{@twocolumnfalse}
-    \begin{onecolabstract}
+
 Knowing whether theoretical predictions are visible and measurable in a high energy experiment is always delicate, due to the
 complexity of the related detectors, data acquisition chain and software. We introduce here a new framework, \textsc{Delphes}, for fast simulation of
@@ -57,9 +55,6 @@
 An overview of \textsc{Delphes} is given as well as a few use-cases for illustration.
 \vspace{1cm}
-    \end{onecolabstract}
-% \end{@twocolumnfalse}
-]
+
 \saythanks
-
 
 \section{Introduction}
@@ -91,9 +86,8 @@
 \begin{tabular}[!h]{lll}
 \hline
-Sub-system   & Card flag & $|\eta|^{max}$\\\hline
-Tracking     & {\verb MAX_TRACKER } & 2.5\\
-Calorimeters & {\verb MAX_CALO_CEN } & 3.0\\
-             & {\verb MAX_CALO_FWD } & 5.0\\
-Muon         & {\verb MAX_MU } & 2.4\\\hline
+Tracking     & {\verb CEN_max_tracker } & 2.5\\
+Calorimeters & {\verb CEN_max_calo_cen } & 3.0\\
+             & {\verb CEN_max_calo_fwd } & 5.0\\
+Muon         & {\verb CEN_max_mu } & 2.4\\\hline
 \end{tabular}
 \label{tab:defEta}
@@ -187,6 +181,6 @@
 \subsection{Tau identification}
 
-\begin{wrapfigure}{l}{0.5\columnwidth}
-\includegraphics[width=0.5\columnwidth]{Tau.eps}
+\begin{wrapfigure}{l}{0.3\columnwidth}
+\includegraphics[width=0.3\columnwidth]{Tau.eps}
 \caption{\small{detectorAng.eps}}
 \label{h_WW_ss_cut1}
@@ -197,9 +191,9 @@
 \subsubsection*{Electromagnetic collimation}
 
-To use the narrowness of the $\tau$-jet, the \textit{electromagnetic collimation} ($C_{\tau}^{em}$) is defined as the sum of the energy in a cone with $\Delta R = ${\verb TAU_CONE_ENERGIE } around the jet axis divided by the energy of the reconstructed jet. The energy in the small cone is calculated using the towers objects. To be taken into account a calorimeter tower should have a transverse energy above a given threshold {\verb M_SEEDTHRESHOLD}. A large fraction of the jet energy, denominated here with {\verb TAU_EM_COLLIMATION } is expected in this small cone. The quantity is represented in figure \ref{fig:tau1} for the default values (see table \ref{tab:tauRef})
+To use the narrowness of the $\tau$-jet, the \textit{electromagnetic collimation} ($C_{\tau}^{em}$) is defined as the sum of the energy in a cone with $\Delta R = ${\verb TAU_energy_scone } around the jet axis divided by the energy of the reconstructed jet. The energy in the small cone is calculated using the towers objects. To be taken into account a calorimeter tower should have a transverse energy above a given threshold {\verb JET_M_seed }. A large fraction of the jet energy, denominated here with {\verb TAU_energy_frac } is expected in this small cone. The quantity is represented in figure \ref{fig:tau1} for the default values (see table \ref{tab:tauRef}).
 
 \begin{figure}[!h]
 \begin{center}
-\includegraphics[width=0.8\columnwidth]{figures/Taujets1.eps}
+%\includegraphics[width=0.8\columnwidth]{figures/Taujets1.eps}
 \caption{\small{}}
 \label{fig:tau1}
@@ -211,5 +205,5 @@
 \begin{figure}[!h]
 \begin{center}
-\includegraphics[width=0.8\columnwidth]{figures/Taujets2.eps}
+%\includegraphics[width=0.8\columnwidth]{figures/Taujets2.eps}
 \caption{\small{}}
 \label{h_WW_ss_cut1}
@@ -217,5 +211,5 @@
 \end{figure}
 
-The tracking isolation for the $\tau$ identification requires that the number of tracks associated to a particle with $p_T >$ {\verb PT_TRACK_TAU } is one and only one in a cone with $\Delta R =$ {\verb TAU_CONE_TRACKS }. This cone should be entirely included in the tracker to be taken into account. This procedure selects taus decaying hadronically with a typical efficiency of $60\%$. Moreover, the minimal $p_T$ of the $\tau$-jet is required to be {\verb TAUJET_pt }(default value: 10~GeV).\\
+The tracking isolation for the $\tau$ identification requires that the number of tracks associated to a particle with $p_T >$ {\verb TAU_track_pt } is one and only one in a cone with $\Delta R =$ {\verb TAU_track_scone }. This cone should be entirely included in the tracker to be taken into account. This procedure selects taus decaying hadronically with a typical efficiency of $60\%$. Moreover, the minimal $p_T$ of the $\tau$-jet is required to be {\verb TAUJET_pt }(default value: 10~GeV).\\
 
 \begin{table}[!h]
@@ -224,9 +218,9 @@
 \hline
 Tau definition  & Card flag & Value\\\hline
-$\Delta R^{for~em}$     & {\verb TAU_CONE_ENERGIE } & 0.15\\
-min $E_{T}^{tower}$     & {\verb M_SEEDTHRESHOLD }  & 1.0~GeV\\
-$C_{\tau}^{em}$         & {\verb TAU_EM_COLLIMATION } & 0.95.\\
-$\Delta R^{for~tracks}$ & {\verb TAU_CONE_TRACKS } & 0.4\\
-min $p_T^{tracks}$      & {\verb PT_TRACK_TAU } & 2 GeV\\\hline
+$\Delta R^{for~em}$     & {\verb TAU_energy_scone } & 0.15\\
+min $E_{T}^{tower}$     & {\verb JET_M_seed }  & 1.0~GeV\\
+$C_{\tau}^{em}$         & {\verb TAU_energy_frac } & 0.95.\\
+$\Delta R^{for~tracks}$ & {\verb TAU_track_scone } & 0.4\\
+min $p_T^{tracks}$      & {\verb PTAU_track_pt } & 2 GeV\\\hline
 \end{tabular}
 \label{tab:tauRef}
@@ -244,8 +238,108 @@
 \section{Conclusion and perspectives}
 
+
+\newpage
+
+\appendix
+
+\section{User manual}
+
+The available code is a tar file which comes with everything you need to run the DELPHES package. Nevertheless in order to visualise the events with the FROG program, you need to install libraries as explained in {\it href="http://projects.hepforge.org/frog/}
+
+\subsection{Getting started}
+
+In order to run DELPHES on your system, first download is sources and compile it:\\
+\begin{quote}
+\begin{verbatim}
+me@mylaptop:~$ wget http://www.fynu.ucl.ac.be/users/s.ovyn/files/Delphes_V_*.*.tar 
+me@mylaptop:~$ tar -xvf Delphes_V_*.*. tar  
+me@mylaptop:~$ cd Delphes_V_*.* 
+me@mylaptop:~$ ./genMakefile.tcl >; Makefile 
+me@mylaptop:~$ make 
+\end{verbatim}
+\end{quote}    
+
+
+\subsection{Running Delphes on your events}
+
+\subsubsection{Setting the run configuration}
+
+The program is driven by two datacards (default cards are data/DataCardDet.dat and data/trigger.dat) which allow a large spectrum of running conditions. 
+{\b The run card }\\
+
+Contains all needed information to run DELPHES
+\begin{itemize}
+  
+\item The following parameters are available: detector parameters, including calorimeter and tracking coverage and resolution, transverse energy thresholds allowed for reconstructed objects, jet algorithm to use as well as jet parameters. 
+  
+\item Four flags, {\verb FLAG_bfield }, {\verb FLAG_vfd }, {\verb FLAG_trigger } and {\verb FLAG_frog } should be assigned to decide if the magnetic field propagation, the very forward detectors acceptance, the trigger selection and the preparation for FROG display respectively are running by DELPHES.
+  
+\item An example (the default detector card) can be found in {\verb files/DataCardDet.dat }
+\end{itemize}
+
+{\b The trigger card }\\
+Contains the definition of all trigger bits
+\begin{itemize}
+  
+\item Cuts can be applied on the transverse momentum of electrons, muons, jets, tau-jets, photons and transverse missing energy.
+\item Be careful that the following structured should be used: 
+  \begin{enumerate}
+  \item One trigger bit per line, the first entry in the line is the name of the trigger bit 
+  \item If the trigger bit uses the presence of multiple identical objects, their transverse momentum thresholds must be defined in decreasing order 
+  \item The different object requirements must be separated by a {\verb && } flag
+  \item Example of a trigger bit line:\\
+    \begin{quote}
+\begin{verbatim}	
+DoubleElec  >> ELEC1_PT: '20' && ELEC2_PT: '10'    
+\end{verbatim}
+    \end{quote}
+  \end{enumerate}
+\item An example (the default trigger card) can be found <a href="files/trigger.dat" title="Home">here</a></li>
+\end{itemize}
+
+\subsubsection{Running the code}
+Create the above cards (data/mydetector.dat and data/mytrigger.dat)
+Create a text file containing the list of input files that will be used by DELPHES (with extension *.lhe, *.root or *.hep)
+To run the code, type the following
+\begin{quote}
+\begin{verbatim}
+me@mylaptop:~$ ./Delphes inputlist.list OutputRootFileName.root data/mydetector.dat data/mytrigger.dat
+\end{verbatim}
+\end{quote}
+
+
+\subsection{Running an analysis on your Delphes events}
+
+Two examples of codes running on the output root file of DELPHES are coming with the package
+\begin{enumerate}
+\item The {\verb Examples/Analysis_Ex.cpp } code shows how to access the available reconstructed objects and the trigger information The two following arguments are required: a text file containing the input DELPHES root files to run, and the name of the output root file. To run the code:
+  \begin{quote}
+\begin{verbatim}
+./Analysis_Ex input_file.list output_file.root
+\end{verbatim}
+  \end{quote}
+  
+\item The {\verb Examples/Trigger_Only.cpp } code permits to run the trigger selection separately from the general detector simulation on output DELPHES root files. An input DELPHES root file is mandatory as argument. The new tree containing the trigger information will be added in these file. The trigger datacard is also necessary. To run the code:
+  \begin{quote}
+\begin{verbatim}
+./Trigger_Only input_file.root data/trigger.dat
+\end{verbatim}
+  \end{quote}
+  
+\end{enumerate}
+
+\subsection{Running the FROG event display}
+
+\begin{itemize}
+\item If the { \verb FLAG_frog } was switched on, two files were created during the run of DELPHES: {\verb DelphesToFrog.vis } and {\verb DelphesToFrog.geom }. They contain all the needed information to run frog.
+\item To display the events and the geometry, you first need to compile FROG. Go to the {\verb Utilities/FROG } and type {\verb make }.
+\item Go back into the main directory and type {\verb ./Utilities/FROG/frog }.
+\end{itemize}
+
 \begin{thebibliography}{99}
+  
 \bibitem{Delphes} \textsc{Delphes}, hepforge:
 \end{thebibliography}
-\appendix
+
 Attention : in SmearUtil::NumTracks, the function arguments 'Eta' and 'Phi' have been switched. Previously, 'Phi' was before 'Eta', now 'Eta' comes in front. This is for consistency with the other functions in SmearUtil. Check your routines, when using NumTracks !
 
Index: /trunk/src/BFieldProp.cc
===================================================================
--- /trunk/src/BFieldProp.cc	(revision 99)
+++ /trunk/src/BFieldProp.cc	(revision 100)
@@ -25,6 +25,8 @@
 //------------------------------------------------------------------------------
 
-TrackPropagation::TrackPropagation() {
+TrackPropagation::TrackPropagation(string DetDatacard) {
 
+ DET = new RESOLution();
+ DET->ReadDataCard(DetDatacard);
  MAXITERATION = 10000;
  MINSEGLENGTH = 70;
@@ -43,6 +45,6 @@
   
   //out of trackibg coverage?
-  if(sqrt(Xvertex1*Xvertex1+Yvertex1*Yvertex1) > TRACK_radius){return;}
-  if(fabs(Zvertex1) > TRACK_length){return;}
+  if(sqrt(Xvertex1*Xvertex1+Yvertex1*Yvertex1) > DET->TRACK_radius){return;}
+  if(fabs(Zvertex1) > DET->TRACK_length){return;}
   
   float Px = Part->Px;
@@ -62,7 +64,7 @@
      double vz = pz/M;
 
-     double Bx = TRACK_bfield_x;
-     double By = TRACK_bfield_y;
-     double Bz = TRACK_bfield_z;
+     double Bx = DET->TRACK_bfield_x;
+     double By = DET->TRACK_bfield_y;
+     double Bz = DET->TRACK_bfield_z;
 
      double ax =  (q/M)*(Bz*vy - By*vz);
@@ -80,4 +82,7 @@
      int k = 0;
      
+     double Radius=DET->TRACK_radius;
+     double Length=DET->TRACK_length;
+
      while(k < MAXITERATION){
         k++;
@@ -99,6 +104,6 @@
         z  += vz*dt;
 
-       if( (x*x+y*y) > TRACK_radius*TRACK_radius ){ x /= (x*x+y*y)/(TRACK_radius*TRACK_radius); y /= (x*x+y*y)/(TRACK_radius*TRACK_radius); break;}
-       if( fabs(z)>TRACK_length)break;
+       if( (x*x+y*y) > Radius*Radius ){ x /= (x*x+y*y)/(Radius*Radius); y /= (x*x+y*y)/(Radius*Radius); break;}
+       if( fabs(z)>Length)break;
 
        xold = x;
Index: /trunk/src/FrogUtil.cc
===================================================================
--- /trunk/src/FrogUtil.cc	(revision 99)
+++ /trunk/src/FrogUtil.cc	(revision 100)
@@ -485,10 +485,13 @@
   
   double Rayon_Tracker=50;
-  double Rayon_Calo = Rayon_Tracker*2;
-  double Lenght_Tracker=120;
-  double Lenght_Calo=Lenght_Tracker+Lenght_Tracker/2;
-  double Lenght_FWCalo=Lenght_Tracker+Lenght_Tracker;
-  
-  int NumPhi=10;
+  double Rayon_Calo = Rayon_Tracker*1.5;
+  double Rayon_Muon = Rayon_Tracker*2;
+  double Lenght_Tracker=100;
+  double Lenght_Calo=Lenght_Tracker+Lenght_Tracker/2.5;
+  double Lenght_Muon=Lenght_Calo+Lenght_Calo/2.5;
+  double Lenght_FWCalo=Lenght_Tracker+1.5*Lenght_Tracker;
+  
+  int plus=1;
+  int NumPhi=4;
   
   //************************************************Tracker*************************************************
@@ -498,9 +501,11 @@
   detector->addDaughter(Tracker);
   unsigned int DetIdCountTracker = 1;
-  for(double ray=0;ray <= Rayon_Tracker;ray +=5){
+  for(double ray=0;ray <= Rayon_Tracker;ray +=plus){
+  //  double ray=Rayon_Tracker;
     double length = ray/tan(EtaToTheta(DET->CEN_max_tracker));
     if(length >= Lenght_Tracker)
       {
-	FROG_Element_Primitive_Cylinder* tracker = new FROG_Element_Primitive_Cylinder(9100000+DetIdCountTracker*10,ray,0,0,0,0,0,Lenght_Tracker,NumPhi,0);
+	FROG_Element_Primitive_Cylinder* tracker = new FROG_Element_Primitive_Cylinder(9100000+DetIdCountTracker*10,ray,0,0,0,0,0,Lenght_Tracker,NumPhi,1);
+//	FROG_Element_Primitive_Cone* tracker = new FROG_Element_Primitive_Cone(9100000+DetIdCountTracker*10,ray,0,0,0,0,0,Lenght_Tracker,NumPhi,1);
 	Tracker->addDaughter(tracker);   DetIdCountTracker++;
       }
@@ -518,5 +523,5 @@
   unsigned int DetIdCountCalo = 1;
   
-  for(double ray=Rayon_Tracker;ray <= Rayon_Calo ;ray +=5){
+  for(double ray=Rayon_Tracker;ray <= Rayon_Calo ;ray +=plus){
     double length = ray/tan(EtaToTheta(DET->CEN_max_calo_cen));
     double add;
@@ -529,5 +534,5 @@
       }
   }
-  for(double ray=0;ray <= Rayon_Tracker;ray +=5){
+  for(double ray=0;ray <= Rayon_Tracker;ray +=plus){
     double length = ray/tan(EtaToTheta(DET->CEN_max_calo_cen));
     double add;
@@ -552,18 +557,52 @@
   double eta_Max=DET->CEN_max_calo_fwd,eta_Min=DET->CEN_max_calo_cen;
   
-  for(double ray=0;ray <= 50;ray +=5){
+  for(double ray=0;ray <= 50;ray +=plus){
     double length = ray/tan(EtaToTheta(eta_Max));
     double add;
-    if(length >= Lenght_FWCalo)add=(Lenght_FWCalo-Lenght_Calo)/2;
-    else add=(length-Lenght_Calo)/2;
+    if(length >= Lenght_FWCalo)add=(Lenght_FWCalo-Lenght_Muon)/2;
+    else add=(length-Lenght_Muon)/2;
     
     if(add > 0 && ray < Lenght_FWCalo*tan(EtaToTheta(eta_Min)))
       {
-	FROG_Element_Primitive_Cylinder* caloFW1 = new FROG_Element_Primitive_Cylinder(9300000+DetIdCountFwCalo*10,ray,0,0,(Lenght_Calo+add)/2,0,0,add,NumPhi,0);
+	FROG_Element_Primitive_Cylinder* caloFW1 = new FROG_Element_Primitive_Cylinder(9300000+DetIdCountFwCalo*10,ray,0,0,(Lenght_Muon+add)/2,0,0,add,NumPhi,0);
 	FWCALO->addDaughter(caloFW1);   DetIdCountFwCalo++;
-	FROG_Element_Primitive_Cylinder* caloFW2 = new FROG_Element_Primitive_Cylinder(9300000+DetIdCountFwCalo*10,ray,0,0,-(Lenght_Calo+add)/2,0,0,add,NumPhi,0);
+	FROG_Element_Primitive_Cylinder* caloFW2 = new FROG_Element_Primitive_Cylinder(9300000+DetIdCountFwCalo*10,ray,0,0,-(Lenght_Muon+add)/2,0,0,add,NumPhi,0);
 	FWCALO->addDaughter(caloFW2);   DetIdCountFwCalo++;
       }
   }
+
+  //***********************************************Muon chambers********************************************
+  //********************************************************************************************************
+  //
+  FROG_Element_Base_With_DetId_And_Name* MUON = new FROG_Element_Base_With_DetId_And_Name(940000000,"MuonDet");
+  detector->addDaughter(MUON);
+  unsigned int DetIdCountMuon = 1;
+
+  for(double ray=Rayon_Calo;ray <= Rayon_Muon ;ray +=plus){
+    double length = ray/tan(EtaToTheta(DET->CEN_max_mu));
+    double add;
+    if(length >= Lenght_Muon)add=Lenght_Muon;
+    else add=ray/tan(EtaToTheta(DET->CEN_max_calo_cen));
+    if(add > 0)
+      {
+        FROG_Element_Primitive_Cylinder* muon = new FROG_Element_Primitive_Cylinder(9400000+DetIdCountMuon*10,ray,0,0,0,0,0,add,NumPhi,0);
+        MUON->addDaughter(muon);   DetIdCountMuon++;
+      }
+  }
+  for(double ray=0;ray <= Rayon_Calo;ray +=plus){
+    double length = ray/tan(EtaToTheta(DET->CEN_max_calo_cen));
+    double add;
+    if(length >= Lenght_Muon)add=(Lenght_Muon-Lenght_Calo)/2;
+    else add=(length-Lenght_Calo)/2;
+    if(add > 0)
+      {
+        FROG_Element_Primitive_Cylinder* muonP = new FROG_Element_Primitive_Cylinder(9400000+DetIdCountMuon*10,ray,0,0,(Lenght_Calo+add)/2,0,0,add,NumPhi,0);
+        MUON->addDaughter(muonP);   DetIdCountMuon++;
+        FROG_Element_Primitive_Cylinder* muonM = new FROG_Element_Primitive_Cylinder(9400000+DetIdCountMuon*10,ray,0,0,-(Lenght_Calo+add)/2,0,0,add,NumPhi,0);
+        MUON->addDaughter(muonM);   DetIdCountMuon++;
+      }
+  }
+
+  
     
   FROG_Geometry* CustomGeom = new FROG_Geometry(prim);
Index: /trunk/src/JetUtils.cc
===================================================================
--- /trunk/src/JetUtils.cc	(revision 99)
+++ /trunk/src/JetUtils.cc	(revision 100)
@@ -15,13 +15,15 @@
 using namespace std;
 
-JetsUtil::JetsUtil() {
-  
-  switch(JET_jetalgo) {
+JetsUtil::JetsUtil(const string DetDatacard) {
+ 
+ DET = new RESOLution();
+ DET->ReadDataCard(DetDatacard);
+ 
+  switch(DET->JET_jetalgo) {
   default:
   case 1: {
-    
     // set up a CDF midpoint jet definition
 #ifdef ENABLE_PLUGIN_CDFCONES
-    plugins = new fastjet::CDFJetCluPlugin(JET_seed,JET_coneradius,JET_C_adjacencycut,JET_C_maxiterations,JET_C_iratch,JET_overlap);
+    plugins = new fastjet::CDFJetCluPlugin(DET->JET_seed,DET->JET_coneradius,DET->JET_C_adjacencycut,DET->JET_C_maxiterations,DET->JET_C_iratch,DET->JET_overlap);
     jet_def = fastjet::JetDefinition(plugins);
 #else
@@ -34,5 +36,5 @@
     // set up a CDF midpoint jet definition
 #ifdef ENABLE_PLUGIN_CDFCONES
-    plugins = new fastjet::CDFMidPointPlugin (JET_seed,JET_coneradius,JET_M_coneareafraction,JET_M_maxpairsize,JET_M_maxiterations,JET_overlap);
+    plugins = new fastjet::CDFMidPointPlugin (DET->JET_seed,DET->JET_coneradius,DET->JET_M_coneareafraction,DET->JET_M_maxpairsize,DET->JET_M_maxiterations,DET->JET_overlap);
     jet_def = fastjet::JetDefinition(plugins);
 #else
@@ -45,5 +47,5 @@
     // set up a siscone jet definition
 #ifdef ENABLE_PLUGIN_SISCONE
-    plugins = new fastjet::SISConePlugin (JET_coneradius,JET_overlap,JET_S_npass, JET_S_protojet_ptmin);
+    plugins = new fastjet::SISConePlugin (DET->JET_coneradius,DET->JET_overlap,DET->JET_S_npass, DET->JET_S_protojet_ptmin);
     jet_def = fastjet::JetDefinition(plugins);
 #else
@@ -54,15 +56,16 @@
     
   case 4: {
-    jet_def = fastjet::JetDefinition(fastjet::kt_algorithm, JET_coneradius);
+
+    jet_def = fastjet::JetDefinition(fastjet::kt_algorithm, DET->JET_coneradius);
   }
     break;
     
   case 5: {
-    jet_def = fastjet::JetDefinition(fastjet::cambridge_algorithm,JET_coneradius);
+    jet_def = fastjet::JetDefinition(fastjet::cambridge_algorithm,DET->JET_coneradius);
   }
     break;
     
   case 6: {
-    jet_def = fastjet::JetDefinition(fastjet::antikt_algorithm,JET_coneradius);
+    jet_def = fastjet::JetDefinition(fastjet::antikt_algorithm,DET->JET_coneradius);
   }
     break;
@@ -71,9 +74,8 @@
 }
 
-vector<fastjet::PseudoJet> JetsUtil::RunJets(const vector<fastjet::PseudoJet> & input_particles)
+vector<fastjet::PseudoJet> JetsUtil::RunJets(const vector<fastjet::PseudoJet>&  input_particles)
 {
   inclusive_jets.clear();
   sorted_jets.clear();
-  
   // run the jet clustering with the above jet definition
   if(input_particles.size()!=0)
@@ -96,5 +98,5 @@
   for (unsigned int i = 0; i < sorted_jets.size(); i++) {
     JET.SetPxPyPzE(sorted_jets[i].px(),sorted_jets[i].py(),sorted_jets[i].pz(),sorted_jets[i].E());
-    if(JET.Pt() > PTCUT_jet)
+    if(JET.Pt() > DET->PTCUT_jet)
       {
 	elementJet = (TRootJet*) branchJet->NewEntry();
@@ -102,5 +104,5 @@
 	// b-jets
 	bool btag=false;
-	if((fabs(JET.Eta()) < CEN_max_tracker && Btaggedjet(JET, NFCentralQ)))btag=true;
+	if((fabs(JET.Eta()) < DET->CEN_max_tracker && DET->Btaggedjet(JET, NFCentralQ)))btag=true;
 	elementJet->Btag = btag;
       }
@@ -116,10 +118,10 @@
     JET.SetPxPyPzE(sorted_jets[i].px(),sorted_jets[i].py(),sorted_jets[i].pz(),sorted_jets[i].E());
     // Tau jet identification : 1! track and electromagnetic collimation
-    if(fabs(JET.Eta()) < (CEN_max_tracker - TAU_track_scone)) {
-      double Energie_tau_central = EnergySmallCone(towers,JET.Eta(),JET.Phi());
+    if(fabs(JET.Eta()) < (DET->CEN_max_tracker - DET->TAU_track_scone)) {
+      double Energie_tau_central = DET->EnergySmallCone(towers,JET.Eta(),JET.Phi());
       if(
-	 ( Energie_tau_central/JET.E() > TAU_energy_frac ) &&
-	 ( NumTracks(TrackCentral,TAU_track_pt,JET.Eta(),JET.Phi()) == 1 ) &&
-	 ( JET.Pt() > PTCUT_taujet)
+	 ( Energie_tau_central/JET.E() > DET->TAU_energy_frac ) &&
+	 ( DET->NumTracks(TrackCentral,DET->TAU_track_pt,JET.Eta(),JET.Phi()) == 1 ) &&
+	 ( JET.Pt() > DET->PTCUT_taujet)
 	 ) {
 	elementTauJet = (TRootTauJet*) branchTauJet->NewEntry();
Index: /trunk/src/VeryForward.cc
===================================================================
--- /trunk/src/VeryForward.cc	(revision 99)
+++ /trunk/src/VeryForward.cc	(revision 100)
@@ -26,6 +26,9 @@
 //------------------------------------------------------------------------------
 
-VeryForward::VeryForward() {
-  
+VeryForward::VeryForward(string DetDatacard) {
+ 
+ DET = new RESOLution();
+ DET->ReadDataCard(DetDatacard);
+ 
   //Initialisation of Hector
   relative_energy = true; // should always be true
@@ -62,5 +65,5 @@
   TLorentzVector genMomentum; 
   // Zero degree calorimeter, for forward neutrons and photons
-  if (particle->Status ==1 && (pid == pN || pid == pGAMMA ) && eta > VFD_min_zdc ) {
+  if (particle->Status ==1 && (pid == pN || pid == pGAMMA ) && eta > DET->VFD_min_zdc ) {
     genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E);
     // !!!!!!!!! vÃ©rifier que particle->Z est bien en micromÃštres!!!
@@ -75,5 +78,5 @@
     //double theta = (1E-6)*sqrt( pow(tx,2) + pow(ty,2) );
     //double flight_distance = (DET->ZDC_S - particle->Z*(1E-6))/cos(theta) ; // assumes that Z is in micrometers
-    double flight_distance = (VFD_s_zdc - particle->Z*(1E-6));
+    double flight_distance = (DET->VFD_s_zdc - particle->Z*(1E-6));
     // assumes also that the emission angle is so small that 1/(cos theta) = 1
     elementZdc->T = 0*particle->T + flight_distance/speed_of_light; // assumes highly relativistic particles
@@ -95,5 +98,5 @@
   genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E);
   // if forward proton
-  if( (pid == pP)  && (particle->Status == 1) &&  (fabs(genMomentum.Eta()) > CEN_max_calo_fwd) )
+  if( (pid == pP)  && (particle->Status == 1) &&  (fabs(genMomentum.Eta()) > DET->CEN_max_calo_fwd) )
     {
       // !!!!!!!! put here particle->CHARGE and particle->MASS
@@ -112,5 +115,5 @@
       if(p1.stopped(beamline)) {
 	if (p1.getStoppingElement()->getName()=="rp220_1" || p1.getStoppingElement()->getName()=="rp220_2") {
-	  p1.propagate(RP_220_s);
+	  p1.propagate(DET->RP_220_s);
 	  elementRP220 = (TRootRomanPotHits*) branchRP220->NewEntry();
 	  elementRP220->X  = (1E-6)*p1.getX();  // [m]
@@ -125,5 +128,5 @@
 	  
 	} else if (p1.getStoppingElement()->getName()=="rp420_1" || p1.getStoppingElement()->getName()=="rp420_2") {
-	  p1.propagate(RP_420_s);
+	  p1.propagate(DET->RP_420_s);
 	  elementFP420 = (TRootRomanPotHits*) branchFP420->NewEntry();
 	  elementFP420->X  = (1E-6)*p1.getX();  // [m]
