101 produces<reco::VertexCollection>();
106 using namespace reco;
119 if (it->pt() > 40 && fabs(it->eta()) < 1.6) {
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);
T getParameter(std::string const &) const
Jets made from CaloTowers.
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
edm::EDGetTokenT< edm::View< reco::Jet > > m_jets
#define DEFINE_FWK_MODULE(type)
Geom::Phi< T > phi() const
T const * product() const
math::Error< dimension >::type Error
covariance error matrix (3x3)
edm::EDGetTokenT< SiPixelClusterCollectionNew > m_clusters
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > const m_geomToken
math::XYZPoint Point
point in the space
FastPrimaryVertexProducer(const edm::ParameterSet &)
bool getData(T &iHolder) const
edm::EDGetTokenT< reco::BeamSpot > m_beamSpot
const TrackerGeomDet * idToDet(DetId) const override
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
edm::ESGetToken< PixelClusterParameterEstimator, TkPixelCPERecord > const m_pixelCPEToken
const Plane & surface() const
The nominal surface of the GeomDet.
const Surface::PositionType & position() const
The position (origin of the R.F.)
Pixel cluster – collection of neighboring pixels above threshold.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects