CMS 3D CMS Logo

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

#include <CSCDigiMatcher.h>

Public Member Functions

std::set< unsigned int > chamberIdsComparator (int csc_type=MuonHitHelper::CSC_ALL) const
 
std::set< unsigned int > chamberIdsStrip (int csc_type=MuonHitHelper::CSC_ALL) const
 
std::set< unsigned int > chamberIdsWire (int csc_type=MuonHitHelper::CSC_ALL) const
 
const CSCComparatorDigiContainercomparatorDigisInChamber (unsigned int) const
 
const CSCComparatorDigiContainercomparatorDigisInDetId (unsigned int) const
 
std::set< int > comparatorsInChamber (unsigned int, int max_gap_to_fill=0) const
 
std::set< int > comparatorsInDetId (unsigned int) const
 
 CSCDigiMatcher (edm::ParameterSet const &iPS, edm::ConsumesCollector &&iC)
 
std::set< unsigned int > detIdsComparator (int csc_type=MuonHitHelper::CSC_ALL) const
 
std::set< unsigned int > detIdsStrip (int csc_type=MuonHitHelper::CSC_ALL) const
 
std::set< unsigned int > detIdsWire (int csc_type=MuonHitHelper::CSC_ALL) const
 
void init (const edm::Event &e, const edm::EventSetup &eventSetup)
 
void match (const SimTrack &t, const SimVertex &v)
 do the matching More...
 
std::shared_ptr< CSCSimHitMatchermuonSimHitMatcher () const
 
int nCoincidenceComparatorChambers (int min_n_layers=4) const
 
int nCoincidenceStripChambers (int min_n_layers=4) const
 
int nCoincidenceWireChambers (int min_n_layers=4) const
 
int nLayersWithComparatorInChamber (unsigned int) const
 
int nLayersWithStripInChamber (unsigned int) const
 
int nLayersWithWireInChamber (unsigned int) const
 
const CSCStripDigiContainerstripDigisInChamber (unsigned int) const
 
const CSCStripDigiContainerstripDigisInDetId (unsigned int) const
 
std::set< int > stripsInChamber (unsigned int, int max_gap_to_fill=0) const
 
std::set< int > stripsInDetId (unsigned int) const
 
const CSCWireDigiContainerwireDigisInChamber (unsigned int) const
 
const CSCWireDigiContainerwireDigisInDetId (unsigned int) const
 
std::set< int > wiregroupsInChamber (unsigned int, int max_gap_to_fill=0) const
 
std::set< int > wiregroupsInDetId (unsigned int) const
 
 ~CSCDigiMatcher ()
 

Private Member Functions

void matchComparatorsToSimTrack (const CSCComparatorDigiCollection &comparators)
 
void matchStripsToSimTrack (const CSCStripDigiCollection &strips)
 
void matchWiresToSimTrack (const CSCWireDigiCollection &wires)
 
template<class T >
std::set< unsigned int > selectDetIds (const T &digis, int csc_type) const
 

Private Attributes

std::map< unsigned int, CSCComparatorDigiContainerchamber_to_comparators_
 
std::map< unsigned int, CSCStripDigiContainerchamber_to_strips_
 
std::map< unsigned int, CSCWireDigiContainerchamber_to_wires_
 
edm::EDGetTokenT< CSCComparatorDigiCollectioncomparatorDigiInput_
 
edm::Handle< CSCComparatorDigiCollectioncomparatorDigisH_
 
std::map< unsigned int, CSCComparatorDigiContainerdetid_to_comparators_
 
std::map< unsigned int, CSCStripDigiContainerdetid_to_strips_
 
std::map< unsigned int, CSCWireDigiContainerdetid_to_wires_
 
int matchDeltaComparator_
 
int matchDeltaStrip_
 
int matchDeltaWG_
 
int maxBXComparator_
 
int maxBXStrip_
 
int maxBXWire_
 
int minBXComparator_
 
int minBXStrip_
 
int minBXWire_
 
std::shared_ptr< CSCSimHitMatchermuonSimHitMatcher_
 
CSCComparatorDigiContainer no_comparators_
 
CSCStripDigiContainer no_strips_
 
CSCWireDigiContainer no_wires_
 
edm::EDGetTokenT< CSCStripDigiCollectionstripDigiInput_
 
edm::Handle< CSCStripDigiCollectionstripDigisH_
 
int verboseComparator_
 
int verboseStrip_
 
int verboseWG_
 
edm::EDGetTokenT< CSCWireDigiCollectionwireDigiInput_
 
edm::Handle< CSCWireDigiCollectionwireDigisH_
 

Detailed Description

Description: Matching of Digis to SimTrack in CSC

Author: Sven Dildick (TAMU), Tao Huang (TAMU)

Definition at line 25 of file CSCDigiMatcher.h.

Constructor & Destructor Documentation

◆ CSCDigiMatcher()

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

Definition at line 5 of file CSCDigiMatcher.cc.

