CMS 3D CMS Logo

CSCRecHitMatcher.h
Go to the documentation of this file.
1 #ifndef Validation_CSCRecHits_CSCRecHitMatcher_h
2 #define Validation_CSCRecHits_CSCRecHitMatcher_h
3 
23 
24 #include <vector>
25 #include <map>
26 #include <set>
27 
28 typedef std::vector<CSCRecHit2D> CSCRecHit2DContainer;
29 typedef std::vector<CSCSegment> CSCSegmentContainer;
30 
32 public:
33  // constructor
35 
36  // destructor
38 
39  // initialize the event
40  void init(const edm::Event& e, const edm::EventSetup& eventSetup);
41 
42  // do the matching
43  void match(const SimTrack& t, const SimVertex& v);
44 
45  // layer detIds with CSCRecHit2D
46  std::set<unsigned int> layerIdsCSCRecHit2D() const;
47  // chamber detIds with CSCRecHit2D
48  std::set<unsigned int> chamberIdsCSCRecHit2D() const;
49  // chamber detIds with CSCSegment
50  std::set<unsigned int> chamberIdsCSCSegment() const;
51 
52  //CSC rechits from a particular layer or chamber
53  const CSCRecHit2DContainer& cscRecHit2DsInLayer(unsigned int) const;
54  const CSCRecHit2DContainer& cscRecHit2DsInChamber(unsigned int) const;
55  //CSC segments from a particular chamber
56  const CSCSegmentContainer& cscSegmentsInChamber(unsigned int) const;
57 
58  const CSCSegmentContainer cscSegments() const;
59  const CSCRecHit2DContainer cscRecHit2Ds() const;
60 
61  // check if a certain rechit appears in a container
62  bool cscRecHit2DInContainer(const CSCRecHit2D&, const CSCRecHit2DContainer&) const;
63  bool cscSegmentInContainer(const CSCSegment&, const CSCSegmentContainer&) const;
64 
65  // check if a certain rechit was matched to a simtrack
66  bool isCSCRecHit2DMatched(const CSCRecHit2D&) const;
67  bool isCSCSegmentMatched(const CSCSegment&) const;
68 
69  int nCSCRecHit2Ds() const;
70  int nCSCSegments() const;
71  bool areCSCSegmentsSame(const CSCSegment&, const CSCSegment&) const;
72  bool areCSCRecHit2DsSame(const CSCRecHit2D&, const CSCRecHit2D&) const;
73 
74  int nCSCRecHit2DsInLayer(unsigned int) const;
75  int nCSCRecHit2DsInChamber(unsigned int) const;
76  int nCSCSegmentsInChamber(unsigned int) const;
77 
78  CSCSegment bestCSCSegment(unsigned int);
79 
80  GlobalPoint globalPoint(const CSCSegment&) const;
81 
82 private:
83  std::unique_ptr<CSCDigiMatcher> cscDigiMatcher_;
84 
87 
90 
93 
96 
100 
104 
105  std::map<unsigned int, CSCRecHit2DContainer> layer_to_cscRecHit2D_;
106  std::map<unsigned int, CSCRecHit2DContainer> chamber_to_cscRecHit2D_;
107  std::map<unsigned int, CSCSegmentContainer> chamber_to_cscSegment_;
108 
111 };
112 
113 #endif
CSCRecHitMatcher
Definition: CSCRecHitMatcher.h:31
CSCRecHitMatcher::cscSegments
const CSCSegmentContainer cscSegments() const
Definition: CSCRecHitMatcher.cc:222
CSCRecHit2DCollection.h
CSCRecHitMatcher::maxBXCSCRecHit2D_
int maxBXCSCRecHit2D_
Definition: CSCRecHitMatcher.h:98
CSCRecHit2DCollection
SimVertex
Definition: SimVertex.h:5
CSCRecHitMatcher::nCSCSegments
int nCSCSegments() const
Definition: CSCRecHitMatcher.cc:263
CSCRecHitMatcher::cscSegmentH_
edm::Handle< CSCSegmentCollection > cscSegmentH_
Definition: CSCRecHitMatcher.h:89
ESHandle.h
CSCRecHitMatcher::matchCSCSegmentsToSimTrack
void matchCSCSegmentsToSimTrack(const CSCSegmentCollection &)
Definition: CSCRecHitMatcher.cc:119
edm::EDGetTokenT< CSCRecHit2DCollection >
CSCRecHitMatcher::chamberIdsCSCSegment
std::set< unsigned int > chamberIdsCSCSegment() const
Definition: CSCRecHitMatcher.cc:182
CSCRecHitMatcher::maxBXCSCSegment_
int maxBXCSCSegment_
Definition: CSCRecHitMatcher.h:102
CSCRecHitMatcher::init
void init(const edm::Event &e, const edm::EventSetup &eventSetup)
Definition: CSCRecHitMatcher.cc:27
CSCRecHitMatcher::layerIdsCSCRecHit2D
std::set< unsigned int > layerIdsCSCRecHit2D() const
Definition: CSCRecHitMatcher.cc:168
CSCRecHit2DContainer
std::vector< CSCRecHit2D > CSCRecHit2DContainer
Definition: CSCRecHitMatcher.h:28
CSCRecHitMatcher::cscRecHit2DInContainer
bool cscRecHit2DInContainer(const CSCRecHit2D &, const CSCRecHit2DContainer &) const
Definition: CSCRecHitMatcher.cc:231
CSCRecHitMatcher::cscSegmentToken_
edm::EDGetTokenT< CSCSegmentCollection > cscSegmentToken_
Definition: CSCRecHitMatcher.h:86
CSCSegmentCollection
findQualityFiles.v
v
Definition: findQualityFiles.py:179
edm::Handle< CSCRecHit2DCollection >
CSCRecHitMatcher::areCSCSegmentsSame
bool areCSCSegmentsSame(const CSCSegment &, const CSCSegment &) const
Definition: CSCRecHitMatcher.cc:275
CSCRecHitMatcher::match
void match(const SimTrack &t, const SimVertex &v)
do the matching
Definition: CSCRecHitMatcher.cc:42
CSCGeometry
Definition: CSCGeometry.h:24
CSCRecHitMatcher::cscSegmentInContainer
bool cscSegmentInContainer(const CSCSegment &, const CSCSegmentContainer &) const
Definition: CSCRecHitMatcher.cc:239
CSCRecHitMatcher::no_cscSegments_
CSCSegmentContainer no_cscSegments_
Definition: CSCRecHitMatcher.h:110
CSCRecHitMatcher::csc_geom_
edm::ESHandle< CSCGeometry > csc_geom_
Definition: CSCRecHitMatcher.h:91
CSCRecHitMatcher::cscRecHit2DH_
edm::Handle< CSCRecHit2DCollection > cscRecHit2DH_
Definition: CSCRecHitMatcher.h:88
CSCRecHitMatcher::nCSCSegmentsInChamber
int nCSCSegmentsInChamber(unsigned int) const
Definition: CSCRecHitMatcher.cc:211
CSCRecHitMatcher::cscDigiMatcher_
std::unique_ptr< CSCDigiMatcher > cscDigiMatcher_
Definition: CSCRecHitMatcher.h:83
CSCRecHitMatcher::no_cscRecHit2Ds_
CSCRecHit2DContainer no_cscRecHit2Ds_
Definition: CSCRecHitMatcher.h:109
edm::ESHandle< CSCGeometry >
Point3DBase< float, GlobalTag >
CSCRecHitMatcher::cscSegmentsInChamber
const CSCSegmentContainer & cscSegmentsInChamber(unsigned int) const
Definition: CSCRecHitMatcher.cc:201
CSCRecHitMatcher::chamber_to_cscRecHit2D_
std::map< unsigned int, CSCRecHit2DContainer > chamber_to_cscRecHit2D_
Definition: CSCRecHitMatcher.h:106
CSCRecHitMatcher::isCSCSegmentMatched
bool isCSCSegmentMatched(const CSCSegment &) const
Definition: CSCRecHitMatcher.cc:251
CSCSegment
Definition: CSCSegment.h:21
CSCRecHitMatcher::verboseCSCSegment_
int verboseCSCSegment_
Definition: CSCRecHitMatcher.h:101
CSCRecHitMatcher::nCSCRecHit2DsInChamber
int nCSCRecHit2DsInChamber(unsigned int) const
Definition: CSCRecHitMatcher.cc:209
CSCRecHitMatcher::minBXCSCSegment_
int minBXCSCSegment_
Definition: CSCRecHitMatcher.h:103
edm::ParameterSet
Definition: ParameterSet.h:47
CSCRecHit2D
Definition: CSCRecHit2D.h:18
CSCRecHitMatcher::minBXCSCRecHit2D_
int minBXCSCRecHit2D_
Definition: CSCRecHitMatcher.h:99
Event.h
CSCRecHitMatcher::chamber_to_cscSegment_
std::map< unsigned int, CSCSegmentContainer > chamber_to_cscSegment_
Definition: CSCRecHitMatcher.h:107
CSCRecHitMatcher::nCSCRecHit2DsInLayer
int nCSCRecHit2DsInLayer(unsigned int) const
Definition: CSCRecHitMatcher.cc:207
CSCRecHitMatcher::chamberIdsCSCRecHit2D
std::set< unsigned int > chamberIdsCSCRecHit2D() const
Definition: CSCRecHitMatcher.cc:175
CSCRecHitMatcher::isCSCRecHit2DMatched
bool isCSCRecHit2DMatched(const CSCRecHit2D &) const
Definition: CSCRecHitMatcher.cc:247
CSCRecHitMatcher::cscRecHit2DsInLayer
const CSCRecHit2DContainer & cscRecHit2DsInLayer(unsigned int) const
Definition: CSCRecHitMatcher.cc:189
edm::EventSetup
Definition: EventSetup.h:58
CSCRecHitMatcher::matchCSCRecHit2DsToSimTrack
void matchCSCRecHit2DsToSimTrack(const CSCRecHit2DCollection &)
Definition: CSCRecHitMatcher.cc:55
CSCRecHitMatcher::verboseCSCRecHit2D_
int verboseCSCRecHit2D_
Definition: CSCRecHitMatcher.h:97
InputTag.h
CSCRecHitMatcher::areCSCRecHit2DsSame
bool areCSCRecHit2DsSame(const CSCRecHit2D &, const CSCRecHit2D &) const
Definition: CSCRecHitMatcher.cc:271
CSCRecHitMatcher::CSCRecHitMatcher
CSCRecHitMatcher(edm::ParameterSet const &iPS, edm::ConsumesCollector &&iC)
Definition: CSCRecHitMatcher.cc:9
CSCRecHitMatcher::globalPoint
GlobalPoint globalPoint(const CSCSegment &) const
Definition: CSCRecHitMatcher.cc:298
CSCDigiMatcher.h
CSCRecHitMatcher::cscRecHit2Ds
const CSCRecHit2DContainer cscRecHit2Ds() const
Definition: CSCRecHitMatcher.cc:213
CSCRecHitMatcher::cscRecHit2DToken_
edm::EDGetTokenT< CSCRecHit2DCollection > cscRecHit2DToken_
Definition: CSCRecHitMatcher.h:85
SimTrack
Definition: SimTrack.h:9
CSCRecHitMatcher::bestCSCSegment
CSCSegment bestCSCSegment(unsigned int)
Definition: CSCRecHitMatcher.cc:279
EventSetup.h
ConsumesCollector.h
CSCRecHitMatcher::cscRecHit2DsInChamber
const CSCRecHit2DContainer & cscRecHit2DsInChamber(unsigned int) const
Definition: CSCRecHitMatcher.cc:195
ParameterSet.h
CSCRecHitMatcher::nCSCRecHit2Ds
int nCSCRecHit2Ds() const
Definition: CSCRecHitMatcher.cc:255
edm::Event
Definition: Event.h:73
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
CSCRecHitMatcher::layer_to_cscRecHit2D_
std::map< unsigned int, CSCRecHit2DContainer > layer_to_cscRecHit2D_
Definition: CSCRecHitMatcher.h:105
SimTrackContainer.h
CSCRecHitMatcher::~CSCRecHitMatcher
~CSCRecHitMatcher()
Definition: CSCRecHitMatcher.h:37
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
SimVertexContainer.h
CSCRecHitMatcher::cscGeometry_
const CSCGeometry * cscGeometry_
Definition: CSCRecHitMatcher.h:92
CSCSegmentContainer
std::vector< CSCSegment > CSCSegmentContainer
Definition: CSCRecHitMatcher.h:29
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
CSCSegmentCollection.h