Project
Loading...
Searching...
No Matches
PVertexerHelpers.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15
17
18using namespace o2::vertexing;
19
21{
22 auto terr2 = tMeanAccErr > 0 ? 1. / tMeanAccErr : 0.;
23 LOGF(info, "VtxSeed: Scale: %+e ScalePrev: %+e |NScaleIncreased: %d NSlowDecrease: %d| WChi2: %e WSum: %e | TMean: %e TMeanE: %e\n",
25 double dZP, rmsZP, dZN, rmsZN, dTP, rmsTP, dTN, rmsTN;
26 double dZ, rmsZ, dT, rmsT;
28}
29
31{
32 if (nEntries < 2) {
33 return -1;
34 }
35 int maxBin = -1, ib = filledBins.size(), last = ib;
36 float maxv = 0.;
37 while (ib--) {
38 auto bin = filledBins[ib];
39 auto v = getBinContent(bin);
40 if (v > maxv) {
41 maxv = v;
42 maxBin = bin;
43 } else if (v <= 0.) { // bin was emptied
44 filledBins[ib] = filledBins[--last]; // move last non-empty bin in place of emptied one
45 }
46 }
47 filledBins.resize(last);
48 return maxBin;
49}
50
52{
53 constexpr int MaxRep = 10;
54 static int count = 0;
55 if (count < MaxRep) {
56 std::string msg = fmt::format("Will reject bad track {} {} at t={}", _gid.asString(), src.asString(), t_est.getTimeStamp());
57 if (++count == MaxRep) {
58 msg += " | further warnings will be suppressed";
59 }
60 LOG(warn) << msg;
61 }
62}
Primary vertex finder helper classes.
T getBinContent(uint32_t ib) const
Definition FlatHisto2D.h:90
GLenum src
Definition glcorearb.h:1767
GLint GLsizei count
Definition glcorearb.h:399
const GLdouble * v
Definition glcorearb.h:832
TrackParCovF TrackParCov
Definition Track.h:33
std::vector< int > filledBins
void reportBadTrack(const o2::track::TrackParCov &src, const TimeEst &t_est, GTrackID _gid)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
uint64_t const void const *restrict const msg
Definition x9.h:153