CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/FastSimulation/TrackingRecHitProducer/src/FastPixelCPE.cc

Go to the documentation of this file.
00001 #include "FastSimulation/TrackingRecHitProducer/interface/FastPixelCPE.h"
00002 
00003 #include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h"
00004 #include "Geometry/TrackerGeometryBuilder/interface/RectangularPixelTopology.h"
00005 
00006 
00007 // Services
00008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00009 
00010 #include "boost/multi_array.hpp"
00011 
00012 #include <iostream>
00013 #include <map>
00014 using namespace std;
00015 
00016 //-----------------------------------------------------------------------------
00018 //-----------------------------------------------------------------------------
00019 
00020 
00021 PixelClusterParameterEstimator::LocalValues FastPixelCPE::localParameters(const SiPixelCluster & cluster, const GeomDetUnit &det) const
00022 {
00023   
00024   std::map<std::pair<unsigned int, std::pair<int,int> >, std::pair<LocalPoint,LocalError> >::const_iterator pixel_link = 
00025     pos_err_map.find(std::make_pair(det.geographicalId().rawId(),std::make_pair(cluster.minPixelRow(),cluster.minPixelCol())));
00026   if (pixel_link != pos_err_map.end()) {
00027     std::pair<LocalPoint,LocalError> pos_err_info = pixel_link->second;
00028     return std::make_pair(pos_err_info.first, pos_err_info.second);
00029   }
00030   throw cms::Exception("FastPixelCPE") << "Cluster not filled.";
00031 }
00032 
00033 void FastPixelCPE::enterLocalParameters(unsigned int id, std::pair<int,int> &row_col, std::pair<LocalPoint,LocalError> pos_err_info) const {
00034   pos_err_map.insert(std::make_pair(std::make_pair(id,row_col), pos_err_info));
00035 }