Index: Makefile
===================================================================
--- Makefile	(revision 3ccc2b6edab8c6bcc2a56024de8ef5ab796abfd5)
+++ Makefile	(revision 2e229c9fe9c79ff255939a03de540b0257974752)
@@ -186,4 +186,5 @@
 	modules/StatusPidFilter.h \
 	modules/Cloner.h \
+	modules/Weighter.h \
 	modules/ExampleModule.h
 tmp/external/ExRootAnalysis/ExRootAnalysisDict.$(SrcSuf): \
@@ -396,4 +397,13 @@
 	external/ExRootAnalysis/ExRootClassifier.h \
 	external/ExRootAnalysis/ExRootTreeBranch.h
+tmp/modules/Weighter.$(ObjSuf): \
+	modules/Weighter.$(SrcSuf) \
+	modules/Weighter.h \
+	classes/DelphesClasses.h \
+	classes/DelphesFactory.h \
+	classes/DelphesFormula.h \
+	external/ExRootAnalysis/ExRootResult.h \
+	external/ExRootAnalysis/ExRootFilter.h \
+	external/ExRootAnalysis/ExRootClassifier.h
 tmp/modules/Delphes.$(ObjSuf): \
 	modules/Delphes.$(SrcSuf) \
@@ -763,4 +773,5 @@
 	tmp/modules/BTagging.$(ObjSuf) \
 	tmp/modules/TreeWriter.$(ObjSuf) \
+	tmp/modules/Weighter.$(ObjSuf) \
 	tmp/modules/Delphes.$(ObjSuf) \
 	tmp/modules/Calorimeter.$(ObjSuf) \
@@ -1022,11 +1033,11 @@
 	@touch $@
 
+external/fastjet/Selector.hh: \
+	external/fastjet/PseudoJet.hh \
+	external/fastjet/RangeDefinition.hh
+	@touch $@
+
 modules/JetPileUpSubtractor.h: \
 	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/Selector.hh: \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/RangeDefinition.hh
 	@touch $@
 
@@ -1159,4 +1170,8 @@
 
 modules/BTagging.h: \
+	classes/DelphesModule.h
+	@touch $@
+
+modules/Weighter.h: \
 	classes/DelphesModule.h
 	@touch $@
Index: classes/ClassesLinkDef.h
===================================================================
--- classes/ClassesLinkDef.h	(revision 3ccc2b6edab8c6bcc2a56024de8ef5ab796abfd5)
+++ classes/ClassesLinkDef.h	(revision 2e229c9fe9c79ff255939a03de540b0257974752)
@@ -37,4 +37,5 @@
 #pragma link C++ class ScalarHT+;
 #pragma link C++ class Rho+;
+#pragma link C++ class Weight+;
 #pragma link C++ class Photon+;
 #pragma link C++ class Electron+;
Index: classes/DelphesClasses.h
===================================================================
--- classes/DelphesClasses.h	(revision 3ccc2b6edab8c6bcc2a56024de8ef5ab796abfd5)
+++ classes/DelphesClasses.h	(revision 2e229c9fe9c79ff255939a03de540b0257974752)
@@ -175,4 +175,14 @@
 //---------------------------------------------------------------------------
 
+class Weight: public TObject
+{
+public:
+  Float_t Weight; // weight for the event
+
+  ClassDef(Weight, 1)
+};
+
+//---------------------------------------------------------------------------
+
 class Photon: public SortableObject
 {
Index: modules/ModulesLinkDef.h
===================================================================
--- modules/ModulesLinkDef.h	(revision 3ccc2b6edab8c6bcc2a56024de8ef5ab796abfd5)
+++ modules/ModulesLinkDef.h	(revision 2e229c9fe9c79ff255939a03de540b0257974752)
@@ -7,5 +7,5 @@
  *  $Revision$
  *
- *  
+ *
  *  \author P. Demin - UCL, Louvain-la-Neuve
  *
@@ -13,5 +13,5 @@
 
 #include "modules/Delphes.h"
- 
+
 #include "modules/FastJetFinder.h"
 #include "modules/ParticlePropagator.h"
@@ -33,4 +33,5 @@
 #include "modules/StatusPidFilter.h"
 #include "modules/Cloner.h"
+#include "modules/Weighter.h"
 #include "modules/ExampleModule.h"
 
@@ -62,4 +63,5 @@
 #pragma link C++ class StatusPidFilter+;
 #pragma link C++ class Cloner+;
+#pragma link C++ class Weighter+;
 #pragma link C++ class ExampleModule+;
 
Index: modules/TreeWriter.cc
===================================================================
--- modules/TreeWriter.cc	(revision 3ccc2b6edab8c6bcc2a56024de8ef5ab796abfd5)
+++ modules/TreeWriter.cc	(revision 2e229c9fe9c79ff255939a03de540b0257974752)
@@ -65,4 +65,5 @@
   fClassMap[ScalarHT::Class()] = &TreeWriter::ProcessScalarHT;
   fClassMap[Rho::Class()] = &TreeWriter::ProcessRho;
+  fClassMap[Weight::Class()] = &TreeWriter::ProcessWeight;
 
   TBranchMap::iterator itBranchMap;
@@ -538,4 +539,22 @@
 //------------------------------------------------------------------------------
 
+void TreeWriter::ProcessWeight(ExRootTreeBranch *branch, TObjArray *array)
+{
+  Candidate *candidate = 0;
+  Weight *entry = 0;
+
+  // get the first entry
+  if((candidate = static_cast<Candidate*>(array->At(0))))
+  {
+    const TLorentzVector &momentum = candidate->Momentum;
+
+    entry = static_cast<Weight*>(branch->NewEntry());
+
+    entry->Weight = momentum.E();
+  }
+}
+
+//------------------------------------------------------------------------------
+
 void TreeWriter::Process()
 {
Index: modules/TreeWriter.h
===================================================================
--- modules/TreeWriter.h	(revision 3ccc2b6edab8c6bcc2a56024de8ef5ab796abfd5)
+++ modules/TreeWriter.h	(revision 2e229c9fe9c79ff255939a03de540b0257974752)
@@ -51,4 +51,5 @@
   void ProcessScalarHT(ExRootTreeBranch *branch, TObjArray *array);
   void ProcessRho(ExRootTreeBranch *branch, TObjArray *array);
+  void ProcessWeight(ExRootTreeBranch *branch, TObjArray *array);
 
 #ifndef __CINT__
