CMS 3D CMS Logo

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 clear ()
 
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 179 of file CSCDigiMatcher.cc.

179  {
180  return selectDetIds(chamber_to_comparators_, csc_type);
181 }

◆ chamberIdsStrip()

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

Definition at line 183 of file CSCDigiMatcher.cc.

183  {
184  return selectDetIds(chamber_to_strips_, csc_type);
185 }

◆ chamberIdsWire()

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

Definition at line 187 of file CSCDigiMatcher.cc.

187  {
188  return selectDetIds(chamber_to_wires_, csc_type);
189 }

◆ clear()

void CSCDigiMatcher::clear ( void  )
private

Definition at line 379 of file CSCDigiMatcher.cc.

379  {
380  detid_to_comparators_.clear();
381  chamber_to_comparators_.clear();
382 
383  detid_to_strips_.clear();
384  chamber_to_strips_.clear();
385 
386  detid_to_wires_.clear();
387  chamber_to_wires_.clear();
388 }

◆ comparatorDigisInChamber()

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

Definition at line 197 of file CSCDigiMatcher.cc.

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

◆ comparatorDigisInDetId()

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

Definition at line 191 of file CSCDigiMatcher.cc.

191  {
192  if (detid_to_comparators_.find(detid) == detid_to_comparators_.end())
193  return no_comparators_;
194  return detid_to_comparators_.at(detid);
195 }

◆ comparatorsInChamber()

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

Definition at line 320 of file CSCDigiMatcher.cc.

320  {
321  set<int> result;
322  const auto& digis = comparatorDigisInChamber(detid);
323  for (const auto& d : digis) {
324  result.insert(d.getStrip());
325  }
326  if (max_gap_to_fill > 0) {
327  int prev = -111;
328  for (const auto& s : result) {
329  if (s - prev > 1 && s - prev - 1 <= max_gap_to_fill) {
330  for (int fill_s = prev + 1; fill_s < s; ++fill_s)
331  result.insert(fill_s);
332  }
333  prev = s;
334  }
335  }
336 
337  return result;
338 }

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

◆ comparatorsInDetId()

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

Definition at line 293 of file CSCDigiMatcher.cc.

293  {
294  set<int> result;
295  const auto& digis = comparatorDigisInDetId(detid);
296  for (const auto& d : digis) {
297  result.insert(d.getHalfStrip());
298  }
299  return result;
300 }

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

◆ detIdsComparator()

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

Definition at line 167 of file CSCDigiMatcher.cc.

167  {
168  return selectDetIds(detid_to_comparators_, csc_type);
169 }

◆ detIdsStrip()

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

Definition at line 171 of file CSCDigiMatcher.cc.

171  {
172  return selectDetIds(detid_to_strips_, csc_type);
173 }

◆ detIdsWire()

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

Definition at line 175 of file CSCDigiMatcher.cc.

175  {
176  return selectDetIds(detid_to_wires_, csc_type);
177 }

◆ 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  clear();
52 
53  // now match the digis
54  matchComparatorsToSimTrack(comparators);
57 }

References clear(), DigiDM_cff::strips, submitPVValidationJobs::t, findQualityFiles::v, and DigiDM_cff::wires.

◆ matchComparatorsToSimTrack()

void CSCDigiMatcher::matchComparatorsToSimTrack ( const CSCComparatorDigiCollection comparators)
private

Definition at line 59 of file CSCDigiMatcher.cc.

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

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

◆ matchStripsToSimTrack()

void CSCDigiMatcher::matchStripsToSimTrack ( const CSCStripDigiCollection strips)
private

Definition at line 93 of file CSCDigiMatcher.cc.

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

References 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 133 of file CSCDigiMatcher.cc.

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

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 263 of file CSCDigiMatcher.cc.

263  {
264  int result = 0;
265  const auto& chamber_ids = chamberIdsComparator();
266  for (const auto& id : chamber_ids) {
267  if (nLayersWithComparatorInChamber(id) >= min_n_layers)
268  result += 1;
269  }
270  return result;
271 }

References mps_fire::result.

◆ nCoincidenceStripChambers()

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

