Index: display/DelphesBranchElement.h
===================================================================
--- display/DelphesBranchElement.h	(revision 4d999a57410bd2e0f18efb7f6965504646a43c49)
+++ display/DelphesBranchElement.h	(revision 5fbcfe80e40de6add76bb12b8e0daf48a1c4dc7d)
@@ -22,5 +22,8 @@
 #include "TColor.h"
 #include "TString.h"
+#include "TClonesArray.h"
+#include "TClass.h"
 #include <exception>
+#include <iostream>
 #include "display/DelphesCaloData.h"
 #include "TEveElement.h"
@@ -31,16 +34,19 @@
 {
   public:
-    DelphesBranchBase(const char* name="", const char*type="", const enum EColor color=kBlack):name_(name),type_(type),color_(color) {}
-    virtual ~DelphesBranchBase() {};
+    DelphesBranchBase(const char* name="", TClonesArray* branch=NULL, const enum EColor color=kBlack):name_(name),branch_(branch),color_(color) {}
+    virtual ~DelphesBranchBase() {}
     const char* GetName() const { return (const char*)name_; }
-    const char* GetType() const { return (const char*)type_; }
+    const char* GetType() const { return branch_ ? branch_->GetClass()->GetName() : "None"; }
+    virtual const char* GetClassName() = 0;
     enum EColor GetColor() const { return color_; }
-    virtual const char* GetClassName() = 0;
     virtual void Reset() = 0;
+    virtual void SetTrackingVolume(Float_t r, Float_t l, Float_t Bz=0.) { tkRadius_ = r; tkHalfLength_ = l; tk_Bz_ = Bz; }
+    virtual void ReadBranch() = 0;
 
   protected:
     TString name_;
-    TString type_; // needed for parsing the branch later on
+    TClonesArray* branch_;
     const enum EColor color_;
+    Float_t tkRadius_,tkHalfLength_, tk_Bz_;
 };
 
@@ -50,5 +56,5 @@
   public:
     // constructor
-    DelphesBranchElement(const char* name="", const char*type="", const enum EColor color=kBlack):DelphesBranchBase(name, type, color) {
+    DelphesBranchElement(const char* name="", TClonesArray* branch=NULL, const enum EColor color=kBlack):DelphesBranchBase(name, branch, color) {
       throw std::exception();
     }
@@ -60,4 +66,7 @@
     EveContainer* GetContainer() { return data_; }
 
+    // tracking volume
+    virtual void SetTrackingVolume(Float_t r, Float_t l, Float_t Bz=0.) { tkRadius_ = r; tkHalfLength_ = l; tk_Bz_ = Bz; }
+
     // resets the collection (before moving to the next event)
     virtual void Reset() {};
@@ -65,4 +74,7 @@
     // template class name
     virtual const char* GetClassName() { return data_->ClassName(); }
+
+    // read the branch and fill elements for display
+    virtual void ReadBranch() {}
 
   private:
@@ -73,14 +85,18 @@
 
 // special case for calo towers
-template<> DelphesBranchElement<DelphesCaloData>::DelphesBranchElement(const char* name, const char*type, const enum EColor color);
+template<> DelphesBranchElement<DelphesCaloData>::DelphesBranchElement(const char* name, TClonesArray* branch, const enum EColor color);
 template<> void DelphesBranchElement<DelphesCaloData>::Reset();
+template<> void DelphesBranchElement<DelphesCaloData>::ReadBranch();
 
 // special case for element lists
-template<> DelphesBranchElement<TEveElementList>::DelphesBranchElement(const char* name, const char*type, const enum EColor color);
+template<> DelphesBranchElement<TEveElementList>::DelphesBranchElement(const char* name, TClonesArray* branch, const enum EColor color);
 template<> void DelphesBranchElement<TEveElementList>::Reset();
+template<> void DelphesBranchElement<TEveElementList>::ReadBranch();
 
 // special case for track lists
-template<> DelphesBranchElement<TEveTrackList>::DelphesBranchElement(const char* name, const char*type, const enum EColor color);
+template<> DelphesBranchElement<TEveTrackList>::DelphesBranchElement(const char* name, TClonesArray* branch, const enum EColor color);
+template<> void DelphesBranchElement<TEveTrackList>::SetTrackingVolume(Float_t r, Float_t l, Float_t Bz);
 template<> void DelphesBranchElement<TEveTrackList>::Reset();
+template<> void DelphesBranchElement<TEveTrackList>::ReadBranch();
 
 #endif // CINT, CLING
