CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
CSCRecHitMatcher Class Reference

#include <CSCRecHitMatcher.h>

Public Member Functions

bool areCSCRecHit2DsSame (const CSCRecHit2D &, const CSCRecHit2D &) const
 
bool areCSCSegmentsSame (const CSCSegment &, const CSCSegment &) const
 
CSCSegment bestCSCSegment (unsigned int)
 
std::set< unsigned int > chamberIdsCSCRecHit2D () const
 
std::set< unsigned int > chamberIdsCSCSegment () const
 
bool cscRecHit2DInContainer (const CSCRecHit2D &, const CSCRecHit2DContainer &) const
 
const CSCRecHit2DContainer cscRecHit2Ds () const
 
const CSCRecHit2DContainercscRecHit2DsInChamber (unsigned int) const
 
const CSCRecHit2DContainercscRecHit2DsInLayer (unsigned int) const
 
 CSCRecHitMatcher (edm::ParameterSet const &iPS, edm::ConsumesCollector &&iC)
 
bool cscSegmentInContainer (const CSCSegment &, const CSCSegmentContainer &) const
 
const CSCSegmentContainer cscSegments () const
 
const CSCSegmentContainercscSegmentsInChamber (unsigned int) const
 
GlobalPoint globalPoint (const CSCSegment &) const
 
void init (const edm::Event &e, const edm::EventSetup &eventSetup)
 
bool isCSCRecHit2DMatched (const CSCRecHit2D &) const
 
bool isCSCSegmentMatched (const CSCSegment &) const
 
std::set< unsigned int > layerIdsCSCRecHit2D () const
 
void match (const SimTrack &t, const SimVertex &v)
 do the matching More...
 
int nCSCRecHit2Ds () const
 
int nCSCRecHit2DsInChamber (unsigned int) const
 
int nCSCRecHit2DsInLayer (unsigned int) const
 
int nCSCSegments () const
 
int nCSCSegmentsInChamber (unsigned int) const
 
 ~CSCRecHitMatcher ()
 

Private Member Functions

void matchCSCRecHit2DsToSimTrack (const CSCRecHit2DCollection &)
 
void matchCSCSegmentsToSimTrack (const CSCSegmentCollection &)
 

Private Attributes

std::map< unsigned int,
CSCRecHit2DContainer
chamber_to_cscRecHit2D_
 
std::map< unsigned int,
CSCSegmentContainer
chamber_to_cscSegment_
 
edm::ESHandle< CSCGeometrycsc_geom_
 
std::unique_ptr< CSCDigiMatchercscDigiMatcher_
 
const CSCGeometrycscGeometry_
 
edm::Handle
< CSCRecHit2DCollection
cscRecHit2DH_
 
edm::EDGetTokenT
< CSCRecHit2DCollection
cscRecHit2DToken_
 
edm::Handle< CSCSegmentCollectioncscSegmentH_
 
edm::EDGetTokenT
< CSCSegmentCollection
cscSegmentToken_
 
std::map< unsigned int,
CSCRecHit2DContainer
layer_to_cscRecHit2D_
 
int maxBXCSCRecHit2D_
 
int maxBXCSCSegment_
 
int minBXCSCRecHit2D_
 
int minBXCSCSegment_
 
CSCRecHit2DContainer no_cscRecHit2Ds_
 
CSCSegmentContainer no_cscSegments_
 
int verboseCSCRecHit2D_
 
int verboseCSCSegment_
 

Detailed Description

Definition at line 31 of file CSCRecHitMatcher.h.

Constructor & Destructor Documentation

CSCRecHitMatcher::CSCRecHitMatcher ( edm::ParameterSet const &  iPS,
edm::ConsumesCollector &&  iC 
)

Definition at line 9 of file CSCRecHitMatcher.cc.

References edm::ParameterSet::getParameter(), eostools::move(), and TrackValidation_cff::pset.