5  {
6  const auto& wireDigi = pset.getParameterSet("cscWireDigi");
7  verboseWG_ = wireDigi.getParameter<int>("verbose");
8  minBXWire_ = wireDigi.getParameter<int>("minBX");
9  maxBXWire_ = wireDigi.getParameter<int>("maxBX");
10  matchDeltaWG_ = wireDigi.getParameter<int>("matchDeltaWG");
11 
12  const auto& comparatorDigi = pset.getParameterSet("cscComparatorDigi");
13  verboseComparator_ = comparatorDigi.getParameter<int>("verbose");
14  minBXComparator_ = comparatorDigi.getParameter<int>("minBX");
15  maxBXComparator_ = comparatorDigi.getParameter<int>("maxBX");
16  matchDeltaComparator_ = comparatorDigi.getParameter<int>("matchDeltaStrip");
17 
18  const auto& stripDigi = pset.getParameterSet("cscStripDigi");
19  verboseStrip_ = stripDigi.getParameter<int>("verbose");
20  minBXStrip_ = stripDigi.getParameter<int>("minBX");
21  maxBXStrip_ = stripDigi.getParameter<int>("maxBX");
22  matchDeltaStrip_ = stripDigi.getParameter<int>("matchDeltaStrip");
23 
24  // make a new simhits matcher
26 
28  iC.consumes<CSCComparatorDigiCollection>(comparatorDigi.getParameter<edm::InputTag>("inputTag"));
29  stripDigiInput_ = iC.consumes<CSCStripDigiCollection>(stripDigi.getParameter<edm::InputTag>("inputTag"));
30  wireDigiInput_ = iC.consumes<CSCWireDigiCollection>(wireDigi.getParameter<edm::InputTag>("inputTag"));
31 }

References eostools::move(), and muonDTDigis_cfi::pset.

◆ ~CSCDigiMatcher()

CSCDigiMatcher::~CSCDigiMatcher ( )
inline

Definition at line 31 of file CSCDigiMatcher.h.

31 {}

Member Function Documentation

◆ chamberIdsComparator()

std::set< unsigned int > CSCDigiMatcher::chamberIdsComparator ( int  csc_type = MuonHitHelper::CSC_ALL) const

Definition at line 184 of file CSCDigiMatcher.cc.

184  {
185  return selectDetIds(chamber_to_comparators_, csc_type);
186 }

◆ chamberIdsStrip()

std::set< unsigned int > CSCDigiMatcher::chamberIdsStrip ( int  csc_type = MuonHitHelper::CSC_ALL) const

Definition at line 188 of file CSCDigiMatcher.cc.

188  {
189  return selectDetIds(chamber_to_strips_, csc_type);
190 }

◆ chamberIdsWire()

std::set< unsigned int > CSCDigiMatcher::chamberIdsWire ( int  csc_type = MuonHitHelper::CSC_ALL) const

Definition at line 192 of file CSCDigiMatcher.cc.

192  {
193  return selectDetIds(chamber_to_wires_, csc_type);
194 }

◆ comparatorDigisInChamber()

const CSCComparatorDigiContainer & CSCDigiMatcher::comparatorDigisInChamber ( unsigned int  detid) const

Definition at line 202 of file CSCDigiMatcher.cc.

202  {
203  if (chamber_to_comparators_.find(detid) == chamber_to_comparators_.end())
204  return no_comparators_;
205  return chamber_to_comparators_.at(detid);
206 }

◆ comparatorDigisInDetId()

const CSCComparatorDigiContainer & CSCDigiMatcher::comparatorDigisInDetId ( unsigned int  detid) const

Definition at line 196 of file CSCDigiMatcher.cc.

196  {
197  if (detid_to_comparators_.find(detid) == detid_to_comparators_.end())
198  return no_comparators_;
199  return detid_to_comparators_.at(detid);
200 }

◆ comparatorsInChamber()

std::set< int > CSCDigiMatcher::comparatorsInChamber ( unsigned int  detid,
int  max_gap_to_fill = 0 
) const

Definition at line 325 of file CSCDigiMatcher.cc.

325  {
326  set<int> result;
327  const auto& digis = comparatorDigisInChamber(detid);
328  for (const auto& d : digis) {
329  result.insert(d.getStrip());
330  }
331  if (max_gap_to_fill > 0) {
332  int prev = -111;
333  for (const auto& s : result) {
334  //cout<<"gap "<<s<<" - "<<prev<<" = "<<s - prev<<" added 0";
335  if (s - prev > 1 && s - prev - 1 <= max_gap_to_fill) {
336  //int sz = result.size();
337  for (int fill_s = prev + 1; fill_s < s; ++fill_s)
338  result.insert(fill_s);
339  //cout<<result.size() - sz;
340  }
341  //cout<<" elems"<<endl;
342  prev = s;
343  }
344  }
345 
346  return result;
347 }

References ztail::d, mps_fire::result, and alignCSCRings::s.

◆ comparatorsInDetId()

std::set< int > CSCDigiMatcher::comparatorsInDetId ( unsigned int  detid) const

Definition at line 298 of file CSCDigiMatcher.cc.

298  {
299  set<int> result;
300  const auto& digis = comparatorDigisInDetId(detid);
301  for (const auto& d : digis) {
302  result.insert(d.getHalfStrip());
303  }
304  return result;
305 }

References ztail::d, and mps_fire::result.

◆ detIdsComparator()

std::set< unsigned int > CSCDigiMatcher::detIdsComparator ( int  csc_type = MuonHitHelper::CSC_ALL) const

