101 produces<reco::VertexCollection>();
106 using namespace reco;
119 if (it->pt() > 40 && fabs(it->eta()) < 1.6) {
120 const CaloJet* ca = dynamic_cast<const CaloJet*>(&(*it));
135 float lengthBmodule = 6.66;
136 std::vector<float> zProjections;
138 float px = jit->px();
139 float py = jit->py();
140 float pz = jit->pz();
141 float pt = jit->pt();
143 float jetZOverRho = jit->momentum().Z() / jit->momentum().Rho();
144 int minSizeY = fabs(2. * jetZOverRho) - 1;
145 int maxSizeY = fabs(2. * jetZOverRho) + 2;
146 if (fabs(jit->eta()) > 1.6) {
153 DetId id = it->detId();
156 float zmodule = modulepos.
z() -
159 (fabs(zmodule) < (
m_maxZ + lengthBmodule / 2))) {
160 for (
size_t j = 0;
j < detset.
size();
j++)
165 pp->localParametersV(aCluster, (*trackerGeometry->
idToDetUnit(
id)))[0].first);
170 zProjections.push_back(
z);
179 std::sort(zProjections.begin(), zProjections.end());
181 std::vector<float>::iterator itCenter = zProjections.begin();
182 std::vector<float>::iterator itLeftSide = zProjections.begin();
183 std::vector<float>::iterator itRightSide = zProjections.begin();
187 std::vector<float>::iterator left, right;
188 for (; itCenter != zProjections.end(); itCenter++) {
189 while (itLeftSide != zProjections.end() && (*itCenter - *itLeftSide) > zCluster)
191 while (itRightSide != zProjections.end() && (*itRightSide - *itCenter) < zCluster)
194 int n = itRightSide - itLeftSide;
209 if (!zProjections.empty()) {
210 res = *(left + (right - left) / 2);
213 e(0, 0) = 0.0015 * 0.0015;
214 e(1, 1) = 0.0015 * 0.0015;
218 auto pOut = std::make_unique<reco::VertexCollection>();
219 pOut->push_back(thePV);
225 e(0, 0) = 0.0015 * 0.0015;
226 e(1, 1) = 0.0015 * 0.0015;
230 auto pOut = std::make_unique<reco::VertexCollection>();
231 pOut->push_back(thePV);