CMS 3D CMS Logo

PseudoBayesGrouping.cc
Go to the documentation of this file.
1 #include <memory>
2 
6 
7 #include "TFile.h"
8 
10 
11 using namespace edm;
12 using namespace std;
13 using namespace cmsdt;
14 using namespace dtbayesam;
15 // ============================================================================
16 // Constructors and destructor
17 // ============================================================================
19  : MotherGrouping(pset, iC) {
20  // Obtention of parameters
21  debug_ = pset.getUntrackedParameter<bool>("debug");
22  pattern_filename_ = pset.getUntrackedParameter<edm::FileInPath>("pattern_filename").fullPath();
23  minNLayerHits_ = pset.getUntrackedParameter<int>("minNLayerHits");
24  minSingleSLHitsMax_ = pset.getUntrackedParameter<int>("minSingleSLHitsMax");
25  minSingleSLHitsMin_ = pset.getUntrackedParameter<int>("minSingleSLHitsMin");
26  allowedVariance_ = pset.getUntrackedParameter<int>("allowedVariance");
27  allowDuplicates_ = pset.getUntrackedParameter<bool>("allowDuplicates");
28  allowUncorrelatedPatterns_ = pset.getUntrackedParameter<bool>("allowUncorrelatedPatterns");
29  minUncorrelatedHits_ = pset.getUntrackedParameter<int>("minUncorrelatedHits");
30  saveOnPlace_ = pset.getUntrackedParameter<bool>("saveOnPlace");
31  setLateralities_ = pset.getUntrackedParameter<bool>("setLateralities");
32  if (debug_)
33  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping:: constructor";
34 }
35 
37  if (debug_)
38  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping:: destructor";
39  for (std::vector<DTPattern*>::iterator pat_it = allPatterns_.begin(); pat_it != allPatterns_.end(); pat_it++) {
40  delete (*pat_it);
41  }
42 }
43 
44 // ============================================================================
45 // Main methods (initialise, run, finish)
46 // ============================================================================
48  if (debug_)
49  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping::initialiase";
50  if (debug_)
51  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping::initialiase using patterns file " << pattern_filename_;
52  nPatterns_ = 0;
53  //Load patterns from pattern root file with expected hits information
54  TFile* f = TFile::Open(TString(pattern_filename_), "READ");
55  std::vector<std::vector<std::vector<int>>>* pattern_reader =
56  (std::vector<std::vector<std::vector<int>>>*)f->Get("allPatterns");
57  for (std::vector<std::vector<std::vector<int>>>::iterator itPattern = (*pattern_reader).begin();
58  itPattern != (*pattern_reader).end();
59  ++itPattern) {
60  //Loops over all patterns in the loop and constructs the Pattern object for each one
61  LoadPattern(itPattern);
62  }
63  if (debug_)
64  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping::initialiase Total number of loaded patterns: "
65  << nPatterns_;
66  f->Close();
67  delete f;
68 
69  prelimMatches_ = std::make_unique<CandidateGroupPtrs>();
70  allMatches_ = std::make_unique<CandidateGroupPtrs>();
71  finalMatches_ = std::make_unique<CandidateGroupPtrs>();
72 }
73 
74 void PseudoBayesGrouping::LoadPattern(std::vector<std::vector<std::vector<int>>>::iterator itPattern) {
75  if (debug_)
76  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping::LoadPattern Loading patterns seeded by: "
77  << itPattern->at(0).at(0) << ", " << itPattern->at(0).at(1) << ", "
78  << itPattern->at(0).at(2) << ", ";
79 
80  DTPattern p;
81  // for (auto itHits = itPattern->begin(); itHits != itPattern->end(); ++itHits) {
82  bool is_seed = true;
83  for (const auto& itHits : *itPattern) {
84  //First entry is the seeding information
85  if (is_seed) {
86  p = DTPattern(itHits.at(0), itHits.at(1), itHits.at(2));
87  is_seed = false;
88  }
89  //Other entries are the hits information
90  else {
91  if (itHits.begin() == itHits.end())
92  continue;
93  //We need to correct the geometry from pattern generation to reconstruction as they use slightly displaced basis
94  else if (itHits.at(0) % 2 == 0) {
95  p.addHit(std::make_tuple(itHits.at(0), itHits.at(1), itHits.at(2)));
96  } else if (itHits.at(0) % 2 == 1) {
97  p.addHit(std::make_tuple(itHits.at(0), itHits.at(1) - 1, itHits.at(2)));
98  }
99  }
100  }
101  //Classified by seeding layers for optimized search later
102  //TODO::This can be vastly improved using std::bitset<8>, for example
103  if (p.sl1() == 0) {
104  if (p.sl2() == 7)
105  L0L7Patterns_.push_back(&p);
106  if (p.sl2() == 6)
107  L0L6Patterns_.push_back(&p);
108  if (p.sl2() == 5)
109  L0L5Patterns_.push_back(&p);
110  if (p.sl2() == 4)
111  L0L4Patterns_.push_back(&p);
112  if (p.sl2() == 3)
113  L0L3Patterns_.push_back(&p);
114  if (p.sl2() == 2)
115  L0L2Patterns_.push_back(&p);
116  if (p.sl2() == 1)
117  L0L1Patterns_.push_back(&p);
118  }
119  if (p.sl1() == 1) {
120  if (p.sl2() == 7)
121  L1L7Patterns_.push_back(&p);
122  if (p.sl2() == 6)
123  L1L6Patterns_.push_back(&p);
124  if (p.sl2() == 5)
125  L1L5Patterns_.push_back(&p);
126  if (p.sl2() == 4)
127  L1L4Patterns_.push_back(&p);
128  if (p.sl2() == 3)
129  L1L3Patterns_.push_back(&p);
130  if (p.sl2() == 2)
131  L1L2Patterns_.push_back(&p);
132  }
133  if (p.sl1() == 2) {
134  if (p.sl2() == 7)
135  L2L7Patterns_.push_back(&p);
136  if (p.sl2() == 6)
137  L2L6Patterns_.push_back(&p);
138  if (p.sl2() == 5)
139  L2L5Patterns_.push_back(&p);
140  if (p.sl2() == 4)
141  L2L4Patterns_.push_back(&p);
142  if (p.sl2() == 3)
143  L2L3Patterns_.push_back(&p);
144  }
145  if (p.sl1() == 3) {
146  if (p.sl2() == 7)
147  L3L7Patterns_.push_back(&p);
148  if (p.sl2() == 6)
149  L3L6Patterns_.push_back(&p);
150  if (p.sl2() == 5)
151  L3L5Patterns_.push_back(&p);
152  if (p.sl2() == 4)
153  L3L4Patterns_.push_back(&p);
154  }
155 
156  if (p.sl1() == 4) {
157  if (p.sl2() == 7)
158  L4L7Patterns_.push_back(&p);
159  if (p.sl2() == 6)
160  L4L6Patterns_.push_back(&p);
161  if (p.sl2() == 5)
162  L4L5Patterns_.push_back(&p);
163  }
164  if (p.sl1() == 5) {
165  if (p.sl2() == 7)
166  L5L7Patterns_.push_back(&p);
167  if (p.sl2() == 6)
168  L5L6Patterns_.push_back(&p);
169  }
170  if (p.sl1() == 6) {
171  if (p.sl2() == 7)
172  L6L7Patterns_.push_back(&p);
173  }
174  //Also creating a list of all patterns, needed later for deleting and avoid a memory leak
175  allPatterns_.push_back(&p);
176  nPatterns_++;
177 }
178 
180  const EventSetup& iEventSetup,
181  const DTDigiCollection& digis,
182  MuonPathPtrs& mpaths) {
183  //Takes dt digis collection and does the grouping for correlated hits, it is saved in a vector of up to 8 (or 4) correlated hits
184  if (debug_)
185  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping::run";
186  //Do initial cleaning
188  //Sort digis by layer
189  FillDigisByLayer(&digis);
190  //Sarch for patterns
192  //Now sort patterns by qualities
193  std::sort(prelimMatches_->begin(), prelimMatches_->end(), CandPointGreat());
194  if (debug_ && !prelimMatches_->empty()) {
195  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping::run Pattern qualities before cleaning: ";
196  for (const auto& cand_it : *prelimMatches_) {
197  LogDebug("PseudoBayesGrouping") << cand_it->nLayerhits() << ", " << cand_it->nisGood() << ", " << cand_it->nhits()
198  << ", " << cand_it->quality() << ", " << cand_it->candId();
199  }
200  }
201  //And ghostbust patterns to retain higher quality ones
203  if (debug_)
204  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping::run Number of found patterns: " << finalMatches_->size();
205 
206  //Last organize candidates information into muonpaths to finalize the grouping
207  FillMuonPaths(mpaths);
208  if (debug_)
209  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping::run ended run";
210 }
211 
213  //Loop over all selected candidates
214  for (auto itCand = finalMatches_->begin(); itCand != finalMatches_->end(); itCand++) {
215  if (debug_)
216  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping::run Create pointers ";
217  DTPrimitivePtrs ptrPrimitive;
218  for (int i = 0; i < 8; i++)
219  ptrPrimitive.push_back(std::make_shared<DTPrimitive>());
220 
221  qualitybits qualityDTP;
222  int intHit = 0;
223  //And for each candidate loop over all grouped hits
224  for (auto& itDTP : (*itCand)->candHits()) {
225  if (debug_)
226  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping::run loop over dt hits to fill pointer";
227 
228  int layerHit = (*itDTP).layerId();
229  //Back to the usual basis for SL
230  if (layerHit >= 4) {
231  (*itDTP).setLayerId(layerHit - 4);
232  }
233  qualitybits ref8Hit(std::pow(2, layerHit));
234  //Get the predicted laterality
235  if (setLateralities_) {
236  int predLat = (*itCand)->pattern()->latHitIn(layerHit, (*itDTP).channelId(), allowedVariance_);
237  if (predLat == -10 || predLat == 0) {
238  (*itDTP).setLaterality(NONE);
239  } else if (predLat == -1) {
240  (*itDTP).setLaterality(LEFT);
241  } else if (predLat == +1) {
242  (*itDTP).setLaterality(RIGHT);
243  }
244  }
245  //Only fill the DT primitives pointer if there is not one hit already in the layer
246  if (qualityDTP != (qualityDTP | ref8Hit)) {
247  if (debug_)
248  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping::run Adding hit to muon path";
249  qualityDTP = (qualityDTP | ref8Hit);
250  if (saveOnPlace_) {
251  //This will save the primitive in a place of the vector equal to its L position
252  ptrPrimitive.at(layerHit) = std::make_shared<DTPrimitive>((*itDTP));
253  }
254  if (!saveOnPlace_) {
255  //This will save the primitive in order
256  intHit++;
257  ptrPrimitive.at(intHit) = std::make_shared<DTPrimitive>((*itDTP));
258  }
259  }
260  }
261  //Now, if there are empty spaces in the vector fill them full of daylight
262  int ipow = 1;
263  for (int i = 0; i <= 7; i++) {
264  ipow *= 2;
265  if (qualityDTP != (qualityDTP | qualitybits(1 << i))) {
266  ptrPrimitive.at(i) = std::make_shared<DTPrimitive>();
267  }
268  }
269 
270  mpaths.emplace_back(
271  std::make_shared<MuonPath>(ptrPrimitive, (short)(*itCand)->nLayerUp(), (short)(*itCand)->nLayerDown()));
272  }
273 }
274 
276  //Separated from main run function for clarity. Do all pattern recognition steps
277  pidx_ = 0;
278  //Compare L0-L7
280  //Compare L0-L6 and L1-L7
283  //Compare L0-L5, L1-L6, L2-L7
287  //L0-L4, L1-L5, L2-L6, L3-L7
292  //L1-L4, L2-L5, L3-L6
296  //L2-L4, L3-L5
299  //L3-L4
301  //Uncorrelated SL1
308  //Uncorrelated SL3
315 }
316 
317 void PseudoBayesGrouping::RecognisePatterns(std::vector<DTPrimitive> digisinLDown,
318  std::vector<DTPrimitive> digisinLUp,
319  std::vector<DTPattern*> patterns) {
320  //Loop over all hits and search for matching patterns (there will be four
321  // amongst ~60, accounting for possible lateralities)
322  for (auto dtPD_it = digisinLDown.begin(); dtPD_it != digisinLDown.end(); dtPD_it++) {
323  int LDown = dtPD_it->layerId();
324  int wireDown = dtPD_it->channelId();
325  for (auto dtPU_it = digisinLUp.begin(); dtPU_it != digisinLUp.end(); dtPU_it++) {
326  int LUp = dtPU_it->layerId();
327  int wireUp = dtPU_it->channelId();
328  int diff = wireUp - wireDown;
329  for (auto pat_it = patterns.begin(); pat_it != patterns.end(); pat_it++) {
330  //For each pair of hits in the layers search for the seeded patterns
331  if ((*pat_it)->sl1() != (LDown) || (*pat_it)->sl2() != (LUp) || (*pat_it)->diff() != diff)
332  continue;
333  //If we are here a pattern was found and we can start comparing
334  (*pat_it)->setHitDown(wireDown);
335  auto cand = std::make_shared<CandidateGroup>(*pat_it);
336  for (auto dtTest_it = alldigis_.begin(); dtTest_it != alldigis_.end(); dtTest_it++) {
337  //Find hits matching to the pattern
338  if (((*pat_it)->latHitIn(dtTest_it->layerId(), dtTest_it->channelId(), allowedVariance_)) != -999) {
339  if (((*pat_it)->latHitIn(dtTest_it->layerId(), dtTest_it->channelId(), allowedVariance_)) == -10)
340  cand->addHit((*dtTest_it), dtTest_it->layerId(), false);
341  else
342  cand->addHit((*dtTest_it), dtTest_it->layerId(), true);
343  }
344  }
345  if ((cand->nhits() >= minNLayerHits_ &&
346  (cand->nLayerUp() >= minSingleSLHitsMax_ || cand->nLayerDown() >= minSingleSLHitsMax_) &&
347  (cand->nLayerUp() >= minSingleSLHitsMin_ && cand->nLayerDown() >= minSingleSLHitsMin_)) ||
348  (allowUncorrelatedPatterns_ && ((cand->nLayerUp() >= minUncorrelatedHits_ && cand->nLayerDown() == 0) ||
349  (cand->nLayerDown() >= minUncorrelatedHits_ && cand->nLayerUp() == 0)))) {
350  if (debug_) {
351  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping::RecognisePatterns Pattern found for pair in "
352  << LDown << " ," << wireDown << " ," << LUp << " ," << wireUp;
353  LogDebug("PseudoBayesGrouping")
354  << "Candidate has " << cand->nhits() << " hits with quality " << cand->quality();
355  LogDebug("PseudoBayesGrouping") << *(*pat_it);
356  }
357  //We currently save everything at this level, might want to be more restrictive
358  pidx_++;
359  cand->setCandId(pidx_);
360  prelimMatches_->push_back(std::move(cand));
361  allMatches_->push_back(std::move(cand));
362  }
363  }
364  }
365  }
366 }
367 
369  //First we need to have separated lists of digis by layer
370  if (debug_)
371  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping::FillDigisByLayer Classifying digis by layer";
372  // for (auto dtDigi_It = digis->begin(); dtDigi_It != digis->end(); dtDigi_It++) {
373  for (const auto& dtDigi_It : *digis) {
374  const DTLayerId dtLId = dtDigi_It.first;
375  //Skip digis in SL theta which we are not interested on for the grouping
376  for (auto digiIt = (dtDigi_It.second).first; digiIt != (dtDigi_It.second).second; digiIt++) {
377  //Need to change notation slightly here
378  if (dtLId.superlayer() == 2)
379  continue;
380  int layer = dtLId.layer() - 1;
381  if (dtLId.superlayer() == 3)
382  layer += 4;
383  //Use the same format as for InitialGrouping to avoid tons of replicating classes, we will have some not used variables
384  DTPrimitive dtpAux = DTPrimitive();
385  dtpAux.setTDCTimeStamp(digiIt->time());
386  dtpAux.setChannelId(digiIt->wire() - 1);
387  dtpAux.setLayerId(layer);
388  dtpAux.setSuperLayerId(dtLId.superlayer());
389  dtpAux.setCameraId(dtLId.rawId());
390  if (debug_)
391  LogDebug("PseudoBayesGrouping") << "Hit in L " << layer << " SL " << dtLId.superlayer() << " WIRE "
392  << digiIt->wire() - 1;
393  if (layer == 0)
394  digisinL0_.push_back(dtpAux);
395  else if (layer == 1)
396  digisinL1_.push_back(dtpAux);
397  else if (layer == 2)
398  digisinL2_.push_back(dtpAux);
399  else if (layer == 3)
400  digisinL3_.push_back(dtpAux);
401  else if (layer == 4)
402  digisinL4_.push_back(dtpAux);
403  else if (layer == 5)
404  digisinL5_.push_back(dtpAux);
405  else if (layer == 6)
406  digisinL6_.push_back(dtpAux);
407  else if (layer == 7)
408  digisinL7_.push_back(dtpAux);
409  alldigis_.push_back(dtpAux);
410  }
411  }
412 }
413 
415  //GhostbustPatterns that share hits and are of lower quality
416  if (prelimMatches_->empty()) {
417  return;
418  };
419  while ((prelimMatches_->at(0)->nLayerhits() >= minNLayerHits_ &&
420  (prelimMatches_->at(0)->nLayerUp() >= minSingleSLHitsMax_ ||
421  prelimMatches_->at(0)->nLayerDown() >= minSingleSLHitsMax_) &&
422  (prelimMatches_->at(0)->nLayerUp() >= minSingleSLHitsMin_ &&
423  prelimMatches_->at(0)->nLayerDown() >= minSingleSLHitsMin_)) ||
425  ((prelimMatches_->at(0)->nLayerUp() >= minUncorrelatedHits_ && prelimMatches_->at(0)->nLayerDown() == 0) ||
426  (prelimMatches_->at(0)->nLayerDown() >= minUncorrelatedHits_ && prelimMatches_->at(0)->nLayerUp() == 0)))) {
427  finalMatches_->push_back(prelimMatches_->at(0));
428  auto itSel = finalMatches_->end() - 1;
429  prelimMatches_->erase(prelimMatches_->begin());
430  if (prelimMatches_->empty()) {
431  return;
432  };
433  for (auto cand_it = prelimMatches_->begin(); cand_it != prelimMatches_->end(); cand_it++) {
434  if (*(*cand_it) == *(*itSel) && allowDuplicates_)
435  continue;
436  for (const auto& dt_it : (*itSel)->candHits()) { //.begin(); dt_it != (*itSel)->candHits().end(); dt_it++) {
437  (*cand_it)->removeHit((*dt_it));
438  }
439  }
440 
441  std::sort(prelimMatches_->begin(), prelimMatches_->end(), CandPointGreat());
442  if (debug_) {
443  LogDebug("PseudoBayesGrouping") << "Pattern qualities: ";
444  for (const auto& cand_it : *prelimMatches_) {
445  LogDebug("PseudoBayesGrouping") << cand_it->nLayerhits() << ", " << cand_it->nisGood() << ", "
446  << cand_it->nhits() << ", " << cand_it->quality() << ", " << cand_it->candId()
447  << "\n";
448  }
449  }
450  }
451 }
452 
454  digisinL0_.clear();
455  digisinL1_.clear();
456  digisinL2_.clear();
457  digisinL3_.clear();
458  digisinL4_.clear();
459  digisinL5_.clear();
460  digisinL6_.clear();
461  digisinL7_.clear();
462  alldigis_.clear();
463  allMatches_->clear();
464  prelimMatches_->clear();
465  finalMatches_->clear();
466 }
467 
469  if (debug_)
470  LogDebug("PseudoBayesGrouping") << "PseudoBayesGrouping: finish";
471 };
PseudoBayesGrouping::finish
void finish() override
Definition: PseudoBayesGrouping.cc:468
change_name.diff
diff
Definition: change_name.py:13
PseudoBayesGrouping::nPatterns_
int nPatterns_
Definition: PseudoBayesGrouping.h:79
PseudoBayesGrouping::L1L2Patterns_
std::vector< DTPattern * > L1L2Patterns_
Definition: PseudoBayesGrouping.h:113
PseudoBayesGrouping::minNLayerHits_
int minNLayerHits_
Definition: PseudoBayesGrouping.h:51
PseudoBayesGrouping::minSingleSLHitsMax_
int minSingleSLHitsMax_
Definition: PseudoBayesGrouping.h:57
mps_fire.i
i
Definition: mps_fire.py:355
dtbayesam::qualitybits
std::bitset< 8 > qualitybits
Definition: CandidateGroup.h:15
MessageLogger.h
PseudoBayesGrouping::CleanDigisByLayer
void CleanDigisByLayer()
Definition: PseudoBayesGrouping.cc:453
PseudoBayesGrouping::digisinL4_
std::vector< DTPrimitive > digisinL4_
Definition: PseudoBayesGrouping.h:68
PseudoBayesGrouping::L2L7Patterns_
std::vector< DTPattern * > L2L7Patterns_
Definition: PseudoBayesGrouping.h:84
PseudoBayesGrouping::L2L6Patterns_
std::vector< DTPattern * > L2L6Patterns_
Definition: PseudoBayesGrouping.h:92
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
PseudoBayesGrouping::L5L7Patterns_
std::vector< DTPattern * > L5L7Patterns_
Definition: PseudoBayesGrouping.h:87
PseudoBayesGrouping::L4L7Patterns_
std::vector< DTPattern * > L4L7Patterns_
Definition: PseudoBayesGrouping.h:86
PseudoBayesGrouping::FillMuonPaths
void FillMuonPaths(MuonPathPtrs &mpaths)
Definition: PseudoBayesGrouping.cc:212
contentValuesFiles.fullPath
fullPath
Definition: contentValuesFiles.py:64
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PseudoBayesGrouping::allMatches_
std::unique_ptr< dtbayesam::CandidateGroupPtrs > allMatches_
Definition: PseudoBayesGrouping.h:75
cmsdt::LEFT
Definition: constants.h:44
PseudoBayesGrouping::digisinL6_
std::vector< DTPrimitive > digisinL6_
Definition: PseudoBayesGrouping.h:70
PseudoBayesGrouping::minUncorrelatedHits_
int minUncorrelatedHits_
Definition: PseudoBayesGrouping.h:59
PseudoBayesGrouping::RecognisePatternsByLayerPairs
void RecognisePatternsByLayerPairs()
Definition: PseudoBayesGrouping.cc:275
PseudoBayesGrouping::L2L5Patterns_
std::vector< DTPattern * > L2L5Patterns_
Definition: PseudoBayesGrouping.h:99
DTPrimitive::setChannelId
void setChannelId(int channel)
Definition: DTprimitive.h:23
DTSuperLayerId::superlayer
int superlayer() const
Return the superlayer number (deprecated method name)
Definition: DTSuperLayerId.h:42
PseudoBayesGrouping::run
void run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, const DTDigiCollection &digis, MuonPathPtrs &outMpath) override
Definition: PseudoBayesGrouping.cc:179
MuonPathPtrs
std::vector< MuonPathPtr > MuonPathPtrs
Definition: MuonPath.h:122
PseudoBayesGrouping::L2L4Patterns_
std::vector< DTPattern * > L2L4Patterns_
Definition: PseudoBayesGrouping.h:105
PseudoBayesGrouping::L1L3Patterns_
std::vector< DTPattern * > L1L3Patterns_
Definition: PseudoBayesGrouping.h:109
PseudoBayesGrouping::digisinL3_
std::vector< DTPrimitive > digisinL3_
Definition: PseudoBayesGrouping.h:67
DTPrimitive::setLayerId
void setLayerId(int layer)
Definition: DTprimitive.h:24
PseudoBayesGrouping::L1L4Patterns_
std::vector< DTPattern * > L1L4Patterns_
Definition: PseudoBayesGrouping.h:104
PseudoBayesGrouping::minSingleSLHitsMin_
int minSingleSLHitsMin_
Definition: PseudoBayesGrouping.h:58
edm::FileInPath
Definition: FileInPath.h:64
cmsdt
Definition: constants.h:39
PseudoBayesGrouping::LoadPattern
void LoadPattern(std::vector< std::vector< std::vector< int >>>::iterator itPattern)
Definition: PseudoBayesGrouping.cc:74
PseudoBayesGrouping::pattern_filename_
std::string pattern_filename_
Definition: PseudoBayesGrouping.h:49
DTPattern
Definition: DTPattern.h:15
PseudoBayesGrouping::L1L7Patterns_
std::vector< DTPattern * > L1L7Patterns_
Definition: PseudoBayesGrouping.h:83
PseudoBayesGrouping::ReCleanPatternsAndDigis
void ReCleanPatternsAndDigis()
Definition: PseudoBayesGrouping.cc:414
PseudoBayesGrouping::L4L5Patterns_
std::vector< DTPattern * > L4L5Patterns_
Definition: PseudoBayesGrouping.h:101
PseudoBayesGrouping::L5L6Patterns_
std::vector< DTPattern * > L5L6Patterns_
Definition: PseudoBayesGrouping.h:95
PseudoBayesGrouping::digisinL7_
std::vector< DTPrimitive > digisinL7_
Definition: PseudoBayesGrouping.h:71
PseudoBayesGrouping::L3L7Patterns_
std::vector< DTPattern * > L3L7Patterns_
Definition: PseudoBayesGrouping.h:85
PseudoBayesGrouping::finalMatches_
std::unique_ptr< dtbayesam::CandidateGroupPtrs > finalMatches_
Definition: PseudoBayesGrouping.h:76
MotherGrouping
Definition: MotherGrouping.h:29
PseudoBayesGrouping::debug_
bool debug_
Definition: PseudoBayesGrouping.h:48
DTLayerId
Definition: DTLayerId.h:12
PseudoBayesGrouping::allPatterns_
std::vector< DTPattern * > allPatterns_
Definition: PseudoBayesGrouping.h:80
PseudoBayesGrouping::alldigis_
std::vector< DTPrimitive > alldigis_
Definition: PseudoBayesGrouping.h:62
DTPrimitive
Definition: DTprimitive.h:9
PseudoBayesGrouping::L0L6Patterns_
std::vector< DTPattern * > L0L6Patterns_
Definition: PseudoBayesGrouping.h:90
dtbayesam
Definition: CandidateGroup.h:13
PseudoBayesGrouping::digisinL5_
std::vector< DTPrimitive > digisinL5_
Definition: PseudoBayesGrouping.h:69
PseudoBayesGrouping::L4L6Patterns_
std::vector< DTPattern * > L4L6Patterns_
Definition: PseudoBayesGrouping.h:94
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
DTPrimitive::setTDCTimeStamp
void setTDCTimeStamp(int tstamp)
Definition: DTprimitive.h:20
PseudoBayesGrouping::L3L4Patterns_
std::vector< DTPattern * > L3L4Patterns_
Definition: PseudoBayesGrouping.h:106
PseudoBayesGrouping::allowUncorrelatedPatterns_
bool allowUncorrelatedPatterns_
Definition: PseudoBayesGrouping.h:54
DTDigiCollection
PseudoBayesGrouping::L0L5Patterns_
std::vector< DTPattern * > L0L5Patterns_
Definition: PseudoBayesGrouping.h:97
cmsdt::RIGHT
Definition: constants.h:44
PseudoBayesGrouping::L1L6Patterns_
std::vector< DTPattern * > L1L6Patterns_
Definition: PseudoBayesGrouping.h:91
cand
Definition: decayParser.h:34
iEvent
int iEvent
Definition: GenABIO.cc:224
PseudoBayesGrouping::~PseudoBayesGrouping
~PseudoBayesGrouping() override
Definition: PseudoBayesGrouping.cc:36
edm::EventSetup
Definition: EventSetup.h:57
PseudoBayesGrouping::allowDuplicates_
bool allowDuplicates_
Definition: PseudoBayesGrouping.h:53
DTPrimitive::setSuperLayerId
void setSuperLayerId(int lay)
Definition: DTprimitive.h:26
DTPrimitive::setCameraId
void setCameraId(int camera)
Definition: DTprimitive.h:25
PseudoBayesGrouping::L0L1Patterns_
std::vector< DTPattern * > L0L1Patterns_
Definition: PseudoBayesGrouping.h:115
PseudoBayesGrouping::PseudoBayesGrouping
PseudoBayesGrouping(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
Definition: PseudoBayesGrouping.cc:18
PseudoBayesGrouping::RecognisePatterns
void RecognisePatterns(std::vector< DTPrimitive > digisinLDown, std::vector< DTPrimitive > digisinLUp, std::vector< DTPattern * > patterns)
Definition: PseudoBayesGrouping.cc:317
PseudoBayesGrouping::L1L5Patterns_
std::vector< DTPattern * > L1L5Patterns_
Definition: PseudoBayesGrouping.h:98
PseudoBayesGrouping::digisinL0_
std::vector< DTPrimitive > digisinL0_
Definition: PseudoBayesGrouping.h:64
PseudoBayesGrouping::L6L7Patterns_
std::vector< DTPattern * > L6L7Patterns_
Definition: PseudoBayesGrouping.h:88
PseudoBayesGrouping::digisinL1_
std::vector< DTPrimitive > digisinL1_
Definition: PseudoBayesGrouping.h:65
PseudoBayesGrouping::allowedVariance_
int allowedVariance_
Definition: PseudoBayesGrouping.h:52
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
PseudoBayesGrouping::pidx_
int pidx_
Definition: PseudoBayesGrouping.h:50
PseudoBayesGrouping::saveOnPlace_
bool saveOnPlace_
Definition: PseudoBayesGrouping.h:56
PseudoBayesGrouping.h
PseudoBayesGrouping::L0L2Patterns_
std::vector< DTPattern * > L0L2Patterns_
Definition: PseudoBayesGrouping.h:112
PseudoBayesGrouping::L3L5Patterns_
std::vector< DTPattern * > L3L5Patterns_
Definition: PseudoBayesGrouping.h:100
NONE
Definition: TkAlStyle.cc:47
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
PseudoBayesGrouping::L0L7Patterns_
std::vector< DTPattern * > L0L7Patterns_
Definition: PseudoBayesGrouping.h:82
PseudoBayesGrouping::L2L3Patterns_
std::vector< DTPattern * > L2L3Patterns_
Definition: PseudoBayesGrouping.h:110
PseudoBayesGrouping::setLateralities_
bool setLateralities_
Definition: PseudoBayesGrouping.h:55
ConsumesCollector.h
PseudoBayesGrouping::L3L6Patterns_
std::vector< DTPattern * > L3L6Patterns_
Definition: PseudoBayesGrouping.h:93
PseudoBayesGrouping::CandPointGreat
Definition: PseudoBayesGrouping.h:42
ParameterSet.h
DTPrimitivePtrs
std::vector< DTPrimitivePtr > DTPrimitivePtrs
Definition: DTprimitive.h:55
PseudoBayesGrouping::initialise
void initialise(const edm::EventSetup &iEventSetup) override
Definition: PseudoBayesGrouping.cc:47
PseudoBayesGrouping::prelimMatches_
std::unique_ptr< dtbayesam::CandidateGroupPtrs > prelimMatches_
Definition: PseudoBayesGrouping.h:74
edm::Event
Definition: Event.h:73
DTLayerId::layer
int layer() const
Return the layer number.
Definition: DTLayerId.h:42
PseudoBayesGrouping::digisinL2_
std::vector< DTPrimitive > digisinL2_
Definition: PseudoBayesGrouping.h:66
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
PseudoBayesGrouping::L0L4Patterns_
std::vector< DTPattern * > L0L4Patterns_
Definition: PseudoBayesGrouping.h:103
PseudoBayesGrouping::FillDigisByLayer
void FillDigisByLayer(const DTDigiCollection *digis)
Definition: PseudoBayesGrouping.cc:368
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
PseudoBayesGrouping::L0L3Patterns_
std::vector< DTPattern * > L0L3Patterns_
Definition: PseudoBayesGrouping.h:108