Fork me on GitHub

Changeset 5496767 in git for modules/TreeWriter.cc


Ignore:
Timestamp:
Jun 17, 2016, 6:52:57 PM (8 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
62d3bc5
Parents:
0f73bea
Message:

added array of constituents to vertices

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TreeWriter.cc

    r0f73bea r5496767  
    240240{
    241241  TIter iterator(array);
    242   Candidate *candidate = 0;
     242  Candidate *candidate = 0, *constituent = 0;
    243243  Vertex *entry = 0;
    244244
    245245  const Double_t c_light = 2.99792458E8;
    246  
     246
    247247  Double_t x, y, z, t, xError, yError, zError, sigma, sumPT2, btvSumPT2, genDeltaZ, genSumPT2;
    248248  UInt_t index, ndf;
    249  
     249
    250250  array->Sort();
    251  
     251
    252252  // loop over all vertices
    253253  iterator.Reset();
    254254  while((candidate = static_cast<Candidate*>(iterator.Next())))
    255255  {
    256    
     256
    257257    index = candidate->ClusterIndex;
    258258    ndf = candidate->ClusterNDF;
     
    262262    genDeltaZ = candidate->GenDeltaZ;
    263263    genSumPT2 = candidate->GenSumPT2;
    264    
     264
    265265    x = candidate->Position.X();
    266266    y = candidate->Position.Y();
    267267    z = candidate->Position.Z();
    268268    t = candidate->Position.T()*1.0E-3/c_light;
    269  
     269
    270270    xError = candidate->PositionError.X ();
    271271    yError = candidate->PositionError.Y ();
     
    281281    entry->GenDeltaZ = genDeltaZ;
    282282    entry->GenSumPT2 = genSumPT2;
    283    
     283
    284284    entry->X = x;
    285285    entry->Y = y;
    286286    entry->Z = z;
    287287    entry->T = t;
    288    
     288
    289289    entry->ErrorX = xError;
    290290    entry->ErrorY = yError;
    291291    entry->ErrorZ = zError;
     292
     293    TIter itConstituents(candidate->GetCandidates());
     294
     295    while((constituent = static_cast<Candidate*>(itConstituents.Next())))
     296    {
     297      entry->Constituents.Add(constituent);
     298    }
     299
    292300  }
    293301}
     
    332340    entry->ZOuter = position.Z();
    333341    entry->TOuter = position.T()*1.0E-3/c_light;
    334  
     342
    335343    entry->L = candidate->L;
    336  
     344
    337345    entry->D0            = candidate->D0;
    338346    entry->ErrorD0       = candidate->ErrorD0;
     
    346354    entry->ErrorCtgTheta = candidate->ErrorCtgTheta;
    347355    entry->Phi           = candidate->Phi;
    348     entry->ErrorPhi      = candidate->ErrorPhi; 
    349    
     356    entry->ErrorPhi      = candidate->ErrorPhi;
     357
    350358    entry->Xd = candidate->Xd;
    351359    entry->Yd = candidate->Yd;
     
    361369
    362370    entry->Eta = eta;
    363    
     371
    364372    particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
    365373    const TLorentzVector &initialPosition = particle->Position;
Note: See TracChangeset for help on using the changeset viewer.