Index: trunk/Makefile
===================================================================
--- trunk/Makefile	(revision 1096)
+++ trunk/Makefile	(revision 1097)
@@ -17,10 +17,14 @@
 
 CXXFLAGS += $(ROOTCFLAGS) -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DDROP_CGAL -I. -Iexternal -Iexternal/tcl
-LIBS = $(shell $(RC) --evelibs) $(SYSLIBS)
+DELPHES_LIBS = $(shell $(RC) --libs) -lEG $(SYSLIBS)
+DISPLAY_LIBS = $(shell $(RC) --evelibs) $(SYSLIBS)
 
 ###
 
-SHARED = libDelphes.$(DllSuf)
-SHAREDLIB = libDelphes.lib
+DELPHES = libDelphes.$(DllSuf)
+DELPHESLIB = libDelphes.lib
+
+DISPLAY = libDelphesDisplay.$(DllSuf)
+DISPLAYLIB = libDelphesDisplay.lib
 
 VERSION = $(shell cat VERSION)
@@ -158,6 +162,4 @@
 	classes/DelphesModule.h \
 	classes/DelphesFactory.h \
-	classes/DelphesDisplay.h \
-	classes/DelphesCaloData.h \
 	classes/SortableObject.h \
 	classes/DelphesClasses.h
@@ -196,17 +198,24 @@
 	external/ExRootAnalysis/ExRootConfReader.h \
 	external/ExRootAnalysis/ExRootTask.h
-DICT =  \
+DELPHES_DICT =  \
 	tmp/classes/ClassesDict.$(SrcSuf) \
 	tmp/modules/ModulesDict.$(SrcSuf) \
 	tmp/external/ExRootAnalysis/ExRootAnalysisDict.$(SrcSuf)
 
-DICT_OBJ =  \
+DELPHES_DICT_OBJ =  \
 	tmp/classes/ClassesDict.$(ObjSuf) \
 	tmp/modules/ModulesDict.$(ObjSuf) \
 	tmp/external/ExRootAnalysis/ExRootAnalysisDict.$(ObjSuf)
 
-tmp/classes/DelphesDisplay.$(ObjSuf): \
-	classes/DelphesDisplay.$(SrcSuf) \
-	classes/DelphesDisplay.h
+tmp/display/DisplayDict.$(SrcSuf): \
+	display/DisplayLinkDef.h \
+	display/DelphesDisplay.h \
+	display/DelphesCaloData.h
+DISPLAY_DICT =  \
+	tmp/display/DisplayDict.$(SrcSuf)
+
+DISPLAY_DICT_OBJ =  \
+	tmp/display/DisplayDict.$(ObjSuf)
+
 tmp/classes/DelphesHepMCReader.$(ObjSuf): \
 	classes/DelphesHepMCReader.$(SrcSuf) \
@@ -251,7 +260,4 @@
 	external/ExRootAnalysis/ExRootTreeWriter.h \
 	external/ExRootAnalysis/ExRootResult.h
-tmp/classes/DelphesCaloData.$(ObjSuf): \
-	classes/DelphesCaloData.$(SrcSuf) \
-	classes/DelphesCaloData.h
 tmp/classes/DelphesClasses.$(ObjSuf): \
 	classes/DelphesClasses.$(SrcSuf) \
@@ -723,6 +729,5 @@
 	external/fastjet/ClusterSequence.hh \
 	external/fastjet/NNH.hh
-SOURCE_OBJ =  \
-	tmp/classes/DelphesDisplay.$(ObjSuf) \
+DELPHES_OBJ =  \
 	tmp/classes/DelphesHepMCReader.$(ObjSuf) \
 	tmp/classes/DelphesLHEFReader.$(ObjSuf) \
@@ -733,5 +738,4 @@
 	tmp/classes/DelphesPileUpWriter.$(ObjSuf) \
 	tmp/classes/DelphesModule.$(ObjSuf) \
-	tmp/classes/DelphesCaloData.$(ObjSuf) \
 	tmp/classes/DelphesClasses.$(ObjSuf) \
 	tmp/classes/DelphesPileUpReader.$(ObjSuf) \
@@ -839,4 +843,14 @@
 	tmp/external/fastjet/plugins/EECambridge/EECambridgePlugin.$(ObjSuf)
 
+tmp/display/DelphesDisplay.$(ObjSuf): \
+	display/DelphesDisplay.$(SrcSuf) \
+	display/DelphesDisplay.h
+tmp/display/DelphesCaloData.$(ObjSuf): \
+	display/DelphesCaloData.$(SrcSuf) \
+	display/DelphesCaloData.h
+DISPLAY_OBJ =  \
+	tmp/display/DelphesDisplay.$(ObjSuf) \
+	tmp/display/DelphesCaloData.$(ObjSuf)
+
 tmp/external/tcl/tclObj.$(ObjSuf): \
 	external/tcl/tclObj.c
