16 int rowMin = 99999999;
19 for (
unsigned int i = 0;
i < theHits.size();
i++) {
21 if (this->getRows().empty()) {
22 row = theHits[
i]->
row();
24 row = this->getRows()[
i];
31 return abs(rowMax - rowMin + 1);
37 unsigned int hitIdx)
const {
40 if (this->getRows().
empty() || this->getCols().
empty()) {
44 int row = this->getRows()[hitIdx];
45 int col = this->getCols()[hitIdx];
54 TTCluster<edm::Ref<edm::DetSetVector<Phase2TrackerDigi>,
Phase2TrackerDigi> >::findAverageLocalCoordinates()
const {
55 double averageCol = 0.0;
56 double averageRow = 0.0;
59 if (!theHits.empty()) {
60 if (this->getRows().empty() || this->getCols().empty()) {
62 for (hitIter = theHits.begin(); hitIter != theHits.end(); hitIter++) {
63 averageCol += (*hitIter)->column();
64 averageRow += (*hitIter)->row();
66 averageCol /= theHits.size();
67 averageRow /= theHits.size();
69 for (
unsigned int j = 0;
j < theHits.size();
j++) {
70 averageCol += theCols[
j];
71 averageRow += theRows[
j];
73 averageCol /= theHits.size();
74 averageRow /= theHits.size();
84 double averageCol = 0.0;
85 double averageRow = 0.0;
88 if (!theHits.empty()) {
89 if (this->getRows().empty() || this->getCols().empty()) {
91 for (hitIter = theHits.begin(); hitIter != theHits.end(); hitIter++) {
92 averageCol += (*hitIter)->column() + 0.5;
93 averageRow += (*hitIter)->row() + 0.5;
95 averageCol /= theHits.size();
96 averageRow /= theHits.size();
98 for (
unsigned int j = 0;
j < theHits.size();
j++) {
99 averageCol += theCols[
j] + 0.5;
100 averageRow += theRows[
j] + 0.5;
102 averageCol /= theHits.size();
103 averageRow /= theHits.size();
111 std::vector<int> TTCluster<edm::Ref<edm::DetSetVector<Phase2TrackerDigi>,
Phase2TrackerDigi> >::findRows()
const {
112 std::vector<int>
temp;
113 temp.reserve(theHits.size());
114 for (
unsigned int i = 0;
i < theHits.size();
i++) {
115 temp.push_back(theHits[
i]->row());
121 std::vector<int> TTCluster<edm::Ref<edm::DetSetVector<Phase2TrackerDigi>,
Phase2TrackerDigi> >::findCols()
const {
122 std::vector<int>
temp;
123 temp.reserve(theHits.size());
124 for (
unsigned int i = 0;
i < theHits.size();
i++) {
125 temp.push_back(theHits[
i]->column());
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
Abs< T >::type abs(const T &t)
hitCont::const_iterator hitIter
NOTE: this is needed even if it seems not.