21 std::vector<TrackingParticle const*> tPC;
22 std::vector<std::pair<bool, TrackBase::ParameterVector>> tpParams;
23 tPC.reserve(tPCH.
size());
24 tpParams.reserve(tPCH.
size());
25 for (
auto const& ref : tPCH) {
26 auto const&
tp = *ref;
34 tpParams.emplace_back(
41 LogDebug(
"TrackAssociator") <<
"=========LOOKING FOR ASSOCIATION==========="
43 <<
"rec::Track #" << tindex <<
" with pt=" << (*rt)->pt() <<
"\n"
44 <<
"==========================================="
51 for (
unsigned int i = 0;
i < 5;
i++) {
52 for (
unsigned int j = 0;
j < 5;
j++) {
54 recoTrackCovMatrix(
i,
j) = 0;
59 recoTrackCovMatrix.Invert();
62 for (
auto tp = tPC.begin();
tp != tPC.end();
tp++, ++tpindex) {
65 if (!tpParams[tpindex].
first)
70 if (
chi2 < chi2cut_) {
72 outputCollection.
insert(tC[tindex], std::make_pair(tPCH[tpindex], -
chi2));
77 return outputCollection;
87 std::vector<TrackBase::ParameterVector> tPars;
88 tPars.reserve(tC.
size());
89 std::vector<TrackBase::CovarianceMatrix> tCovs;
90 tCovs.reserve(tC.
size());
91 for (
auto const& ref : tC) {
92 auto const& aTk = *ref;
93 tPars.emplace_back(aTk.parameters());
97 for (
unsigned int i = 0;
i < 5;
i++) {
98 for (
unsigned int j = 0;
j < 5;
j++) {
100 recoTrackCovMatrix(
i,
j) = 0;
104 recoTrackCovMatrix.Invert();
105 tCovs.emplace_back(recoTrackCovMatrix);
112 auto const& aTP = **
tp;
113 int charge = aTP.charge();
117 LogDebug(
"TrackAssociator") <<
"=========LOOKING FOR ASSOCIATION==========="
119 <<
"TrackingParticle #" << tpindex <<
" with pt=" <<
sqrt(aTP.momentum().perp2())
121 <<
"==========================================="
125 auto const tpBoolParams =
127 if (!tpBoolParams.first)
130 for (
unsigned int tindex = 0; tindex < tC.size(); tindex++) {
136 if (
chi2 < chi2cut_) {
138 outputCollection.
insert(*
tp, std::make_pair(tC[tindex], -
chi2));
143 return outputCollection;