Fork me on GitHub

Changeset 7b518f0 in git for modules/TrackCovariance.cc


Ignore:
Timestamp:
Feb 26, 2020, 1:22:26 PM (5 years ago)
Author:
Pavel Demin <pavel.demin@…>
Branches:
ImprovedOutputFile, master
Children:
1388e73
Parents:
1294bba
Message:

fix negative mass problem in modules/TrackCovariance.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackCovariance.cc

    r1294bba r7b518f0  
    8989{
    9090  Candidate *candidate, *mother;
    91   Double_t energy;
     91  Double_t mass;
    9292
    9393  fItInputArray->Reset();
     
    9797    const TLorentzVector &candidateMomentum = candidate->Momentum;
    9898
    99     energy = candidateMomentum.E();
     99    mass = candidateMomentum.M();
    100100
    101101    ObsTrk track(candidatePosition.Vect(), candidateMomentum.Vect(), candidate->Charge, fBz, fCovariance);
     
    103103    mother = candidate;
    104104    candidate = static_cast<Candidate *>(candidate->Clone());
    105     candidate->Momentum.SetVect(track.GetObsP());
    106     candidate->Momentum.SetE(energy);
     105    candidate->Momentum.SetVectM(track.GetObsP(), mass);
    107106
    108107    candidate->AddCandidate(mother);
Note: See TracChangeset for help on using the changeset viewer.