11 typedef std::multimap<unsigned, std::vector<unsigned> >
BlockMap;
16 : pfTransformer_(nullptr),
19 produces<reco::PFRecTrackCollection>();
20 produces<reco::PFConversionCollection>();
31 auto pfConversionColl = std::make_unique<reco::PFConversionCollection>();
32 auto pfRecTrackColl = std::make_unique<reco::PFRecTrackCollection>();
51 e(0, 0) = 0.0015 * 0.0015;
52 e(1, 1) = 0.0015 * 0.0015;
59 multimap<unsigned int, unsigned int> trackmap;
60 std::vector<unsigned int> conv_coll(0);
63 for (
unsigned int icoll1 = 0; icoll1 < convColl.size(); icoll1++) {
68 bool greater_prob =
false;
69 std::vector<edm::RefToBase<reco::Track> > tracksRefColl1 = convColl[icoll1].tracks();
70 for (
unsigned it1 = 0; it1 < tracksRefColl1.size(); it1++) {
71 reco::TrackRef trackRef1 = (tracksRefColl1[it1]).castTo<reco::TrackRef>();
73 for (
unsigned int icoll2 = 0; icoll2 < convColl.size(); icoll2++) {
79 std::vector<edm::RefToBase<reco::Track> > tracksRefColl2 = convColl[icoll2].tracks();
80 for (
unsigned it2 = 0; it2 < tracksRefColl2.size(); it2++) {
81 reco::TrackRef trackRef2 = (tracksRefColl2[it2]).castTo<reco::TrackRef>();
86 for (
auto const& hit1 : trackRef1->recHits())
87 if (hit1->isValid()) {
89 for (
auto const& hit2 : trackRef2->recHits()) {
96 float size1 = trackRef1->found();
97 float size2 = trackRef2->found();
100 frac = (double)shared / size2;
102 frac = (double)shared / size1;
105 convColl[icoll1].conversionVertex().
ndof());
107 convColl[icoll2].conversionVertex().
ndof());
122 conv_coll.push_back(icoll1);
126 for (
unsigned iColl = 0; iColl < conv_coll.size(); iColl++) {
127 unsigned int collindex = conv_coll[iColl];
129 std::vector<reco::PFRecTrackRef> pfRecTkcoll;
131 std::vector<edm::RefToBase<reco::Track> > tracksRefColl = convColl[collindex].tracks();
133 for (
unsigned it = 0; it < tracksRefColl.size(); it++) {
134 reco::TrackRef trackRef = (tracksRefColl[it]).castTo<reco::TrackRef>();
150 pfRecTrack.setSTIP(stip);
152 pfRecTrackColl->push_back(pfRecTrack);