31 produces<reco::VertexCollection>();
46 std::vector<const reco::Track*>
tracks;
47 for (
unsigned int i = 0;
i < tracks_.size();
i++) {
50 tracks.push_back(&(*recTrack));
54 LogTrace(
"MinBiasTracking") <<
" [VertexProducer] selected tracks: " <<
tracks.size() <<
" (out of " << tracks_.size()
57 auto vertices = std::make_unique<reco::VertexCollection>();
65 if (
tracks.size() % 2 == 0)
70 LogTrace(
"MinBiasTracking") <<
" [vertex position] median = " << med <<
" cm";
75 float halfWidth = 0.1;
78 TH1F
histo(
"histo",
"histo",
nBin, -halfWidth, halfWidth);
81 if (fabs((*track)->vz() - med) < halfWidth)
82 histo.Fill((*track)->vz() - med);
84 LogTrace(
"MinBiasTracking") <<
" [vertex position] most prob = "
85 << med +
histo.GetBinCenter(
histo.GetMaximumBin()) <<
" cm";
90 TF1
f1(
"f1",
"[0]*exp(-0.5 * ((x-[1])/[2])^2) + [3]");
91 f1.SetParameters(10., 0., 0.01, 1.);
95 LogTrace(
"MinBiasTracking") <<
" [vertex position] fitted = " << med +
f1.GetParameter(1) <<
" +- "
96 <<
f1.GetParError(1) <<
" cm";
100 err(2, 2) =
f1.GetParError(1) *
f1.GetParError(1);
106 err(2, 2) = 0.1 * 0.1;