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.
1 #include "FastPixelCPE.h"
2 
5 
6 
7 // Services
9 
10 #include "boost/multi_array.hpp"
11 
12 #include <iostream>
13 #include <map>
14 #include <memory>
15 using namespace std;
16 
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
20 
21 
23 {
24 
25  std::map<std::pair<unsigned int, std::pair<int,int> >, std::pair<LocalPoint,LocalError> >::const_iterator pixel_link =
26  pos_err_map.find(std::make_pair(det.geographicalId().rawId(),std::make_pair(cluster.minPixelRow(),cluster.minPixelCol())));
27  if (pixel_link != pos_err_map.end()) {
28  std::pair<LocalPoint,LocalError> pos_err_info = pixel_link->second;
29  return std::make_pair(pos_err_info.first, pos_err_info.second);
30  }
31  throw cms::Exception("FastPixelCPE") << "Cluster not filled.";
32 }
33 
34 void FastPixelCPE::enterLocalParameters(unsigned int id, std::pair<int,int> &row_col, const std::pair<LocalPoint,LocalError>& pos_err_info) {
35  pos_err_map.insert(std::make_pair(std::make_pair(id,row_col), pos_err_info));
36 }
37 
38 std::unique_ptr<ClusterParameterEstimator<SiPixelCluster>>
40  return std::unique_ptr<ClusterParameterEstimator<SiPixelCluster>>(new ClusterParameterEstimator<SiPixelCluster>(*this));
41 }
int minPixelCol() const
std::pair< LocalPoint, LocalError > LocalValues
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
int minPixelRow() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
std::unique_ptr< ClusterParameterEstimator< SiPixelCluster > > clone() const
Definition: FastPixelCPE.cc:39
Pixel cluster – collection of neighboring pixels above threshold.
void enterLocalParameters(unsigned int id, std::pair< int, int > &row_col, const std::pair< LocalPoint, LocalError > &pos_err_info)
Definition: FastPixelCPE.cc:34
PixelClusterParameterEstimator::LocalValues localParameters(const SiPixelCluster &cl, const GeomDetUnit &det) const
The constructor.
Definition: FastPixelCPE.cc:22