Fork me on GitHub

Changeset 1323 in svn for trunk/modules/TreeWriter.cc


Ignore:
Timestamp:
Nov 8, 2013, 5:09:58 PM (11 years ago)
Author:
Pavel Demin
Message:

add vertex block

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/TreeWriter.cc

    r1321 r1323  
    213213//------------------------------------------------------------------------------
    214214
     215void TreeWriter::ProcessVertices(ExRootTreeBranch *branch, TObjArray *array)
     216{
     217  TIter iterator(array);
     218  Candidate *candidate = 0;
     219  Vertex *entry = 0;
     220
     221  // loop over all vertices
     222  iterator.Reset();
     223  while((candidate = static_cast<Candidate*>(iterator.Next())))
     224  {
     225    const TLorentzVector &position = candidate->Position;
     226
     227    entry = static_cast<Vertex*>(branch->NewEntry());
     228
     229    entry->X = position.X();
     230    entry->Y = position.Y();
     231    entry->Z = position.Z();
     232    entry->T = position.T();
     233  }
     234}
     235
     236//------------------------------------------------------------------------------
     237
    215238void TreeWriter::ProcessTracks(ExRootTreeBranch *branch, TObjArray *array)
    216239{
     
    221244  Double_t pt, signz, cosTheta, eta, rapidity;
    222245
    223   // loop over all jets
     246  // loop over all tracks
    224247  iterator.Reset();
    225248  while((candidate = static_cast<Candidate*>(iterator.Next())))
     
    280303  Double_t pt, signPz, cosTheta, eta, rapidity;
    281304
    282   // loop over all jets
     305  // loop over all towers
    283306  iterator.Reset();
    284307  while((candidate = static_cast<Candidate*>(iterator.Next())))
Note: See TracChangeset for help on using the changeset viewer.