Fork me on GitHub

Changeset 21eab4f in git for modules/TreeWriter.cc


Ignore:
Timestamp:
Aug 26, 2016, 5:17:14 PM (8 years ago)
Author:
GitHub <noreply@…>
Parents:
ec5e04b (diff), 94cacb6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
AlexandreMertens <alexandre.mertens@…> (08/26/16 17:17:14)
git-committer:
GitHub <noreply@…> (08/26/16 17:17:14)
Message:

Merge 94cacb6ab322f96b75a06369dfd9b7389d0d6802 into ec5e04b014990ea45a8708f4f726b6b214cdb82b

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TreeWriter.cc

    rec5e04b r21eab4f  
    215215    entry->Pz = momentum.Pz();
    216216
     217    entry->D0            = candidate->D0;
     218    entry->DZ            = candidate->DZ;
     219    entry->P             = candidate->P;
     220    entry->PT            = candidate->PT;
     221    entry->CtgTheta      = candidate->CtgTheta;
     222    entry->Phi           = candidate->Phi;
     223
    217224    entry->Eta = eta;
    218225    entry->Phi = momentum.Phi();
     
    233240{
    234241  TIter iterator(array);
    235   Candidate *candidate = 0;
     242  Candidate *candidate = 0, *constituent = 0;
    236243  Vertex *entry = 0;
    237244
    238245  const Double_t c_light = 2.99792458E8;
    239246
     247  Double_t x, y, z, t, xError, yError, zError, tError, sigma, sumPT2, btvSumPT2, genDeltaZ, genSumPT2;
     248  UInt_t index, ndf;
     249
     250  CompBase *compare = Candidate::fgCompare;
     251  Candidate::fgCompare = CompSumPT2<Candidate>::Instance();
     252  array->Sort();
     253  Candidate::fgCompare = compare;
     254
    240255  // loop over all vertices
    241256  iterator.Reset();
    242257  while((candidate = static_cast<Candidate*>(iterator.Next())))
    243258  {
    244     const TLorentzVector &position = candidate->Position;
     259
     260    index = candidate->ClusterIndex;
     261    ndf = candidate->ClusterNDF;
     262    sigma = candidate->ClusterSigma;
     263    sumPT2 = candidate->SumPT2;
     264    btvSumPT2 = candidate->BTVSumPT2;
     265    genDeltaZ = candidate->GenDeltaZ;
     266    genSumPT2 = candidate->GenSumPT2;
     267
     268    x = candidate->Position.X();
     269    y = candidate->Position.Y();
     270    z = candidate->Position.Z();
     271    t = candidate->Position.T()*1.0E-3/c_light;
     272
     273    xError = candidate->PositionError.X ();
     274    yError = candidate->PositionError.Y ();
     275    zError = candidate->PositionError.Z ();
     276    tError = candidate->PositionError.T ()*1.0E-3/c_light;
    245277
    246278    entry = static_cast<Vertex*>(branch->NewEntry());
    247279
    248     entry->X = position.X();
    249     entry->Y = position.Y();
    250     entry->Z = position.Z();
    251     entry->T = position.T()*1.0E-3/c_light;
    252   }
    253 }
     280    entry->Index = index;
     281    entry->NDF = ndf;
     282    entry->Sigma = sigma;
     283    entry->SumPT2 = sumPT2;
     284    entry->BTVSumPT2 = btvSumPT2;
     285    entry->GenDeltaZ = genDeltaZ;
     286    entry->GenSumPT2 = genSumPT2;
     287
     288    entry->X = x;
     289    entry->Y = y;
     290    entry->Z = z;
     291    entry->T = t;
     292
     293    entry->ErrorX = xError;
     294    entry->ErrorY = yError;
     295    entry->ErrorZ = zError;
     296    entry->ErrorT = tError;
     297
     298
     299    TIter itConstituents(candidate->GetCandidates());
     300    itConstituents.Reset();
     301    entry->Constituents.Clear();
     302    while((constituent = static_cast<Candidate*>(itConstituents.Next())))
     303    {
     304      entry->Constituents.Add(constituent);
     305    }
     306
     307  }
     308}
     309
    254310
    255311//------------------------------------------------------------------------------
     
    261317  Candidate *particle = 0;
    262318  Track *entry = 0;
    263   Double_t pt, signz, cosTheta, eta, rapidity;
     319  Double_t pt, signz, cosTheta, eta, rapidity, p, ctgTheta, phi;
    264320  const Double_t c_light = 2.99792458E8;
    265321
     
    292348    entry->TOuter = position.T()*1.0E-3/c_light;
    293349
    294     entry->Dxy = candidate->Dxy;
    295     entry->SDxy = candidate->SDxy ;
     350    entry->L = candidate->L;
     351
     352    entry->D0            = candidate->D0;
     353    entry->ErrorD0       = candidate->ErrorD0;
     354    entry->DZ            = candidate->DZ;
     355    entry->ErrorDZ       = candidate->ErrorDZ;
     356
     357    entry->ErrorP        = candidate->ErrorP;
     358    entry->ErrorPT       = candidate->ErrorPT;
     359    entry->ErrorCtgTheta = candidate->ErrorCtgTheta;
     360    entry->ErrorPhi      = candidate->ErrorPhi;
     361
    296362    entry->Xd = candidate->Xd;
    297363    entry->Yd = candidate->Yd;
     
    301367
    302368    pt = momentum.Pt();
     369    p = momentum.P();
     370    phi = momentum.Phi();
     371    ctgTheta = (TMath::Tan(momentum.Theta()) != 0) ? 1/TMath::Tan(momentum.Theta()) : 1e10;
     372
    303373    cosTheta = TMath::Abs(momentum.CosTheta());
    304374    signz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0;
     
    306376    rapidity = (cosTheta == 1.0 ? signz*999.9 : momentum.Rapidity());
    307377
     378    entry->PT  = pt;
    308379    entry->Eta = eta;
    309     entry->Phi = momentum.Phi();
    310     entry->PT = pt;
     380    entry->Phi = phi;
     381    entry->CtgTheta = ctgTheta;
    311382
    312383    particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0));
     
    319390
    320391    entry->Particle = particle;
     392
     393    entry->VertexIndex = candidate->ClusterIndex;
     394
    321395  }
    322396}
Note: See TracChangeset for help on using the changeset viewer.