CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MuonMesh.h
Go to the documentation of this file.
1 #ifndef _MuonIdentification_MuonMesh_h_
2 #define _MuonIdentification_MuonMesh_h_
3 //
4 // Creates a mesh of muons connected by overlapping segments
5 // Original author: Lindsey Gray
6 //
7 
8 #include <vector>
9 #include <utility>
10 #include <map>
14 
15 class CSCGeometry;
16 
17 class MuonMesh {
18  typedef std::map<reco::Muon*,
19  std::vector<std::pair<reco::Muon*, std::pair<reco::MuonChamberMatch*, reco::MuonSegmentMatch*> > > >
21 
22  typedef std::vector<std::pair<reco::Muon*, std::pair<reco::MuonChamberMatch*, reco::MuonSegmentMatch*> > >
24 
25 public:
27 
28  void runMesh(std::vector<reco::Muon>* p) {
29  fillMesh(p);
30  pruneMesh();
31  }
32 
33  void clearMesh() { mesh_.clear(); }
34 
35  void setCSCGeometry(const CSCGeometry* pg) { geometry_ = pg; }
36 
37  bool isDuplicateOf(const CSCSegmentRef& lhs, const CSCSegmentRef& rhs) const;
38  bool isDuplicateOf(const std::pair<CSCDetId, CSCSegmentRef>& rhs,
39  const std::pair<CSCDetId, CSCSegmentRef>& lhs) const;
40  bool isClusteredWith(const std::pair<CSCDetId, CSCSegmentRef>& lhs,
41  const std::pair<CSCDetId, CSCSegmentRef>& rhs) const;
42 
43 private:
44  void fillMesh(std::vector<reco::Muon>*);
45 
46  void pruneMesh();
47 
48  // implement to remove cases where two segments in the same
49  // chamber overlap within 2 sigma of ALL of their errors
50  bool withinTwoSigma(const std::pair<CSCDetId, CSCSegmentRef>& rhs,
51  const std::pair<CSCDetId, CSCSegmentRef>& lhs) const {
52  return false;
53  }
54 
56 
57  // geometry cache for segment arbitration
59 
60  // do various cleanings?
62  // overlap and clustering parameters
64 };
65 
66 #endif
void runMesh(std::vector< reco::Muon > *p)
Definition: MuonMesh.h:28
const double ClusterDTheta
Definition: MuonMesh.h:63
const CSCGeometry * geometry_
Definition: MuonMesh.h:58
const double OverlapDPhi
Definition: MuonMesh.h:63
const bool doClustering
Definition: MuonMesh.h:61
const bool doOverlaps
Definition: MuonMesh.h:61
std::map< reco::Muon *, std::vector< std::pair< reco::Muon *, std::pair< reco::MuonChamberMatch *, reco::MuonSegmentMatch * > > > > MeshType
Definition: MuonMesh.h:20
const double OverlapDTheta
Definition: MuonMesh.h:63
const double ClusterDPhi
Definition: MuonMesh.h:63
void pruneMesh()
Definition: MuonMesh.cc:151
bool isClusteredWith(const std::pair< CSCDetId, CSCSegmentRef > &lhs, const std::pair< CSCDetId, CSCSegmentRef > &rhs) const
Definition: MuonMesh.cc:443
MuonMesh(const edm::ParameterSet &)
Definition: MuonMesh.cc:9
void clearMesh()
Definition: MuonMesh.h:33
void setCSCGeometry(const CSCGeometry *pg)
Definition: MuonMesh.h:35
void fillMesh(std::vector< reco::Muon > *)
Definition: MuonMesh.cc:18
std::vector< std::pair< reco::Muon *, std::pair< reco::MuonChamberMatch *, reco::MuonSegmentMatch * > > > AssociationType
Definition: MuonMesh.h:23
MeshType mesh_
Definition: MuonMesh.h:55
bool isDuplicateOf(const CSCSegmentRef &lhs, const CSCSegmentRef &rhs) const
Definition: MuonMesh.cc:297
const bool doME1a
Definition: MuonMesh.h:61
bool withinTwoSigma(const std::pair< CSCDetId, CSCSegmentRef > &rhs, const std::pair< CSCDetId, CSCSegmentRef > &lhs) const
Definition: MuonMesh.h:50