35 temp_all_hits.clear();
37 Road temp_all_hits_badPot;
38 temp_all_hits_badPot.clear();
43 for (
const auto& it_rh : ds_rh2.data) {
47 localError[0][0] = it_rh.error().xx();
48 localError[0][1] = it_rh.error().xy();
49 localError[0][2] = 0.;
50 localError[1][0] = it_rh.error().xy();
51 localError[1][1] = it_rh.error().yy();
52 localError[1][2] = 0.;
53 localError[2][0] = 0.;
54 localError[2][1] = 0.;
55 localError[2][2] = 0.;
57 edm::LogInfo(
"RPixRoadFinder") <<
"Hits = " << ds_rh2.data.size();
61 theRotationMatrix.GetComponents(theRotationTMatrix(0, 0),
62 theRotationTMatrix(0, 1),
63 theRotationTMatrix(0, 2),
64 theRotationTMatrix(1, 0),
65 theRotationTMatrix(1, 1),
66 theRotationTMatrix(1, 2),
67 theRotationTMatrix(2, 0),
68 theRotationTMatrix(2, 1),
69 theRotationTMatrix(2, 2));
75 if (isBadPot ==
true && myid.arm() == 0 && myid.station() == 2 && localV.x() > 0 &&
76 (myid.plane() == 0 || myid.plane() == 5)) {
78 temp_all_hits_badPot.emplace_back(
PointInPlane{globalV, globalError, it_rh, myid});
80 temp_all_hits.emplace_back(
PointInPlane{globalV, globalError, it_rh, myid});
84 Road::iterator it_gh1 = temp_all_hits.begin();
85 Road::iterator it_gh2;
91 while (it_gh1 != temp_all_hits.end() && temp_all_hits.size() >=
minRoadSize_) {
96 const auto currPoint = it_gh1->globalPoint;
99 while (it_gh2 != temp_all_hits.end()) {
100 bool same_pot =
false;
102 if (currDet.
rpId() == tmpGh2Id.
rpId())
104 const auto subtraction = currPoint - it_gh2->globalPoint;
107 temp_road.push_back(*it_gh2);
108 temp_all_hits.erase(it_gh2);
120 Road::iterator it_gh1_bP = temp_all_hits_badPot.begin();
121 Road::iterator it_gh2_bP;
123 while (it_gh1_bP != temp_all_hits_badPot.end() && temp_all_hits_badPot.size() >= 2) {
126 it_gh2_bP = it_gh1_bP;
128 const auto currPoint = it_gh1_bP->globalPoint;
130 while (it_gh2_bP != temp_all_hits_badPot.end()) {
131 const auto subtraction = currPoint - it_gh2_bP->globalPoint;
134 temp_road.push_back(*it_gh2_bP);
135 temp_all_hits_badPot.erase(it_gh2_bP);
141 if (temp_road.size() == 2) {
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33
unsigned int maxRoadSize_
std::vector< PointInPlane > Road
Vector localToGlobal(const DetGeomDesc *, const Vector &) const
DetGeomDesc::Translation Vector
const CTPPSGeometry * geometry_
const edm::DetSetVector< CTPPSPixelRecHit > * hitVector_
const DetGeomDesc * sensor(unsigned int id) const
returns geometry of a detector performs necessary checks, returns NULL if fails
std::vector< Road > patternVector_
std::pair< double, double > PointInPlane
Log< level::Info, false > LogInfo
const RotationMatrix & rotation() const
unsigned int minRoadSize_
ROOT::Math::Rotation3D RotationMatrix