Definition at line 273 of file CSCDigiMatcher.cc.

273  {
274  int result = 0;
275  const auto& chamber_ids = chamberIdsStrip();
276  for (const auto& id : chamber_ids) {
277  if (nLayersWithStripInChamber(id) >= min_n_layers)
278  result += 1;
279  }
280  return result;
281 }

References mps_fire::result.

◆ nCoincidenceWireChambers()

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

Definition at line 283 of file CSCDigiMatcher.cc.

283  {
284  int result = 0;
285  const auto& chamber_ids = chamberIdsWire();
286  for (const auto& id : chamber_ids) {
287  if (nLayersWithWireInChamber(id) >= min_n_layers)
288  result += 1;
289  }
290  return result;
291 }

References mps_fire::result.

◆ nLayersWithComparatorInChamber()

int CSCDigiMatcher::nLayersWithComparatorInChamber ( unsigned int  detid) const

Definition at line 227 of file CSCDigiMatcher.cc.

227  {
228  int nLayers = 0;
229  CSCDetId chamberId(detid);
230  for (int i = 1; i <= 6; ++i) {
231  CSCDetId layerId(chamberId.endcap(), chamberId.station(), chamberId.ring(), chamberId.chamber(), i);
232  if (!comparatorDigisInDetId(layerId.rawId()).empty()) {
233  nLayers++;
234  }
235  }
236  return nLayers;
237 }

References CSCDetId::chamber(), relativeConstraints::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 239 of file CSCDigiMatcher.cc.

239  {
240  int nLayers = 0;
241  CSCDetId chamberId(detid);
242  for (int i = 1; i <= 6; ++i) {
243  CSCDetId layerId(chamberId.endcap(), chamberId.station(), chamberId.ring(), chamberId.chamber(), i);
244  if (!stripDigisInDetId(layerId.rawId()).empty()) {
245  nLayers++;
246  }
247  }
248  return nLayers;
249 }

References CSCDetId::chamber(), relativeConstraints::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 251 of file CSCDigiMatcher.cc.

251  {
252  int nLayers = 0;
253  CSCDetId chamberId(detid);
254  for (int i = 1; i <= 6; ++i) {
255  CSCDetId layerId(chamberId.endcap(), chamberId.station(), chamberId.ring(), chamberId.chamber(), i);
256  if (!wireDigisInDetId(layerId.rawId()).empty()) {
257  nLayers++;
258  }
259  }
260  return nLayers;
261 }

References CSCDetId::chamber(), relativeConstraints::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 133 of file CSCDigiMatcher.h.

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

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 209 of file CSCDigiMatcher.cc.

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

◆ stripDigisInDetId()

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

Definition at line 203 of file CSCDigiMatcher.cc.

203  {
204  if (detid_to_strips_.find(detid) == detid_to_strips_.end())
205  return no_strips_;
206  return detid_to_strips_.at(detid);
207 }

◆ stripsInChamber()

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

Definition at line 340 of file CSCDigiMatcher.cc.

340  {
341  set<int> result;
342  const auto& digis = stripDigisInChamber(detid);
343  for (const auto& d : digis) {
344  result.insert(d.getStrip());
345  }
346  if (max_gap_to_fill > 0) {
347  int prev = -111;
348  for (const auto& s : result) {
349  if (s - prev > 1 && s - prev - 1 <= max_gap_to_fill) {
350  for (int fill_s = prev + 1; fill_s < s; ++fill_s)
351  result.insert(fill_s);
352  }
353  prev = s;
354  }
355  }
356 
357  return result;
358 }

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

◆ stripsInDetId()

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

Definition at line 302 of file CSCDigiMatcher.cc.

302  {
303  set<int> result;
304  const auto& digis = stripDigisInDetId(detid);
305  for (const auto& d : digis) {
306  result.insert(d.getStrip());
307  }
308  return result;
309 }

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

◆ wireDigisInChamber()

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

Definition at line 221 of file CSCDigiMatcher.cc.

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

◆ wireDigisInDetId()

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

Definition at line 215 of file CSCDigiMatcher.cc.

