10 #include <tracking/spacePointCreation/SpacePoint.h>
11 #include <svd/dataobjects/SVDCluster.h>
12 #include <tracking/trackFindingVXD/utilities/Named.h>
13 #include <tracking/trackFindingVXD/variableExtractors/VariableExtractor.h>
46 std::vector<SVDCluster const*> clusters;
47 clusters.reserve(spacePoints.size() * 2);
51 for (
const SVDCluster& cluster : relatedClusters) {
52 clusters.push_back(&cluster);
58 std::vector<float> values(clusters.size());
59 for (
unsigned int i = 0; i < clusters.size(); ++i) {
60 values[i] = clusters[i]->getCharge();
64 for (
unsigned int i = 0; i < clusters.size(); ++i) {
65 values[i] = clusters[i]->getSeedCharge();
70 for (
unsigned int i = 0; i < clusters.size(); ++i) {
71 values[i] = clusters[i]->getSize();
76 for (
unsigned int i = 0; i < clusters.size(); ++i) {
77 values[i] = clusters[i]->getCharge() / clusters[i]->getSize();
82 for (
unsigned int i = 0; i < clusters.size(); ++i) {
83 values[i] = clusters[i]->getClsTime();
87 for (
unsigned int i = 0; i < clusters.size(); ++i) {
88 values[i] = clusters[i]->getClsTimeSigma();
110 void setStats(
const std::string& identifier, std::vector<float>& values)
112 short size = values.size();
113 if (values.size() == 0) {
122 float sum = std::accumulate(values.begin(), values.end(), 0.0);
124 float mean = sum / size;
127 float variance = std::accumulate(values.begin(), values.end(), 0.0,
128 [mean, size](
float x,
float y) {return x + ((y - mean) * (y - mean)) / (size - 1);});
132 float min = *(std::min_element(values.begin(), values.end()));
133 float max = *(std::max_element(values.begin(), values.end()));
Class for type safe access to objects that are referred to in relations.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.