35 for (vector<const GeometricDet*>::const_iterator
it = theGeometricRods.begin();
it != theGeometricRods.end();
it++) {
36 meanPerp = meanPerp + (*it)->positionBounds().perp();
38 meanPerp = meanPerp / theGeometricRods.size();
40 vector<const GeometricDet*> theInnerGeometricRods;
41 vector<const GeometricDet*> theOuterGeometricRods;
43 for (vector<const GeometricDet*>::const_iterator
it = theGeometricRods.begin();
it != theGeometricRods.end();
it++) {
44 if ((*it)->positionBounds().perp() < meanPerp)
45 theInnerGeometricRods.push_back(*
it);
46 if ((*it)->positionBounds().perp() > meanPerp)
47 theOuterGeometricRods.push_back(*
it);
50 size_t innerLeftRodMaxSize = 0;
51 size_t innerRightRodMaxSize = 0;
52 size_t outerLeftRodMaxSize = 0;
53 size_t outerRightRodMaxSize = 0;
55 for (vector<const GeometricDet*>::const_iterator
it = theInnerGeometricRods.begin();
56 it != theInnerGeometricRods.end();
58 if ((*it)->positionBounds().z() < 0)
59 innerLeftRodMaxSize =
max(innerLeftRodMaxSize, (**it).components().size());
60 if ((*it)->positionBounds().z() > 0)
61 innerRightRodMaxSize =
max(innerRightRodMaxSize, (**it).components().size());
64 for (vector<const GeometricDet*>::const_iterator
it = theOuterGeometricRods.begin();
65 it != theOuterGeometricRods.end();
67 if ((*it)->positionBounds().z() < 0)
68 outerLeftRodMaxSize =
max(outerLeftRodMaxSize, (**it).components().size());
69 if ((*it)->positionBounds().z() > 0)
70 outerRightRodMaxSize =
max(outerRightRodMaxSize, (**it).components().size());
73 LogDebug(
"TkDetLayers") <<
"innerLeftRodMaxSize: " << innerLeftRodMaxSize;
74 LogDebug(
"TkDetLayers") <<
"innerRightRodMaxSize: " << innerRightRodMaxSize;
76 LogDebug(
"TkDetLayers") <<
"outerLeftRodMaxSize: " << outerLeftRodMaxSize;
77 LogDebug(
"TkDetLayers") <<
"outerRightRodMaxSize: " << outerRightRodMaxSize;
79 for (
unsigned int i = 0;
i < (innerLeftRodMaxSize + innerRightRodMaxSize);
i++) {
80 innerGeometricDetRings.push_back(vector<const GeometricDet*>());
83 for (
unsigned int i = 0;
i < (outerLeftRodMaxSize + outerRightRodMaxSize);
i++) {
84 outerGeometricDetRings.push_back(vector<const GeometricDet*>());
87 for (
unsigned int ringN = 0; ringN < innerLeftRodMaxSize; ringN++) {
88 for (vector<const GeometricDet*>::const_iterator
it = theInnerGeometricRods.begin();
89 it != theInnerGeometricRods.end();
91 if ((*it)->positionBounds().z() < 0) {
92 if ((**it).components().size() > ringN)
93 innerGeometricDetRings[ringN].
push_back((**it).components()[ringN]);
98 for (
unsigned int ringN = 0; ringN < innerRightRodMaxSize; ringN++) {
99 for (vector<const GeometricDet*>::const_iterator
it = theInnerGeometricRods.begin();
100 it != theInnerGeometricRods.end();
102 if ((*it)->positionBounds().z() > 0) {
103 if ((**it).components().size() > ringN)
104 innerGeometricDetRings[innerLeftRodMaxSize + ringN].
push_back((**it).components()[ringN]);
109 for (
unsigned int ringN = 0; ringN < outerLeftRodMaxSize; ringN++) {
110 for (vector<const GeometricDet*>::const_iterator
it = theOuterGeometricRods.begin();
111 it != theOuterGeometricRods.end();
113 if ((*it)->positionBounds().z() < 0) {
114 if ((**it).components().size() > ringN)
115 outerGeometricDetRings[ringN].
push_back((**it).components()[ringN]);
120 for (
unsigned int ringN = 0; ringN < outerRightRodMaxSize; ringN++) {
121 for (vector<const GeometricDet*>::const_iterator
it = theOuterGeometricRods.begin();
122 it != theOuterGeometricRods.end();
124 if ((*it)->positionBounds().z() > 0) {
125 if ((**it).components().size() > ringN)
126 outerGeometricDetRings[outerLeftRodMaxSize + ringN].
push_back((**it).components()[ringN]);
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})