@@ -1200,15 +1214,17 @@
 ###
 
-all: $(SHARED) $(EXECUTABLE) $(STDHEP_EXECUTABLE)
-
-$(SHARED): $(DICT_OBJ) $(SOURCE_OBJ) $(TCL_OBJ)
+all: $(DELPHES) $(EXECUTABLE)
+
+display: $(DISPLAY)
+
+$(DELPHES): $(DELPHES_DICT_OBJ) $(DELPHES_OBJ) $(TCL_OBJ)
 	@mkdir -p $(@D)
 	@echo ">> Building $@"
 ifeq ($(ARCH),aix5)
-	@$(MAKESHARED) $(OutPutOpt) $@ $(LIBS) -p 0 $^
+	@$(MAKESHARED) $(OutPutOpt) $@ $(DELPHES_LIBS) -p 0 $^
 else
 ifeq ($(PLATFORM),macosx)
 # We need to make both the .dylib and the .so
-	@$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(LIBS)
+	@$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
 ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
 ifeq ($(MACOSX_MINOR),4)
@@ -1219,9 +1235,9 @@
 ifeq ($(PLATFORM),win32)
 	@bindexplib $* $^ > $*.def
-	@lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(SHAREDLIB)
-	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) $(OutPutOpt)$@
+	@lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(DELPHESLIB)
+	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(DELPHES_LIBS) $(OutPutOpt)$@
 	@$(MT_DLL)
 else
-	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(LIBS)
+	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
 	@$(MT_DLL)
 endif
@@ -1229,9 +1245,37 @@
 endif
 
+$(DISPLAY): $(DELPHES_DICT_OBJ) $(DISPLAY_DICT_OBJ) $(DELPHES_OBJ) $(DISPLAY_OBJ) $(TCL_OBJ)
+	@mkdir -p $(@D)
+	@echo ">> Building $@"
+ifeq ($(ARCH),aix5)
+	@$(MAKESHARED) $(OutPutOpt) $@ $(DISPLAY_LIBS) -p 0 $^
+else
+ifeq ($(PLATFORM),macosx)
+# We need to make both the .dylib and the .so
+	@$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(DISPLAY_LIBS)
+ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
+ifeq ($(MACOSX_MINOR),4)
+	@ln -sf $@ $(subst .$(DllSuf),.so,$@)
+endif
+endif
+else
+ifeq ($(PLATFORM),win32)
+	@bindexplib $* $^ > $*.def
+	@lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(DISPLAYLIB)
+	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(DISPLAY_LIBS) $(OutPutOpt)$@
+	@$(MT_DLL)
+else
+	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(DISPLAY_LIBS)
+	@$(MT_DLL)
+endif
+endif
+endif
+
 clean:
-	@rm -f $(DICT_OBJ) $(SOURCE_OBJ) $(TCL_OBJ) $(STDHEP_OBJ) core
+	@rm -f $(DELPHES_DICT_OBJ) $(DISPLAY_DICT_OBJ) $(DELPHES_OBJ) $(DISPLAY_OBJ) $(TCL_OBJ) core
+	@rm -rf tmp
 
 distclean: clean
-	@rm -f $(SHARED) $(SHAREDLIB) $(EXECUTABLE)
+	@rm -f $(DELPHES) $(DELPHESLIB) $(DISPLAY) $(DISPLAYLIB) $(EXECUTABLE)
 
 dist:
@@ -1257,10 +1301,20 @@
 	@rm $@.arch $@.base
 
