CMS 3D CMS Logo

MuonTransientTrackingRecHitBreaker Class Reference

No description available. More...

#include <RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHitBreaker.h>

List of all members.

Static Public Member Functions

static
TransientTrackingRecHit::ConstRecHitContainer 
breakInSubRecHits (TransientTrackingRecHit::ConstRecHitPointer, int granularity)
 takes a muon rechit and returns its sub-rechits given a certain granularity


Detailed Description

No description available.

Date
2008/04/24 18:14:07
Revision
1.1
Author:
R. Bellan - INFN Torino <riccardo.bellan@cern.ch>

Definition at line 14 of file MuonTransientTrackingRecHitBreaker.h.


Member Function Documentation

TransientTrackingRecHit::ConstRecHitContainer MuonTransientTrackingRecHitBreaker::breakInSubRecHits ( TransientTrackingRecHit::ConstRecHitPointer  muonRecHit,
int  granularity 
) [static]

takes a muon rechit and returns its sub-rechits given a certain granularity

Definition at line 6 of file MuonTransientTrackingRecHitBreaker.cc.

References edmNew::copy(), MuonSubdetId::CSC, MuonSubdetId::DT, Exception, and MuonSubdetId::RPC.

Referenced by MuonTrajectoryUpdator::update().

00006                                                                                                                           {
00007 
00008   const std::string metname = "Muon|RecoMuon|MuonTransientTrackingRecHitBreaker";
00009 
00010   TransientTrackingRecHit::ConstRecHitContainer recHitsForFit;
00011   
00012   int subDet = muonRecHit->geographicalId().subdetId();
00013 
00014   switch(granularity){
00015   case 0:
00016     {
00017       // Asking for 4D segments for the CSC/DT and a point for the RPC
00018       recHitsForFit.push_back( muonRecHit );
00019       break;
00020     }
00021   case 1:
00022     {
00023       if (subDet == MuonSubdetId::DT ||
00024           subDet == MuonSubdetId::CSC) 
00025         // measurement->recHit() returns a 4D segment, then
00026         // DT case: asking for 2D segments.
00027         // CSC case: asking for 2D points.
00028         recHitsForFit = muonRecHit->transientHits();
00029       
00030       else if(subDet == MuonSubdetId::RPC)
00031         recHitsForFit.push_back( muonRecHit);   
00032       
00033       break;
00034     }
00035     
00036   case 2:
00037     {
00038       if (subDet == MuonSubdetId::DT ) {
00039 
00040         // Asking for 2D segments. measurement->recHit() returns a 4D segment
00041         TransientTrackingRecHit::ConstRecHitContainer segments2D = muonRecHit->transientHits();
00042         
00043         // loop over segment
00044         for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator segment = segments2D.begin(); 
00045              segment != segments2D.end();++segment ){
00046 
00047           // asking for 1D Rec Hit
00048           TransientTrackingRecHit::ConstRecHitContainer rechit1D = (**segment).transientHits();
00049           
00050           // load them into the recHitsForFit container
00051           copy(rechit1D.begin(),rechit1D.end(),back_inserter(recHitsForFit));
00052         }
00053       }
00054 
00055       else if(subDet == MuonSubdetId::RPC)
00056         recHitsForFit.push_back(muonRecHit);
00057       
00058       else if(subDet == MuonSubdetId::CSC)      
00059         // Asking for 2D points. measurement->recHit() returns a 4D segment
00060         recHitsForFit = (*muonRecHit).transientHits();
00061       
00062       break;
00063     }
00064     
00065   default:
00066     {
00067       throw cms::Exception(metname) <<"Wrong granularity chosen!"
00068                                     <<"it will be set to 0";
00069       break;
00070     }
00071   }
00072 
00073   return recHitsForFit;
00074 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:28:54 2009 for CMSSW by  doxygen 1.5.4