Definition at line 172 of file CSCDigiMatcher.cc.

172  {
173  return selectDetIds(detid_to_comparators_, csc_type);
174 }

◆ detIdsStrip()

std::set< unsigned int > CSCDigiMatcher::detIdsStrip ( int  csc_type = MuonHitHelper::CSC_ALL) const

Definition at line 176 of file CSCDigiMatcher.cc.

176  {
177  return selectDetIds(detid_to_strips_, csc_type);
178 }

◆ detIdsWire()

std::set< unsigned int > CSCDigiMatcher::detIdsWire ( int  csc_type = MuonHitHelper::CSC_ALL) const

Definition at line 180 of file CSCDigiMatcher.cc.

180  {
181  return selectDetIds(detid_to_wires_, csc_type);
182 }

◆ init()

void CSCDigiMatcher::init ( const edm::Event e,
const edm::EventSetup eventSetup 
)

Definition at line 33 of file CSCDigiMatcher.cc.

33  {
34  muonSimHitMatcher_->init(iEvent, iSetup);
35 
37  iEvent.getByToken(stripDigiInput_, stripDigisH_);
38  iEvent.getByToken(wireDigiInput_, wireDigisH_);
39 }

References iEvent.

◆ match()

void CSCDigiMatcher::match ( const SimTrack t,
const SimVertex v 
)

do the matching

Definition at line 42 of file CSCDigiMatcher.cc.

42  {
43  // match simhits first
44  muonSimHitMatcher_->match(t, v);
45 
46  // get the digi collections
50 
51  // now match the digis
52  matchComparatorsToSimTrack(comparators);
55 }

References DigiDM_cff::strips, OrderedSet::t, findQualityFiles::v, and DigiDM_cff::wires.

◆ matchComparatorsToSimTrack()

void CSCDigiMatcher::matchComparatorsToSimTrack ( const CSCComparatorDigiCollection comparators)
private

Definition at line 57 of file CSCDigiMatcher.cc.

57  {
58  for (auto detUnitIt = comparators.begin(); detUnitIt != comparators.end(); ++detUnitIt) {
59  const CSCDetId& id = (*detUnitIt).first;
60  const auto& range = (*detUnitIt).second;
61  for (auto digiIt = range.first; digiIt != range.second; ++digiIt) {
62  if (id.station() == 1 and (id.ring() == 1 or id.ring() == 4))
64  cout << "CSCid " << id << " Comparator digi (comparator, comparator, Tbin ) " << (*digiIt) << endl;
65  }
66  }
67 
68  const auto& det_ids = muonSimHitMatcher_->detIds(0);
69  for (const auto& id : det_ids) {
70  CSCDetId layer_id(id);
71 
72  const auto& hit_comparators = muonSimHitMatcher_->hitStripsInDetId(id, matchDeltaStrip_);
73  if (verboseComparator_) {
74  cout << "hit_comparators_fat, CSCid " << layer_id << " ";
75  copy(hit_comparators.begin(), hit_comparators.end(), ostream_iterator<int>(cout, " "));
76  cout << endl;
77  }
78 
79  const auto& comp_digis_in_det = comparators.get(layer_id);
80  for (auto c = comp_digis_in_det.first; c != comp_digis_in_det.second; ++c) {
82  cout << "sdigi " << layer_id << " (comparator, comparator, Tbin ) " << *c << endl;
83 
84  // check that the first BX for this digi wasn't too early or too late
85  if (c->getTimeBin() < minBXComparator_ || c->getTimeBin() > maxBXComparator_)
86  continue;
87 
88  int comparator = c->getStrip(); // comparators are counted from 1
89  // check that it matches a comparator that was hit by SimHits from our track
90  if (hit_comparators.find(comparator) == hit_comparators.end())
91  continue;
92 
94  cout << "Matched comparator " << *c << endl;
95  detid_to_comparators_[id].push_back(*c);
96  chamber_to_comparators_[layer_id.chamberId().rawId()].push_back(*c);
97  }
98  }
99 }

References HltBtagPostValidation_cff::c, CSCDetId::chamberId(), filterCSVwithJSON::copy, gather_cfg::cout, triggerObjects_cff::id, or, FastTimerService_cff::range, DetId::rawId(), relativeConstraints::ring, and relativeConstraints::station.

◆ matchStripsToSimTrack()

void CSCDigiMatcher::matchStripsToSimTrack ( const CSCStripDigiCollection strips)
private

Definition at line 101 of file CSCDigiMatcher.cc.

