109 using namespace reco;
123 if(it->pt() > 40 && fabs(it->eta()) < 1.6)
127 selectedJets.push_back(*ca);
145 float lengthBmodule=6.66;
146 std::vector<float> zProjections;
147 for(CaloJetCollection::const_iterator jit = selectedJets.begin() ; jit != selectedJets.end() ; jit++)
154 float jetZOverRho = jit->momentum().Z()/jit->momentum().Rho();
155 int minSizeY = fabs(2.*jetZOverRho)-1;
156 int maxSizeY = fabs(2.*jetZOverRho)+2;
157 if( fabs(jit->eta()) > 1.6)
164 DetId id = it->detId();
167 float zmodule = modulepos.
z() - ((modulepos.
x()-
beamSpot->x0())*px+(modulepos.
y()-
beamSpot->y0())*py)/pt * pz/
pt;
170 for(
size_t j = 0 ;
j < detset.
size() ;
j ++)
174 Point3DBase<float, GlobalTag> v = trackerGeometry->idToDet(
id)->surface().toGlobal(
pp->localParametersV( aCluster,( *trackerGeometry->idToDetUnit(
id)))[0].first) ;
181 zProjections.push_back(z);
190 std::sort(zProjections.begin(),zProjections.end());
192 std::vector<float>::iterator itCenter = zProjections.begin();
193 std::vector<float>::iterator itLeftSide = zProjections.begin();
194 std::vector<float>::iterator itRightSide = zProjections.begin();
195 std::vector<int> counts;
198 std::vector<float>::iterator left,right;
199 for(;itCenter!=zProjections.end(); itCenter++)
202 while(itLeftSide != zProjections.end() && (*itCenter - *itLeftSide) > zCluster ) itLeftSide++;
203 while(itRightSide != zProjections.end() && (*itRightSide - *itCenter) < zCluster ) itRightSide++;
205 int n= itRightSide-itLeftSide;
223 if(zProjections.size() > 0)
225 res=*(left+(right-left)/2);
228 e(0, 0) = 0.0015 * 0.0015;
229 e(1, 1) = 0.0015 * 0.0015;
234 pOut->push_back(thePV);
241 e(0, 0) = 0.0015 * 0.0015;
242 e(1, 1) = 0.0015 * 0.0015;
247 pOut->push_back(thePV);
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Jets made from CaloTowers.
Geom::Phi< T > phi() const
math::Error< dimension >::type Error
covariance error matrix (3x3)
std::vector< Vertex > VertexCollection
collection of Vertex objects
const T & max(const T &a, const T &b)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
math::XYZPoint Point
point in the space
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Pixel cluster – collection of neighboring pixels above threshold.
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects