Fork me on GitHub

Changeset 59ba063 in git for external


Ignore:
Timestamp:
Apr 13, 2021, 1:38:49 PM (3 years ago)
Author:
Franco BEDESCHI <bed@…>
Branches:
master
Children:
4df491e
Parents:
c5696dd
Message:

Fixed Ubuntu problems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/TrackCovariance/TrkUtil.cc

    rc5696dd r59ba063  
    290290                        //
    291291                        // Include second branch of loopers
    292                         Double_t ph2 = 2*TMath::Pi() - TMath::Abs(ph);
     292                        Double_t Pi = 3.14159265358979323846;
     293                        Double_t ph2 = 2*Pi - TMath::Abs(ph);
    293294                        if (ph < 0)ph2 = -ph2;
    294295                        z = z0 + ct * ph2 / (2.0 * C);
     
    324325                Double_t dPhase = 0.0;  // Phase difference between two close intersections
    325326                Double_t ph_arr[Nint] = { phRin, phRin2, phRhi, phZmn, phZmx };
    326                 Int_t srtind[Nint];
    327                 //TMath::Sort(Nint, ph_arr, srtind, kFALSE);
    328                 for (Int_t i = 0; i < Nint; i++) { srtind[i] = i; }
    329                 std::sort(srtind, srtind + Nint, CompareAsc<const Double_t*>(ph_arr));
     327                std::sort(ph_arr, ph_arr + Nint);
    330328                Int_t iPos = -1;                // First element > 0
    331329                for (Int_t i = 0; i < Nint; i++)
    332330                {
    333                         if (ph_arr[srtind[i]] <= 0.0) iPos = i;
     331                        if (ph_arr[i] <= 0.0) iPos = i;
    334332                }
    335333
    336334                if (iPos < Nint - 2)
    337335                {
    338                         dPhase = ph_arr[srtind[iPos + 2]] - ph_arr[srtind[iPos + 1]];
     336                        dPhase = ph_arr[iPos + 2] - ph_arr[iPos + 1];
    339337                        tLength = dPhase*Scale;
    340338                }
Note: See TracChangeset for help on using the changeset viewer.