Index: display/DelphesBranchElement.cc
===================================================================
--- display/DelphesBranchElement.cc	(revision fafc4338a61369fbe7d7b57cb98ebe9514a799bd)
+++ display/DelphesBranchElement.cc	(revision 30bb83a57f494a3a1bb02dec9633824967d67a2d)
@@ -43,8 +43,6 @@
 template<> void DelphesBranchElement<TEveElementList>::Reset() { data_->DestroyElements(); }
 
-//TODO: does the type really make sense?
 // special case for track lists
 template<> DelphesBranchElement<TEveTrackList>::DelphesBranchElement(const char* name, const char*type, const enum EColor color):DelphesBranchBase(name, type, color) {
-      if(TString(type)=="track") {
         data_ = new TEveTrackList(name);
         data_->SetMainColor(color_);
@@ -52,18 +50,4 @@
         data_->SetMarkerStyle(kCircle);
         data_->SetMarkerSize(0.5);
-      } else if(TString(type)=="photon") {
-        data_ = new TEveTrackList(name);
-        data_->SetMainColor(color_);
-        data_->SetMarkerColor(color_);
-        data_->SetMarkerStyle(kCircle);
-        data_->SetMarkerSize(0.5);
-      } else {
-        data_ = new TEveTrackList(name);
-        data_->SetMainColor(color_);
-        data_->SetMarkerColor(color_);
-        data_->SetMarkerStyle(kCircle);
-        data_->SetMarkerSize(0.5);
-        //throw std::exception();
-      }
     }
 template<> void DelphesBranchElement<TEveTrackList>::Reset() { data_->DestroyElements(); }
Index: display/DelphesEventDisplay.cc
===================================================================
--- display/DelphesEventDisplay.cc	(revision fafc4338a61369fbe7d7b57cb98ebe9514a799bd)
+++ display/DelphesEventDisplay.cc	(revision 30bb83a57f494a3a1bb02dec9633824967d67a2d)
@@ -66,35 +66,16 @@
    tkHalfLength_ = det3D.getTrackerHalfLength();
    bz_ = det3D.getBField();
-
-   //TODO specific to some classical detector... could use better the det3D
    TGeoVolume* top = det3D.getDetector(false);
    geom->SetTopVolume(top);
    TEveElementList *geometry = new TEveElementList("Geometry");
-   TEveGeoTopNode* trk = new TEveGeoTopNode(gGeoManager, top->FindNode("tracker_1"));
-   trk->SetVisLevel(6);
-   geometry->AddElement(trk);
-   TEveGeoTopNode* calo = new TEveGeoTopNode(gGeoManager, top->FindNode("Calorimeter_barrel_1"));
-   calo->SetVisLevel(3);
-   geometry->AddElement(calo);
-   calo = new TEveGeoTopNode(gGeoManager, top->FindNode("Calorimeter_endcap_1"));
-   calo->SetVisLevel(3);
-   calo->UseNodeTrans();
-   geometry->AddElement(calo);
-   calo = new TEveGeoTopNode(gGeoManager, top->FindNode("Calorimeter_endcap_2"));
-   calo->SetVisLevel(3);
-   calo->UseNodeTrans();
-   geometry->AddElement(calo);
-   TEveGeoTopNode* muon = new TEveGeoTopNode(gGeoManager, top->FindNode("muons_barrel_1"));
-   muon->SetVisLevel(4);
-   geometry->AddElement(muon);
-   muon = new TEveGeoTopNode(gGeoManager, top->FindNode("muons_endcap_1"));
-   muon->SetVisLevel(4);
-   muon->UseNodeTrans();
-   geometry->AddElement(muon);
-   muon = new TEveGeoTopNode(gGeoManager, top->FindNode("muons_endcap_2"));
-   muon->SetVisLevel(4);
-   muon->UseNodeTrans();
-   geometry->AddElement(muon);
-   //gGeoManager->DefaultColors();
+   TObjArray* nodes = top->GetNodes();
+   TIter itNodes(nodes);
+   TGeoNode* nodeobj;
+   TEveGeoTopNode* node;
+   while((nodeobj = (TGeoNode*)itNodes.Next())) {
+     node = new TEveGeoTopNode(gGeoManager,nodeobj);
+     node->UseNodeTrans();
+     geometry->AddElement(node);
+   }
 
    // Create chain of root trees