101  {
102  for (auto detUnitIt = strips.begin(); detUnitIt != strips.end(); ++detUnitIt) {
103  const CSCDetId& id = (*detUnitIt).first;
104  const auto& range = (*detUnitIt).second;
105  for (auto digiIt = range.first; digiIt != range.second; ++digiIt) {
106  if (id.station() == 1 and (id.ring() == 1 or id.ring() == 4))
107  if (verboseStrip_)
108  cout << "CSCid " << id << " Strip digi (strip, strip, Tbin ) " << (*digiIt) << endl;
109  }
110  }
111 
112  const auto& det_ids = muonSimHitMatcher_->detIds(0);
113  for (const auto& id : det_ids) {
114  CSCDetId layer_id(id);
115 
116  const auto& hit_strips = muonSimHitMatcher_->hitStripsInDetId(id, matchDeltaStrip_);
117  if (verboseStrip_) {
118  cout << "hit_strips_fat, CSCid " << layer_id << " ";
119  copy(hit_strips.begin(), hit_strips.end(), ostream_iterator<int>(cout, " "));
120  cout << endl;
121  }
122 
123  const auto& strip_digis_in_det = strips.get(layer_id);
124  for (auto c = strip_digis_in_det.first; c != strip_digis_in_det.second; ++c) {
125  if (verboseStrip_)
126  cout << "sdigi " << layer_id << " (strip, Tbin ) " << *c << endl;
127 
128  int strip = c->getStrip(); // strips are counted from 1
129  // check that it matches a strip that was hit by SimHits from our track
130  if (hit_strips.find(strip) == hit_strips.end())
131  continue;
132 
133  if (verboseStrip_)
134  cout << "Matched strip " << *c << endl;
135  detid_to_strips_[id].push_back(*c);
136  chamber_to_strips_[layer_id.chamberId().rawId()].push_back(*c);
137  }
138  }
139 }

References HltBtagPostValidation_cff::c, CSCDetId::chamberId(), filterCSVwithJSON::copy, gather_cfg::cout, triggerObjects_cff::id, or, FastTimerService_cff::range, DetId::rawId(), relativeConstraints::ring, relativeConstraints::station, digitizers_cfi::strip, and DigiDM_cff::strips.

◆ matchWiresToSimTrack()

void CSCDigiMatcher::matchWiresToSimTrack ( const CSCWireDigiCollection wires)
private

Definition at line 141 of file CSCDigiMatcher.cc.

141  {
142  const auto& det_ids = muonSimHitMatcher_->detIds(0);
143  for (const auto& id : det_ids) {
144  CSCDetId layer_id(id);
145 
146  const auto& hit_wires = muonSimHitMatcher_->hitWiregroupsInDetId(id, matchDeltaWG_);
147  if (verboseWG_) {
148  cout << "hit_wires ";
149  copy(hit_wires.begin(), hit_wires.end(), ostream_iterator<int>(cout, " "));
150  cout << endl;
151  }
152 
153  const auto& wire_digis_in_det = wires.get(layer_id);
154  for (auto w = wire_digis_in_det.first; w != wire_digis_in_det.second; ++w) {
155  // check that the first BX for this digi wasn't too early or too late
156  if (w->getTimeBin() < minBXWire_ || w->getTimeBin() > maxBXWire_)
157  continue;
158 
159  int wg = w->getWireGroup(); // wiregroups are counted from 1
160  // check that it matches a strip that was hit by SimHits from our track
161  if (hit_wires.find(wg) == hit_wires.end())
162  continue;
163 
164  if (verboseStrip_)
165  cout << "Matched wire digi " << *w << endl;
166  detid_to_wires_[id].push_back(*w);
167  chamber_to_wires_[layer_id.chamberId().rawId()].push_back(*w);
168  }
169  }
170 }

References CSCDetId::chamberId(), filterCSVwithJSON::copy, gather_cfg::cout, triggerObjects_cff::id, DetId::rawId(), w, and DigiDM_cff::wires.

◆ muonSimHitMatcher()

std::shared_ptr<CSCSimHitMatcher> CSCDigiMatcher::muonSimHitMatcher ( ) const
inline

Definition at line 83 of file CSCDigiMatcher.h.

83 { return muonSimHitMatcher_; }

References muonSimHitMatcher_.

◆ nCoincidenceComparatorChambers()

int CSCDigiMatcher::nCoincidenceComparatorChambers ( int  min_n_layers = 4) const

Definition at line 268 of file CSCDigiMatcher.cc.

268  {
269  int result = 0;
270  const auto& chamber_ids = chamberIdsComparator();
271  for (const auto& id : chamber_ids) {
272  if (nLayersWithComparatorInChamber(id) >= min_n_layers)
273  result += 1;
274  }
275  return result;
276 }

References mps_fire::result.

◆ nCoincidenceStripChambers()

int CSCDigiMatcher::nCoincidenceStripChambers ( int  min_n_layers = 4) const

Definition at line 278 of file CSCDigiMatcher.cc.

278  {
279  int result = 0;
280  const auto& chamber_ids = chamberIdsStrip();
281  for (const auto& id : chamber_ids) {
282  if (nLayersWithStripInChamber(id) >= min_n_layers)
283  result += 1;
284  }
285  return result;
286 }

References mps_fire::result.

◆ nCoincidenceWireChambers()

int CSCDigiMatcher::nCoincidenceWireChambers ( int  min_n_layers = 4) const

Definition at line 288 of file CSCDigiMatcher.cc.

288  {
289  int result = 0;
290  const auto& chamber_ids = chamberIdsWire();
291  for (const auto& id : chamber_ids) {
292  if (nLayersWithWireInChamber(id) >= min_n_layers)
293  result += 1;
294  }
295  return result;
296 }

References mps_fire::result.

◆ nLayersWithComparatorInChamber()

int CSCDigiMatcher::nLayersWithComparatorInChamber ( unsigned int  detid) const

Definition at line 232 of file CSCDigiMatcher.cc.

