59 produces<std::vector<reco::ME0Muon>>();
90 auto oc = std::make_unique<std::vector<ME0Muon>>();
91 std::vector<ME0Muon> TempStore;
99 ++thisTrack, ++TrackNumber) {
103 if (
std::abs(thisTrack->eta()) < 1.8)
107 float zSign = thisTrack->pz() > 0 ? 1.0f : -1.0f;
112 int chargeReco = thisTrack->charge();
115 p3reco =
GlobalVector(thisTrack->outerPx(), thisTrack->outerPy(), thisTrack->outerPz());
116 r3reco =
GlobalVector(thisTrack->outerX(), thisTrack->outerY(), thisTrack->outerZ());
122 getFromFTS(initrecostate, p3reco, r3reco, chargeReco, covReco);
133 getFromFTS(finalrecostate, p3FinalReco_glob, r3FinalReco_globv, chargeReco, covFinalReco);
136 int SegmentNumber = 0;
139 double ClosestDelR2 = 999.;
141 for (
auto thisSegment = OurSegments->begin(); thisSegment != OurSegments->end(); ++thisSegment, ++SegmentNumber) {
142 ME0DetId id = thisSegment->me0DetId();
146 if (zSign *
chamber->toGlobal(thisSegment->localPosition()).
z() < 0)
149 GlobalPoint r3FinalReco_glob(r3FinalReco_globv.
x(), r3FinalReco_globv.
y(), r3FinalReco_globv.
z());
154 LocalPoint thisPosition(thisSegment->localPosition());
155 LocalVector thisDirection(thisSegment->localDirection().x(),
156 thisSegment->localDirection().y(),
157 thisSegment->localDirection().z());
161 for (
int i = 1;
i <= 4;
i++) {
162 for (
int j = 1;
j <= 4;
j++) {
163 thisCov(
i,
j) = thisSegment->parametersError()(
i,
j);
171 AlgebraicMatrix55 Ctmp = (jacobGlbToLoc * covFinalReco) * ROOT::Math::Transpose(jacobGlbToLoc);
173 for (
int i = 0;
i < 5; ++
i) {
174 for (
int j = 0;
j < 5; ++
j) {
175 C[
i][
j] = Ctmp[
i][
j];
179 Double_t sigmax =
sqrt(
C[3][3] + thisSegment->localPositionError().xx());
180 Double_t sigmay =
sqrt(
C[4][4] + thisSegment->localPositionError().yy());
182 bool X_MatchFound =
false, Y_MatchFound =
false, Dir_MatchFound =
false;
193 Dir_MatchFound =
true;
196 if (X_MatchFound && Y_MatchFound && Dir_MatchFound) {
200 GlobalPoint TkPos(r3FinalReco_globv.
x(), r3FinalReco_globv.
y(), r3FinalReco_globv.
z());
203 if (thisDelR2 < ClosestDelR2) {
204 ClosestDelR2 = thisDelR2;
218 if (ClosestDelR2 < 500.) {