Index: modules/PileUpMerger.cc
===================================================================
--- modules/PileUpMerger.cc	(revision 0f73bea1419928003aaf498ec3020eb075bdc5aa)
+++ modules/PileUpMerger.cc	(revision 54967676c83b598c4f980f5e616a3abc837efb9d)
@@ -134,17 +134,17 @@
   dz0 = -1.0e6;
   dt0 = -1.0e6;
-  
+
   dt *= c_light*1.0E3; // necessary in order to make t in mm/c
   dz *= 1.0E3; // necessary in order to make z in mm
-  
+
   //cout<<dz<<","<<dt<<endl;
- 
+
   vx = 0.0;
   vy = 0.0;
-  
+
   numberOfParticles = fInputArray->GetEntriesFast();
   nch = 0;
-  sumpt2 = 0.0; 
-   
+  sumpt2 = 0.0;
+
   while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
   {
@@ -154,5 +154,5 @@
     t = candidate->Position.T();
     pt = candidate->Momentum.Pt();
-       
+
     // take postion and time from first stable particle
     if (dz0 < -999999.0)
@@ -164,14 +164,14 @@
     candidate->Position.SetZ(z - dz0 + dz);
     candidate->Position.SetT(t - dt0 + dt);
-    
+
     fParticleOutputArray->Add(candidate);
- 
+
     if(TMath::Abs(candidate->Charge) >  1.0E-9)
     {
-      nch++;    
+      nch++;
       sumpt2 += pt*pt;
-    }  
+    }
   }
- 
+
   if(numberOfParticles > 0)
   {
@@ -179,5 +179,5 @@
     vy /= sumpt2;
   }
-  
+
   nvtx++;
   factory = GetFactory();
@@ -188,6 +188,6 @@
   vertex->ClusterNDF = nch;
   vertex->SumPT2 = sumpt2;
-  vertex->GenSumPT2 = sumpt2; 
-  
+  vertex->GenSumPT2 = sumpt2;
+
   fVertexOutputArray->Add(vertex);
 
@@ -204,5 +204,5 @@
     case 2:
       numberOfEvents = fMeanPileUp;
-      break;   
+      break;
     default:
       numberOfEvents = gRandom->Poisson(fMeanPileUp);
@@ -233,8 +233,10 @@
     vx = 0.0;
     vy = 0.0;
-    
+
     numberOfParticles = 0;
     sumpt2 = 0.0;
-    
+
+    vertex = factory->NewCandidate();
+
     while(fReader->ReadParticle(pid, x, y, z, t, px, py, pz, e))
     {
@@ -262,12 +264,14 @@
       vx += candidate->Position.X();
       vy += candidate->Position.Y();
-      
+
       ++numberOfParticles;
       if(TMath::Abs(candidate->Charge) >  1.0E-9)
       {
-        nch++;    
+        nch++;
         sumpt2 += pt*pt;
-      } 
-       
+        vertex->AddCandidate(candidate);
+
+      }
+
       fParticleOutputArray->Add(candidate);
     }
@@ -278,19 +282,18 @@
       vy /= numberOfParticles;
     }
-    
+
     nvtx++;
 
-    vertex = factory->NewCandidate();
     vertex->Position.SetXYZT(vx, vy, dz, dt);
-    
-    vertex->ClusterIndex = nvtx; 
+
+    vertex->ClusterIndex = nvtx;
     vertex->ClusterNDF = nch;
     vertex->SumPT2 = sumpt2;
     vertex->GenSumPT2 = sumpt2;
-    
+
     vertex->IsPU = 1;
 
     fVertexOutputArray->Add(vertex);
-    
+
   }
 }
Index: modules/TreeWriter.cc
===================================================================
--- modules/TreeWriter.cc	(revision 0f73bea1419928003aaf498ec3020eb075bdc5aa)
+++ modules/TreeWriter.cc	(revision 54967676c83b598c4f980f5e616a3abc837efb9d)
@@ -240,19 +240,19 @@
 {
   TIter iterator(array);
-  Candidate *candidate = 0;
+  Candidate *candidate = 0, *constituent = 0;
   Vertex *entry = 0;
 
   const Double_t c_light = 2.99792458E8;
- 
+
   Double_t x, y, z, t, xError, yError, zError, sigma, sumPT2, btvSumPT2, genDeltaZ, genSumPT2;
   UInt_t index, ndf;
- 
+
   array->Sort();
- 
+
   // loop over all vertices
   iterator.Reset();
   while((candidate = static_cast<Candidate*>(iterator.Next())))
   {
-   
+
     index = candidate->ClusterIndex;
     ndf = candidate->ClusterNDF;
@@ -262,10 +262,10 @@
     genDeltaZ = candidate->GenDeltaZ;
     genSumPT2 = candidate->GenSumPT2;
-   
+
     x = candidate->Position.X();
     y = candidate->Position.Y();
     z = candidate->Position.Z();
     t = candidate->Position.T()*1.0E-3/c_light;
-  
+
     xError = candidate->PositionError.X ();
     yError = candidate->PositionError.Y ();
@@ -281,13 +281,21 @@
     entry->GenDeltaZ = genDeltaZ;
     entry->GenSumPT2 = genSumPT2;
-    
+
     entry->X = x;
     entry->Y = y;
     entry->Z = z;
     entry->T = t;
-    
+
     entry->ErrorX = xError;
     entry->ErrorY = yError;
     entry->ErrorZ = zError;
+
+    TIter itConstituents(candidate->GetCandidates());
+
+    while((constituent = static_cast<Candidate*>(itConstituents.Next())))
+    {
+      entry->Constituents.Add(constituent);
+    }
+
   }
 }
@@ -332,7 +340,7 @@
     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;
@@ -346,6 +354,6 @@
     entry->ErrorCtgTheta = candidate->ErrorCtgTheta;
     entry->Phi           = candidate->Phi;
-    entry->ErrorPhi      = candidate->ErrorPhi; 
-    
+    entry->ErrorPhi      = candidate->ErrorPhi;
+
     entry->Xd = candidate->Xd;
     entry->Yd = candidate->Yd;
@@ -361,5 +369,5 @@
 
     entry->Eta = eta;
-    
+
     particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
     const TLorentzVector &initialPosition = particle->Position;
