File indexing completed on 2024-04-06 12:22:13
0001
0002 #include "L1Trigger/VertexFinder/interface/Vertex.h"
0003
0004 namespace l1tVertexFinder {
0005
0006 void Vertex::computeParameters() {
0007 pT_ = 0.;
0008 z0_ = 0.;
0009 float z0square = 0.;
0010 for (const TP& track : tracks_) {
0011 pT_ += track->pt();
0012 z0_ += track->z0();
0013 z0square += track->z0() * track->z0();
0014 }
0015 z0_ /= tracks_.size();
0016 z0square /= tracks_.size();
0017 z0width_ = sqrt(std::abs(z0_ * z0_ - z0square));
0018 }
0019
0020 }