CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/FastSimulation/TrackingRecHitProducer/src/FastStripCPE.cc

Go to the documentation of this file.
00001 #include "FastSimulation/TrackingRecHitProducer/interface/FastStripCPE.h"
00002 #include "Geometry/CommonTopologies/interface/StripTopology.h"
00003 #include <algorithm>
00004 #include<cmath>
00005 #include<map>
00006 
00007 
00008 void FastStripCPE::enterLocalParameters(uint32_t id, uint16_t firstStrip, std::pair<LocalPoint, LocalError> pos_err_info ) const {
00009   //Filling the map.
00010   pos_err_map.insert(std::make_pair(std::make_pair(id, firstStrip), pos_err_info));
00011 }
00012 
00013 StripClusterParameterEstimator::LocalValues FastStripCPE::localParameters( const SiStripCluster & cl)const {
00014   std::map<std::pair<uint32_t,uint16_t>,std::pair<LocalPoint,LocalError> >::const_iterator strip_link = pos_err_map.find(std::make_pair(cl.geographicalId(),cl.firstStrip()));
00015   if (strip_link != pos_err_map.end()) {
00016     std::pair<LocalPoint,LocalError> pos_err_info = strip_link->second;
00017     LocalPoint result = pos_err_info.first;
00018     LocalError eresult = pos_err_info.second;
00019     return std::make_pair(result,eresult);
00020   }
00021   throw cms::Exception("FastStripCPE") << "Cluster not filled.";
00022 }
00023 
00024 
00025 LocalVector FastStripCPE::driftDirection(const StripGeomDetUnit* det) const {
00026   throw cms::Exception("FastStripCPE") << "Should Not Be Called.";
00027 }