48 std::vector<ChamberHitContainer> rechits_clusters;
52 float dXclus_box = 0.0;
53 float dYclus_box = 0.0;
55 std::vector<const CSCRecHit2D*>
temp;
57 std::vector<ChamberHitContainer>
seeds;
59 std::vector<float> running_meanX;
60 std::vector<float> running_meanY;
62 std::vector<float> seed_minX;
63 std::vector<float> seed_maxX;
64 std::vector<float> seed_minY;
65 std::vector<float> seed_maxY;
70 for (
unsigned int i = 0;
i <
rechits.size(); ++
i) {
80 running_meanX.push_back(
rechits[
i]->localPosition().
x());
81 running_meanY.push_back(
rechits[
i]->localPosition().
y());
84 seed_minX.push_back(
rechits[
i]->localPosition().
x());
85 seed_maxX.push_back(
rechits[
i]->localPosition().
x());
86 seed_minY.push_back(
rechits[
i]->localPosition().
y());
87 seed_maxY.push_back(
rechits[
i]->localPosition().
y());
92 for (
size_t NNN = 0; NNN <
seeds.size(); ++NNN) {
93 for (
size_t MMM = NNN + 1; MMM <
seeds.size(); ++MMM) {
94 if (running_meanX[MMM] == 999999. || running_meanX[NNN] == 999999.) {
95 std::cout <<
"We should never see this line now!!!" << std::endl;
104 if (running_meanX[NNN] > running_meanX[MMM])
105 dXclus_box = seed_minX[NNN] - seed_maxX[MMM];
107 dXclus_box = seed_minX[MMM] - seed_maxX[NNN];
108 if (running_meanY[NNN] > running_meanY[MMM])
109 dYclus_box = seed_minY[NNN] - seed_maxY[MMM];
111 dYclus_box = seed_minY[MMM] - seed_maxY[NNN];
118 running_meanX[MMM] = (running_meanX[NNN] *
seeds[NNN].size() + running_meanX[MMM] *
seeds[MMM].size()) /
120 running_meanY[MMM] = (running_meanY[NNN] *
seeds[NNN].size() + running_meanY[MMM] *
seeds[MMM].size()) /
124 if (seed_minX[NNN] <= seed_minX[MMM])
125 seed_minX[MMM] = seed_minX[NNN];
126 if (seed_maxX[NNN] > seed_maxX[MMM])
127 seed_maxX[MMM] = seed_maxX[NNN];
128 if (seed_minY[NNN] <= seed_minY[MMM])
129 seed_minY[MMM] = seed_minY[NNN];
130 if (seed_maxY[NNN] > seed_maxY[MMM])
131 seed_maxY[MMM] = seed_maxY[NNN];
137 running_meanX[NNN] = 999999.;
138 running_meanY[NNN] = 999999.;
149 for (
size_t NNN = 0; NNN <
seeds.size(); ++NNN) {
150 if (running_meanX[NNN] == 999999.)
152 rechits_clusters.push_back(
seeds[NNN]);
153 mean_x = running_meanX[NNN];
154 mean_y = running_meanY[NNN];
156 (seed_maxX[NNN] - seed_minX[NNN]) / 3.464101615;
158 (seed_maxY[NNN] - seed_minY[NNN]) / 3.464101615;
161 return rechits_clusters;