CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
19  typedef std::map<reco::Muon*,
20  std::vector<std::pair<reco::Muon*,
21  std::pair<reco::MuonChamberMatch*,
23  >
24  >
25  >
27 
28  typedef std::vector<std::pair<reco::Muon*,
29  std::pair<reco::MuonChamberMatch*,
31  >
32  >
34 
35  public:
36 
38 
39  void runMesh(std::vector<reco::Muon>* p) {fillMesh(p); pruneMesh();}
40 
41  void clearMesh() { mesh_.clear(); }
42 
43  void setCSCGeometry(const CSCGeometry* pg) { geometry_ = pg; }
44 
45  bool isDuplicateOf(const CSCSegmentRef& lhs, const CSCSegmentRef& rhs) const;
46  bool isDuplicateOf(const std::pair<CSCDetId,CSCSegmentRef>& rhs,
47  const std::pair<CSCDetId,CSCSegmentRef>& lhs) const;
48  bool isClusteredWith(const std::pair<CSCDetId,CSCSegmentRef>& lhs,
49  const std::pair<CSCDetId,CSCSegmentRef>& rhs) const;
50 
51  private:
52 
53  void fillMesh(std::vector<reco::Muon>*);
54 
55  void pruneMesh();
56 
57 
58  // implement to remove cases where two segments in the same
59  // chamber overlap within 2 sigma of ALL of their errors
60  bool withinTwoSigma(const std::pair<CSCDetId,CSCSegmentRef>& rhs,
61  const std::pair<CSCDetId,CSCSegmentRef>& lhs) const { return false; }
62 
63 
64 
65 
66 
68 
69  // geometry cache for segment arbitration
71 
72  // do various cleanings?
74  // overlap and clustering parameters
76 };
77 
78 #endif
void runMesh(std::vector< reco::Muon > *p)
Definition: MuonMesh.h:39
const double ClusterDTheta
Definition: MuonMesh.h:75
const CSCGeometry * geometry_
Definition: MuonMesh.h:70
const double OverlapDPhi
Definition: MuonMesh.h:75
const bool doClustering
Definition: MuonMesh.h:73
const bool doOverlaps
Definition: MuonMesh.h:73
const double OverlapDTheta
Definition: MuonMesh.h:75
const double ClusterDPhi
Definition: MuonMesh.h:75
std::map< reco::Muon *, std::vector< std::pair< reco::Muon *, std::pair< reco::MuonChamberMatch *, reco::MuonSegmentMatch * > > > > MeshType
Definition: MuonMesh.h:26
void pruneMesh()
Definition: MuonMesh.cc:175
bool isClusteredWith(const std::pair< CSCDetId, CSCSegmentRef > &lhs, const std::pair< CSCDetId, CSCSegmentRef > &rhs) const
Definition: MuonMesh.cc:482
MuonMesh(const edm::ParameterSet &)
Definition: MuonMesh.cc:9
void clearMesh()
Definition: MuonMesh.h:41
dictionary map
Definition: Association.py:205
void setCSCGeometry(const CSCGeometry *pg)
Definition: MuonMesh.h:43
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:33
MeshType mesh_
Definition: MuonMesh.h:67
bool isDuplicateOf(const CSCSegmentRef &lhs, const CSCSegmentRef &rhs) const
Definition: MuonMesh.cc:342
const bool doME1a
Definition: MuonMesh.h:73
bool withinTwoSigma(const std::pair< CSCDetId, CSCSegmentRef > &rhs, const std::pair< CSCDetId, CSCSegmentRef > &lhs) const
Definition: MuonMesh.h:60