232  {
233  int nLayers = 0;
234  CSCDetId chamberId(detid);
235  for (int i = 1; i <= 6; ++i) {
236  CSCDetId layerId(chamberId.endcap(), chamberId.station(), chamberId.ring(), chamberId.chamber(), i);
237  if (!comparatorDigisInDetId(layerId.rawId()).empty()) {
238  nLayers++;
239  }
240  }
241  return nLayers;
242 }

References CSCDetId::chamber(), std::empty(), CSCDetId::endcap(), mps_fire::i, MuonTCMETValueMapProducer_cff::nLayers, CSCDetId::ring(), and CSCDetId::station().

◆ nLayersWithStripInChamber()

int CSCDigiMatcher::nLayersWithStripInChamber ( unsigned int  detid) const

Definition at line 244 of file CSCDigiMatcher.cc.

244  {
245  int nLayers = 0;
246  CSCDetId chamberId(detid);
247  for (int i = 1; i <= 6; ++i) {
248  CSCDetId layerId(chamberId.endcap(), chamberId.station(), chamberId.ring(), chamberId.chamber(), i);
249  if (!stripDigisInDetId(layerId.rawId()).empty()) {
250  nLayers++;
251  }
252  }
253  return nLayers;
254 }

References CSCDetId::chamber(), std::empty(), CSCDetId::endcap(), mps_fire::i, MuonTCMETValueMapProducer_cff::nLayers, CSCDetId::ring(), and CSCDetId::station().

◆ nLayersWithWireInChamber()

int CSCDigiMatcher::nLayersWithWireInChamber ( unsigned int  detid) const

Definition at line 256 of file CSCDigiMatcher.cc.

256  {
257  int nLayers = 0;
258  CSCDetId chamberId(detid);
259  for (int i = 1; i <= 6; ++i) {
260  CSCDetId layerId(chamberId.endcap(), chamberId.station(), chamberId.ring(), chamberId.chamber(), i);
261  if (!wireDigisInDetId(layerId.rawId()).empty()) {
262  nLayers++;
263  }
264  }
265  return nLayers;
266 }

References CSCDetId::chamber(), std::empty(), CSCDetId::endcap(), mps_fire::i, MuonTCMETValueMapProducer_cff::nLayers, CSCDetId::ring(), and CSCDetId::station().

◆ selectDetIds()

template<class T >
std::set< unsigned int > CSCDigiMatcher::selectDetIds ( const T digis,
int  csc_type 
) const
private

Definition at line 131 of file CSCDigiMatcher.h.

131  {
132  std::set<unsigned int> result;
133  for (const auto& p : digis) {
134  const auto& id = p.first;
135  if (csc_type > 0) {
136  CSCDetId detId(id);
137  if (MuonHitHelper::toCSCType(detId.station(), detId.ring()) != csc_type)
138  continue;
139  }
140  result.insert(p.first);
141  }
142  return result;
143 }

References AlCaHLTBitMon_ParallelJobs::p, mps_fire::result, CSCDetId::ring(), CSCDetId::station(), and MuonHitHelper::toCSCType().

◆ stripDigisInChamber()

const CSCStripDigiContainer & CSCDigiMatcher::stripDigisInChamber ( unsigned int  detid) const

Definition at line 214 of file CSCDigiMatcher.cc.

214  {
215  if (chamber_to_strips_.find(detid) == chamber_to_strips_.end())
216  return no_strips_;
217  return chamber_to_strips_.at(detid);
218 }

◆ stripDigisInDetId()

const CSCStripDigiContainer & CSCDigiMatcher::stripDigisInDetId ( unsigned int  detid) const

Definition at line 208 of file CSCDigiMatcher.cc.

208  {
209  if (detid_to_strips_.find(detid) == detid_to_strips_.end())
210  return no_strips_;
211  return detid_to_strips_.at(detid);
212 }

◆ stripsInChamber()

std::set< int > CSCDigiMatcher::stripsInChamber ( unsigned int  detid,
int  max_gap_to_fill = 0 
) const

Definition at line 349 of file CSCDigiMatcher.cc.

349  {
350  set<int> result;
351  const auto& digis = stripDigisInChamber(detid);
352  for (const auto& d : digis) {
353  result.insert(d.getStrip());
354  }
355  if (max_gap_to_fill > 0) {
356  int prev = -111;
357  for (const auto& s : result) {
358  //cout<<"gap "<<s<<" - "<<prev<<" = "<<s - prev<<" added 0";
359  if (s - prev > 1 && s - prev - 1 <= max_gap_to_fill) {
360  //int sz = result.size();
361  for (int fill_s = prev + 1; fill_s < s; ++fill_s)
362  result.insert(fill_s);
363  //cout<<result.size() - sz;
364  }
365  //cout<<" elems"<<endl;
366  prev = s;
367  }
368  }
369 
370  return result;
371 }

References ztail::d, mps_fire::result, and alignCSCRings::s.

◆ stripsInDetId()

std::set< int > CSCDigiMatcher::stripsInDetId ( unsigned int  detid) const

Definition at line 307 of file CSCDigiMatcher.cc.

307  {
308  set<int> result;
309  const auto& digis = stripDigisInDetId(detid);
310  for (const auto& d : digis) {
311  result.insert(d.getStrip());
312  }
313  return result;
314 }

