Index: trunk/modules/TreeWriter.cc
===================================================================
--- trunk/modules/TreeWriter.cc	(revision 1325)
+++ trunk/modules/TreeWriter.cc	(revision 1345)
@@ -95,5 +95,5 @@
       continue;
     }
-
+    
     itClassMap = fClassMap.find(branchClass);
     if(itClassMap == fClassMap.end())
@@ -115,5 +115,4 @@
 void TreeWriter::Finish()
 {
-
 }
 
@@ -161,5 +160,7 @@
   GenParticle *entry = 0;
   Double_t pt, signPz, cosTheta, eta, rapidity;
-
+  
+  const Double_t c_light = 2.99792458E8;
+  
   // loop over all particles
   iterator.Reset();
@@ -208,5 +209,5 @@
     entry->Y = position.Y();
     entry->Z = position.Z();
-    entry->T = position.T();
+    entry->T = position.T()*1.0E-3/c_light;
   }
 }
@@ -219,4 +220,6 @@
   Candidate *candidate = 0;
   Vertex *entry = 0;
+  
+  const Double_t c_light = 2.99792458E8;
 
   // loop over all vertices
@@ -231,5 +234,5 @@
     entry->Y = position.Y();
     entry->Z = position.Z();
-    entry->T = position.T();
+    entry->T = position.T()*1.0E-3/c_light;
   }
 }
@@ -244,5 +247,6 @@
   Track *entry = 0;
   Double_t pt, signz, cosTheta, eta, rapidity;
-
+  const Double_t c_light = 2.99792458E8;
+  
   // loop over all tracks
   iterator.Reset();
@@ -271,4 +275,5 @@
     entry->YOuter = position.Y();
     entry->ZOuter = position.Z();
+    entry->TOuter = position.T()*1.0E-3/c_light;
 
     const TLorentzVector &momentum = candidate->Momentum;
@@ -290,4 +295,5 @@
     entry->Y = initialPosition.Y();
     entry->Z = initialPosition.Z();
+    entry->T = initialPosition.T()*1.0E-3/c_light;
 
     entry->Particle = particle;
@@ -303,5 +309,6 @@
   Tower *entry = 0;
   Double_t pt, signPz, cosTheta, eta, rapidity;
-
+  const Double_t c_light = 2.99792458E8;
+  
   // loop over all towers
   iterator.Reset();
@@ -309,5 +316,6 @@
   {
     const TLorentzVector &momentum = candidate->Momentum;
-
+    const TLorentzVector &position = candidate->Position;
+    
     pt = momentum.Pt();
     cosTheta = TMath::Abs(momentum.CosTheta());
@@ -331,5 +339,7 @@
     entry->Edges[2] = candidate->Edges[2];
     entry->Edges[3] = candidate->Edges[3];
-
+    
+    entry->T = position.T()*1.0E-3/c_light;
+    
     FillParticles(candidate, &entry->Particles);
   }
@@ -344,5 +354,6 @@
   Photon *entry = 0;
   Double_t pt, signPz, cosTheta, eta, rapidity;
-
+  const Double_t c_light = 2.99792458E8;
+  
   array->Sort();
 
@@ -353,4 +364,6 @@
     TIter it1(candidate->GetCandidates());
     const TLorentzVector &momentum = candidate->Momentum;
+    const TLorentzVector &position = candidate->Position;
+    
 
     pt = momentum.Pt();
@@ -366,5 +379,7 @@
     entry->PT = pt;
     entry->E = momentum.E();
-
+    
+    entry->T = position.T()*1.0E-3/c_light;
+   
     entry->EhadOverEem = candidate->Eem > 0.0 ? candidate->Ehad/candidate->Eem : 999.9;
 
@@ -381,5 +396,6 @@
   Electron *entry = 0;
   Double_t pt, signPz, cosTheta, eta, rapidity;
-
+  const Double_t c_light = 2.99792458E8;
+  
   array->Sort();
 
@@ -389,5 +405,6 @@
   {
     const TLorentzVector &momentum = candidate->Momentum;
-
+    const TLorentzVector &position = candidate->Position;
+    
     pt = momentum.Pt();
     cosTheta = TMath::Abs(momentum.CosTheta());
@@ -401,5 +418,7 @@
     entry->Phi = momentum.Phi();
     entry->PT = pt;
-
+    
+    entry->T = position.T()*1.0E-3/c_light;
+    
     entry->Charge = candidate->Charge;
 
@@ -418,5 +437,7 @@
   Muon *entry = 0;
   Double_t pt, signPz, cosTheta, eta, rapidity;
-
+  
+  const Double_t c_light = 2.99792458E8;
+  
   array->Sort();
 
@@ -426,4 +447,6 @@
   {
     const TLorentzVector &momentum = candidate->Momentum;
+    const TLorentzVector &position = candidate->Position;
+    
 
     pt = momentum.Pt();
@@ -442,4 +465,8 @@
     entry->PT = pt;
 
+    entry->T = position.T()*1.0E-3/c_light;
+    
+   // cout<<entry->PT<<","<<entry->T<<endl;
+
     entry->Charge = candidate->Charge;
 
@@ -457,5 +484,6 @@
   Double_t pt, signPz, cosTheta, eta, rapidity;
   Double_t ecalEnergy, hcalEnergy;
-
+  const Double_t c_light = 2.99792458E8;
+  
   array->Sort();
 
@@ -465,6 +493,8 @@
   {
     TIter itConstituents(candidate->GetCandidates());
-    const TLorentzVector &momentum = candidate->Momentum;
-
+    
+    const TLorentzVector &momentum = candidate->Momentum;
+    const TLorentzVector &position = candidate->Position;
+   
     pt = momentum.Pt();
     cosTheta = TMath::Abs(momentum.CosTheta());
@@ -479,4 +509,6 @@
     entry->PT = pt;
 
+    entry->T = position.T()*1.0E-3/c_light;
+    
     entry->Mass = momentum.M();
 
