CMS 3D CMS Logo

StubAssociation.h
Go to the documentation of this file.
1 #ifndef SimTracker_TrackTriggerAssociation_StubAssociation_h
2 #define SimTracker_TrackTriggerAssociation_StubAssociation_h
3 
6 
7 #include <vector>
8 #include <map>
9 
10 namespace tt {
11 
20  public:
21  StubAssociation() { setup_ = nullptr; }
24 
25  // insert a TPPtr and its associated collection of TTstubRefs into the underlayering maps
26  void insert(const TPPtr& tpPtr, const std::vector<TTStubRef>& ttSTubRefs);
27  // returns map containing TTStubRef and their associated collection of TPPtrs
28  const std::map<TTStubRef, std::vector<TPPtr>>& getTTStubToTrackingParticlesMap() const {
29  return mapTTStubRefsTPPtrs_;
30  }
31  // returns map containing TPPtr and their associated collection of TTStubRefs
32  const std::map<TPPtr, std::vector<TTStubRef>>& getTrackingParticleToTTStubsMap() const {
33  return mapTPPtrsTTStubRefs_;
34  }
35  // returns collection of TPPtrs associated to given TTstubRef
36  std::vector<TPPtr> findTrackingParticlePtrs(const TTStubRef& ttStubRef) const;
37  // returns collection of TTStubRefs associated to given TPPtr
38  std::vector<TTStubRef> findTTStubRefs(const TPPtr& tpPtr) const;
39  // total number of stubs associated with TPs
40  int numStubs() const { return mapTTStubRefsTPPtrs_.size(); };
41  // total number of TPs associated with stubs
42  int numTPs() const { return mapTPPtrsTTStubRefs_.size(); };
43  // Get all TPs that are matched to these stubs in at least 'tpMinLayers' layers and 'tpMinLayersPS' ps layers
44  std::vector<TPPtr> associate(const std::vector<TTStubRef>& ttStubRefs) const;
45  // Get all TPs that are matched to these stubs in at least 'tpMinLayers' layers and 'tpMinLayersPS' ps layers with not more then 'tpMaxBadStubs2S' not associated 2S stubs and not more then 'tpMaxBadStubsPS' associated PS stubs
46  std::vector<TPPtr> associateFinal(const std::vector<TTStubRef>& ttStubRefs) const;
47 
48  private:
49  // stores, calculates and provides run-time constants
50  const Setup* setup_;
51  // map containing TTStubRef and their associated collection of TPPtrs
52  std::map<TTStubRef, std::vector<TPPtr>> mapTTStubRefsTPPtrs_;
53  // map containing TPPtr and their associated collection of TTStubRefs
54  std::map<TPPtr, std::vector<TTStubRef>> mapTPPtrsTTStubRefs_;
55  // empty container of TPPtr
56  const std::vector<TPPtr> emptyTPPtrs_;
57  // empty container of TTStubRef
58  const std::vector<TTStubRef> emptyTTStubRefs_;
59  };
60 
61 } // namespace tt
62 
63 #endif
std::vector< TTStubRef > findTTStubRefs(const TPPtr &tpPtr) const
Class to process and provide run-time constants used by Track Trigger emulators.
Definition: Setup.h:44
const std::vector< TPPtr > emptyTPPtrs_
StubAssociation(const Setup *setup)
Class to associate reconstrucable TrackingParticles with TTStubs and vice versa. It may associate mul...
const std::map< TPPtr, std::vector< TTStubRef > > & getTrackingParticleToTTStubsMap() const
const std::vector< TTStubRef > emptyTTStubRefs_
Definition: TTTypes.h:54
std::map< TPPtr, std::vector< TTStubRef > > mapTPPtrsTTStubRefs_
std::map< TTStubRef, std::vector< TPPtr > > mapTTStubRefsTPPtrs_
std::vector< TPPtr > associateFinal(const std::vector< TTStubRef > &ttStubRefs) const
const Setup * setup_
void insert(const TPPtr &tpPtr, const std::vector< TTStubRef > &ttSTubRefs)
const std::map< TTStubRef, std::vector< TPPtr > > & getTTStubToTrackingParticlesMap() const
std::vector< TPPtr > findTrackingParticlePtrs(const TTStubRef &ttStubRef) const
std::vector< TPPtr > associate(const std::vector< TTStubRef > &ttStubRefs) const