References ztail::d, and mps_fire::result.

◆ wireDigisInChamber()

const CSCWireDigiContainer & CSCDigiMatcher::wireDigisInChamber ( unsigned int  detid) const

Definition at line 226 of file CSCDigiMatcher.cc.

226  {
227  if (chamber_to_wires_.find(detid) == chamber_to_wires_.end())
228  return no_wires_;
229  return chamber_to_wires_.at(detid);
230 }

◆ wireDigisInDetId()

const CSCWireDigiContainer & CSCDigiMatcher::wireDigisInDetId ( unsigned int  detid) const

Definition at line 220 of file CSCDigiMatcher.cc.

220  {
221  if (detid_to_wires_.find(detid) == detid_to_wires_.end())
222  return no_wires_;
223  return detid_to_wires_.at(detid);
224 }

◆ wiregroupsInChamber()

std::set< int > CSCDigiMatcher::wiregroupsInChamber ( unsigned int  detid,
int  max_gap_to_fill = 0 
) const

Definition at line 373 of file CSCDigiMatcher.cc.

373  {
374  set<int> result;
375  const auto& digis = wireDigisInChamber(detid);
376  for (const auto& d : digis) {
377  result.insert(d.getWireGroup());
378  }
379  if (max_gap_to_fill > 0) {
380  int prev = -111;
381  for (const auto& w : result) {
382  if (w - prev > 1 && w - prev - 1 <= max_gap_to_fill) {
383  for (int fill_w = prev + 1; fill_w < w; ++fill_w)
384  result.insert(fill_w);
385  }
386  prev = w;
387  }
388  }
389  return result;
390 }

References ztail::d, mps_fire::result, and w.

◆ wiregroupsInDetId()

std::set< int > CSCDigiMatcher::wiregroupsInDetId ( unsigned int  detid) const

Definition at line 316 of file CSCDigiMatcher.cc.

316  {
317  set<int> result;
318  const auto& digis = wireDigisInDetId(detid);
319  for (const auto& d : digis) {
320  result.insert(d.getWireGroup());
321  }
322  return result;
323 }

References ztail::d, and mps_fire::result.

Member Data Documentation

◆ chamber_to_comparators_

std::map<unsigned int, CSCComparatorDigiContainer> CSCDigiMatcher::chamber_to_comparators_
private

Definition at line 117 of file CSCDigiMatcher.h.

◆ chamber_to_strips_

std::map<unsigned int, CSCStripDigiContainer> CSCDigiMatcher::chamber_to_strips_
private

Definition at line 120 of file CSCDigiMatcher.h.

◆ chamber_to_wires_

std::map<unsigned int, CSCWireDigiContainer> CSCDigiMatcher::chamber_to_wires_
private

Definition at line 123 of file CSCDigiMatcher.h.

◆ comparatorDigiInput_

edm::EDGetTokenT<CSCComparatorDigiCollection> CSCDigiMatcher::comparatorDigiInput_
private

Definition at line 94 of file CSCDigiMatcher.h.

◆ comparatorDigisH_

edm::Handle<CSCComparatorDigiCollection> CSCDigiMatcher::comparatorDigisH_
private

Definition at line 98 of file CSCDigiMatcher.h.

◆ detid_to_comparators_

std::map<unsigned int, CSCComparatorDigiContainer> CSCDigiMatcher::detid_to_comparators_
private

Definition at line 116 of file CSCDigiMatcher.h.

◆ detid_to_strips_

std::map<unsigned int, CSCStripDigiContainer> CSCDigiMatcher::detid_to_strips_
private

Definition at line 119 of file CSCDigiMatcher.h.

◆ detid_to_wires_

std::map<unsigned int, CSCWireDigiContainer> CSCDigiMatcher::detid_to_wires_
private

Definition at line 122 of file CSCDigiMatcher.h.

◆ matchDeltaComparator_

int CSCDigiMatcher::matchDeltaComparator_
private

Definition at line 108 of file CSCDigiMatcher.h.

◆ matchDeltaStrip_

int CSCDigiMatcher::matchDeltaStrip_
private

Definition at line 109 of file CSCDigiMatcher.h.

◆ matchDeltaWG_

int CSCDigiMatcher::matchDeltaWG_
private

Definition at line 110 of file CSCDigiMatcher.h.

◆ maxBXComparator_

int CSCDigiMatcher::maxBXComparator_
private

Definition at line 104 of file CSCDigiMatcher.h.

◆ maxBXStrip_

int CSCDigiMatcher::maxBXStrip_
private

Definition at line 105 of file CSCDigiMatcher.h.

◆ maxBXWire_

int CSCDigiMatcher::maxBXWire_
private

Definition at line 106 of file CSCDigiMatcher.h.

◆ minBXComparator_

int CSCDigiMatcher::minBXComparator_
private

Definition at line 104 of file CSCDigiMatcher.h.

◆ minBXStrip_

int CSCDigiMatcher::minBXStrip_
private

Definition at line 105 of file CSCDigiMatcher.h.

◆ minBXWire_

int CSCDigiMatcher::minBXWire_
private

Definition at line 106 of file CSCDigiMatcher.h.

◆ muonSimHitMatcher_