@@ -145,4 +126,5 @@
 
 }
+
 // function that parses the config to extract the branches of interest and prepare containers
 void DelphesEventDisplay::readConfig(const char *configFile, Delphes3DGeometry& det3D, std::vector<DelphesBranchBase*>& elements, std::vector<TClonesArray*>& arrays) {
@@ -216,5 +198,4 @@
        continue;
      }
-//TODO one possible simplification could be to add the array to the element class.
      arrays.push_back(treeReader_->UseBranch(name));
    }
@@ -237,6 +218,4 @@
 }
 
-
-//______________________________________________________________________________
 void DelphesEventDisplay::load_event()
 {
@@ -244,7 +223,9 @@
    // The contents of previous event are removed.
 
+   // safety
+   if(event_id_ >= treeReader_->GetEntries() || event_id_<0 ) return;
+
    //TODO move this to the status bar ???
    printf("Loading event %d.\n", event_id_);
-
 
    // clear the previous event
@@ -254,6 +235,19 @@
    }
 
-   // read the new event
-   delphes_read();
+   // Load selected branches with data from specified event
+   treeReader_->ReadEntry(event_id_);
+
+   // loop over selected branches, and apply the proper recipe to fill the collections.
+   // this is basically to loop on arrays_ to fill elements_.
+   std::vector<TClonesArray*>::iterator data = arrays_.begin();
+   std::vector<DelphesBranchBase*>::iterator element = elements_.begin();
+   for(; data<arrays_.end() && element<elements_.end(); ++data, ++element) {
+     TString type = (*element)->GetType();
+     // branch on the element type
+     if(type=="tower") delphes_read_towers(*data,*element);
+     else if(type=="track" || type=="photon" || type=="electron" || type=="muon" || type=="genparticle") delphes_read_tracks(*data,*element);
+     else if(type=="jet") delphes_read_jets(*data,*element);
+     else if(type=="vector") delphes_read_vectors(*data,*element);
+   }
 
    // update display
@@ -264,30 +258,6 @@
    delphesDisplay_->ImportEventRhoZ(top);
    //update_html_summary();
+
    gEve->Redraw3D(kFALSE, kTRUE);
-}
-
-void DelphesEventDisplay::delphes_read()
-{
-
-  // safety
-  if(event_id_ >= treeReader_->GetEntries() || event_id_<0 ) return;
-
-  // Load selected branches with data from specified event
-  treeReader_->ReadEntry(event_id_);
-
-  // loop over selected branches, and apply the proper recipe to fill the collections.
-  // this is basically to loop on arrays_ to fill elements_.
-
-//TODO: one option would be to have templated methods in the element classes. We could simply call "element.fill()"
-  std::vector<TClonesArray*>::iterator data = arrays_.begin();
-  std::vector<DelphesBranchBase*>::iterator element = elements_.begin();
-  for(; data<arrays_.end() && element<elements_.end(); ++data, ++element) {
-    TString type = (*element)->GetType();
-    // branch on the element type
-    if(type=="tower") delphes_read_towers(*data,*element);
-    else if(type=="track" || type=="photon" || type=="electron" || type=="muon" || type=="genparticle") delphes_read_tracks(*data,*element);
-    else if(type=="jet") delphes_read_jets(*data,*element);
-    else if(type=="vector") delphes_read_vectors(*data,*element);
-  }
 }
 
Index: display/DelphesEventDisplay.h
===================================================================
--- display/DelphesEventDisplay.h	(revision fafc4338a61369fbe7d7b57cb98ebe9514a799bd)
+++ display/DelphesEventDisplay.h	(revision 30bb83a57f494a3a1bb02dec9633824967d67a2d)
@@ -45,5 +45,4 @@
     void make_gui();
     void load_event();
-    void delphes_read();
     void delphes_read_towers(TClonesArray* data, DelphesBranchBase* element);
     void delphes_read_tracks(TClonesArray* data, DelphesBranchBase* element);
