CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/RecoLocalMuon/RPCRecHit/src/RPCRecHitStandardAlgo.cc

Go to the documentation of this file.
00001 /*
00002  *  See header file for a description of this class.
00003  *
00004  *  $Date: 2006/10/26 15:37:08 $
00005  *  $Revision: 1.5 $
00006  *  \author M. Maggi -- INFN
00007  */
00008 
00009 #include "RPCCluster.h"
00010 #include "RecoLocalMuon/RPCRecHit/src/RPCRecHitStandardAlgo.h"
00011 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
00012 #include "Geometry/RPCGeometry/interface/RPCRoll.h"
00013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00014 #include "FWCore/Framework/interface/EventSetup.h"
00015 #include "FWCore/Utilities/interface/Exception.h"
00016 
00017 
00018 RPCRecHitStandardAlgo::RPCRecHitStandardAlgo(const edm::ParameterSet& config) :
00019   RPCRecHitBaseAlgo(config) 
00020 {
00021 }
00022 
00023 
00024 
00025 RPCRecHitStandardAlgo::~RPCRecHitStandardAlgo()
00026 {
00027 }
00028 
00029 
00030 
00031 void RPCRecHitStandardAlgo::setES(const edm::EventSetup& setup) {
00032 }
00033 
00034 
00035 
00036 // First Step
00037 bool RPCRecHitStandardAlgo::compute(const RPCRoll& roll,
00038                                     const RPCCluster& cluster,
00039                                     LocalPoint& Point,
00040                                     LocalError& error)  const
00041 {
00042   // Get Average Strip position
00043   float fstrip = (roll.centreOfStrip(cluster.firstStrip())).x();
00044   float lstrip = (roll.centreOfStrip(cluster.lastStrip())).x();
00045   float centreOfCluster = (fstrip + lstrip)/2;
00046 
00047   LocalPoint loctemp2(centreOfCluster,0.,0.);
00048  
00049   Point = loctemp2;
00050   error = roll.localError((cluster.firstStrip()+cluster.lastStrip())/2.);
00051   return true;
00052 }
00053 
00054 
00055 bool RPCRecHitStandardAlgo::compute(const RPCRoll& roll,
00056                                     const RPCCluster& cl,
00057                                     const float& angle,
00058                                     const GlobalPoint& globPos, 
00059                                     LocalPoint& Point,
00060                                     LocalError& error)  const
00061 {
00062 
00063   // Glob Pos and angle not used so far...
00064   if (globPos.z()<0){ } // Fake use to avoid warnings
00065   if (angle<0.){ }      // Fake use to avoid warnings
00066   this->compute(roll,cl,Point,error);
00067   return true;
00068 }
00069