std::shared_ptr<CSCSimHitMatcher> CSCDigiMatcher::muonSimHitMatcher_
private

Definition at line 102 of file CSCDigiMatcher.h.

Referenced by muonSimHitMatcher().

◆ no_comparators_

CSCComparatorDigiContainer CSCDigiMatcher::no_comparators_
private

Definition at line 125 of file CSCDigiMatcher.h.

◆ no_strips_

CSCStripDigiContainer CSCDigiMatcher::no_strips_
private

Definition at line 126 of file CSCDigiMatcher.h.

◆ no_wires_

CSCWireDigiContainer CSCDigiMatcher::no_wires_
private

Definition at line 127 of file CSCDigiMatcher.h.

◆ stripDigiInput_

edm::EDGetTokenT<CSCStripDigiCollection> CSCDigiMatcher::stripDigiInput_
private

Definition at line 95 of file CSCDigiMatcher.h.

◆ stripDigisH_

edm::Handle<CSCStripDigiCollection> CSCDigiMatcher::stripDigisH_
private

Definition at line 99 of file CSCDigiMatcher.h.

◆ verboseComparator_

int CSCDigiMatcher::verboseComparator_
private

Definition at line 112 of file CSCDigiMatcher.h.

◆ verboseStrip_

int CSCDigiMatcher::verboseStrip_
private

Definition at line 113 of file CSCDigiMatcher.h.

◆ verboseWG_

int CSCDigiMatcher::verboseWG_
private

Definition at line 114 of file CSCDigiMatcher.h.

◆ wireDigiInput_

edm::EDGetTokenT<CSCWireDigiCollection> CSCDigiMatcher::wireDigiInput_
private

Definition at line 96 of file CSCDigiMatcher.h.

◆ wireDigisH_

edm::Handle<CSCWireDigiCollection> CSCDigiMatcher::wireDigisH_
private

Definition at line 100 of file CSCDigiMatcher.h.

