34 temp_all_hits.clear();
36 Road temp_all_hits_badPot;
37 temp_all_hits_badPot.clear();
42 for (
const auto& it_rh : ds_rh2.data) {
46 localError[0][0] = it_rh.error().xx();
47 localError[0][1] = it_rh.error().xy();
48 localError[0][2] = 0.;
49 localError[1][0] = it_rh.error().xy();
50 localError[1][1] = it_rh.error().yy();
51 localError[1][2] = 0.;
52 localError[2][0] = 0.;
53 localError[2][1] = 0.;
54 localError[2][2] = 0.;
56 edm::LogInfo(
"RPixRoadFinder") <<
"Hits = " << ds_rh2.data.size();
60 theRotationMatrix.GetComponents(theRotationTMatrix(0, 0),
61 theRotationTMatrix(0, 1),
62 theRotationTMatrix(0, 2),
63 theRotationTMatrix(1, 0),
64 theRotationTMatrix(1, 1),
65 theRotationTMatrix(1, 2),
66 theRotationTMatrix(2, 0),
67 theRotationTMatrix(2, 1),
68 theRotationTMatrix(2, 2));
74 if (isBadPot ==
true && myid.arm() == 0 && myid.station() == 2 && localV.x() > 0 &&
75 (myid.plane() == 0 || myid.plane() == 5)) {
77 temp_all_hits_badPot.emplace_back(
PointInPlane{globalV, globalError, it_rh, myid});
79 temp_all_hits.emplace_back(
PointInPlane{globalV, globalError, it_rh, myid});
83 Road::iterator it_gh1 = temp_all_hits.begin();
84 Road::iterator it_gh2;
90 while (it_gh1 != temp_all_hits.end() && temp_all_hits.size() >=
minRoadSize_) {
95 const auto currPoint = it_gh1->globalPoint;
98 while (it_gh2 != temp_all_hits.end()) {
99 bool same_pot =
false;
101 if (currDet.
rpId() == tmpGh2Id.
rpId())
103 const auto subtraction = currPoint - it_gh2->globalPoint;
106 temp_road.push_back(*it_gh2);
107 temp_all_hits.erase(it_gh2);
119 Road::iterator it_gh1_bP = temp_all_hits_badPot.begin();
120 Road::iterator it_gh2_bP;
122 while (it_gh1_bP != temp_all_hits_badPot.end() && temp_all_hits_badPot.size() >= 2) {
125 it_gh2_bP = it_gh1_bP;
127 const auto currPoint = it_gh1_bP->globalPoint;
129 while (it_gh2_bP != temp_all_hits_badPot.end()) {
130 const auto subtraction = currPoint - it_gh2_bP->globalPoint;
133 temp_road.push_back(*it_gh2_bP);
134 temp_all_hits_badPot.erase(it_gh2_bP);
140 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