9  {
10  const auto& cscRecHit2D = pset.getParameter<edm::ParameterSet>("cscRecHit");
11  maxBXCSCRecHit2D_ = cscRecHit2D.getParameter<int>("maxBX");
12  minBXCSCRecHit2D_ = cscRecHit2D.getParameter<int>("minBX");
13  verboseCSCRecHit2D_ = cscRecHit2D.getParameter<int>("verbose");
14 
15  const auto& cscSegment = pset.getParameter<edm::ParameterSet>("cscSegment");
16  maxBXCSCSegment_ = cscSegment.getParameter<int>("maxBX");
17  minBXCSCSegment_ = cscSegment.getParameter<int>("minBX");
18  verboseCSCSegment_ = cscSegment.getParameter<int>("verbose");
19 
20  // make a new digi matcher
21  cscDigiMatcher_ = std::make_unique<CSCDigiMatcher>(pset, std::move(iC));
22 
23  cscRecHit2DToken_ = iC.consumes<CSCRecHit2DCollection>(cscRecHit2D.getParameter<edm::InputTag>("inputTag"));
24  cscSegmentToken_ = iC.consumes<CSCSegmentCollection>(cscSegment.getParameter<edm::InputTag>("inputTag"));
25 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< CSCRecHit2DCollection > cscRecHit2DToken_
def move
Definition: eostools.py:511
edm::EDGetTokenT< CSCSegmentCollection > cscSegmentToken_
std::unique_ptr< CSCDigiMatcher > cscDigiMatcher_
CSCRecHitMatcher::~CSCRecHitMatcher ( )
inline

Definition at line 37 of file CSCRecHitMatcher.h.

37 {}

Member Function Documentation

bool CSCRecHitMatcher::areCSCRecHit2DsSame ( const CSCRecHit2D l,
const CSCRecHit2D r 
) const

Definition at line 271 of file CSCRecHitMatcher.cc.

References CSCRecHit2D::localPosition().

271  {
272  return l.localPosition() == r.localPosition();
273 }
LocalPoint localPosition() const override
Definition: CSCRecHit2D.h:56
bool CSCRecHitMatcher::areCSCSegmentsSame ( const CSCSegment l,
const CSCSegment r 
) const

Definition at line 275 of file CSCRecHitMatcher.cc.

References CSCSegment::localDirection(), and CSCSegment::localPosition().

275  {
276  return (l.localPosition() == r.localPosition() and l.localDirection() == r.localDirection());
277 }
LocalPoint localPosition() const override
Definition: CSCSegment.h:39
LocalVector localDirection() const override
Local direction.
Definition: CSCSegment.h:42
CSCSegment CSCRecHitMatcher::bestCSCSegment ( unsigned int  id)

Definition at line 279 of file CSCRecHitMatcher.cc.

References gpuClustering::id.

279  {
280  CSCSegment emptySegment;
281  double chi2overNdf = 99;
282  int index = 0;
283  int foundIndex = -99;
284 
285  for (const auto& seg : chamber_to_cscSegment_[id]) {
286  double newChi2overNdf(seg.chi2() / seg.degreesOfFreedom());
287  if (newChi2overNdf < chi2overNdf) {
288  chi2overNdf = newChi2overNdf;
289  foundIndex = index;
290  }
291  ++index;
292  }
293  if (foundIndex != -99)
294  return chamber_to_cscSegment_[id][foundIndex];
295  return emptySegment;
296 }
uint16_t *__restrict__ id
std::map< unsigned int, CSCSegmentContainer > chamber_to_cscSegment_
std::set< unsigned int > CSCRecHitMatcher::chamberIdsCSCRecHit2D ( ) const

Definition at line 175 of file CSCRecHitMatcher.cc.

References AlCaHLTBitMon_ParallelJobs::p, and mps_fire::result.

175  {
176  std::set<unsigned int> result;
177  for (const auto& p : chamber_to_cscRecHit2D_)
178  result.insert(p.first);
179  return result;
180 }
std::map< unsigned int, CSCRecHit2DContainer > chamber_to_cscRecHit2D_
tuple result
Definition: mps_fire.py:311
std::set< unsigned int > CSCRecHitMatcher::chamberIdsCSCSegment ( ) const

Definition at line 182 of file CSCRecHitMatcher.cc.

References AlCaHLTBitMon_ParallelJobs::p, and mps_fire::result.

182  {
183  std::set<unsigned int> result;
184  for (const auto& p : chamber_to_cscSegment_)
185  result.insert(p.first);
186  return result;
187 }
std::map< unsigned int, CSCSegmentContainer > chamber_to_cscSegment_
tuple result
Definition: mps_fire.py:311
bool CSCRecHitMatcher::cscRecHit2DInContainer ( const CSCRecHit2D sg,
const CSCRecHit2DContainer c 
) const

Definition at line 231 of file CSCRecHitMatcher.cc.

231  {
232  bool isSame = false;
233  for (const auto& segment : c)
234  if (areCSCRecHit2DsSame(sg, segment))
235  isSame = true;
236  return isSame;
237 }
const edm::EventSetup & c
bool areCSCRecHit2DsSame(const CSCRecHit2D &, const CSCRecHit2D &) const
const CSCRecHit2DContainer CSCRecHitMatcher::cscRecHit2Ds ( ) const

Definition at line 213 of file CSCRecHitMatcher.cc.

References mps_fire::result.

213  {
215  for (const auto& id : chamberIdsCSCRecHit2D()) {
216  const auto& segmentsInChamber(cscRecHit2DsInChamber(id));
217  result.insert(result.end(), segmentsInChamber.begin(), segmentsInChamber.end());
218  }
219  return result;
220 }
const CSCRecHit2DContainer & cscRecHit2DsInChamber(unsigned int) const
tuple result
Definition: mps_fire.py:311
std::set< unsigned int > chamberIdsCSCRecHit2D() const
std::vector< CSCRecHit2D > CSCRecHit2DContainer
const CSCRecHit2DContainer & CSCRecHitMatcher::cscRecHit2DsInChamber ( unsigned int  detid) const

Definition at line 195 of file CSCRecHitMatcher.cc.

195  {
196  if (chamber_to_cscRecHit2D_.find(detid) == chamber_to_cscRecHit2D_.end())
197  return no_cscRecHit2Ds_;
198  return chamber_to_cscRecHit2D_.at(detid);
199 }
std::map< unsigned int, CSCRecHit2DContainer > chamber_to_cscRecHit2D_
CSCRecHit2DContainer no_cscRecHit2Ds_
const CSCRecHit2DContainer & CSCRecHitMatcher::cscRecHit2DsInLayer ( unsigned int  detid) const

Definition at line 189 of file CSCRecHitMatcher.cc.

189  {
190  if (layer_to_cscRecHit2D_.find(detid) == layer_to_cscRecHit2D_.end())
191  return no_cscRecHit2Ds_;
192  return layer_to_cscRecHit2D_.at(detid);
193 }
std::map< unsigned int, CSCRecHit2DContainer > layer_to_cscRecHit2D_
CSCRecHit2DContainer no_cscRecHit2Ds_
bool CSCRecHitMatcher::cscSegmentInContainer ( const CSCSegment sg,
const CSCSegmentContainer c 
) const

Definition at line 239 of file CSCRecHitMatcher.cc.

239  {
240  bool isSame = false;
241  for (const auto& segment : c)
242  if (areCSCSegmentsSame(sg, segment))
243  isSame = true;
244  return isSame;
245 }
const edm::EventSetup & c
bool areCSCSegmentsSame(const CSCSegment &, const CSCSegment &) const
const CSCSegmentContainer CSCRecHitMatcher::cscSegments ( ) const

Definition at line 222 of file CSCRecHitMatcher.cc.

References mps_fire::result.

222  {
224  for (const auto& id : chamberIdsCSCSegment()) {
225  const auto& segmentsInChamber(cscSegmentsInChamber(id));
226  result.insert(result.end(), segmentsInChamber.begin(), segmentsInChamber.end());
227  }
228  return result;
229 }
const CSCSegmentContainer & cscSegmentsInChamber(unsigned int) const
std::set< unsigned int > chamberIdsCSCSegment() const
tuple result
Definition: mps_fire.py:311
std::vector< CSCSegment > CSCSegmentContainer
const CSCSegmentContainer & CSCRecHitMatcher::cscSegmentsInChamber ( unsigned int  detid) const

Definition at line 201 of file CSCRecHitMatcher.cc.

201  {
202  if (chamber_to_cscSegment_.find(detid) == chamber_to_cscSegment_.end())
203  return no_cscSegments_;
204  return chamber_to_cscSegment_.at(detid);
205 }
std::map< unsigned int, CSCSegmentContainer > chamber_to_cscSegment_
CSCSegmentContainer no_cscSegments_
GlobalPoint CSCRecHitMatcher::globalPoint ( const CSCSegment c) const

Definition at line 298 of file CSCRecHitMatcher.cc.

References CSCSegment::cscDetId(), and CSCSegment::localPosition().

298  {
299  return cscGeometry_->idToDet(c.cscDetId())->surface().toGlobal(c.localPosition());
300 }
LocalPoint localPosition() const override
Definition: CSCSegment.h:39
CSCDetId cscDetId() const
Definition: CSCSegment.h:70
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
const CSCGeometry * cscGeometry_
const GeomDet * idToDet(DetId) const override
Definition: CSCGeometry.cc:91
void CSCRecHitMatcher::init ( const edm::Event e,
const edm::EventSetup eventSetup 
)

Definition at line 27 of file CSCRecHitMatcher.cc.

References edm::EventSetup::get(), and edm::Event::getByToken().

27  {
28  cscDigiMatcher_->init(iEvent, iSetup);
29 
32 
33  iSetup.get<MuonGeometryRecord>().get(csc_geom_);
34  if (csc_geom_.isValid()) {
36  } else {
37  edm::LogWarning("CSCSimHitMatcher") << "+++ Info: CSC geometry is unavailable. +++\n";
38  }
39 }
edm::EDGetTokenT< CSCRecHit2DCollection > cscRecHit2DToken_
int iEvent
Definition: GenABIO.cc:224
const CSCGeometry * cscGeometry_
edm::Handle< CSCSegmentCollection > cscSegmentH_
edm::EDGetTokenT< CSCSegmentCollection > cscSegmentToken_
std::unique_ptr< CSCDigiMatcher > cscDigiMatcher_
edm::ESHandle< CSCGeometry > csc_geom_
Log< level::Warning, false > LogWarning
edm::Handle< CSCRecHit2DCollection > cscRecHit2DH_
bool isValid() const
Definition: ESHandle.h:44
bool CSCRecHitMatcher::isCSCRecHit2DMatched ( const CSCRecHit2D thisSg) const

Definition at line 247 of file CSCRecHitMatcher.cc.

247  {
248  return cscRecHit2DInContainer(thisSg, cscRecHit2Ds());
249 }
bool cscRecHit2DInContainer(const CSCRecHit2D &, const CSCRecHit2DContainer &) const
const CSCRecHit2DContainer cscRecHit2Ds() const
bool CSCRecHitMatcher::isCSCSegmentMatched ( const CSCSegment thisSg) const

Definition at line 251 of file CSCRecHitMatcher.cc.

References cscSegments_cfi::cscSegments.

251  {
252  return cscSegmentInContainer(thisSg, cscSegments());
253 }
bool cscSegmentInContainer(const CSCSegment &, const CSCSegmentContainer &) const
const CSCSegmentContainer cscSegments() const
std::set< unsigned int > CSCRecHitMatcher::layerIdsCSCRecHit2D ( ) const

Definition at line 168 of file CSCRecHitMatcher.cc.

References AlCaHLTBitMon_ParallelJobs::p, and mps_fire::result.

168  {
169  std::set<unsigned int> result;
170  for (const auto& p : layer_to_cscRecHit2D_)
171  result.insert(p.first);
172  return result;
173 }
tuple result
Definition: mps_fire.py:311
std::map< unsigned int, CSCRecHit2DContainer > layer_to_cscRecHit2D_
void CSCRecHitMatcher::match ( const SimTrack t,
const SimVertex v 
)

do the matching

Definition at line 42 of file CSCRecHitMatcher.cc.

References cscSegments_cfi::cscSegments.

42  {
43  // match digis first
44  cscDigiMatcher_->match(t, v);
45 
46  // get the rechit collection
49 
50  // now match the rechits
51  matchCSCRecHit2DsToSimTrack(cscRecHit2Ds);
52  matchCSCSegmentsToSimTrack(cscSegments);
53 }
void matchCSCRecHit2DsToSimTrack(const CSCRecHit2DCollection &)
edm::Handle< CSCSegmentCollection > cscSegmentH_
void matchCSCSegmentsToSimTrack(const CSCSegmentCollection &)
T const * product() const
Definition: Handle.h:70
std::unique_ptr< CSCDigiMatcher > cscDigiMatcher_
const CSCSegmentContainer cscSegments() const
const CSCRecHit2DContainer cscRecHit2Ds() const
edm::Handle< CSCRecHit2DCollection > cscRecHit2DH_
void CSCRecHitMatcher::matchCSCRecHit2DsToSimTrack ( const CSCRecHit2DCollection rechits)
private

Definition at line 55 of file CSCRecHitMatcher.cc.

References CSCDetId::chamberId(), ztail::d, spr::find(), gpuClustering::id, AlCaHLTBitMon_ParallelJobs::p, and DetId::rawId().

55  {
57  edm::LogInfo("CSCRecHitMatcher") << "Matching simtrack to CSC rechits";
58 
59  // fetch all layerIds with digis
60  const auto& strip_ids = cscDigiMatcher_->detIdsStrip();
61  const auto& wire_ids = cscDigiMatcher_->detIdsWire();
62 
63  // merge the two collections
64  std::set<unsigned int> layer_ids;
65  layer_ids.insert(strip_ids.begin(), strip_ids.end());
66  layer_ids.insert(wire_ids.begin(), wire_ids.end());
67 
69  edm::LogInfo("CSCRecHitMatcher") << "Number of matched csc layer_ids " << layer_ids.size();
70 
71  for (const auto& id : layer_ids) {
72  CSCDetId p_id(id);
73 
74  // print all the wires in the CSCChamber
75  const auto& hit_wg(cscDigiMatcher_->wiregroupsInDetId(id));
76  if (verboseCSCRecHit2D_) {
77  edm::LogInfo("CSCRecHitMatcher") << "hit wg csc from simhit" << endl;
78  for (const auto& p : hit_wg) {
79  edm::LogInfo("CSCRecHitMatcher") << p;
80  }
81  }
82 
83  // print all the strips in the CSCChamber
84  const auto& hit_strips(cscDigiMatcher_->stripsInDetId(id));
85  if (verboseCSCRecHit2D_) {
86  edm::LogInfo("CSCRecHitMatcher") << "hit strip csc from simhit" << endl;
87  for (const auto& p : hit_strips) {
88  edm::LogInfo("CSCRecHitMatcher") << p;
89  }
90  }
91 
92  // get the rechits
93  const auto& rechits_in_det = rechits.get(p_id);
94  for (auto d = rechits_in_det.first; d != rechits_in_det.second; ++d) {
96  edm::LogInfo("CSCRecHitMatcher") << "rechit " << p_id << " " << *d;
97 
98  // does the wire number match?
99  const bool wireMatch(std::find(hit_wg.begin(), hit_wg.end(), d->hitWire()) != hit_wg.end());
100 
101  // does the strip number match?
102  bool stripMatch(false);
103  for (size_t iS = 0; iS < d->nStrips(); ++iS) {
104  if (std::find(hit_strips.begin(), hit_strips.end(), d->channels(iS)) != hit_strips.end())
105  stripMatch = true;
106  }
107 
108  // this rechit was matched to a matching simhit
109  if (wireMatch and stripMatch) {
111  edm::LogInfo("CSCRecHitMatcher") << "\t...was matched!";
112  layer_to_cscRecHit2D_[id].push_back(*d);
113  chamber_to_cscRecHit2D_[p_id.chamberId().rawId()].push_back(*d);
114  }
115  }
116  }
117 }
std::map< unsigned int, CSCRecHit2DContainer > chamber_to_cscRecHit2D_
uint16_t *__restrict__ id
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
tuple d
Definition: ztail.py:151
std::map< unsigned int, CSCRecHit2DContainer > layer_to_cscRecHit2D_
Log< level::Info, false > LogInfo
std::unique_ptr< CSCDigiMatcher > cscDigiMatcher_
void CSCRecHitMatcher::matchCSCSegmentsToSimTrack ( const CSCSegmentCollection cscSegments)
private

Definition at line 119 of file CSCRecHitMatcher.cc.

References ztail::d, AlCaHLTBitMon_ParallelJobs::p, DetId::rawId(), and HLT_FULL_cff::recHits.

119  {
120  if (verboseCSCSegment_)
121  edm::LogInfo("CSCRecHitMatcher") << "Matching simtrack to segments";
122  // fetch all chamberIds with 2D rechits
123 
124  const auto& chamber_ids = chamberIdsCSCRecHit2D();
125  if (verboseCSCSegment_)
126  edm::LogInfo("CSCRecHitMatcher") << "Number of matched csc segments " << chamber_ids.size();
127  for (const auto& id : chamber_ids) {
128  CSCDetId p_id(id);
129 
130  // print all CSCRecHit2D in the CSCChamber
131  const auto& csc_rechits(cscRecHit2DsInChamber(id));
132  if (verboseCSCSegment_) {
133  edm::LogInfo("CSCRecHitMatcher") << "hit csc rechits" << endl;
134  for (const auto& p : csc_rechits) {
135  edm::LogInfo("CSCRecHitMatcher") << p;
136  }
137  }
138 
139  // get the segments
140  const auto& segments_in_det = cscSegments.get(p_id);
141  for (auto d = segments_in_det.first; d != segments_in_det.second; ++d) {
142  if (verboseCSCSegment_)
143  edm::LogInfo("CSCRecHitMatcher") << "segment " << p_id << " " << *d << endl;
144 
145  //access the rechits
146  const auto& recHits(d->recHits());
147 
148  int rechitsFound = 0;
149  if (verboseCSCSegment_)
150  edm::LogInfo("CSCRecHitMatcher") << recHits.size() << " csc rechits from segment " << endl;
151  for (const auto& rh : recHits) {
152  const CSCRecHit2D* cscrh(dynamic_cast<const CSCRecHit2D*>(rh));
153  if (isCSCRecHit2DMatched(*cscrh))
154  ++rechitsFound;
155  }
156  if (rechitsFound == 0)
157  continue;
158  if (verboseCSCSegment_) {
159  edm::LogInfo("CSCRecHitMatcher") << "Found " << rechitsFound << " rechits out of "
160  << cscRecHit2DsInChamber(id).size();
161  edm::LogInfo("CSCRecHitMatcher") << "\t...was matched!";
162  }
163  chamber_to_cscSegment_[p_id.rawId()].push_back(*d);
164  }
165  }
166 }
std::map< unsigned int, CSCSegmentContainer > chamber_to_cscSegment_
const CSCRecHit2DContainer & cscRecHit2DsInChamber(unsigned int) const
bool isCSCRecHit2DMatched(const CSCRecHit2D &) const
tuple d
Definition: ztail.py:151
std::set< unsigned int > chamberIdsCSCRecHit2D() const
Log< level::Info, false > LogInfo
int CSCRecHitMatcher::nCSCRecHit2Ds ( ) const

Definition at line 255 of file CSCRecHitMatcher.cc.

References dqmiodumpmetadata::n.

255  {
256  int n = 0;
257  const auto& ids = chamberIdsCSCRecHit2D();
258  for (const auto& id : ids)
259  n += cscRecHit2DsInChamber(id).size();
260  return n;
261 }
const CSCRecHit2DContainer & cscRecHit2DsInChamber(unsigned int) const
std::set< unsigned int > chamberIdsCSCRecHit2D() const
int CSCRecHitMatcher::nCSCRecHit2DsInChamber ( unsigned int  detid) const

Definition at line 209 of file CSCRecHitMatcher.cc.

209 { return cscRecHit2DsInChamber(detid).size(); }
const CSCRecHit2DContainer & cscRecHit2DsInChamber(unsigned int) const
int CSCRecHitMatcher::nCSCRecHit2DsInLayer ( unsigned int  detid) const

Definition at line 207 of file CSCRecHitMatcher.cc.

207 { return cscRecHit2DsInLayer(detid).size(); }
const CSCRecHit2DContainer & cscRecHit2DsInLayer(unsigned int) const
int CSCRecHitMatcher::nCSCSegments ( ) const

Definition at line 263 of file CSCRecHitMatcher.cc.

References dqmiodumpmetadata::n.

263  {
264  int n = 0;
265  const auto& ids = chamberIdsCSCSegment();
266  for (const auto& id : ids)
267  n += cscSegmentsInChamber(id).size();
268  return n;
269 }
const CSCSegmentContainer & cscSegmentsInChamber(unsigned int) const
std::set< unsigned int > chamberIdsCSCSegment() const
int CSCRecHitMatcher::nCSCSegmentsInChamber ( unsigned int  detid) const

Definition at line 211 of file CSCRecHitMatcher.cc.

211 { return cscSegmentsInChamber(detid).size(); }
const CSCSegmentContainer & cscSegmentsInChamber(unsigned int) const

Member Data Documentation

std::map<unsigned int, CSCRecHit2DContainer> CSCRecHitMatcher::chamber_to_cscRecHit2D_
private

Definition at line 106 of file CSCRecHitMatcher.h.

std::map<unsigned int, CSCSegmentContainer> CSCRecHitMatcher::chamber_to_cscSegment_
private

Definition at line 107 of file CSCRecHitMatcher.h.

edm::ESHandle<CSCGeometry> CSCRecHitMatcher::csc_geom_
private

Definition at line 91 of file CSCRecHitMatcher.h.

std::unique_ptr<CSCDigiMatcher> CSCRecHitMatcher::cscDigiMatcher_
private

Definition at line 83 of file CSCRecHitMatcher.h.

const CSCGeometry* CSCRecHitMatcher::cscGeometry_
private

Definition at line 92 of file CSCRecHitMatcher.h.

edm::Handle<CSCRecHit2DCollection> CSCRecHitMatcher::cscRecHit2DH_
private

Definition at line 88 of file CSCRecHitMatcher.h.

edm::EDGetTokenT<CSCRecHit2DCollection> CSCRecHitMatcher::cscRecHit2DToken_
private

Definition at line 85 of file CSCRecHitMatcher.h.

edm::Handle<CSCSegmentCollection> CSCRecHitMatcher::cscSegmentH_
private

Definition at line 89 of file CSCRecHitMatcher.h.

edm::EDGetTokenT<CSCSegmentCollection> CSCRecHitMatcher::cscSegmentToken_
private

Definition at line 86 of file CSCRecHitMatcher.h.

std::map<unsigned int, CSCRecHit2DContainer> CSCRecHitMatcher::layer_to_cscRecHit2D_
private

Definition at line 105 of file CSCRecHitMatcher.h.

int CSCRecHitMatcher::maxBXCSCRecHit2D_
private

Definition at line 98 of file CSCRecHitMatcher.h.

int CSCRecHitMatcher::maxBXCSCSegment_
private

Definition at line 102 of file CSCRecHitMatcher.h.

int CSCRecHitMatcher::minBXCSCRecHit2D_
private

Definition at line 99 of file CSCRecHitMatcher.h.

int CSCRecHitMatcher::minBXCSCSegment_
private

Definition at line 103 of file CSCRecHitMatcher.h.

CSCRecHit2DContainer CSCRecHitMatcher::no_cscRecHit2Ds_
private

Definition at line 109 of file CSCRecHitMatcher.h.

CSCSegmentContainer CSCRecHitMatcher::no_cscSegments_
private

Definition at line 110 of file CSCRecHitMatcher.h.

int CSCRecHitMatcher::verboseCSCRecHit2D_
private

Definition at line 97 of file CSCRecHitMatcher.h.

int CSCRecHitMatcher::verboseCSCSegment_
private

Definition at line 101 of file CSCRecHitMatcher.h.