CSCDigiMatcher::detid_to_strips_
std::map< unsigned int, CSCStripDigiContainer > detid_to_strips_
Definition: CSCDigiMatcher.h:119
CSCDigiMatcher::maxBXComparator_
int maxBXComparator_
Definition: CSCDigiMatcher.h:104
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
CSCDigiMatcher::detid_to_comparators_
std::map< unsigned int, CSCComparatorDigiContainer > detid_to_comparators_
Definition: CSCDigiMatcher.h:116
mps_fire.i
i
Definition: mps_fire.py:355
CSCDigiMatcher::verboseStrip_
int verboseStrip_
Definition: CSCDigiMatcher.h:113
CSCDigiMatcher::wireDigisInChamber
const CSCWireDigiContainer & wireDigisInChamber(unsigned int) const
Definition: CSCDigiMatcher.cc:226
CSCSimHitMatcher
Definition: CSCSimHitMatcher.h:14
edm::Handle::product
T const * product() const
Definition: Handle.h:70
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCDigiMatcher::chamber_to_strips_
std::map< unsigned int, CSCStripDigiContainer > chamber_to_strips_
Definition: CSCDigiMatcher.h:120
CSCDigiMatcher::no_comparators_
CSCComparatorDigiContainer no_comparators_
Definition: CSCDigiMatcher.h:125
DigiDM_cff.wires
wires
Definition: DigiDM_cff.py:33
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CSCStripDigiCollection
gather_cfg.cout
cout
Definition: gather_cfg.py:144
CSCDigiMatcher::minBXStrip_
int minBXStrip_
Definition: CSCDigiMatcher.h:105
CSCDigiMatcher::matchComparatorsToSimTrack
void matchComparatorsToSimTrack(const CSCComparatorDigiCollection &comparators)
Definition: CSCDigiMatcher.cc:57
CSCDigiMatcher::stripDigiInput_
edm::EDGetTokenT< CSCStripDigiCollection > stripDigiInput_
Definition: CSCDigiMatcher.h:95
CSCDigiMatcher::muonSimHitMatcher_
std::shared_ptr< CSCSimHitMatcher > muonSimHitMatcher_
Definition: CSCDigiMatcher.h:102
CSCDigiMatcher::detid_to_wires_
std::map< unsigned int, CSCWireDigiContainer > detid_to_wires_
Definition: CSCDigiMatcher.h:122
CSCDigiMatcher::minBXWire_
int minBXWire_
Definition: CSCDigiMatcher.h:106
findQualityFiles.v
v
Definition: findQualityFiles.py:179
CSCDigiMatcher::stripDigisH_
edm::Handle< CSCStripDigiCollection > stripDigisH_
Definition: CSCDigiMatcher.h:99
CSCDigiMatcher::wireDigisInDetId
const CSCWireDigiContainer & wireDigisInDetId(unsigned int) const
Definition: CSCDigiMatcher.cc:220
CSCDigiMatcher::maxBXStrip_
int maxBXStrip_
Definition: CSCDigiMatcher.h:105
CSCDigiMatcher::chamberIdsStrip
std::set< unsigned int > chamberIdsStrip(int csc_type=MuonHitHelper::CSC_ALL) const
Definition: CSCDigiMatcher.cc:188
CSCDigiMatcher::matchDeltaWG_
int matchDeltaWG_
Definition: CSCDigiMatcher.h:110
CSCDigiMatcher::chamberIdsWire
std::set< unsigned int > chamberIdsWire(int csc_type=MuonHitHelper::CSC_ALL) const
Definition: CSCDigiMatcher.cc:192
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CSCDigiMatcher::nLayersWithStripInChamber
int nLayersWithStripInChamber(unsigned int) const
Definition: CSCDigiMatcher.cc:244
CSCDigiMatcher::verboseComparator_
int verboseComparator_
Definition: CSCDigiMatcher.h:112
CSCDigiMatcher::nLayersWithWireInChamber
int nLayersWithWireInChamber(unsigned int) const
Definition: CSCDigiMatcher.cc:256
CSCDigiMatcher::comparatorDigisH_
edm::Handle< CSCComparatorDigiCollection > comparatorDigisH_
Definition: CSCDigiMatcher.h:98
w
const double w
Definition: UKUtility.cc:23
CSCDigiMatcher::chamber_to_wires_
std::map< unsigned int, CSCWireDigiContainer > chamber_to_wires_
Definition: CSCDigiMatcher.h:123
CSCDigiMatcher::verboseWG_
int verboseWG_
Definition: CSCDigiMatcher.h:114
CSCDigiMatcher::stripDigisInDetId
const CSCStripDigiContainer & stripDigisInDetId(unsigned int) const
Definition: CSCDigiMatcher.cc:208
CSCDigiMatcher::chamber_to_comparators_
std::map< unsigned int, CSCComparatorDigiContainer > chamber_to_comparators_
Definition: CSCDigiMatcher.h:117
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
OrderedSet.t
t
Definition: OrderedSet.py:90
MuonTCMETValueMapProducer_cff.nLayers
nLayers
Definition: MuonTCMETValueMapProducer_cff.py:38
CSCDigiMatcher::selectDetIds
std::set< unsigned int > selectDetIds(const T &digis, int csc_type) const
Definition: CSCDigiMatcher.h:131
CSCDigiMatcher::stripDigisInChamber
const CSCStripDigiContainer & stripDigisInChamber(unsigned int) const
Definition: CSCDigiMatcher.cc:214
CSCDigiMatcher::minBXComparator_
int minBXComparator_
Definition: CSCDigiMatcher.h:104
CSCDigiMatcher::matchWiresToSimTrack
void matchWiresToSimTrack(const CSCWireDigiCollection &wires)
Definition: CSCDigiMatcher.cc:141
CSCDetId
Definition: CSCDetId.h:26
iEvent
int iEvent
Definition: GenABIO.cc:224
CSCDigiMatcher::wireDigiInput_
edm::EDGetTokenT< CSCWireDigiCollection > wireDigiInput_
Definition: CSCDigiMatcher.h:96
CSCDigiMatcher::wireDigisH_
edm::Handle< CSCWireDigiCollection > wireDigisH_
Definition: CSCDigiMatcher.h:100
CSCDigiMatcher::comparatorDigisInDetId
const CSCComparatorDigiContainer & comparatorDigisInDetId(unsigned int) const
Definition: CSCDigiMatcher.cc:196
CSCDigiMatcher::comparatorDigiInput_
edm::EDGetTokenT< CSCComparatorDigiCollection > comparatorDigiInput_
Definition: CSCDigiMatcher.h:94
CSCComparatorDigiCollection
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
CSCDigiMatcher::comparatorDigisInChamber
const CSCComparatorDigiContainer & comparatorDigisInChamber(unsigned int) const
Definition: CSCDigiMatcher.cc:202
eostools.move
def move(src, dest)
Definition: eostools.py:511
CSCWireDigiCollection
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
CSCDigiMatcher::no_wires_
CSCWireDigiContainer no_wires_
Definition: CSCDigiMatcher.h:127
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
CSCDigiMatcher::matchStripsToSimTrack
void matchStripsToSimTrack(const CSCStripDigiCollection &strips)
Definition: CSCDigiMatcher.cc:101
CSCDigiMatcher::matchDeltaComparator_
int matchDeltaComparator_
Definition: CSCDigiMatcher.h:108
ztail.d
d
Definition: ztail.py:151
mps_fire.result
result
Definition: mps_fire.py:303
CSCDigiMatcher::nLayersWithComparatorInChamber
int nLayersWithComparatorInChamber(unsigned int) const
Definition: CSCDigiMatcher.cc:232
CSCDigiMatcher::maxBXWire_
int maxBXWire_
Definition: CSCDigiMatcher.h:106
MuonHitHelper::toCSCType
static int toCSCType(int st, int ri)
Definition: MuonHitHelper.cc:195
CSCDigiMatcher::no_strips_
CSCStripDigiContainer no_strips_
Definition: CSCDigiMatcher.h:126
edm::InputTag
Definition: InputTag.h:15
DigiDM_cff.strips
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers....
Definition: DigiDM_cff.py:32
CSCDigiMatcher::chamberIdsComparator
std::set< unsigned int > chamberIdsComparator(int csc_type=MuonHitHelper::CSC_ALL) const
Definition: CSCDigiMatcher.cc:184
CSCDigiMatcher::matchDeltaStrip_
int matchDeltaStrip_
Definition: CSCDigiMatcher.h:109
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27