Index: modules/TreeWriter.cc
===================================================================
--- modules/TreeWriter.cc	(revision 414db83dac90e55f6317dc35d0ad85df286a38af)
+++ modules/TreeWriter.cc	(revision 4d7014e54199d54f2c4bf45a2ac59bef82845f99)
@@ -72,4 +72,5 @@
   fClassMap[Track::Class()] = &TreeWriter::ProcessTracks;
   fClassMap[Tower::Class()] = &TreeWriter::ProcessTowers;
+  fClassMap[ParticleFlowCandidate::Class()] = &TreeWriter::ProcessParticleFlowCandidates;
   fClassMap[Photon::Class()] = &TreeWriter::ProcessPhotons;
   fClassMap[Electron::Class()] = &TreeWriter::ProcessElectrons;
@@ -137,4 +138,5 @@
   it1.Reset();
   array->Clear();
+  
   while((candidate = static_cast<Candidate *>(it1.Next())))
   {
@@ -439,4 +441,100 @@
 //------------------------------------------------------------------------------
 
+void TreeWriter::ProcessParticleFlowCandidates(ExRootTreeBranch *branch, TObjArray *array)
+{
+
+  TIter iterator(array);
+  Candidate *candidate = 0;
+  Candidate *particle = 0;
+  ParticleFlowCandidate *entry = 0;
+  Double_t e, pt, signz, cosTheta, eta, rapidity, p, ctgTheta, phi;
+  const Double_t c_light = 2.99792458E8;
+
+  // loop over all tracks
+  iterator.Reset();
+  while((candidate = static_cast<Candidate *>(iterator.Next())))
+  {
+    const TLorentzVector &position = candidate->Position;
+
+    cosTheta = TMath::Abs(position.CosTheta());
+    signz = (position.Pz() >= 0.0) ? 1.0 : -1.0;
+    eta = (cosTheta == 1.0 ? signz * 999.9 : position.Eta());
+    rapidity = (cosTheta == 1.0 ? signz * 999.9 : position.Rapidity());
+
+    entry = static_cast<ParticleFlowCandidate *>(branch->NewEntry());
+
+    entry->SetBit(kIsReferenced);
+    entry->SetUniqueID(candidate->GetUniqueID());
+
+    entry->PID = candidate->PID;
+
+    entry->Charge = candidate->Charge;
+
+    entry->EtaOuter = eta;
+    entry->PhiOuter = position.Phi();
+
+    entry->XOuter = position.X();
+    entry->YOuter = position.Y();
+    entry->ZOuter = position.Z();
+    entry->TOuter = position.T() * 1.0E-3 / c_light;
+
+    entry->L = candidate->L;
+
+    entry->D0 = candidate->D0;
+    entry->ErrorD0 = candidate->ErrorD0;
+    entry->DZ = candidate->DZ;
+    entry->ErrorDZ = candidate->ErrorDZ;
+
+    entry->ErrorP = candidate->ErrorP;
+    entry->ErrorPT = candidate->ErrorPT;
+    entry->ErrorCtgTheta = candidate->ErrorCtgTheta;
+    entry->ErrorPhi = candidate->ErrorPhi;
+
+    entry->Xd = candidate->Xd;
+    entry->Yd = candidate->Yd;
+    entry->Zd = candidate->Zd;
+
+    const TLorentzVector &momentum = candidate->Momentum;
+
+    e = momentum.E();
+    pt = momentum.Pt();
+    p = momentum.P();
+    phi = momentum.Phi();
+    ctgTheta = (TMath::Tan(momentum.Theta()) != 0) ? 1 / TMath::Tan(momentum.Theta()) : 1e10;
+
+    entry->E = e;
+    entry->P = p;
+    entry->PT = pt;
+    entry->Eta = eta;
+    entry->Phi = phi;
+    entry->CtgTheta = ctgTheta;
+
+    particle = static_cast<Candidate *>(candidate->GetCandidates()->At(0));
+    const TLorentzVector &initialPosition = particle->Position;
+
+    entry->X = initialPosition.X();
+    entry->Y = initialPosition.Y();
+    entry->Z = initialPosition.Z();
+    entry->T = initialPosition.T() * 1.0E-3 / c_light;
+
+    entry->VertexIndex = candidate->ClusterIndex;
+
+    entry->Eem = candidate->Eem;
+    entry->Ehad = candidate->Ehad;
+    entry->Edges[0] = candidate->Edges[0];
+    entry->Edges[1] = candidate->Edges[1];
+    entry->Edges[2] = candidate->Edges[2];
+    entry->Edges[3] = candidate->Edges[3];
+
+    entry->T = position.T() * 1.0E-3 / c_light;
+    entry->NTimeHits = candidate->NTimeHits;
+
+    FillParticles(candidate, &entry->Particles);
+
+  }
+}
+
+//------------------------------------------------------------------------------
+
 void TreeWriter::ProcessPhotons(ExRootTreeBranch *branch, TObjArray *array)
 {
Index: modules/TreeWriter.h
===================================================================
--- modules/TreeWriter.h	(revision 414db83dac90e55f6317dc35d0ad85df286a38af)
+++ modules/TreeWriter.h	(revision 4d7014e54199d54f2c4bf45a2ac59bef82845f99)
@@ -56,4 +56,5 @@
   void ProcessTracks(ExRootTreeBranch *branch, TObjArray *array);
   void ProcessTowers(ExRootTreeBranch *branch, TObjArray *array);
+  void ProcessParticleFlowCandidates(ExRootTreeBranch *branch, TObjArray *array);
   void ProcessPhotons(ExRootTreeBranch *branch, TObjArray *array);
   void ProcessElectrons(ExRootTreeBranch *branch, TObjArray *array);
@@ -77,5 +78,5 @@
 #endif
 
-  ClassDef(TreeWriter, 1)
+  ClassDef(TreeWriter, 2)
 };
 
