#include <CSCRecHitMatcher.h>
Definition at line 32 of file CSCRecHitMatcher.h.
◆ CSCRecHitMatcher()
◆ ~CSCRecHitMatcher()
CSCRecHitMatcher::~CSCRecHitMatcher |
( |
| ) |
|
|
inline |
◆ areCSCRecHit2DsSame()
◆ areCSCSegmentsSame()
◆ bestCSCSegment()
CSCSegment CSCRecHitMatcher::bestCSCSegment |
( |
unsigned int |
id | ) |
|
Definition at line 279 of file CSCRecHitMatcher.cc.
References l1ctLayer2EG_cff::id.
281 double chi2overNdf = 99;
283 int foundIndex = -99;
286 double newChi2overNdf(seg.chi2() / seg.degreesOfFreedom());
287 if (newChi2overNdf < chi2overNdf) {
288 chi2overNdf = newChi2overNdf;
293 if (foundIndex != -99)
std::map< unsigned int, CSCSegmentContainer > chamber_to_cscSegment_
◆ chamberIdsCSCRecHit2D()
std::set< unsigned int > CSCRecHitMatcher::chamberIdsCSCRecHit2D |
( |
| ) |
const |
◆ chamberIdsCSCSegment()
std::set< unsigned int > CSCRecHitMatcher::chamberIdsCSCSegment |
( |
| ) |
const |
◆ cscRecHit2DInContainer()
◆ cscRecHit2Ds()
Definition at line 213 of file CSCRecHitMatcher.cc.
References mps_fire::result.
217 result.insert(
result.end(), segmentsInChamber.begin(), segmentsInChamber.end());
std::set< unsigned int > chamberIdsCSCRecHit2D() const
const CSCRecHit2DContainer & cscRecHit2DsInChamber(unsigned int) const
std::vector< CSCRecHit2D > CSCRecHit2DContainer
◆ cscRecHit2DsInChamber()
Definition at line 195 of file CSCRecHitMatcher.cc.
std::map< unsigned int, CSCRecHit2DContainer > chamber_to_cscRecHit2D_
CSCRecHit2DContainer no_cscRecHit2Ds_
◆ cscRecHit2DsInLayer()
Definition at line 189 of file CSCRecHitMatcher.cc.
std::map< unsigned int, CSCRecHit2DContainer > layer_to_cscRecHit2D_
CSCRecHit2DContainer no_cscRecHit2Ds_
◆ cscSegmentInContainer()
◆ cscSegments()
Definition at line 222 of file CSCRecHitMatcher.cc.
References mps_fire::result.
226 result.insert(
result.end(), segmentsInChamber.begin(), segmentsInChamber.end());
const CSCSegmentContainer & cscSegmentsInChamber(unsigned int) const
std::set< unsigned int > chamberIdsCSCSegment() const
std::vector< CSCSegment > CSCSegmentContainer
◆ cscSegmentsInChamber()
Definition at line 201 of file CSCRecHitMatcher.cc.
std::map< unsigned int, CSCSegmentContainer > chamber_to_cscSegment_
CSCSegmentContainer no_cscSegments_
◆ globalPoint()
Definition at line 298 of file CSCRecHitMatcher.cc.
References HltBtagPostValidation_cff::c.
const CSCGeometry * cscGeometry_
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
const GeomDet * idToDet(DetId) const override
◆ init()
Definition at line 27 of file CSCRecHitMatcher.cc.
References edm::EventSetup::getHandle(), and iEvent.
34 if (csc_geom.isValid()) {
37 edm::LogWarning(
"CSCSimHitMatcher") <<
"+++ Info: CSC geometry is unavailable. +++\n";
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken_
edm::EDGetTokenT< CSCRecHit2DCollection > cscRecHit2DToken_
const CSCGeometry * cscGeometry_
edm::Handle< CSCSegmentCollection > cscSegmentH_
edm::EDGetTokenT< CSCSegmentCollection > cscSegmentToken_
std::unique_ptr< CSCDigiMatcher > cscDigiMatcher_
Log< level::Warning, false > LogWarning
edm::Handle< CSCRecHit2DCollection > cscRecHit2DH_
◆ isCSCRecHit2DMatched()
bool CSCRecHitMatcher::isCSCRecHit2DMatched |
( |
const CSCRecHit2D & |
thisSg | ) |
const |
Definition at line 247 of file CSCRecHitMatcher.cc.
const CSCRecHit2DContainer cscRecHit2Ds() const
bool cscRecHit2DInContainer(const CSCRecHit2D &, const CSCRecHit2DContainer &) const
◆ isCSCSegmentMatched()
bool CSCRecHitMatcher::isCSCSegmentMatched |
( |
const CSCSegment & |
thisSg | ) |
const |
◆ layerIdsCSCRecHit2D()
std::set< unsigned int > CSCRecHitMatcher::layerIdsCSCRecHit2D |
( |
| ) |
const |
◆ match()
do the matching
Definition at line 42 of file CSCRecHitMatcher.cc.
References dtChamberEfficiency_cfi::cscSegments, submitPVValidationJobs::t, and findQualityFiles::v.
void matchCSCRecHit2DsToSimTrack(const CSCRecHit2DCollection &)
T const * product() const
const CSCRecHit2DContainer cscRecHit2Ds() const
edm::Handle< CSCSegmentCollection > cscSegmentH_
const CSCSegmentContainer cscSegments() const
void matchCSCSegmentsToSimTrack(const CSCSegmentCollection &)
std::unique_ptr< CSCDigiMatcher > cscDigiMatcher_
edm::Handle< CSCRecHit2DCollection > cscRecHit2DH_
◆ matchCSCRecHit2DsToSimTrack()
Definition at line 55 of file CSCRecHitMatcher.cc.
References CSCDetId::chamberId(), ztail::d, spr::find(), l1ctLayer2EG_cff::id, AlCaHLTBitMon_ParallelJobs::p, DetId::rawId(), and HI_PhotonSkim_cff::rechits.
57 edm::LogInfo(
"CSCRecHitMatcher") <<
"Matching simtrack to CSC rechits";
64 std::set<unsigned int> layer_ids;
65 layer_ids.insert(strip_ids.begin(), strip_ids.end());
66 layer_ids.insert(wire_ids.begin(), wire_ids.end());
69 edm::LogInfo(
"CSCRecHitMatcher") <<
"Number of matched csc layer_ids " << layer_ids.size();
71 for (
const auto&
id : layer_ids) {
77 edm::LogInfo(
"CSCRecHitMatcher") <<
"hit wg csc from simhit" << endl;
78 for (
const auto&
p : hit_wg) {
86 edm::LogInfo(
"CSCRecHitMatcher") <<
"hit strip csc from simhit" << endl;
87 for (
const auto&
p : hit_strips) {
93 const auto& rechits_in_det =
rechits.get(p_id);
94 for (
auto d = rechits_in_det.first;
d != rechits_in_det.second; ++
d) {
96 edm::LogInfo(
"CSCRecHitMatcher") <<
"rechit " << p_id <<
" " << *
d;
99 const bool wireMatch(
std::find(hit_wg.begin(), hit_wg.end(),
d->hitWire()) != hit_wg.end());
102 bool stripMatch(
false);
103 for (
size_t iS = 0; iS <
d->nStrips(); ++iS) {
104 if (hit_strips.find(
d->channels(iS)) != hit_strips.end())
109 if (wireMatch and stripMatch) {
111 edm::LogInfo(
"CSCRecHitMatcher") <<
"\t...was matched!";
std::map< unsigned int, CSCRecHit2DContainer > chamber_to_cscRecHit2D_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::map< unsigned int, CSCRecHit2DContainer > layer_to_cscRecHit2D_
Log< level::Info, false > LogInfo
std::unique_ptr< CSCDigiMatcher > cscDigiMatcher_
◆ matchCSCSegmentsToSimTrack()
Definition at line 119 of file CSCRecHitMatcher.cc.
References dtChamberEfficiency_cfi::cscSegments, ztail::d, AlCaHLTBitMon_ParallelJobs::p, DetId::rawId(), and FastTrackerRecHitMaskProducer_cfi::recHits.
121 edm::LogInfo(
"CSCRecHitMatcher") <<
"Matching simtrack to segments";
126 edm::LogInfo(
"CSCRecHitMatcher") <<
"Number of matched csc segments " << chamber_ids.size();
127 for (
const auto&
id : chamber_ids) {
133 edm::LogInfo(
"CSCRecHitMatcher") <<
"hit csc rechits" << endl;
134 for (
const auto&
p : csc_rechits) {
140 const auto& segments_in_det =
cscSegments.get(p_id);
141 for (
auto d = segments_in_det.first;
d != segments_in_det.second; ++
d) {
143 edm::LogInfo(
"CSCRecHitMatcher") <<
"segment " << p_id <<
" " << *
d << endl;
148 int rechitsFound = 0;
150 edm::LogInfo(
"CSCRecHitMatcher") <<
recHits.size() <<
" csc rechits from segment " << endl;
151 for (
const auto& rh :
recHits) {
152 const CSCRecHit2D* cscrh(dynamic_cast<const CSCRecHit2D*>(rh));
156 if (rechitsFound == 0)
159 edm::LogInfo(
"CSCRecHitMatcher") <<
"Found " << rechitsFound <<
" rechits out of " 161 edm::LogInfo(
"CSCRecHitMatcher") <<
"\t...was matched!";
std::map< unsigned int, CSCSegmentContainer > chamber_to_cscSegment_
bool isCSCRecHit2DMatched(const CSCRecHit2D &) const
std::set< unsigned int > chamberIdsCSCRecHit2D() const
const CSCRecHit2DContainer & cscRecHit2DsInChamber(unsigned int) const
const CSCSegmentContainer cscSegments() const
Log< level::Info, false > LogInfo
◆ nCSCRecHit2Ds()
int CSCRecHitMatcher::nCSCRecHit2Ds |
( |
| ) |
const |
Definition at line 255 of file CSCRecHitMatcher.cc.
References dqmiodumpmetadata::n.
258 for (
const auto&
id : ids)
std::set< unsigned int > chamberIdsCSCRecHit2D() const
const CSCRecHit2DContainer & cscRecHit2DsInChamber(unsigned int) const
◆ nCSCRecHit2DsInChamber()
int CSCRecHitMatcher::nCSCRecHit2DsInChamber |
( |
unsigned int |
detid | ) |
const |
Definition at line 209 of file CSCRecHitMatcher.cc.
const CSCRecHit2DContainer & cscRecHit2DsInChamber(unsigned int) const
◆ nCSCRecHit2DsInLayer()
int CSCRecHitMatcher::nCSCRecHit2DsInLayer |
( |
unsigned int |
detid | ) |
const |
Definition at line 207 of file CSCRecHitMatcher.cc.
const CSCRecHit2DContainer & cscRecHit2DsInLayer(unsigned int) const
◆ nCSCSegments()
int CSCRecHitMatcher::nCSCSegments |
( |
| ) |
const |
Definition at line 263 of file CSCRecHitMatcher.cc.
References dqmiodumpmetadata::n.
266 for (
const auto&
id : ids)
const CSCSegmentContainer & cscSegmentsInChamber(unsigned int) const
std::set< unsigned int > chamberIdsCSCSegment() const
◆ nCSCSegmentsInChamber()
int CSCRecHitMatcher::nCSCSegmentsInChamber |
( |
unsigned int |
detid | ) |
const |
Definition at line 211 of file CSCRecHitMatcher.cc.
const CSCSegmentContainer & cscSegmentsInChamber(unsigned int) const
◆ chamber_to_cscRecHit2D_
◆ chamber_to_cscSegment_
◆ cscDigiMatcher_
◆ cscGeometry_
◆ cscGeomToken_
◆ cscRecHit2DH_
◆ cscRecHit2DToken_
◆ cscSegmentH_
◆ cscSegmentToken_
◆ layer_to_cscRecHit2D_
◆ maxBXCSCRecHit2D_
int CSCRecHitMatcher::maxBXCSCRecHit2D_ |
|
private |
◆ maxBXCSCSegment_
int CSCRecHitMatcher::maxBXCSCSegment_ |
|
private |
◆ minBXCSCRecHit2D_
int CSCRecHitMatcher::minBXCSCRecHit2D_ |
|
private |
◆ minBXCSCSegment_
int CSCRecHitMatcher::minBXCSCSegment_ |
|
private |
◆ no_cscRecHit2Ds_
◆ no_cscSegments_
◆ verboseCSCRecHit2D_
int CSCRecHitMatcher::verboseCSCRecHit2D_ |
|
private |
◆ verboseCSCSegment_
int CSCRecHitMatcher::verboseCSCSegment_ |
|
private |