30 produces<reco::VertexCollection>();
47 std::vector<const reco::Track*>
tracks;
48 for (
unsigned int i = 0;
i < tracks_.size();
i++) {
51 tracks.push_back(&(*recTrack));
55 LogTrace(
"MinBiasTracking") <<
" [VertexProducer] selected tracks: " <<
tracks.size() <<
" (out of " << tracks_.size()
58 auto vertices = std::make_unique<reco::VertexCollection>();
66 if (
tracks.size() % 2 == 0)
71 LogTrace(
"MinBiasTracking") <<
" [vertex position] median = " << med <<
" cm";
76 float halfWidth = 0.1;
79 TH1F
histo(
"histo",
"histo",
nBin, -halfWidth, halfWidth);
82 if (fabs((*track)->vz() - med) < halfWidth)
83 histo.Fill((*track)->vz() - med);
85 LogTrace(
"MinBiasTracking") <<
" [vertex position] most prob = "
86 << med +
histo.GetBinCenter(
histo.GetMaximumBin()) <<
" cm";
91 TF1 f1(
"f1",
"[0]*exp(-0.5 * ((x-[1])/[2])^2) + [3]");
92 f1.SetParameters(10., 0., 0.01, 1.);
96 LogTrace(
"MinBiasTracking") <<
" [vertex position] fitted = " << med +
f1.GetParameter(1) <<
" +- "
97 <<
f1.GetParError(1) <<
" cm";
101 err(2, 2) =
f1.GetParError(1) *
f1.GetParError(1);
107 err(2, 2) = 0.1 * 0.1;