CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FastPixelCPE.cc
Go to the documentation of this file.
2 
5 
6 
7 // Services
9 
10 #include "boost/multi_array.hpp"
11 
12 #include <iostream>
13 #include <map>
14 using namespace std;
15 
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
19 
20 
22 {
23 
24  std::map<std::pair<unsigned int, std::pair<int,int> >, std::pair<LocalPoint,LocalError> >::const_iterator pixel_link =
25  pos_err_map.find(std::make_pair(det.geographicalId().rawId(),std::make_pair(cluster.minPixelRow(),cluster.minPixelCol())));
26  if (pixel_link != pos_err_map.end()) {
27  std::pair<LocalPoint,LocalError> pos_err_info = pixel_link->second;
28  return std::make_pair(pos_err_info.first, pos_err_info.second);
29  }
30  throw cms::Exception("FastPixelCPE") << "Cluster not filled.";
31 }
32 
33 void FastPixelCPE::enterLocalParameters(unsigned int id, std::pair<int,int> &row_col, std::pair<LocalPoint,LocalError> pos_err_info) const {
34  pos_err_map.insert(std::make_pair(std::make_pair(id,row_col), pos_err_info));
35 }
int minPixelCol() const
std::pair< LocalPoint, LocalError > LocalValues
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
int minPixelRow() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
Pixel cluster – collection of neighboring pixels above threshold.
PixelClusterParameterEstimator::LocalValues localParameters(const SiPixelCluster &cl, const GeomDetUnit &det) const
The constructor.
Definition: FastPixelCPE.cc:21
void enterLocalParameters(unsigned int id, std::pair< int, int > &row_col, std::pair< LocalPoint, LocalError > pos_err_info) const
Definition: FastPixelCPE.cc:33