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_) {
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_) {
reco::RecoToSimCollection associateRecoToSim(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< TrackingParticleCollection > &) const override
Association Reco To Sim with Collections.
reco::SimToRecoCollection associateSimToReco(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< TrackingParticleCollection > &) const override
Association Sim To Reco with Collections.
math::Vector< dimension >::type ParameterVector
parameter vector
U second(std::pair< T, U > const &p)
const_iterator begin() const
const_iterator end() const
size_type size() const
Size of the RefVector.
std::pair< bool, reco::TrackBase::ParameterVector > trackingParametersAtClosestApproachToBeamSpot(const Basic3DVector< double > &vertex, const Basic3DVector< double > &momAtVtx, float charge, const MagneticField &magField, const BeamSpot &bs)
const_iterator end() const
Termination of iteration.
const_iterator begin() const
Initialize an iterator over the RefVector.
T first(std::pair< T, U > const &p)
double trackAssociationChi2(const reco::TrackBase::ParameterVector &rParameters, const reco::TrackBase::CovarianceMatrix &recoTrackCovMatrix, const reco::TrackBase::ParameterVector &sParameters)
basic method where chi2 is computed
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix