CMS 3D CMS Logo

RPCRecHitBaseAlgo.cc

Go to the documentation of this file.
00001 /*
00002  *  See header file for a description of this class.
00003  *
00004  *  $Date: 2006/07/16 07:25:48 $
00005  *  $Revision: 1.5 $
00006  *  \author M. Maggi -- INFN Bari
00007  */
00008 
00009 
00010 
00011 #include "RecoLocalMuon/RPCRecHit/interface/RPCRecHitBaseAlgo.h"
00012 #include "RecoLocalMuon/RPCRecHit/src/RPCClusterContainer.h"
00013 #include "RecoLocalMuon/RPCRecHit/src/RPCCluster.h"
00014 #include "RecoLocalMuon/RPCRecHit/src/RPCClusterizer.h"
00015 
00016 #include "Geometry/RPCGeometry/interface/RPCRoll.h"
00017 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
00018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00019 
00020 
00021 RPCRecHitBaseAlgo::RPCRecHitBaseAlgo(const edm::ParameterSet& config) {
00022   //  theSync = RPCTTrigSyncFactory::get()->create(config.getParameter<string>("tTrigMode"),
00023   //config.getParameter<ParameterSet>("tTrigModeConfig"));
00024 }
00025 
00026 RPCRecHitBaseAlgo::~RPCRecHitBaseAlgo(){}
00027 
00028 
00029 // Build all hits in the range associated to the layerId, at the 1st step.
00030 edm::OwnVector<RPCRecHit> RPCRecHitBaseAlgo::reconstruct(const RPCRoll& roll,
00031                                                          const RPCDetId& rpcId,
00032                                                          const RPCDigiCollection::Range& digiRange) {
00033   edm::OwnVector<RPCRecHit> result; 
00034 
00035 
00036   RPCClusterizer clizer;
00037   RPCClusterContainer cls = clizer.doAction(digiRange);
00038 
00039   for (RPCClusterContainer::const_iterator cl = cls.begin();
00040        cl != cls.end(); cl++){
00041     
00042     LocalError tmpErr;
00043     LocalPoint point;
00044     // Call the compute method
00045     bool OK = this->compute(roll, *cl, point, tmpErr);
00046     if (!OK) continue;
00047 
00048     // Build a new pair of 1D rechit 
00049     int firstClustStrip= cl->firstStrip();
00050     int clusterSize=cl->clusterSize(); 
00051     RPCRecHit*  recHit = new RPCRecHit(rpcId,cl->bx(),firstClustStrip,clusterSize,point,tmpErr);
00052 
00053 
00054     result.push_back(recHit);
00055   }
00056   return result;
00057 }

Generated on Tue Jun 9 17:43:54 2009 for CMSSW by  doxygen 1.5.4