215  {
216  if (detid_to_wires_.find(detid) == detid_to_wires_.end())
217  return no_wires_;
218  return detid_to_wires_.at(detid);
219 }

◆ wiregroupsInChamber()

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

Definition at line 360 of file CSCDigiMatcher.cc.

360  {
361  set<int> result;
362  const auto& digis = wireDigisInChamber(detid);
363  for (const auto& d : digis) {
364  result.insert(d.getWireGroup());
365  }
366  if (max_gap_to_fill > 0) {
367  int prev = -111;
368  for (const auto& w : result) {
369  if (w - prev > 1 && w - prev - 1 <= max_gap_to_fill) {
370  for (int fill_w = prev + 1; fill_w < w; ++fill_w)
371  result.insert(fill_w);
372  }
373  prev = w;
374  }
375  }
376  return result;
377 }

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

◆ wiregroupsInDetId()

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

Definition at line 311 of file CSCDigiMatcher.cc.

311  {
312  set<int> result;
313  const auto& digis = wireDigisInDetId(detid);
314  for (const auto& d : digis) {
315  result.insert(d.getWireGroup());
316  }
317  return result;
318 }

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 119 of file CSCDigiMatcher.h.

◆ chamber_to_strips_

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

Definition at line 122 of file CSCDigiMatcher.h.

◆ chamber_to_wires_

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

Definition at line 125 of file CSCDigiMatcher.h.

◆ comparatorDigiInput_

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

Definition at line 96 of file CSCDigiMatcher.h.

◆ comparatorDigisH_

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

Definition at line 100 of file CSCDigiMatcher.h.

◆ detid_to_comparators_

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

Definition at line 118 of file CSCDigiMatcher.h.

◆ detid_to_strips_

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

Definition at line 121 of file CSCDigiMatcher.h.

◆ detid_to_wires_

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

Definition at line 124 of file CSCDigiMatcher.h.

◆ matchDeltaComparator_

int CSCDigiMatcher::matchDeltaComparator_
private

Definition at line 110 of file CSCDigiMatcher.h.

◆ matchDeltaStrip_

int CSCDigiMatcher::matchDeltaStrip_
private

Definition at line 111 of file CSCDigiMatcher.h.

◆ matchDeltaWG_

int CSCDigiMatcher::matchDeltaWG_
private

Definition at line 112 of file CSCDigiMatcher.h.

◆ maxBXComparator_

int CSCDigiMatcher::maxBXComparator_
private

Definition at line 106 of file CSCDigiMatcher.h.

◆ maxBXStrip_

int CSCDigiMatcher::maxBXStrip_
private

Definition at line 107 of file CSCDigiMatcher.h.

◆ maxBXWire_

int CSCDigiMatcher::maxBXWire_
private

Definition at line 108 of file CSCDigiMatcher.h.

◆ minBXComparator_

int CSCDigiMatcher::minBXComparator_
private

Definition at line 106 of file CSCDigiMatcher.h.

◆ minBXStrip_

int CSCDigiMatcher::minBXStrip_
private

Definition at line 107 of file CSCDigiMatcher.h.

◆ minBXWire_

int CSCDigiMatcher::minBXWire_
private

Definition at line 108 of file CSCDigiMatcher.h.

◆ muonSimHitMatcher_

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

Definition at line 104 of file CSCDigiMatcher.h.

Referenced by muonSimHitMatcher().

◆ no_comparators_

CSCComparatorDigiContainer CSCDigiMatcher::no_comparators_
private

Definition at line 127 of file CSCDigiMatcher.h.

◆ no_strips_

CSCStripDigiContainer CSCDigiMatcher::no_strips_
private

Definition at line 128 of file CSCDigiMatcher.h.

◆ no_wires_

CSCWireDigiContainer CSCDigiMatcher::no_wires_
private

Definition at line 129 of file CSCDigiMatcher.h.

◆ stripDigiInput_

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

Definition at line 97 of file CSCDigiMatcher.h.

◆ stripDigisH_

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

Definition at line 101 of file CSCDigiMatcher.h.

◆ verboseComparator_

