#include <MuonTransientTrackingRecHitBreaker.h>
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 |
No description available.
Definition at line 14 of file MuonTransientTrackingRecHitBreaker.h.
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 filterCSVwithJSON::copy, MuonSubdetId::CSC, MuonSubdetId::DT, Exception, metname, and MuonSubdetId::RPC.
Referenced by MuonTrajectoryCleaner::clean(), MuonShowerInformationFiller::hitsFromSegments(), SeedTransformer::seedTransform(), and MuonTrajectoryUpdator::update().
{ const std::string metname = "Muon|RecoMuon|MuonTransientTrackingRecHitBreaker"; TransientTrackingRecHit::ConstRecHitContainer recHitsForFit; int subDet = muonRecHit->geographicalId().subdetId(); switch(granularity){ case 0: { // Asking for 4D segments for the CSC/DT and a point for the RPC recHitsForFit.push_back( muonRecHit ); break; } case 1: { if (subDet == MuonSubdetId::DT || subDet == MuonSubdetId::CSC) // measurement->recHit() returns a 4D segment, then // DT case: asking for 2D segments. // CSC case: asking for 2D points. recHitsForFit = muonRecHit->transientHits(); else if(subDet == MuonSubdetId::RPC) recHitsForFit.push_back( muonRecHit); break; } case 2: { if (subDet == MuonSubdetId::DT ) { // Asking for 2D segments. measurement->recHit() returns a 4D segment TransientTrackingRecHit::ConstRecHitContainer segments2D = muonRecHit->transientHits(); // loop over segment for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator segment = segments2D.begin(); segment != segments2D.end();++segment ){ // asking for 1D Rec Hit TransientTrackingRecHit::ConstRecHitContainer rechit1D = (**segment).transientHits(); // load them into the recHitsForFit container copy(rechit1D.begin(),rechit1D.end(),back_inserter(recHitsForFit)); } } else if(subDet == MuonSubdetId::RPC) recHitsForFit.push_back(muonRecHit); else if(subDet == MuonSubdetId::CSC) // Asking for 2D points. measurement->recHit() returns a 4D segment recHitsForFit = (*muonRecHit).transientHits(); break; } default: { throw cms::Exception(metname) <<"Wrong granularity chosen!" <<"it will be set to 0"; break; } } return recHitsForFit; }