Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 449)
+++ trunk/CHANGELOG	(revision 450)
@@ -1,2 +1,5 @@
+
+* Changes relative to V.1.7b
+   - LHE files where not processed correctly (empty Analysis/Trigger trees). Now LHEFParticle derives from TRootC::GenParticle as it should.
 
  /-----------------------------------------\
Index: trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h
===================================================================
--- trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h	(revision 449)
+++ trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h	(revision 450)
@@ -73,4 +73,6 @@
 //---------------------------------------------------------------------------
 
+//---------------------------------------------------------------------------
+/*
 class TRootLHEFParticle: public TSortableObject
 {
@@ -100,5 +102,5 @@
                      // (c*tau, distance from production to decay in mm)
                      // | hepup.VTIMUP[number]
-                     
+
   double Spin; // cosine of the angle between the particle spin vector
                  // and the decaying particle 3-momentum,
@@ -110,5 +112,5 @@
 
 };
-
+*/
 //---------------------------------------------------------------------------
 
@@ -526,4 +528,28 @@
 
 
+
+
+class TRootLHEFParticle: public TRootC::GenParticle
+{
+public:
+  TRootLHEFParticle() {};
+  int ColorLine1; // index for the particle color-line | hepup.ICOLUP[number][0]
+  int ColorLine2; // index for the particle anti-color-line | hepup.ICOLUP[number][1]
+
+  double Rapidity; // particle rapidity
+  double LifeTime; // particle invariant lifetime
+                     // (c*tau, distance from production to decay in mm)
+                     // | hepup.VTIMUP[number]
+
+  double Spin; // cosine of the angle between the particle spin vector
+                 // and the decaying particle 3-momentum,
+                 // specified in the lab frame. | hepup.SPINUP[number]
+
+  static TCompare *fgCompare; //!
+  const TCompare *GetCompare() const { return fgCompare; }
+  ClassDef(TRootLHEFParticle, 2)
+
+};
+
 #endif // BLOCKCLASSES_H
 
Index: trunk/interface/LHEFConverter.h
===================================================================
--- trunk/interface/LHEFConverter.h	(revision 449)
+++ trunk/interface/LHEFConverter.h	(revision 450)
@@ -57,4 +57,5 @@
   void AnalyseEvent(LHEF::Reader *reader, ExRootTreeBranch *branch, const Long64_t eventNumber);
   void AnalyseParticles(LHEF::Reader *reader, ExRootTreeBranch *branch);
+  //void AnalyseLHEFParticles(LHEF::Reader *reader, ExRootTreeBranch *branch);
 
 };
Index: trunk/src/LHEFConverter.cc
===================================================================
--- trunk/src/LHEFConverter.cc	(revision 449)
+++ trunk/src/LHEFConverter.cc	(revision 450)
@@ -80,6 +80,8 @@
     element->PID = hepeup.IDUP[particle];
     element->Status = hepeup.ISTUP[particle];
-    element->Mother1 = hepeup.MOTHUP[particle].first;
-    element->Mother2 = hepeup.MOTHUP[particle].second;
+    element->M1 = hepeup.MOTHUP[particle].first;
+    element->M2 = hepeup.MOTHUP[particle].second;
+    element->D1 = 0;
+    element->D2 = 0;
     element->ColorLine1 = hepeup.ICOLUP[particle].first;
     element->ColorLine2 = hepeup.ICOLUP[particle].second;
@@ -107,4 +109,51 @@
 }
 
+
+//---------------------------------------------------------------------------
+/*
+void LHEFConverter::AnalyseParticles(LHEF::Reader *reader, ExRootTreeBranch *branch)
+{
+  const LHEF::HEPEUP &hepeup = reader->hepeup;
+  Double_t signPz;
+  TLorentzVector momentum;
+  TRootC::GenParticle *element;
+
+  for(Int_t particle = 0; particle < hepeup.NUP; ++particle)
+  {
+    element = (TRootC::GenParticle*) branch->NewEntry();
+
+    element->PID = hepeup.IDUP[particle];
+    element->Status = hepeup.ISTUP[particle];
+    element->M1 = hepeup.MOTHUP[particle].first;
+    element->M2 = hepeup.MOTHUP[particle].second;
+    //element->ColorLine1 = hepeup.ICOLUP[particle].first;
+    //element->ColorLine2 = hepeup.ICOLUP[particle].second;
+    element->D1 = 0;
+    element->D2 = 0;
+
+    PdgParticle pdg_part = pdg_table[element->PID];
+    element->Charge = pdg_part.charge();
+    element->M = pdg_part.mass();
+    //element->Charge = ChargeVal(element->PID);
+    //element->M = hepeup.PUP[particle][4];
+
+    element->E = hepeup.PUP[particle][3];
+    element->Px = hepeup.PUP[particle][0];
+    element->Py = hepeup.PUP[particle][1];
+    element->Pz = hepeup.PUP[particle][2];
+
+    momentum.SetPxPyPzE(element->Px, element->Py, element->Pz, element->E);
+    element->PT = momentum.Perp();
+    signPz = (element->Pz >= 0.0) ? 1.0 : -1.0;
+    //element->Eta = element->PT == 0.0 ? signPz*999.9 : momentum.Eta(); to avoid a warning from ROOT, replace the "==0" by "< 1e-6"
+    element->Eta = element->PT < 1E-6 ? signPz*999.9 : momentum.Eta();
+    element->Phi = momentum.Phi();
+//    element->Rapidity = element->PT < 1E-6 ? signPz*999.9 : momentum.Rapidity();
+//    element->LifeTime = hepeup.VTIMUP[particle];
+//    element->Spin = hepeup.SPINUP[particle];
+  }
+}
+*/
+
 LHEFConverter::~LHEFConverter()
 {
@@ -112,6 +161,5 @@
 
 //------------------------------------------------------------------------------
-LHEFConverter::LHEFConverter(const string& inputFileList, const string& outputFileName, const PdgTable& pdg, const int& Nevents) :
- DataConverter(pdg,Nevents) {
+LHEFConverter::LHEFConverter(const string& inputFileList, const string& outputFileName, const PdgTable& pdg, const int& Nevents) : DataConverter(pdg,Nevents) {
 
   ExRootTreeWriter *treeWriter = new ExRootTreeWriter(outputFileName, "GEN");
@@ -122,4 +170,5 @@
   // generated partons from LHEF
   ExRootTreeBranch *branchParticle = treeWriter->NewBranch("Particle", TRootLHEFParticle::Class());
+  //ExRootTreeBranch *branchParticle = treeWriter->NewBranch("Particle", TRootC::GenParticle::Class());
   
   // Open a stream connected to an event file:
@@ -167,6 +216,4 @@
   }
   treeWriter->Write();
-  
-  
   delete treeWriter;
   //delete inputReader;