-$(SOURCE_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
+$(DELPHES_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
 	@mkdir -p $(@D)
 	@echo ">> Compiling $<"
 	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
 
-$(DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
+$(DISPLAY_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
+	@mkdir -p $(@D)
+	@echo ">> Compiling $<"
+	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
+
+$(DELPHES_DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
+	@mkdir -p $(@D)
+	@echo ">> Compiling $<"
+	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
+
+$(DISPLAY_DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
 	@mkdir -p $(@D)
 	@echo ">> Compiling $<"
@@ -1277,7 +1331,7 @@
 	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
 
-$(EXECUTABLE): %$(ExeSuf): $(DICT_OBJ) $(SOURCE_OBJ) $(TCL_OBJ)
+$(EXECUTABLE): %$(ExeSuf): $(DELPHES_DICT_OBJ) $(DELPHES_OBJ) $(TCL_OBJ)
 	@echo ">> Building $@"
-	@$(LD) $(LDFLAGS) $^ $(LIBS) $(OutPutOpt)$@
+	@$(LD) $(LDFLAGS) $^ $(DELPHES_LIBS) $(OutPutOpt)$@
 
 ###
Index: trunk/classes/ClassesLinkDef.h
===================================================================
--- trunk/classes/ClassesLinkDef.h	(revision 1096)
+++ trunk/classes/ClassesLinkDef.h	(revision 1097)
@@ -15,7 +15,4 @@
 #include "classes/DelphesFactory.h"
 
-#include "classes/DelphesDisplay.h"
-#include "classes/DelphesCaloData.h"
-
 #include "classes/SortableObject.h"
 #include "classes/DelphesClasses.h"
@@ -29,7 +26,4 @@
 #pragma link C++ class DelphesModule+;
 #pragma link C++ class DelphesFactory+;
-
-#pragma link C++ class DelphesDisplay+;
-#pragma link C++ class DelphesCaloData+;
 
 #pragma link C++ class SortableObject+;
Index: trunk/classes/DelphesCaloData.cc
===================================================================
--- trunk/classes/DelphesCaloData.cc	(revision 1096)
+++ 	(revision )
@@ -1,24 +1,0 @@
-
-#include "classes/DelphesCaloData.h"
-
-//------------------------------------------------------------------------------
-
-DelphesCaloData::DelphesCaloData(Int_t nslices) :
-  TEveCaloDataVec(nslices)
-{
-}
-
-//------------------------------------------------------------------------------
-
-DelphesCaloData::~DelphesCaloData()
-{
-}
-
-//------------------------------------------------------------------------------
-
-void DelphesCaloData::ClearTowers()
-{
-   fGeomVec.clear();
-}
-
-//------------------------------------------------------------------------------
Index: trunk/classes/DelphesCaloData.h
===================================================================
--- trunk/classes/DelphesCaloData.h	(revision 1096)
+++ 	(revision )
@@ -1,20 +1,0 @@
-#ifndef DelphesCaloData_h
-#define DelphesCaloData_h
-
-#include "TEveCaloData.h"
-
-class DelphesCaloData: public TEveCaloDataVec 
-{
-public:
-  
-  DelphesCaloData(Int_t nslices);
-
-  ~DelphesCaloData();
-
-  void ClearTowers();
-
-  ClassDef(DelphesCaloData, 1)
-};
-
-#endif /* DelphesCaloData_h */
-
Index: trunk/classes/DelphesDisplay.cc
===================================================================
--- trunk/classes/DelphesDisplay.cc	(revision 1096)
+++ 	(revision )
@@ -1,150 +1,0 @@
-
-#include "TEveManager.h"
-#include "TEveViewer.h"
-#include "TGLViewer.h"
-#include "TGLWidget.h"
-#include "TEveScene.h"
-#include "TEveProjectionManager.h"
-#include "TEveProjectionAxes.h"
-#include "TEveBrowser.h"
-#include "TEveWindow.h"
-#include "TGTab.h"
-
-#include "TEveCalo2DGL.h"
-#include "TEveCalo3DGL.h"  
-#include "TEveCaloLegoGL.h"
-#include "TEveCaloLegoOverlay.h"
-#include "TEveLegoEventHandler.h"
-
-#include "classes/DelphesDisplay.h"
-
-//------------------------------------------------------------------------------
-
-DelphesDisplay::DelphesDisplay()
-{
-  TEveProjectionAxes *axes;
-  TEveWindowSlot *slot;
-  TEveWindowPack *packH, *pack0, *pack1;
-
-  fRPhiMgr = new TEveProjectionManager(TEveProjection::kPT_RPhi);
-  fRhoZMgr = new TEveProjectionManager(TEveProjection::kPT_RhoZ);
-
-	fRPhiGeomScene = gEve->SpawnNewScene("RPhi Geometry");
-	fRhoZGeomScene = gEve->SpawnNewScene("RhoZ Geometry");
-
-	fRPhiCaloScene = gEve->SpawnNewScene("RPhi Calorimeter");
-	fRhoZCaloScene = gEve->SpawnNewScene("RhoZ Calorimeter");
-	fLegoCaloScene = gEve->SpawnNewScene("Lego Calorimeter");
-
-	fRPhiEventScene = gEve->SpawnNewScene("RPhi Event Data");
-	fRhoZEventScene = gEve->SpawnNewScene("RhoZ Event Data");
-  
-  axes = new TEveProjectionAxes(fRPhiMgr);
-  fRPhiGeomScene->AddElement(axes);
-
-  axes = new TEveProjectionAxes(fRhoZMgr);
-  fRhoZGeomScene->AddElement(axes);
-
-  // close default tab
-  gEve->GetBrowser()->GetTabRight()->CloseTab(0);
-
-  // frames
-  slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
-  packH = slot->MakePack();
-
-  packH->SetElementName("Delphes Display");
-  packH->SetHorizontal();
-  packH->SetShowTitleBar(kFALSE);
-
-  pack0 = packH->NewSlot()->MakePack();
-  pack0->SetShowTitleBar(kFALSE);
-
-  pack1 = packH->NewSlot()->MakePack();
-  pack1->SetShowTitleBar(kFALSE);
-
-  pack1->NewSlot()->MakeCurrent();
-  f3DimView = gEve->SpawnNewViewer("3D View", "");
-  f3DimView->AddScene(gEve->GetGlobalScene());
-  f3DimView->AddScene(gEve->GetEventScene());
-  
-  pack1->NewSlot()->MakeCurrent();
-  fLegoView = gEve->SpawnNewViewer("Lego View", "");
-  fLegoView->GetGLViewer()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
-  fLegoView->AddScene(fLegoCaloScene);
-  
-  pack0->NewSlot()->MakeCurrent();
-  fRPhiView = gEve->SpawnNewViewer("RPhi View", "");
-  fRPhiView->GetGLViewer()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
-  fRPhiView->AddScene(fRPhiGeomScene);
-  fRPhiView->AddScene(fRPhiCaloScene);
-  fRPhiView->AddScene(fRPhiEventScene);
-        
-  pack0->NewSlot()->MakeCurrent();
-  fRhoZView = gEve->SpawnNewViewer("RhoZ View", "");
-  fRhoZView->GetGLViewer()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
-  fRhoZView->AddScene(fRhoZGeomScene);
-  fRhoZView->AddScene(fRhoZCaloScene);
-  fRhoZView->AddScene(fRhoZEventScene);
-}
-
-//------------------------------------------------------------------------------
-
-DelphesDisplay::~DelphesDisplay()
-{
-}
-
-//------------------------------------------------------------------------------
-
-void DelphesDisplay::ImportGeomRPhi(TEveElement* el)
-{ 
-  fRPhiMgr->ImportElements(el, fRPhiGeomScene);
-}
-
-void DelphesDisplay::ImportGeomRhoZ(TEveElement* el)
-{ 
-  fRhoZMgr->ImportElements(el, fRhoZGeomScene);
-}
-
-void DelphesDisplay::ImportCaloRPhi(TEveCalo3D *calo)
-{
-  fRPhiMgr->ImportElements(calo, fRPhiCaloScene);
-}
-
-void DelphesDisplay::ImportCaloRhoZ(TEveCalo3D *calo)
-{
-  fRhoZMgr->ImportElements(calo, fRhoZCaloScene);
-}
-
-void DelphesDisplay::ImportCaloLego(TEveCaloLego *calo)
-{
-  TEveCaloLegoOverlay *overlay = new TEveCaloLegoOverlay();
- 
-  overlay->SetCaloLego(calo);
-  fLegoView->GetGLViewer()->AddOverlayElement(overlay);
-
-  fLegoCaloScene->AddElement(calo);
-}
-
-void DelphesDisplay::ImportEventRPhi(TEveElement* el)
-{ 
-  fRPhiMgr->ImportElements(el, fRPhiEventScene);
-}
-
-void DelphesDisplay::ImportEventRhoZ(TEveElement* el)
-{ 
-  fRhoZMgr->ImportElements(el, fRhoZEventScene);
-}
-
-//---------------------------------------------------------------------------
-
-void DelphesDisplay::DestroyEventRPhi()
-{
-  fRPhiEventScene->DestroyElements();
-}
-
-void DelphesDisplay::DestroyEventRhoZ()
-{
-  fRhoZEventScene->DestroyElements();
-}
-//------------------------------------------------------------------------------
-
Index: trunk/classes/DelphesDisplay.h
===================================================================
--- trunk/classes/DelphesDisplay.h	(revision 1096)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#ifndef DelphesDisplay_h
-#define DelphesDisplay_h
-
-class TEveProjectionManager;
-class TEveElement;
-class TEveCalo3D;
-class TEveCaloLego;
-class TEveViewer;
-class TEveScene;
-
-class DelphesDisplay
-{
-public:
-  
-  DelphesDisplay();
-
-  virtual ~DelphesDisplay();
-
-  void ImportGeomRPhi(TEveElement* el);
-  void ImportGeomRhoZ(TEveElement* el);
-
-  void ImportCaloRPhi(TEveCalo3D *calo);
-  void ImportCaloRhoZ(TEveCalo3D *calo);
-  void ImportCaloLego(TEveCaloLego *calo);
-
-  void ImportEventRPhi(TEveElement* el);
-  void ImportEventRhoZ(TEveElement* el);
-
-  void DestroyEventRPhi();
-  void DestroyEventRhoZ();
-
-private:
-
-  TEveProjectionManager *fRPhiMgr;
-  TEveProjectionManager *fRhoZMgr;
-
-  TEveViewer *fRPhiView;
-  TEveViewer *fRhoZView;
-  TEveViewer *f3DimView;
-  TEveViewer *fLegoView;
-
-  TEveScene *fRPhiGeomScene;
-  TEveScene *fRhoZGeomScene;
-
-  TEveScene *fRPhiCaloScene;
-  TEveScene *fRhoZCaloScene;
-  TEveScene *fLegoCaloScene;
-
-  TEveScene *fRPhiEventScene;
-  TEveScene *fRhoZEventScene;
-};
-
-#endif /* DelphesDisplay_h */
-
Index: trunk/display/DelphesCaloData.cc
===================================================================
--- trunk/display/DelphesCaloData.cc	(revision 1097)
+++ trunk/display/DelphesCaloData.cc	(revision 1097)
@@ -0,0 +1,24 @@
+
+#include "display/DelphesCaloData.h"
+
+//------------------------------------------------------------------------------
+
+DelphesCaloData::DelphesCaloData(Int_t nslices) :
+  TEveCaloDataVec(nslices)
+{
+}
+
+//------------------------------------------------------------------------------
+
+DelphesCaloData::~DelphesCaloData()
+{
+}
+
+//------------------------------------------------------------------------------
+
+void DelphesCaloData::ClearTowers()
+{
+   fGeomVec.clear();
+}
+
+//------------------------------------------------------------------------------
Index: trunk/display/DelphesCaloData.h
===================================================================
--- trunk/display/DelphesCaloData.h	(revision 1097)
+++ trunk/display/DelphesCaloData.h	(revision 1097)
@@ -0,0 +1,20 @@
+#ifndef DelphesCaloData_h
+#define DelphesCaloData_h
+
+#include "TEveCaloData.h"
+
+class DelphesCaloData: public TEveCaloDataVec 
+{
+public:
+  
+  DelphesCaloData(Int_t nslices);
+
+  ~DelphesCaloData();
+
+  void ClearTowers();
+
+  ClassDef(DelphesCaloData, 1)
+};
+
+#endif /* DelphesCaloData_h */
+
Index: trunk/display/DelphesDisplay.cc
===================================================================
--- trunk/display/DelphesDisplay.cc	(revision 1097)
+++ trunk/display/DelphesDisplay.cc	(revision 1097)
@@ -0,0 +1,150 @@
+
+#include "TEveManager.h"
+#include "TEveViewer.h"
+#include "TGLViewer.h"
+#include "TGLWidget.h"
+#include "TEveScene.h"
+#include "TEveProjectionManager.h"
+#include "TEveProjectionAxes.h"
+#include "TEveBrowser.h"
+#include "TEveWindow.h"
+#include "TGTab.h"
+
+#include "TEveCalo2DGL.h"
+#include "TEveCalo3DGL.h"  
+#include "TEveCaloLegoGL.h"
+#include "TEveCaloLegoOverlay.h"
+#include "TEveLegoEventHandler.h"
+
+#include "display/DelphesDisplay.h"
+
+//------------------------------------------------------------------------------
+
+DelphesDisplay::DelphesDisplay()
+{
+  TEveProjectionAxes *axes;
+  TEveWindowSlot *slot;
+  TEveWindowPack *packH, *pack0, *pack1;
+
+  fRPhiMgr = new TEveProjectionManager(TEveProjection::kPT_RPhi);
+  fRhoZMgr = new TEveProjectionManager(TEveProjection::kPT_RhoZ);
+
+	fRPhiGeomScene = gEve->SpawnNewScene("RPhi Geometry");
+	fRhoZGeomScene = gEve->SpawnNewScene("RhoZ Geometry");
+
+	fRPhiCaloScene = gEve->SpawnNewScene("RPhi Calorimeter");
+	fRhoZCaloScene = gEve->SpawnNewScene("RhoZ Calorimeter");
+	fLegoCaloScene = gEve->SpawnNewScene("Lego Calorimeter");
+
+	fRPhiEventScene = gEve->SpawnNewScene("RPhi Event Data");
+	fRhoZEventScene = gEve->SpawnNewScene("RhoZ Event Data");
+  
+  axes = new TEveProjectionAxes(fRPhiMgr);
+  fRPhiGeomScene->AddElement(axes);
+
+  axes = new TEveProjectionAxes(fRhoZMgr);
+  fRhoZGeomScene->AddElement(axes);
+
+  // close default tab
+  gEve->GetBrowser()->GetTabRight()->CloseTab(0);
+
+  // frames
+  slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
+  packH = slot->MakePack();
+
+  packH->SetElementName("Delphes Display");
+  packH->SetHorizontal();
+  packH->SetShowTitleBar(kFALSE);
+
+  pack0 = packH->NewSlot()->MakePack();
+  pack0->SetShowTitleBar(kFALSE);
+
+  pack1 = packH->NewSlot()->MakePack();
+  pack1->SetShowTitleBar(kFALSE);
+
+  pack1->NewSlot()->MakeCurrent();
+  f3DimView = gEve->SpawnNewViewer("3D View", "");
+  f3DimView->AddScene(gEve->GetGlobalScene());
+  f3DimView->AddScene(gEve->GetEventScene());
+  
+  pack1->NewSlot()->MakeCurrent();
+  fLegoView = gEve->SpawnNewViewer("Lego View", "");
+  fLegoView->GetGLViewer()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
+  fLegoView->AddScene(fLegoCaloScene);
+  
+  pack0->NewSlot()->MakeCurrent();
+  fRPhiView = gEve->SpawnNewViewer("RPhi View", "");
+  fRPhiView->GetGLViewer()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
+  fRPhiView->AddScene(fRPhiGeomScene);
+  fRPhiView->AddScene(fRPhiCaloScene);
+  fRPhiView->AddScene(fRPhiEventScene);
+        
+  pack0->NewSlot()->MakeCurrent();
+  fRhoZView = gEve->SpawnNewViewer("RhoZ View", "");
+  fRhoZView->GetGLViewer()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
+  fRhoZView->AddScene(fRhoZGeomScene);
+  fRhoZView->AddScene(fRhoZCaloScene);
+  fRhoZView->AddScene(fRhoZEventScene);
+}
+
+//------------------------------------------------------------------------------
+
+DelphesDisplay::~DelphesDisplay()
+{
+}
+
+//------------------------------------------------------------------------------
+
+void DelphesDisplay::ImportGeomRPhi(TEveElement* el)
+{ 
+  fRPhiMgr->ImportElements(el, fRPhiGeomScene);
+}
+
+void DelphesDisplay::ImportGeomRhoZ(TEveElement* el)
+{ 
+  fRhoZMgr->ImportElements(el, fRhoZGeomScene);
+}
+
+void DelphesDisplay::ImportCaloRPhi(TEveCalo3D *calo)
+{
+  fRPhiMgr->ImportElements(calo, fRPhiCaloScene);
+}
+
+void DelphesDisplay::ImportCaloRhoZ(TEveCalo3D *calo)
+{
+  fRhoZMgr->ImportElements(calo, fRhoZCaloScene);
+}
+
+void DelphesDisplay::ImportCaloLego(TEveCaloLego *calo)
+{
+  TEveCaloLegoOverlay *overlay = new TEveCaloLegoOverlay();
+ 
+  overlay->SetCaloLego(calo);
+  fLegoView->GetGLViewer()->AddOverlayElement(overlay);
+
+  fLegoCaloScene->AddElement(calo);
+}
+
+void DelphesDisplay::ImportEventRPhi(TEveElement* el)
+{ 
+  fRPhiMgr->ImportElements(el, fRPhiEventScene);
+}
+
+void DelphesDisplay::ImportEventRhoZ(TEveElement* el)
+{ 
+  fRhoZMgr->ImportElements(el, fRhoZEventScene);
+}
+
+//---------------------------------------------------------------------------
+
+void DelphesDisplay::DestroyEventRPhi()
+{
+  fRPhiEventScene->DestroyElements();
+}
+
+void DelphesDisplay::DestroyEventRhoZ()
+{
+  fRhoZEventScene->DestroyElements();
+}
+//------------------------------------------------------------------------------
+
Index: trunk/display/DelphesDisplay.h
===================================================================
--- trunk/display/DelphesDisplay.h	(revision 1097)
+++ trunk/display/DelphesDisplay.h	(revision 1097)
@@ -0,0 +1,54 @@
+#ifndef DelphesDisplay_h
+#define DelphesDisplay_h
+
+class TEveProjectionManager;
+class TEveElement;
+class TEveCalo3D;
+class TEveCaloLego;
+class TEveViewer;
+class TEveScene;
+
+class DelphesDisplay
+{
+public:
+  
+  DelphesDisplay();
+
+  virtual ~DelphesDisplay();
+
+  void ImportGeomRPhi(TEveElement* el);
+  void ImportGeomRhoZ(TEveElement* el);
+
+  void ImportCaloRPhi(TEveCalo3D *calo);
+  void ImportCaloRhoZ(TEveCalo3D *calo);
+  void ImportCaloLego(TEveCaloLego *calo);
+
+  void ImportEventRPhi(TEveElement* el);
+  void ImportEventRhoZ(TEveElement* el);
+
+  void DestroyEventRPhi();
+  void DestroyEventRhoZ();
+
+private:
+
+  TEveProjectionManager *fRPhiMgr;
+  TEveProjectionManager *fRhoZMgr;
+
+  TEveViewer *fRPhiView;
+  TEveViewer *fRhoZView;
+  TEveViewer *f3DimView;
+  TEveViewer *fLegoView;
+
+  TEveScene *fRPhiGeomScene;
+  TEveScene *fRhoZGeomScene;
+
+  TEveScene *fRPhiCaloScene;
+  TEveScene *fRhoZCaloScene;
+  TEveScene *fLegoCaloScene;
+
+  TEveScene *fRPhiEventScene;
+  TEveScene *fRhoZEventScene;
+};
+
+#endif /* DelphesDisplay_h */
+
Index: trunk/display/DisplayLinkDef.h
===================================================================
--- trunk/display/DisplayLinkDef.h	(revision 1097)
+++ trunk/display/DisplayLinkDef.h	(revision 1097)
@@ -0,0 +1,27 @@
+
+/** ExRootAnalysisLinkDef
+ *
+ *  Lists classes to be included in cint dicitonary
+ *
+ *  $Date$
+ *  $Revision$
+ *
+ *  
+ *  \author P. Demin - UCL, Louvain-la-Neuve
+ *
+ */
+
+#include "display/DelphesDisplay.h"
+#include "display/DelphesCaloData.h"
+
+#ifdef __CINT__
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#pragma link C++ class DelphesDisplay+;
+#pragma link C++ class DelphesCaloData+;
+
+#endif
+
Index: trunk/doc/genMakefile.tcl
===================================================================
--- trunk/doc/genMakefile.tcl	(revision 1096)
+++ trunk/doc/genMakefile.tcl	(revision 1097)
@@ -188,10 +188,14 @@
 
 CXXFLAGS += $(ROOTCFLAGS) -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DDROP_CGAL -I. -Iexternal -Iexternal/tcl
-LIBS = $(shell $(RC) --evelibs) $(SYSLIBS)
+DELPHES_LIBS = $(shell $(RC) --libs) -lEG $(SYSLIBS)
+DISPLAY_LIBS = $(shell $(RC) --evelibs) $(SYSLIBS)
 
 ###
 
-SHARED = libDelphes.$(DllSuf)
-SHAREDLIB = libDelphes.lib
+DELPHES = libDelphes.$(DllSuf)
+DELPHESLIB = libDelphes.lib
+
+DISPLAY = libDelphesDisplay.$(DllSuf)
+DISPLAYLIB = libDelphesDisplay.lib
 
 VERSION = $(shell cat VERSION)
@@ -205,7 +209,11 @@
 executableDeps
 
-dictDeps {DICT} {classes/*LinkDef.h} {modules/*LinkDef.h} {external/ExRootAnalysis/*LinkDef.h}
-
-sourceDeps {SOURCE} {classes/*.cc} {modules/*.cc} {external/ExRootAnalysis/*.cc} {external/fastjet/*.cc} {external/fastjet/tools/*.cc} {external/fastjet/plugins/*/*.cc}
+dictDeps {DELPHES_DICT} {classes/*LinkDef.h} {modules/*LinkDef.h} {external/ExRootAnalysis/*LinkDef.h}
+
+dictDeps {DISPLAY_DICT} {display/*LinkDef.h}
+
+sourceDeps {DELPHES} {classes/*.cc} {modules/*.cc} {external/ExRootAnalysis/*.cc} {external/fastjet/*.cc} {external/fastjet/tools/*.cc} {external/fastjet/plugins/*/*.cc}
+
+sourceDeps {DISPLAY} {display/*.cc}
 
 tclDeps
@@ -217,15 +225,17 @@
 ###
 
-all: $(SHARED) $(EXECUTABLE) $(STDHEP_EXECUTABLE)
-
-$(SHARED): $(DICT_OBJ) $(SOURCE_OBJ) $(TCL_OBJ)
+all: $(DELPHES) $(EXECUTABLE)
+
+display: $(DISPLAY)
+
+$(DELPHES): $(DELPHES_DICT_OBJ) $(DELPHES_OBJ) $(TCL_OBJ)
 	@mkdir -p $(@D)
 	@echo ">> Building $@"
 ifeq ($(ARCH),aix5)
-	@$(MAKESHARED) $(OutPutOpt) $@ $(LIBS) -p 0 $^
+	@$(MAKESHARED) $(OutPutOpt) $@ $(DELPHES_LIBS) -p 0 $^
 else
 ifeq ($(PLATFORM),macosx)
 # We need to make both the .dylib and the .so
-	@$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(LIBS)
+	@$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
 ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
 ifeq ($(MACOSX_MINOR),4)
@@ -236,9 +246,9 @@
 ifeq ($(PLATFORM),win32)
 	@bindexplib $* $^ > $*.def
-	@lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(SHAREDLIB)
-	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) $(OutPutOpt)$@
+	@lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(DELPHESLIB)
+	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(DELPHES_LIBS) $(OutPutOpt)$@
 	@$(MT_DLL)
 else
-	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(LIBS)
+	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
 	@$(MT_DLL)
 endif
@@ -246,9 +256,37 @@
 endif
 
+$(DISPLAY): $(DELPHES_DICT_OBJ) $(DISPLAY_DICT_OBJ) $(DELPHES_OBJ) $(DISPLAY_OBJ) $(TCL_OBJ)
+	@mkdir -p $(@D)
+	@echo ">> Building $@"
+ifeq ($(ARCH),aix5)
+	@$(MAKESHARED) $(OutPutOpt) $@ $(DISPLAY_LIBS) -p 0 $^
+else
+ifeq ($(PLATFORM),macosx)
+# We need to make both the .dylib and the .so
+	@$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(DISPLAY_LIBS)
+ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
+ifeq ($(MACOSX_MINOR),4)
+	@ln -sf $@ $(subst .$(DllSuf),.so,$@)
+endif
+endif
+else
+ifeq ($(PLATFORM),win32)
+	@bindexplib $* $^ > $*.def
+	@lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(DISPLAYLIB)
+	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(DISPLAY_LIBS) $(OutPutOpt)$@
+	@$(MT_DLL)
+else
+	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(DISPLAY_LIBS)
+	@$(MT_DLL)
+endif
+endif
+endif
+
 clean:
-	@rm -f $(DICT_OBJ) $(SOURCE_OBJ) $(TCL_OBJ) $(STDHEP_OBJ) core
+	@rm -f $(DELPHES_DICT_OBJ) $(DISPLAY_DICT_OBJ) $(DELPHES_OBJ) $(DISPLAY_OBJ) $(TCL_OBJ) core
+	@rm -rf tmp
 
 distclean: clean
-	@rm -f $(SHARED) $(SHAREDLIB) $(EXECUTABLE)
+	@rm -f $(DELPHES) $(DELPHESLIB) $(DISPLAY) $(DISPLAYLIB) $(EXECUTABLE)
 
 dist:
@@ -274,10 +312,20 @@
 	@rm $@.arch $@.base
 
-$(SOURCE_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
-	@mkdir -p $(@D)
-	@echo ">> Compiling $<"
-	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
-
-$(DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
+$(DELPHES_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
+	@mkdir -p $(@D)
+	@echo ">> Compiling $<"
+	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
+
+$(DISPLAY_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
+	@mkdir -p $(@D)
+	@echo ">> Compiling $<"
+	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
+
+$(DELPHES_DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
+	@mkdir -p $(@D)
+	@echo ">> Compiling $<"
+	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
+
+$(DISPLAY_DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
 	@mkdir -p $(@D)
 	@echo ">> Compiling $<"
@@ -294,7 +342,7 @@
 	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
 
-$(EXECUTABLE): %$(ExeSuf): $(DICT_OBJ) $(SOURCE_OBJ) $(TCL_OBJ)
+$(EXECUTABLE): %$(ExeSuf): $(DELPHES_DICT_OBJ) $(DELPHES_OBJ) $(TCL_OBJ)
 	@echo ">> Building $@"
-	@$(LD) $(LDFLAGS) $^ $(LIBS) $(OutPutOpt)$@
+	@$(LD) $(LDFLAGS) $^ $(DELPHES_LIBS) $(OutPutOpt)$@
 
 ###
