CMS 3D CMS Logo

List of all members | Static Public Member Functions
MuonTransientTrackingRecHitBreaker Class Reference

#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 More...
 

Detailed Description

No description available.

Author
R. Bellan - INFN Torino ricca.nosp@m.rdo..nosp@m.bella.nosp@m.n@ce.nosp@m.rn.ch

Definition at line 12 of file MuonTransientTrackingRecHitBreaker.h.

Member Function Documentation

◆ breakInSubRecHits()

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 5 of file MuonTransientTrackingRecHitBreaker.cc.

References filterCSVwithJSON::copy, MuonSubdetId::CSC, MuonSubdetId::DT, Exception, metname, ecalGpuTask_cfi::rechit1D, MuonSubdetId::RPC, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by MuonShowerInformationFiller::hitsFromSegments(), SeedTransformer::seedTransform(), and MuonTrajectoryUpdator::update().

6  {
7  const std::string metname = "Muon|RecoMuon|MuonTransientTrackingRecHitBreaker";
8 
10 
11  int subDet = muonRecHit->geographicalId().subdetId();
12 
13  switch (granularity) {
14  case 0: {
15  // Asking for 4D segments for the CSC/DT and a point for the RPC
16  recHitsForFit.push_back(muonRecHit);
17  break;
18  }
19  case 1: {
20  if (subDet == MuonSubdetId::DT || subDet == MuonSubdetId::CSC)
21  // measurement->recHit() returns a 4D segment, then
22  // DT case: asking for 2D segments.
23  // CSC case: asking for 2D points.
24  recHitsForFit = muonRecHit->transientHits();
25 
26  else if (subDet == MuonSubdetId::RPC)
27  recHitsForFit.push_back(muonRecHit);
28 
29  break;
30  }
31 
32  case 2: {
33  if (subDet == MuonSubdetId::DT) {
34  // Asking for 2D segments. measurement->recHit() returns a 4D segment
35  TransientTrackingRecHit::ConstRecHitContainer segments2D = muonRecHit->transientHits();
36 
37  // loop over segment
38  for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator segment = segments2D.begin();
39  segment != segments2D.end();
40  ++segment) {
41  // asking for 1D Rec Hit
42  TransientTrackingRecHit::ConstRecHitContainer rechit1D = (**segment).transientHits();
43 
44  // load them into the recHitsForFit container
45  copy(rechit1D.begin(), rechit1D.end(), back_inserter(recHitsForFit));
46  }
47  }
48 
49  else if (subDet == MuonSubdetId::RPC)
50  recHitsForFit.push_back(muonRecHit);
51 
52  else if (subDet == MuonSubdetId::CSC)
53  // Asking for 2D points. measurement->recHit() returns a 4D segment
54  recHitsForFit = (*muonRecHit).transientHits();
55 
56  break;
57  }
58 
59  default: {
60  throw cms::Exception(metname) << "Wrong granularity chosen!"
61  << "it will be set to 0";
62  break;
63  }
64  }
65 
66  return recHitsForFit;
67 }
const std::string metname
std::vector< ConstRecHitPointer > ConstRecHitContainer
static constexpr int RPC
Definition: MuonSubdetId.h:13
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12