13 for (
unsigned int i=0;
i<trks.
size();
i++) {
14 sumZIP += trks[
i]->dz();
15 err += trks[
i]->dzError();
27 for (
unsigned int i=0;
i<trks.
size();
i++) {
29 double err2 = trks[
i]->dzError();
32 sumUp += trks[
i]->dz() * 1/err2;
37 if (sumDown > 0)
return Measurement1D ( sumUp/sumDown , err/ntracks/
sqrt(ntracks) );
PVPositionBuilder()
Constructor does nothing, no data members.
Measurement1D average(const reco::TrackRefVector &trks) const
Calculate unweighted average of Z of tracks from const collection of track pointers.
size_type size() const
Size of the RefVector.
Measurement1D wtAverage(const reco::TrackRefVector &trks) const
Calculate Error-Weighted average of Z of tracks from const collection of track pointers.