CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MBLTCollection.h
Go to the documentation of this file.
1 #ifndef MBLTCollection_h_
2 #define MBLTCollection_h_
3 //
4 // Class: L1ITMu::
5 //
6 // Info: This track represents a DT(1 station) plus eventual RPC station(s)
7 // based track seed, from which a full multi-station track can be
8 // built.
9 //
10 // Author:
11 // Carlo Battilana - Giuseppe Codispoti
12 //
13 
14 #include <iostream>
15 
17 
22 
23 
24 using namespace L1TMuon;
25 
26 namespace L1TwinMux {
27 
29  typedef std::vector<TriggerPrimitiveRef> TriggerPrimitiveList;
30 
32 
33  public:
34 
36  enum subsystem_offset{ kDT, kRPCb, kCSC, kRPCf };
37 
40  std::vector< size_t > rpcIn;
41  std::vector< size_t > rpcOut;
42  };
43 
44  enum bxMatch { NOMATCH, INMATCH, OUTMATCH, FULLMATCH };
45 
47  MBLTCollection() :_wheel(0),_sector(0),_station(0) {};
48 
50  MBLTCollection( const DTChamberId & dtId );
52 
55  void addStub( const TriggerPrimitiveRef & stub );
56 
57 
60  return _dtAssociatedStubs;
61  }
62 
65  return _rpcInAssociatedStubs;
66  }
67 
70  return _rpcOutAssociatedStubs;
71  }
72 
74  inline int wheel() const { return _wheel; }
75 
77  inline int sector() const { return _sector; }
78 
80  inline int station() const { return _station; }
81 
83  inline DTChamberId detId() const { return DTChamberId( _wheel, _station, _sector ); }
84 
86  TriggerPrimitiveList getRpcInAssociatedStubs( size_t dtIndex ) const;
87 
89  TriggerPrimitiveList getRpcOutAssociatedStubs( size_t dtIndex ) const;
90 
91  // build association map among dt and rpc primitives
92  void associate( double );
93 
94  // look for common rpc hists among 2 dt primitives
95  bxMatch haveCommonRpc( size_t dt1, size_t dt2 ) const;
96 
98  TriggerPrimitiveList getRpcInUnassociatedStubs() const;
99 
101  TriggerPrimitiveList getRpcOutUnassociatedStubs() const;
102 
104  std::vector< std::pair< TriggerPrimitiveList, TriggerPrimitiveList > >
105  getUnassociatedRpcClusters( double minRpcPhi ) const;
106 
107  private :
109  void
110  getUnassociatedRpcClusters( const std::vector< size_t > & rpcUnass,
111  const TriggerPrimitiveList & rpcList,
112  double minRpcPhi,
113  std::vector< std::vector <size_t> > & clusters ) const;
114  //
115  bool areCloseClusters( std::vector< size_t > & cluster1,
116  std::vector< size_t > & cluster2,
117  const TriggerPrimitiveList & rpcList1,
118  const TriggerPrimitiveList & rpcList2,
119  double minRpcPhi ) const;
120  //
121  size_t reduceRpcClusters( std::vector< std::vector <size_t> > & tmpClusters,
122  const TriggerPrimitiveList & rpcList,
123  double minRpcPhi ) const;
124  private :
125 
128 
131 
134 
136  int _wheel, _sector, _station;
137 
138  // association map among dt and rpc primitives
139  std::vector< primitiveAssociation > _dtMapAss;
140  // association map among dt and rpc primitives
142 
143  };
144 }
145 
146 #endif
subsystem_offset
internal enum for subdetector stub identification
int wheel() const
returns wheel
TriggerPrimitiveList _dtAssociatedStubs
dt segments
int _wheel
space coordinates
std::vector< primitiveAssociation > _dtMapAss
const double NOMATCH
const TriggerPrimitiveList & getRpcInner() const
rpc inner layer hits only
structure for internal indexing
TriggerPrimitiveList _rpcOutAssociatedStubs
rpc outer layer hits
int sector() const
returns sector
primitiveAssociation _rpcMapUnass
TriggerPrimitiveList _rpcInAssociatedStubs
rpc inner layer hits
std::vector< TriggerPrimitiveRef > TriggerPrimitiveList
int station() const
returns station
edm::Ref< TriggerPrimitiveCollection > TriggerPrimitiveRef
const TriggerPrimitiveList & getDtSegments() const
return a reference to the DT only segments
MBLTCollection()
default constructor
DTChamberId detId() const
returns detId
const TriggerPrimitiveList & getRpcOuter() const
rpc outer layer hits only