int CSCDigiMatcher::verboseComparator_
private

Definition at line 114 of file CSCDigiMatcher.h.

◆ verboseStrip_

int CSCDigiMatcher::verboseStrip_
private

Definition at line 115 of file CSCDigiMatcher.h.

◆ verboseWG_

int CSCDigiMatcher::verboseWG_
private

Definition at line 116 of file CSCDigiMatcher.h.

◆ wireDigiInput_

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

Definition at line 98 of file CSCDigiMatcher.h.

◆ wireDigisH_

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

Definition at line 102 of file CSCDigiMatcher.h.

CSCDigiMatcher::detid_to_strips_
std::map< unsigned int, CSCStripDigiContainer > detid_to_strips_
Definition: CSCDigiMatcher.h:121
CSCDigiMatcher::maxBXComparator_
int maxBXComparator_
Definition: CSCDigiMatcher.h:106
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
CSCDigiMatcher::detid_to_comparators_
std::map< unsigned int, CSCComparatorDigiContainer > detid_to_comparators_
Definition: CSCDigiMatcher.h:118
mps_fire.i
i
Definition: mps_fire.py:428
CSCDigiMatcher::verboseStrip_
int verboseStrip_
Definition: CSCDigiMatcher.h:115
CSCDigiMatcher::wireDigisInChamber
const CSCWireDigiContainer & wireDigisInChamber(unsigned int) const
Definition: CSCDigiMatcher.cc:221
CSCSimHitMatcher
Definition: CSCSimHitMatcher.h:16
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:122
CSCDigiMatcher::no_comparators_
CSCComparatorDigiContainer no_comparators_
Definition: CSCDigiMatcher.h:127
DigiDM_cff.wires
wires
Definition: DigiDM_cff.py:33
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
CSCDigiMatcher::clear
void clear()
Definition: CSCDigiMatcher.cc:379
CSCStripDigiCollection
gather_cfg.cout
cout
Definition: gather_cfg.py:144
CSCDigiMatcher::minBXStrip_
int minBXStrip_
Definition: CSCDigiMatcher.h:107
CSCDigiMatcher::matchComparatorsToSimTrack
void matchComparatorsToSimTrack(const CSCComparatorDigiCollection &comparators)
Definition: CSCDigiMatcher.cc:59
CSCDigiMatcher::stripDigiInput_
edm::EDGetTokenT< CSCStripDigiCollection > stripDigiInput_
Definition: CSCDigiMatcher.h:97
CSCDigiMatcher::muonSimHitMatcher_
std::shared_ptr< CSCSimHitMatcher > muonSimHitMatcher_
Definition: CSCDigiMatcher.h:104
CSCDigiMatcher::detid_to_wires_
std::map< unsigned int, CSCWireDigiContainer > detid_to_wires_
Definition: CSCDigiMatcher.h:124
CSCDigiMatcher::minBXWire_
int minBXWire_
Definition: CSCDigiMatcher.h:108
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
findQualityFiles.v
v
Definition: findQualityFiles.py:179
CSCDigiMatcher::stripDigisH_
edm::Handle< CSCStripDigiCollection > stripDigisH_
Definition: CSCDigiMatcher.h:101
CSCDigiMatcher::wireDigisInDetId
const CSCWireDigiContainer & wireDigisInDetId(unsigned int) const
Definition: CSCDigiMatcher.cc:215
CSCDigiMatcher::maxBXStrip_
int maxBXStrip_
Definition: CSCDigiMatcher.h:107
CSCDigiMatcher::chamberIdsStrip
std::set< unsigned int > chamberIdsStrip(int csc_type=MuonHitHelper::CSC_ALL) const
Definition: CSCDigiMatcher.cc:183
CSCDigiMatcher::matchDeltaWG_
int matchDeltaWG_
Definition: CSCDigiMatcher.h:112
CSCDigiMatcher::chamberIdsWire
std::set< unsigned int > chamberIdsWire(int csc_type=MuonHitHelper::CSC_ALL) const
Definition: CSCDigiMatcher.cc:187
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CSCDigiMatcher::nLayersWithStripInChamber
int nLayersWithStripInChamber(unsigned int) const
Definition: CSCDigiMatcher.cc:239
CSCDigiMatcher::verboseComparator_
int verboseComparator_
Definition: CSCDigiMatcher.h:114
CSCDigiMatcher::nLayersWithWireInChamber
int nLayersWithWireInChamber(unsigned int) const
Definition: CSCDigiMatcher.cc:251
CSCDigiMatcher::comparatorDigisH_
edm::Handle< CSCComparatorDigiCollection > comparatorDigisH_
Definition: CSCDigiMatcher.h:100
w
const double w
Definition: UKUtility.cc:23
CSCDigiMatcher::chamber_to_wires_
std::map< unsigned int, CSCWireDigiContainer > chamber_to_wires_
Definition: CSCDigiMatcher.h:125
CSCDigiMatcher::verboseWG_
int verboseWG_
Definition: CSCDigiMatcher.h:116
CSCDigiMatcher::stripDigisInDetId
const CSCStripDigiContainer & stripDigisInDetId(unsigned int) const
Definition: CSCDigiMatcher.cc:203
CSCDigiMatcher::chamber_to_comparators_
std::map< unsigned int, CSCComparatorDigiContainer > chamber_to_comparators_
Definition: CSCDigiMatcher.h:119
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
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:133
CSCDigiMatcher::stripDigisInChamber
const CSCStripDigiContainer & stripDigisInChamber(unsigned int) const
Definition: CSCDigiMatcher.cc:209
CSCDigiMatcher::minBXComparator_
int minBXComparator_
Definition: CSCDigiMatcher.h:106
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CSCDigiMatcher::matchWiresToSimTrack
void matchWiresToSimTrack(const CSCWireDigiCollection &wires)
Definition: CSCDigiMatcher.cc:133
CSCDetId
Definition: CSCDetId.h:26
iEvent
int iEvent
Definition: GenABIO.cc:224
CSCDigiMatcher::wireDigiInput_
edm::EDGetTokenT< CSCWireDigiCollection > wireDigiInput_
Definition: CSCDigiMatcher.h:98
CSCDigiMatcher::wireDigisH_
edm::Handle< CSCWireDigiCollection > wireDigisH_
Definition: CSCDigiMatcher.h:102
CSCDigiMatcher::comparatorDigisInDetId
const CSCComparatorDigiContainer & comparatorDigisInDetId(unsigned int) const
Definition: CSCDigiMatcher.cc:191
CSCDigiMatcher::comparatorDigiInput_
edm::EDGetTokenT< CSCComparatorDigiCollection > comparatorDigiInput_
Definition: CSCDigiMatcher.h:96
CSCComparatorDigiCollection
CSCDigiMatcher::comparatorDigisInChamber
const CSCComparatorDigiContainer & comparatorDigisInChamber(unsigned int) const
Definition: CSCDigiMatcher.cc:197
eostools.move
def move(src, dest)
Definition: eostools.py:511
CSCWireDigiCollection
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
CSCDigiMatcher::no_wires_
CSCWireDigiContainer no_wires_
Definition: CSCDigiMatcher.h:129
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:93
CSCDigiMatcher::matchDeltaComparator_
int matchDeltaComparator_
Definition: CSCDigiMatcher.h:110
ztail.d
d
Definition: ztail.py:151
mps_fire.result
result
Definition: mps_fire.py:311
CSCDigiMatcher::nLayersWithComparatorInChamber
int nLayersWithComparatorInChamber(unsigned int) const
Definition: CSCDigiMatcher.cc:227
CSCDigiMatcher::maxBXWire_
int maxBXWire_
Definition: CSCDigiMatcher.h:108
MuonHitHelper::toCSCType
static int toCSCType(int st, int ri)
Definition: MuonHitHelper.cc:195
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
CSCDigiMatcher::no_strips_
CSCStripDigiContainer no_strips_
Definition: CSCDigiMatcher.h:128
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:179
CSCDigiMatcher::matchDeltaStrip_
int matchDeltaStrip_
Definition: CSCDigiMatcher.h:111
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27