CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
GEMDigiMatcher Class Reference

#include <GEMDigiMatcher.h>

Public Member Functions

const std::map< unsigned int, GEMPadDigiContainerallPads () const
 
std::set< unsigned int > chamberIdsCluster (int gem_type=MuonHitHelper::GEM_ALL) const
 
std::set< unsigned int > chamberIdsDigi (int gem_type=MuonHitHelper::GEM_ALL) const
 
std::set< unsigned int > chamberIdsPad (int gem_type=MuonHitHelper::GEM_ALL) const
 
const GEMPadDigiClusterContainerclustersInChamber (unsigned int) const
 
const GEMPadDigiClusterContainerclustersInDetId (unsigned int) const
 
const GEMPadDigiClusterContainerclustersInSuperChamber (unsigned int) const
 
const GEMCoPadDigiContainercoPadsInSuperChamber (unsigned int) const
 
std::set< unsigned int > detIdsCluster (int gem_type=MuonHitHelper::GEM_ALL) const
 
std::set< unsigned int > detIdsDigi (int gem_type=MuonHitHelper::GEM_ALL) const
 
std::set< unsigned int > detIdsPad (int gem_type=MuonHitHelper::GEM_ALL) const
 
std::set< unsigned int > detIdsSimLink (int gem_type=MuonHitHelper::GEM_ALL) const
 
const GEMDigiContainerdigisInChamber (unsigned int) const
 
const GEMDigiContainerdigisInDetId (unsigned int) const
 
const GEMDigiContainerdigisInSuperChamber (unsigned int) const
 
int extrapolateHsfromGEMPad (unsigned int, int) const
 
int extrapolateHsfromGEMStrip (unsigned int, int) const
 
 GEMDigiMatcher (edm::ParameterSet const &iPS, edm::ConsumesCollector &&iC)
 
GlobalPoint getGlobalPointDigi (unsigned int rawId, const GEMDigi &d) const
 
GlobalPoint getGlobalPointPad (unsigned int rawId, const GEMPadDigi &tp) const
 
void init (const edm::Event &e, const edm::EventSetup &eventSetup)
 
void match (const SimTrack &t, const SimVertex &v)
 do the matching More...
 
std::shared_ptr< GEMSimHitMatchermuonSimHitMatcher ()
 
int nCoPads () const
 How many coincidence pads in GEM did this simtrack get in total? More...
 
int nLayersWithClustersInSuperChamber (unsigned int) const
 
int nLayersWithDigisInSuperChamber (unsigned int) const
 
int nLayersWithPadsInSuperChamber (unsigned int) const
 
int nPads () const
 How many pads in GEM did this simtrack get in total? More...
 
std::set< int > padNumbersInDetId (unsigned int) const
 
const GEMPadDigiContainerpadsInChamber (unsigned int) const
 
const GEMPadDigiContainerpadsInDetId (unsigned int) const
 
const GEMPadDigiContainerpadsInSuperChamber (unsigned int) const
 
std::set< int > partitionNumbers () const
 
std::set< int > partitionNumbersWithCoPads () const
 
const GEMDigiSimLinkContainersimLinksInDetId (unsigned int) const
 
std::set< int > stripNumbersInDetId (unsigned int) const
 
std::set< unsigned int > superChamberIdsCluster (int gem_type=MuonHitHelper::GEM_ALL) const
 
std::set< unsigned int > superChamberIdsCoPad (int gem_type=MuonHitHelper::GEM_ALL) const
 
std::set< unsigned int > superChamberIdsDigi (int gem_type=MuonHitHelper::GEM_ALL) const
 
std::set< unsigned int > superChamberIdsPad (int gem_type=MuonHitHelper::GEM_ALL) const
 
 ~GEMDigiMatcher ()
 

Private Member Functions

void clear ()
 
void matchClustersToSimTrack (const GEMPadDigiClusterCollection &)
 
void matchCoPadsToSimTrack (const GEMCoPadDigiCollection &)
 
void matchDigisSLToSimTrack (const edm::DetSetVector< GEMDigiSimLink > &)
 
void matchDigisToSimTrack (const GEMDigiCollection &)
 
void matchPadsInDetId (const GEMDetId &simhitId, const GEMPadDigiCollection &)
 
void matchPadsToSimTrack (const GEMPadDigiCollection &)
 
template<class T >
std::set< unsigned int > selectDetIds (const T &, int) const
 

Private Attributes

std::map< unsigned int, GEMPadDigiClusterContainerchamber_to_clusters_
 
std::map< unsigned int, GEMDigiContainerchamber_to_digis_
 
std::map< unsigned int, GEMPadDigiContainerchamber_to_pads_
 
std::map< unsigned int, GEMPadDigiClusterContainerdetid_to_clusters_
 
std::map< unsigned int, GEMDigiContainerdetid_to_digis_
 
std::map< unsigned int, GEMPadDigiContainerdetid_to_pads_
 
std::map< unsigned int, GEMDigiSimLinkContainerdetid_to_simLinks_
 
bool discardEleHits_
 
edm::Handle< GEMPadDigiClusterCollectiongemClustersH_
 
edm::EDGetTokenT< GEMPadDigiClusterCollectiongemClusterToken_
 
edm::Handle< GEMCoPadDigiCollectiongemCoPadsH_
 
edm::EDGetTokenT< GEMCoPadDigiCollectiongemCoPadToken_
 
edm::Handle< GEMDigiCollectiongemDigisH_
 
edm::Handle< edm::DetSetVector< GEMDigiSimLink > > gemDigisSLH_
 
edm::EDGetTokenT< GEMDigiCollectiongemDigiToken_
 
const GEMGeometrygemGeometry_
 
edm::Handle< GEMPadDigiCollectiongemPadsH_
 
edm::EDGetTokenT< GEMPadDigiCollectiongemPadToken_
 
edm::EDGetTokenT< edm::DetSetVector< GEMDigiSimLink > > gemSimLinkToken_
 
edm::ESGetToken< GEMGeometry, MuonGeometryRecordgeomToken_
 
int matchDeltaStrip_
 
bool matchToSimLink_
 
int maxBXCluster_
 
int maxBXCoPad_
 
int maxBXDigi_
 
int maxBXPad_
 
int minBXCluster_
 
int minBXCoPad_
 
int minBXDigi_
 
int minBXPad_
 
std::shared_ptr< GEMSimHitMatchermuonSimHitMatcher_
 
GEMPadDigiClusterContainer no_gem_clusters_
 
GEMCoPadDigiContainer no_gem_copads_
 
GEMDigiContainer no_gem_digis_
 
GEMPadDigiContainer no_gem_pads_
 
GEMDigiSimLinkContainer no_gem_simLinks_
 
bool simMuOnly_
 
std::map< unsigned int, GEMPadDigiClusterContainersuperchamber_to_clusters_
 
std::map< unsigned int, GEMCoPadDigiContainersuperchamber_to_copads_
 
std::map< unsigned int, GEMDigiContainersuperchamber_to_digis_
 
std::map< unsigned int, GEMPadDigiContainersuperchamber_to_pads_
 
bool verboseCluster_
 
bool verboseCoPad_
 
bool verboseDigi_
 
bool verbosePad_
 
bool verboseSimLink_
 

Detailed Description

Definition at line 31 of file GEMDigiMatcher.h.

Constructor & Destructor Documentation

◆ GEMDigiMatcher()

GEMDigiMatcher::GEMDigiMatcher ( edm::ParameterSet const &  iPS,
edm::ConsumesCollector &&  iC 
)

Definition at line 5 of file GEMDigiMatcher.cc.

References muonGEMDigiPSet::gemSimLink, eostools::move(), and muonDTDigis_cfi::pset.

5  {
6  const auto& gemSimLink = pset.getParameterSet("gemSimLink");
7  simMuOnly_ = gemSimLink.getParameter<bool>("simMuOnly");
8  discardEleHits_ = gemSimLink.getParameter<bool>("discardEleHits");
9  verboseSimLink_ = gemSimLink.getParameter<int>("verbose");
10 
11  const auto& gemDigi = pset.getParameterSet("gemStripDigi");
12  minBXDigi_ = gemDigi.getParameter<int>("minBX");
13  maxBXDigi_ = gemDigi.getParameter<int>("maxBX");
14  matchDeltaStrip_ = gemDigi.getParameter<int>("matchDeltaStrip");
15  verboseDigi_ = gemDigi.getParameter<int>("verbose");
16  matchToSimLink_ = gemDigi.getParameter<bool>("matchToSimLink");
17 
18  const auto& gemPad = pset.getParameterSet("gemPadDigi");
19  minBXPad_ = gemPad.getParameter<int>("minBX");
20  maxBXPad_ = gemPad.getParameter<int>("maxBX");
21  verbosePad_ = gemPad.getParameter<int>("verbose");
22 
23  const auto& gemCluster = pset.getParameterSet("gemPadCluster");
24  minBXCluster_ = gemCluster.getParameter<int>("minBX");
25  maxBXCluster_ = gemCluster.getParameter<int>("maxBX");
26  verboseCluster_ = gemCluster.getParameter<int>("verbose");
27 
28  const auto& gemCoPad = pset.getParameterSet("gemCoPadDigi");
29  minBXCoPad_ = gemCoPad.getParameter<int>("minBX");
30  maxBXCoPad_ = gemCoPad.getParameter<int>("maxBX");
31  verboseCoPad_ = gemCoPad.getParameter<int>("verbose");
32 
33  // make a new simhits matcher
35 
36  if (matchToSimLink_)
39  gemDigiToken_ = iC.consumes<GEMDigiCollection>(gemDigi.getParameter<edm::InputTag>("inputTag"));
40  gemPadToken_ = iC.consumes<GEMPadDigiCollection>(gemPad.getParameter<edm::InputTag>("inputTag"));
41  gemClusterToken_ = iC.consumes<GEMPadDigiClusterCollection>(gemCluster.getParameter<edm::InputTag>("inputTag"));
42  gemCoPadToken_ = iC.consumes<GEMCoPadDigiCollection>(gemCoPad.getParameter<edm::InputTag>("inputTag"));
43 
45 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::shared_ptr< GEMSimHitMatcher > muonSimHitMatcher_
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
edm::EDGetTokenT< GEMCoPadDigiCollection > gemCoPadToken_
edm::EDGetTokenT< edm::DetSetVector< GEMDigiSimLink > > gemSimLinkToken_
edm::EDGetTokenT< GEMPadDigiClusterCollection > gemClusterToken_
edm::EDGetTokenT< GEMDigiCollection > gemDigiToken_
def move(src, dest)
Definition: eostools.py:511
edm::EDGetTokenT< GEMPadDigiCollection > gemPadToken_

◆ ~GEMDigiMatcher()

GEMDigiMatcher::~GEMDigiMatcher ( )
inline

Definition at line 37 of file GEMDigiMatcher.h.

37 {}

Member Function Documentation

◆ allPads()

const std::map<unsigned int, GEMPadDigiContainer> GEMDigiMatcher::allPads ( ) const
inline

Definition at line 83 of file GEMDigiMatcher.h.

References detid_to_pads_.

83 { return detid_to_pads_; }
std::map< unsigned int, GEMPadDigiContainer > detid_to_pads_

◆ chamberIdsCluster()

std::set< unsigned int > GEMDigiMatcher::chamberIdsCluster ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 341 of file GEMDigiMatcher.cc.

341  {
342  return selectDetIds(chamber_to_clusters_, gem_type);
343 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMPadDigiClusterContainer > chamber_to_clusters_

◆ chamberIdsDigi()

std::set< unsigned int > GEMDigiMatcher::chamberIdsDigi ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 333 of file GEMDigiMatcher.cc.

333  {
334  return selectDetIds(chamber_to_digis_, gem_type);
335 }
std::map< unsigned int, GEMDigiContainer > chamber_to_digis_
std::set< unsigned int > selectDetIds(const T &, int) const

◆ chamberIdsPad()

std::set< unsigned int > GEMDigiMatcher::chamberIdsPad ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 337 of file GEMDigiMatcher.cc.

337  {
338  return selectDetIds(chamber_to_pads_, gem_type);
339 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMPadDigiContainer > chamber_to_pads_

◆ clear()

void GEMDigiMatcher::clear ( void  )
private

Definition at line 538 of file GEMDigiMatcher.cc.

538  {
539  detid_to_simLinks_.clear();
540 
541  detid_to_digis_.clear();
542  chamber_to_digis_.clear();
543  superchamber_to_digis_.clear();
544 
545  detid_to_pads_.clear();
546  chamber_to_pads_.clear();
547  superchamber_to_pads_.clear();
548 
549  detid_to_clusters_.clear();
550  chamber_to_clusters_.clear();
552 
553  superchamber_to_copads_.clear();
554 }
std::map< unsigned int, GEMDigiSimLinkContainer > detid_to_simLinks_
std::map< unsigned int, GEMDigiContainer > detid_to_digis_
std::map< unsigned int, GEMDigiContainer > chamber_to_digis_
std::map< unsigned int, GEMPadDigiClusterContainer > detid_to_clusters_
std::map< unsigned int, GEMDigiContainer > superchamber_to_digis_
std::map< unsigned int, GEMPadDigiContainer > chamber_to_pads_
std::map< unsigned int, GEMPadDigiContainer > superchamber_to_pads_
std::map< unsigned int, GEMPadDigiContainer > detid_to_pads_
std::map< unsigned int, GEMCoPadDigiContainer > superchamber_to_copads_
std::map< unsigned int, GEMPadDigiClusterContainer > superchamber_to_clusters_
std::map< unsigned int, GEMPadDigiClusterContainer > chamber_to_clusters_

◆ clustersInChamber()

const GEMPadDigiClusterContainer & GEMDigiMatcher::clustersInChamber ( unsigned int  detid) const

Definition at line 403 of file GEMDigiMatcher.cc.

403  {
404  if (chamber_to_clusters_.find(detid) == chamber_to_clusters_.end())
405  return no_gem_clusters_;
406  return chamber_to_clusters_.at(detid);
407 }
std::map< unsigned int, GEMPadDigiClusterContainer > chamber_to_clusters_
GEMPadDigiClusterContainer no_gem_clusters_

◆ clustersInDetId()

const GEMPadDigiClusterContainer & GEMDigiMatcher::clustersInDetId ( unsigned int  detid) const

Definition at line 397 of file GEMDigiMatcher.cc.

397  {
398  if (detid_to_clusters_.find(detid) == detid_to_clusters_.end())
399  return no_gem_clusters_;
400  return detid_to_clusters_.at(detid);
401 }
std::map< unsigned int, GEMPadDigiClusterContainer > detid_to_clusters_
GEMPadDigiClusterContainer no_gem_clusters_

◆ clustersInSuperChamber()

const GEMPadDigiClusterContainer & GEMDigiMatcher::clustersInSuperChamber ( unsigned int  detid) const

Definition at line 409 of file GEMDigiMatcher.cc.

409  {
410  if (superchamber_to_clusters_.find(detid) == superchamber_to_clusters_.end())
411  return no_gem_clusters_;
412  return superchamber_to_clusters_.at(detid);
413 }
std::map< unsigned int, GEMPadDigiClusterContainer > superchamber_to_clusters_
GEMPadDigiClusterContainer no_gem_clusters_

◆ coPadsInSuperChamber()

const GEMCoPadDigiContainer & GEMDigiMatcher::coPadsInSuperChamber ( unsigned int  detid) const

Definition at line 415 of file GEMDigiMatcher.cc.

415  {
416  if (superchamber_to_copads_.find(detid) == superchamber_to_copads_.end())
417  return no_gem_copads_;
418  return superchamber_to_copads_.at(detid);
419 }
GEMCoPadDigiContainer no_gem_copads_
std::map< unsigned int, GEMCoPadDigiContainer > superchamber_to_copads_

◆ detIdsCluster()

std::set< unsigned int > GEMDigiMatcher::detIdsCluster ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 329 of file GEMDigiMatcher.cc.

329  {
330  return selectDetIds(detid_to_clusters_, gem_type);
331 }
std::map< unsigned int, GEMPadDigiClusterContainer > detid_to_clusters_
std::set< unsigned int > selectDetIds(const T &, int) const

◆ detIdsDigi()

std::set< unsigned int > GEMDigiMatcher::detIdsDigi ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 323 of file GEMDigiMatcher.cc.

323  {
324  return selectDetIds(detid_to_digis_, gem_type);
325 }
std::map< unsigned int, GEMDigiContainer > detid_to_digis_
std::set< unsigned int > selectDetIds(const T &, int) const

◆ detIdsPad()

std::set< unsigned int > GEMDigiMatcher::detIdsPad ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 327 of file GEMDigiMatcher.cc.

327 { return selectDetIds(detid_to_pads_, gem_type); }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMPadDigiContainer > detid_to_pads_

◆ detIdsSimLink()

std::set< unsigned int > GEMDigiMatcher::detIdsSimLink ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 319 of file GEMDigiMatcher.cc.

319  {
320  return selectDetIds(detid_to_simLinks_, gem_type);
321 }
std::map< unsigned int, GEMDigiSimLinkContainer > detid_to_simLinks_
std::set< unsigned int > selectDetIds(const T &, int) const

◆ digisInChamber()

const GEMDigiContainer & GEMDigiMatcher::digisInChamber ( unsigned int  detid) const

Definition at line 367 of file GEMDigiMatcher.cc.

367  {
368  if (chamber_to_digis_.find(detid) == chamber_to_digis_.end())
369  return no_gem_digis_;
370  return chamber_to_digis_.at(detid);
371 }
std::map< unsigned int, GEMDigiContainer > chamber_to_digis_
GEMDigiContainer no_gem_digis_

◆ digisInDetId()

const GEMDigiContainer & GEMDigiMatcher::digisInDetId ( unsigned int  detid) const

Definition at line 361 of file GEMDigiMatcher.cc.

361  {
362  if (detid_to_digis_.find(detid) == detid_to_digis_.end())
363  return no_gem_digis_;
364  return detid_to_digis_.at(detid);
365 }
std::map< unsigned int, GEMDigiContainer > detid_to_digis_
GEMDigiContainer no_gem_digis_

◆ digisInSuperChamber()

const GEMDigiContainer & GEMDigiMatcher::digisInSuperChamber ( unsigned int  detid) const

Definition at line 373 of file GEMDigiMatcher.cc.

373  {
374  if (superchamber_to_digis_.find(detid) == superchamber_to_digis_.end())
375  return no_gem_digis_;
376  return superchamber_to_digis_.at(detid);
377 }
GEMDigiContainer no_gem_digis_
std::map< unsigned int, GEMDigiContainer > superchamber_to_digis_

◆ extrapolateHsfromGEMPad()

int GEMDigiMatcher::extrapolateHsfromGEMPad ( unsigned  int,
int   
) const

◆ extrapolateHsfromGEMStrip()

int GEMDigiMatcher::extrapolateHsfromGEMStrip ( unsigned  int,
int   
) const

◆ getGlobalPointDigi()

GlobalPoint GEMDigiMatcher::getGlobalPointDigi ( unsigned int  rawId,
const GEMDigi d 
) const

Definition at line 524 of file GEMDigiMatcher.cc.

References ztail::d.

524  {
525  GEMDetId gem_id(rawId);
526  const LocalPoint& gem_lp = gemGeometry_->etaPartition(gem_id)->centreOfStrip(d.strip());
527  const GlobalPoint& gem_gp = gemGeometry_->idToDet(gem_id)->surface().toGlobal(gem_lp);
528  return gem_gp;
529 }
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a GEMEtaPartition given its id.
Definition: GEMGeometry.cc:77
const GeomDet * idToDet(DetId) const override
Definition: GEMGeometry.cc:25
const GEMGeometry * gemGeometry_
d
Definition: ztail.py:151
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
LocalPoint centreOfStrip(int strip) const

◆ getGlobalPointPad()

GlobalPoint GEMDigiMatcher::getGlobalPointPad ( unsigned int  rawId,
const GEMPadDigi tp 
) const

Definition at line 531 of file GEMDigiMatcher.cc.

References cmsswSequenceInfo::tp.

531  {
532  GEMDetId gem_id(rawId);
533  const LocalPoint& gem_lp = gemGeometry_->etaPartition(gem_id)->centreOfPad(tp.pad());
534  const GlobalPoint& gem_gp = gemGeometry_->idToDet(gem_id)->surface().toGlobal(gem_lp);
535  return gem_gp;
536 }
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a GEMEtaPartition given its id.
Definition: GEMGeometry.cc:77
const GeomDet * idToDet(DetId) const override
Definition: GEMGeometry.cc:25
const GEMGeometry * gemGeometry_
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
LocalPoint centreOfPad(int pad) const

◆ init()

void GEMDigiMatcher::init ( const edm::Event e,
const edm::EventSetup eventSetup 
)

Definition at line 47 of file GEMDigiMatcher.cc.

References edm::EventSetup::getHandle(), and iEvent.

47  {
48  muonSimHitMatcher_->init(iEvent, iSetup);
49 
50  if (matchToSimLink_)
52  iEvent.getByToken(gemDigiToken_, gemDigisH_);
53  iEvent.getByToken(gemPadToken_, gemPadsH_);
55  iEvent.getByToken(gemCoPadToken_, gemCoPadsH_);
56 
57  const auto gemH = iSetup.getHandle(geomToken_);
58  if (!gemH.isValid()) {
59  gemGeometry_ = nullptr;
60  edm::LogError("GEMDigiMatcher") << "Failed to initialize GEM geometry.";
61  }
62  gemGeometry_ = gemH.product();
63 }
std::shared_ptr< GEMSimHitMatcher > muonSimHitMatcher_
edm::Handle< GEMCoPadDigiCollection > gemCoPadsH_
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
edm::EDGetTokenT< GEMCoPadDigiCollection > gemCoPadToken_
Log< level::Error, false > LogError
edm::EDGetTokenT< edm::DetSetVector< GEMDigiSimLink > > gemSimLinkToken_
edm::Handle< GEMDigiCollection > gemDigisH_
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< GEMPadDigiClusterCollection > gemClusterToken_
const GEMGeometry * gemGeometry_
edm::Handle< GEMPadDigiCollection > gemPadsH_
edm::Handle< GEMPadDigiClusterCollection > gemClustersH_
edm::EDGetTokenT< GEMDigiCollection > gemDigiToken_
edm::Handle< edm::DetSetVector< GEMDigiSimLink > > gemDigisSLH_
edm::EDGetTokenT< GEMPadDigiCollection > gemPadToken_

◆ match()

void GEMDigiMatcher::match ( const SimTrack t,
const SimVertex v 
)

do the matching

Definition at line 66 of file GEMDigiMatcher.cc.

References funct::abs(), clear(), submitPVValidationJobs::t, and findQualityFiles::v.

66  {
67  // match simhits first
68  muonSimHitMatcher_->match(t, v);
69 
70  // get the digi collections
71  const GEMDigiCollection& gemDigis = *gemDigisH_.product();
72  const GEMPadDigiCollection& gemPads = *gemPadsH_.product();
73  const GEMPadDigiClusterCollection& gemClusters = *gemClustersH_.product();
74  const GEMCoPadDigiCollection& gemCoPads = *gemCoPadsH_.product();
75 
76  clear();
77 
78  // hard cut on non-GEM muons
79  if (std::abs(t.momentum().eta()) < 1.55)
80  return;
81 
82  // now match the digis
83  if (matchToSimLink_) {
85  matchDigisSLToSimTrack(gemDigisSL);
86  }
87  matchDigisToSimTrack(gemDigis);
88  matchPadsToSimTrack(gemPads);
89  matchClustersToSimTrack(gemClusters);
90  matchCoPadsToSimTrack(gemCoPads);
91 }
void matchCoPadsToSimTrack(const GEMCoPadDigiCollection &)
std::shared_ptr< GEMSimHitMatcher > muonSimHitMatcher_
edm::Handle< GEMCoPadDigiCollection > gemCoPadsH_
void matchPadsToSimTrack(const GEMPadDigiCollection &)
T const * product() const
Definition: Handle.h:70
void matchClustersToSimTrack(const GEMPadDigiClusterCollection &)
edm::Handle< GEMDigiCollection > gemDigisH_
void matchDigisToSimTrack(const GEMDigiCollection &)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::Handle< GEMPadDigiCollection > gemPadsH_
void matchDigisSLToSimTrack(const edm::DetSetVector< GEMDigiSimLink > &)
edm::Handle< GEMPadDigiClusterCollection > gemClustersH_
edm::Handle< edm::DetSetVector< GEMDigiSimLink > > gemDigisSLH_

◆ matchClustersToSimTrack()

void GEMDigiMatcher::matchClustersToSimTrack ( const GEMPadDigiClusterCollection clusters)
private

Definition at line 245 of file GEMDigiMatcher.cc.

References GEMDetId::chamberId(), bsc_activity_cfg::clusters, trackerHitRTTI::isMatched(), AlCaHLTBitMon_ParallelJobs::p, DetId::rawId(), and GEMDetId::superChamberId().

245  {
246  for (auto it = clusters.begin(); it != clusters.end(); ++it) {
247  const GEMDetId p_id = (*it).first;
248  const auto clvec = (*it).second;
249  for (auto cluster = clvec.first; cluster != clvec.second; ++cluster) {
250  bool isMatched = false;
251 
252  // check that the cluster BX is within the range
253  if (cluster->bx() < minBXCluster_ || cluster->bx() > maxBXCluster_)
254  continue;
255 
256  if (verboseCluster_)
257  edm::LogInfo("GEMDigiMatcher") << "GEMCluster " << p_id << " " << *cluster << endl;
258 
259  // check that at least one pad was hit by the track
260  for (const auto& p : cluster->pads()) {
261  for (const auto& pad : detid_to_pads_[p_id.rawId()]) {
262  if (pad.pad() == p) {
263  isMatched = true;
264  }
265  }
266  }
267  if (isMatched) {
268  detid_to_clusters_[p_id.rawId()].push_back(*cluster);
269  chamber_to_clusters_[p_id.chamberId().rawId()].push_back(*cluster);
270  superchamber_to_clusters_[p_id.superChamberId().rawId()].push_back(*cluster);
271  if (verboseCluster_)
272  edm::LogInfo("GEMDigiMatcher") << "...was matched!" << endl;
273  }
274  }
275  }
276 }
std::map< unsigned int, GEMPadDigiClusterContainer > detid_to_clusters_
bool isMatched(TrackingRecHit const &hit)
Log< level::Info, false > LogInfo
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::map< unsigned int, GEMPadDigiContainer > detid_to_pads_
std::map< unsigned int, GEMPadDigiClusterContainer > superchamber_to_clusters_
constexpr GEMDetId superChamberId() const
Definition: GEMDetId.h:207
std::map< unsigned int, GEMPadDigiClusterContainer > chamber_to_clusters_
constexpr GEMDetId chamberId() const
Definition: GEMDetId.h:204

◆ matchCoPadsToSimTrack()

void GEMDigiMatcher::matchCoPadsToSimTrack ( const GEMCoPadDigiCollection co_pads)
private

Definition at line 278 of file GEMDigiMatcher.cc.

References relativeConstraints::chamber, ztail::d, triggerObjects_cff::id, AlCaHLTBitMon_ParallelJobs::p, HLT_2022v12_cff::region, and relativeConstraints::station.

278  {
279  // loop on the GEM detids
280  for (auto d : superChamberIdsPad()) {
281  GEMDetId id(d);
282 
283  const auto& co_pads_in_det = co_pads.get(id);
284  for (auto copad = co_pads_in_det.first; copad != co_pads_in_det.second; ++copad) {
285  // check that the cluster BX is within the range
286  if (copad->bx(1) < minBXCoPad_ || copad->bx(1) > maxBXCoPad_)
287  continue;
288 
289  if (verboseCoPad_)
290  edm::LogInfo("GEMDigiMatcher") << "GEMCoPadDigi: " << id << " " << *copad << endl;
291 
292  bool isMatchedL1 = false;
293  bool isMatchedL2 = false;
294  GEMDetId gemL1_id(id.region(), 1, id.station(), 1, id.chamber(), copad->roll());
295  GEMDetId gemL2_id(id.region(), 1, id.station(), 2, id.chamber(), 0);
296 
297  // first pad is tightly matched
298  for (const auto& p : padsInDetId(gemL1_id.rawId())) {
299  if (p == copad->first()) {
300  isMatchedL1 = true;
301  }
302  }
303 
304  // second pad can only be loosely matched
305  for (const auto& p : padsInChamber(gemL2_id.rawId())) {
306  if (p == copad->second()) {
307  isMatchedL2 = true;
308  }
309  }
310  if (isMatchedL1 and isMatchedL2) {
311  superchamber_to_copads_[id.rawId()].push_back(*copad);
312  if (verboseCoPad_)
313  edm::LogInfo("GEMDigiMatcher") << "...was matched! " << endl;
314  }
315  }
316  }
317 }
const GEMPadDigiContainer & padsInChamber(unsigned int) const
const GEMPadDigiContainer & padsInDetId(unsigned int) const
d
Definition: ztail.py:151
Log< level::Info, false > LogInfo
std::map< unsigned int, GEMCoPadDigiContainer > superchamber_to_copads_
std::set< unsigned int > superChamberIdsPad(int gem_type=MuonHitHelper::GEM_ALL) const

◆ matchDigisSLToSimTrack()

void GEMDigiMatcher::matchDigisSLToSimTrack ( const edm::DetSetVector< GEMDigiSimLink > &  digisSL)
private

Definition at line 93 of file GEMDigiMatcher.cc.

References funct::abs(), edm::DetSetVector< T >::begin(), relativeConstraints::empty, edm::DetSetVector< T >::end(), and DetId::rawId().

93  {
94  if (verboseSimLink_)
95  edm::LogInfo("GEMDigiMatcher") << "Matching simtrack to GEM simlinks" << endl;
96 
97  // loop on the simlinks
98  for (auto itsimlink = digisSL.begin(); itsimlink != digisSL.end(); itsimlink++) {
99  GEMDetId p_id(itsimlink->id);
100  for (auto sl = itsimlink->data.begin(); sl != itsimlink->data.end(); ++sl) {
101  // ignore simlinks in non-matched chambers
102  const auto& detids(muonSimHitMatcher_->detIds());
103  if (detids.find(p_id.rawId()) == detids.end())
104  continue;
105 
106  // no simhits in this chamber!
107  if (muonSimHitMatcher_->hitsInDetId(p_id.rawId()).empty())
108  continue;
109 
110  if (verboseSimLink_)
111  edm::LogInfo("GEMDigiMatcher") << "GEMDigiSimLink " << p_id << " " << sl->getStrip() << " " << sl->getBx()
112  << " " << sl->getTrackId() << std::endl;
113 
114  // consider only the muon hits
115  if (simMuOnly_ && std::abs(sl->getParticleType()) != 13)
116  continue;
117 
118  // discard electron hits in the GEM chambers
119  if (discardEleHits_ && std::abs(sl->getParticleType()) == 11)
120  continue;
121 
122  // loop on the matched simhits
123  for (const auto& simhit : muonSimHitMatcher_->hitsInDetId(p_id.rawId())) {
124  // check if the simhit properties agree
125  if (simhit.trackId() == sl->getTrackId() and simhit.particleType() == sl->getParticleType()) {
126  detid_to_simLinks_[p_id.rawId()].push_back(*sl);
127  if (verboseSimLink_)
128  edm::LogInfo("GEMDigiMatcher") << "...was matched!" << endl;
129  break;
130  }
131  }
132  }
133  }
134 }
std::map< unsigned int, GEMDigiSimLinkContainer > detid_to_simLinks_
std::shared_ptr< GEMSimHitMatcher > muonSimHitMatcher_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:325
Log< level::Info, false > LogInfo
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:314

◆ matchDigisToSimTrack()

void GEMDigiMatcher::matchDigisToSimTrack ( const GEMDigiCollection digis)
private

Definition at line 136 of file GEMDigiMatcher.cc.

References GEMDetId::chamberId(), ztail::d, trackerHitRTTI::isMatched(), DetId::rawId(), and GEMDetId::superChamberId().

136  {
137  if (verboseDigi_)
138  edm::LogInfo("GEMDigiMatcher") << "Matching simtrack to GEM digis" << endl;
139  for (auto id : muonSimHitMatcher_->detIds()) {
140  GEMDetId p_id(id);
141  const auto& hit_strips = muonSimHitMatcher_->hitStripsInDetId(id, matchDeltaStrip_);
142  const auto& digis_in_det = digis.get(p_id);
143 
144  for (auto d = digis_in_det.first; d != digis_in_det.second; ++d) {
145  bool isMatched = false;
146 
147  // check that the digi is within BX range
148  if (d->bx() < minBXDigi_ || d->bx() > maxBXDigi_)
149  continue;
150 
151  if (verboseDigi_)
152  edm::LogInfo("GEMDigiMatcher") << "GEMDigi " << p_id << " " << *d << endl;
153 
154  // GEN-SIM-DIGI-RAW monte carlo
155  if (matchToSimLink_) {
156  // check that the digi matches to at least one GEMDigiSimLink
157  for (const auto& sl : detid_to_simLinks_[p_id.rawId()]) {
158  if (sl.getStrip() == d->strip() and sl.getBx() == d->bx()) {
159  isMatched = true;
160  break;
161  }
162  }
163  }
164  // GEN-SIM-RAW monte carlo
165  else {
166  // check that it matches a strip that was hit by SimHits from our track
167  if (hit_strips.find(d->strip()) != hit_strips.end()) {
168  isMatched = true;
169  }
170  }
171  if (isMatched) {
172  detid_to_digis_[p_id.rawId()].push_back(*d);
173  chamber_to_digis_[p_id.chamberId().rawId()].push_back(*d);
174  superchamber_to_digis_[p_id.superChamberId().rawId()].push_back(*d);
175  if (verboseDigi_)
176  edm::LogInfo("GEMDigiMatcher") << "...was matched!" << endl;
177  }
178  }
179  }
180 }
std::map< unsigned int, GEMDigiSimLinkContainer > detid_to_simLinks_
std::map< unsigned int, GEMDigiContainer > detid_to_digis_
std::shared_ptr< GEMSimHitMatcher > muonSimHitMatcher_
std::map< unsigned int, GEMDigiContainer > chamber_to_digis_
std::map< unsigned int, GEMDigiContainer > superchamber_to_digis_
bool isMatched(TrackingRecHit const &hit)
d
Definition: ztail.py:151
Log< level::Info, false > LogInfo

◆ matchPadsInDetId()

void GEMDigiMatcher::matchPadsInDetId ( const GEMDetId simhitId,
const GEMPadDigiCollection  
)
private

◆ matchPadsToSimTrack()

void GEMDigiMatcher::matchPadsToSimTrack ( const GEMPadDigiCollection pads)
private

Definition at line 181 of file GEMDigiMatcher.cc.

References GEMDetId::chamber(), GEMDetId::chamberId(), GEMPadDigi::GE21, GEMPadDigi::GE21SplitStrip, GEMDetId::isGE11(), GEMDetId::isGE21(), GEMDetId::isME0(), GEMDetId::layer(), or, DetId::rawId(), GEMDetId::region(), GEMDetId::ring(), GEMDetId::roll(), GEMDetId::station(), and GEMDetId::superChamberId().

181  {
182  for (auto it = pads.begin(); it != pads.end(); ++it) {
183  const GEMDetId& p_id = (*it).first;
184  const auto& padsvec = (*it).second;
185 
186  for (auto pad = padsvec.first; pad != padsvec.second; ++pad) {
187  // check that the pad BX is within the range
188  if (pad->bx() < minBXPad_ || pad->bx() > maxBXPad_)
189  continue;
190 
191  if (verbosePad_)
192  edm::LogInfo("GEMDigiMatcher") << "GEMPad " << p_id << " " << *pad << endl;
193 
194  auto digivec = detid_to_digis_[p_id.rawId()];
195  /*
196  For GE1/1 and ME0 (and obsolete 8-partition GE2/1) geometries, the matching
197  is pretty simple. Each simhit is converted to a digi. Two digis in neighboring
198  strips are ed together into a pad. So for these geometries you just need
199  to match pads to simtracks that are in the same eta partition (detid) as the
200  simhit is in. By convention, all pads in the 16-partition GE2/1 geometry are
201  assigned to odd partition numbers. For the 16-partition GE2/1 geometry, you may
202  have a track with simhits in eta partition 1 and 2 on the same strip and only
203  produce 1 pad associated to eta partition 1. Therefore, for pads with odd
204  partition number N, you need to consider the digis in the even partition number
205  N+1.
206  */
207  if (p_id.roll() % 2 == 1 && p_id.isGE21() && pad->nPartitions() == GEMPadDigi::GE21SplitStrip) {
208  // make the GEMDetId for the neighboring partition
209  GEMDetId p_id2(p_id.region(), p_id.ring(), p_id.station(), p_id.layer(), p_id.chamber(), p_id.roll() + 1);
210 
211  // make a temporary container for its digis
212  auto digivec2 = detid_to_digis_[p_id2.rawId()];
213 
214  // now add it to the container for the digis in the odd partition number
215  digivec.insert(digivec.end(), digivec2.begin(), digivec2.end());
216  }
217  for (const auto& digi : digivec) {
218  // for 8-partition geometries, the pad number equals the strip number divided by two
219  const bool match8Partition(digi.strip() / 2 == pad->pad());
220 
221  // for 16-partition geometries, the pad number is the strip number itself
222  const bool match16Partition(digi.strip() == pad->pad());
223 
224  // now consider the different cases separately
225  const bool matchGE0(p_id.isME0() and match8Partition);
226  const bool matchGE11(p_id.isGE11() and match8Partition);
227  const bool matchGE21_8(p_id.isGE21() and pad->nPartitions() == GEMPadDigi::GE21 and match8Partition);
228  const bool matchGE21_16(p_id.isGE21() and pad->nPartitions() == GEMPadDigi::GE21SplitStrip and
229  match16Partition);
230 
231  // OR them together
232  if (matchGE0 or matchGE11 or matchGE21_8 or matchGE21_16) {
233  detid_to_pads_[p_id.rawId()].push_back(*pad);
234  chamber_to_pads_[p_id.chamberId().rawId()].push_back(*pad);
235  superchamber_to_pads_[p_id.superChamberId().rawId()].push_back(*pad);
236  if (verbosePad_)
237  edm::LogInfo("GEMDigiMatcher") << "...was matched!" << endl;
238  break;
239  }
240  }
241  }
242  }
243 }
constexpr int station() const
Definition: GEMDetId.h:179
std::map< unsigned int, GEMDigiContainer > detid_to_digis_
bool isGE11() const
Definition: GEMDetId.cc:9
constexpr int region() const
Definition: GEMDetId.h:171
constexpr int layer() const
Definition: GEMDetId.h:190
constexpr int chamber() const
Definition: GEMDetId.h:183
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::map< unsigned int, GEMPadDigiContainer > chamber_to_pads_
bool isME0() const
Definition: GEMDetId.cc:13
constexpr int ring() const
Definition: GEMDetId.h:176
bool isGE21() const
Definition: GEMDetId.cc:11
Log< level::Info, false > LogInfo
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::map< unsigned int, GEMPadDigiContainer > superchamber_to_pads_
std::map< unsigned int, GEMPadDigiContainer > detid_to_pads_
constexpr GEMDetId superChamberId() const
Definition: GEMDetId.h:207
constexpr int roll() const
Definition: GEMDetId.h:194
constexpr GEMDetId chamberId() const
Definition: GEMDetId.h:204

◆ muonSimHitMatcher()

std::shared_ptr<GEMSimHitMatcher> GEMDigiMatcher::muonSimHitMatcher ( )
inline

Definition at line 110 of file GEMDigiMatcher.h.

References muonSimHitMatcher_.

110 { return muonSimHitMatcher_; }
std::shared_ptr< GEMSimHitMatcher > muonSimHitMatcher_

◆ nCoPads()

int GEMDigiMatcher::nCoPads ( ) const

How many coincidence pads in GEM did this simtrack get in total?

Definition at line 475 of file GEMDigiMatcher.cc.

References dqmiodumpmetadata::n.

475  {
476  int n = 0;
477  const auto& ids = superChamberIdsCoPad();
478  for (const auto& id : ids) {
479  n += coPadsInSuperChamber(id).size();
480  }
481  return n;
482 }
std::set< unsigned int > superChamberIdsCoPad(int gem_type=MuonHitHelper::GEM_ALL) const
const GEMCoPadDigiContainer & coPadsInSuperChamber(unsigned int) const

◆ nLayersWithClustersInSuperChamber()

int GEMDigiMatcher::nLayersWithClustersInSuperChamber ( unsigned int  detid) const

Definition at line 451 of file GEMDigiMatcher.cc.

References GEMDetId::chamber(), bsc_activity_cfg::clusters, hgcalTopologyTester_cfi::layers, GEMDetId::region(), GEMDetId::ring(), and GEMDetId::station().

451  {
452  set<int> layers;
453  GEMDetId sch_id(detid);
454  for (int iLayer = 1; iLayer <= 2; iLayer++) {
455  GEMDetId ch_id(sch_id.region(), sch_id.ring(), sch_id.station(), iLayer, sch_id.chamber(), 0);
456  // get the pads in this chamber
457  const auto& clusters = clustersInChamber(ch_id.rawId());
458  // at least one digi in this layer!
459  if (!clusters.empty()) {
460  layers.insert(iLayer);
461  }
462  }
463  return layers.size();
464 }
const GEMPadDigiClusterContainer & clustersInChamber(unsigned int) const

◆ nLayersWithDigisInSuperChamber()

int GEMDigiMatcher::nLayersWithDigisInSuperChamber ( unsigned int  detid) const

Definition at line 421 of file GEMDigiMatcher.cc.

References GEMDetId::chamber(), hgcalTopologyTester_cfi::layers, GEMDetId::region(), GEMDetId::ring(), and GEMDetId::station().

421  {
422  set<int> layers;
423  GEMDetId sch_id(detid);
424  for (int iLayer = 1; iLayer <= 2; iLayer++) {
425  GEMDetId ch_id(sch_id.region(), sch_id.ring(), sch_id.station(), iLayer, sch_id.chamber(), 0);
426  // get the digis in this chamber
427  const auto& digis = digisInChamber(ch_id.rawId());
428  // at least one digi in this layer!
429  if (!digis.empty()) {
430  layers.insert(iLayer);
431  }
432  }
433  return layers.size();
434 }
const GEMDigiContainer & digisInChamber(unsigned int) const

◆ nLayersWithPadsInSuperChamber()

int GEMDigiMatcher::nLayersWithPadsInSuperChamber ( unsigned int  detid) const

Definition at line 436 of file GEMDigiMatcher.cc.

References GEMDetId::chamber(), hgcalTopologyTester_cfi::layers, GEMDetId::region(), GEMDetId::ring(), and GEMDetId::station().

436  {
437  set<int> layers;
438  GEMDetId sch_id(detid);
439  for (int iLayer = 1; iLayer <= 2; iLayer++) {
440  GEMDetId ch_id(sch_id.region(), sch_id.ring(), sch_id.station(), iLayer, sch_id.chamber(), 0);
441  // get the pads in this chamber
442  const auto& pads = padsInChamber(ch_id.rawId());
443  // at least one digi in this layer!
444  if (!pads.empty()) {
445  layers.insert(iLayer);
446  }
447  }
448  return layers.size();
449 }
const GEMPadDigiContainer & padsInChamber(unsigned int) const

◆ nPads()

int GEMDigiMatcher::nPads ( ) const

How many pads in GEM did this simtrack get in total?

Definition at line 466 of file GEMDigiMatcher.cc.

References dqmiodumpmetadata::n.

466  {
467  int n = 0;
468  const auto& ids = superChamberIdsPad();
469  for (const auto& id : ids) {
470  n += padsInSuperChamber(id).size();
471  }
472  return n;
473 }
const GEMPadDigiContainer & padsInSuperChamber(unsigned int) const
std::set< unsigned int > superChamberIdsPad(int gem_type=MuonHitHelper::GEM_ALL) const

◆ padNumbersInDetId()

std::set< int > GEMDigiMatcher::padNumbersInDetId ( unsigned int  detid) const

Definition at line 493 of file GEMDigiMatcher.cc.

References ztail::d, and mps_fire::result.

493  {
494  set<int> result;
495  const auto& digis = padsInDetId(detid);
496  for (const auto& d : digis) {
497  result.insert(d.pad());
498  }
499  return result;
500 }
const GEMPadDigiContainer & padsInDetId(unsigned int) const
d
Definition: ztail.py:151

◆ padsInChamber()

const GEMPadDigiContainer & GEMDigiMatcher::padsInChamber ( unsigned int  detid) const

Definition at line 385 of file GEMDigiMatcher.cc.

385  {
386  if (chamber_to_pads_.find(detid) == chamber_to_pads_.end())
387  return no_gem_pads_;
388  return chamber_to_pads_.at(detid);
389 }
std::map< unsigned int, GEMPadDigiContainer > chamber_to_pads_
GEMPadDigiContainer no_gem_pads_

◆ padsInDetId()

const GEMPadDigiContainer & GEMDigiMatcher::padsInDetId ( unsigned int  detid) const

Definition at line 379 of file GEMDigiMatcher.cc.

379  {
380  if (detid_to_pads_.find(detid) == detid_to_pads_.end())
381  return no_gem_pads_;
382  return detid_to_pads_.at(detid);
383 }
std::map< unsigned int, GEMPadDigiContainer > detid_to_pads_
GEMPadDigiContainer no_gem_pads_

◆ padsInSuperChamber()

const GEMPadDigiContainer & GEMDigiMatcher::padsInSuperChamber ( unsigned int  detid) const

Definition at line 391 of file GEMDigiMatcher.cc.

391  {
392  if (superchamber_to_pads_.find(detid) == superchamber_to_pads_.end())
393  return no_gem_pads_;
394  return superchamber_to_pads_.at(detid);
395 }
std::map< unsigned int, GEMPadDigiContainer > superchamber_to_pads_
GEMPadDigiContainer no_gem_pads_

◆ partitionNumbers()

std::set< int > GEMDigiMatcher::partitionNumbers ( ) const

Definition at line 502 of file GEMDigiMatcher.cc.

References mps_fire::result, and GEMDetId::roll().

502  {
503  std::set<int> result;
504 
505  const auto& detids = detIdsDigi();
506  for (const auto& id : detids) {
507  const GEMDetId& idd(id);
508  result.insert(idd.roll());
509  }
510  return result;
511 }
std::set< unsigned int > detIdsDigi(int gem_type=MuonHitHelper::GEM_ALL) const

◆ partitionNumbersWithCoPads()

std::set< int > GEMDigiMatcher::partitionNumbersWithCoPads ( ) const

Definition at line 513 of file GEMDigiMatcher.cc.

References mps_fire::result, and GEMDetId::roll().

513  {
514  std::set<int> result;
515 
516  const auto& detids = superChamberIdsCoPad();
517  for (const auto& id : detids) {
518  const GEMDetId& idd(id);
519  result.insert(idd.roll());
520  }
521  return result;
522 }
std::set< unsigned int > superChamberIdsCoPad(int gem_type=MuonHitHelper::GEM_ALL) const

◆ selectDetIds()

template<class T >
std::set< unsigned int > GEMDigiMatcher::selectDetIds ( const T digis,
int  gem_type 
) const
private

Definition at line 191 of file GEMDigiMatcher.h.

References AlCaHLTBitMon_ParallelJobs::p, mps_fire::result, GEMDetId::ring(), GEMDetId::station(), and MuonHitHelper::toGEMType().

191  {
192  std::set<unsigned int> result;
193  for (const auto& p : digis) {
194  const auto& id = p.first;
195  if (gem_type > 0) {
196  GEMDetId detId(id);
197  if (MuonHitHelper::toGEMType(detId.station(), detId.ring()) != gem_type)
198  continue;
199  }
200  result.insert(p.first);
201  }
202  return result;
203 }
static int toGEMType(int st, int ri)

◆ simLinksInDetId()

const GEMDigiSimLinkContainer& GEMDigiMatcher::simLinksInDetId ( unsigned  int) const

◆ stripNumbersInDetId()

std::set< int > GEMDigiMatcher::stripNumbersInDetId ( unsigned int  detid) const

Definition at line 484 of file GEMDigiMatcher.cc.

References ztail::d, and mps_fire::result.

484  {
485  set<int> result;
486  const auto& digis = digisInDetId(detid);
487  for (const auto& d : digis) {
488  result.insert(d.strip());
489  }
490  return result;
491 }
d
Definition: ztail.py:151
const GEMDigiContainer & digisInDetId(unsigned int) const

◆ superChamberIdsCluster()

std::set< unsigned int > GEMDigiMatcher::superChamberIdsCluster ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 353 of file GEMDigiMatcher.cc.

353  {
354  return selectDetIds(superchamber_to_clusters_, gem_type);
355 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMPadDigiClusterContainer > superchamber_to_clusters_

◆ superChamberIdsCoPad()

std::set< unsigned int > GEMDigiMatcher::superChamberIdsCoPad ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 357 of file GEMDigiMatcher.cc.

357  {
358  return selectDetIds(superchamber_to_copads_, gem_type);
359 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMCoPadDigiContainer > superchamber_to_copads_

◆ superChamberIdsDigi()

std::set< unsigned int > GEMDigiMatcher::superChamberIdsDigi ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 345 of file GEMDigiMatcher.cc.

345  {
346  return selectDetIds(superchamber_to_digis_, gem_type);
347 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMDigiContainer > superchamber_to_digis_

◆ superChamberIdsPad()

std::set< unsigned int > GEMDigiMatcher::superChamberIdsPad ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 349 of file GEMDigiMatcher.cc.

349  {
350  return selectDetIds(superchamber_to_pads_, gem_type);
351 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMPadDigiContainer > superchamber_to_pads_

Member Data Documentation

◆ chamber_to_clusters_

std::map<unsigned int, GEMPadDigiClusterContainer> GEMDigiMatcher::chamber_to_clusters_
private

Definition at line 178 of file GEMDigiMatcher.h.

◆ chamber_to_digis_

std::map<unsigned int, GEMDigiContainer> GEMDigiMatcher::chamber_to_digis_
private

Definition at line 170 of file GEMDigiMatcher.h.

◆ chamber_to_pads_

std::map<unsigned int, GEMPadDigiContainer> GEMDigiMatcher::chamber_to_pads_
private

Definition at line 174 of file GEMDigiMatcher.h.

◆ detid_to_clusters_

std::map<unsigned int, GEMPadDigiClusterContainer> GEMDigiMatcher::detid_to_clusters_
private

Definition at line 177 of file GEMDigiMatcher.h.

◆ detid_to_digis_

std::map<unsigned int, GEMDigiContainer> GEMDigiMatcher::detid_to_digis_
private

Definition at line 169 of file GEMDigiMatcher.h.

◆ detid_to_pads_

std::map<unsigned int, GEMPadDigiContainer> GEMDigiMatcher::detid_to_pads_
private

Definition at line 173 of file GEMDigiMatcher.h.

Referenced by allPads().

◆ detid_to_simLinks_

std::map<unsigned int, GEMDigiSimLinkContainer> GEMDigiMatcher::detid_to_simLinks_
private

Definition at line 167 of file GEMDigiMatcher.h.

◆ discardEleHits_

bool GEMDigiMatcher::discardEleHits_
private

Definition at line 149 of file GEMDigiMatcher.h.

◆ gemClustersH_

edm::Handle<GEMPadDigiClusterCollection> GEMDigiMatcher::gemClustersH_
private

Definition at line 137 of file GEMDigiMatcher.h.

◆ gemClusterToken_

edm::EDGetTokenT<GEMPadDigiClusterCollection> GEMDigiMatcher::gemClusterToken_
private

Definition at line 131 of file GEMDigiMatcher.h.

◆ gemCoPadsH_

edm::Handle<GEMCoPadDigiCollection> GEMDigiMatcher::gemCoPadsH_
private

Definition at line 138 of file GEMDigiMatcher.h.

◆ gemCoPadToken_

edm::EDGetTokenT<GEMCoPadDigiCollection> GEMDigiMatcher::gemCoPadToken_
private

Definition at line 132 of file GEMDigiMatcher.h.

◆ gemDigisH_

edm::Handle<GEMDigiCollection> GEMDigiMatcher::gemDigisH_
private

Definition at line 135 of file GEMDigiMatcher.h.

◆ gemDigisSLH_

edm::Handle<edm::DetSetVector<GEMDigiSimLink> > GEMDigiMatcher::gemDigisSLH_
private

Definition at line 134 of file GEMDigiMatcher.h.

◆ gemDigiToken_

edm::EDGetTokenT<GEMDigiCollection> GEMDigiMatcher::gemDigiToken_
private

Definition at line 129 of file GEMDigiMatcher.h.

◆ gemGeometry_

const GEMGeometry* GEMDigiMatcher::gemGeometry_
private

Definition at line 143 of file GEMDigiMatcher.h.

◆ gemPadsH_

edm::Handle<GEMPadDigiCollection> GEMDigiMatcher::gemPadsH_
private

Definition at line 136 of file GEMDigiMatcher.h.

◆ gemPadToken_

edm::EDGetTokenT<GEMPadDigiCollection> GEMDigiMatcher::gemPadToken_
private

Definition at line 130 of file GEMDigiMatcher.h.

◆ gemSimLinkToken_

edm::EDGetTokenT<edm::DetSetVector<GEMDigiSimLink> > GEMDigiMatcher::gemSimLinkToken_
private

Definition at line 128 of file GEMDigiMatcher.h.

◆ geomToken_

edm::ESGetToken<GEMGeometry, MuonGeometryRecord> GEMDigiMatcher::geomToken_
private

Definition at line 142 of file GEMDigiMatcher.h.

◆ matchDeltaStrip_

int GEMDigiMatcher::matchDeltaStrip_
private

Definition at line 156 of file GEMDigiMatcher.h.

◆ matchToSimLink_

bool GEMDigiMatcher::matchToSimLink_
private

Definition at line 164 of file GEMDigiMatcher.h.

◆ maxBXCluster_

int GEMDigiMatcher::maxBXCluster_
private

Definition at line 153 of file GEMDigiMatcher.h.

◆ maxBXCoPad_

int GEMDigiMatcher::maxBXCoPad_
private

Definition at line 154 of file GEMDigiMatcher.h.

◆ maxBXDigi_

int GEMDigiMatcher::maxBXDigi_
private

Definition at line 151 of file GEMDigiMatcher.h.

◆ maxBXPad_

int GEMDigiMatcher::maxBXPad_
private

Definition at line 152 of file GEMDigiMatcher.h.

◆ minBXCluster_

int GEMDigiMatcher::minBXCluster_
private

Definition at line 153 of file GEMDigiMatcher.h.

◆ minBXCoPad_

int GEMDigiMatcher::minBXCoPad_
private

Definition at line 154 of file GEMDigiMatcher.h.

◆ minBXDigi_

int GEMDigiMatcher::minBXDigi_
private

Definition at line 151 of file GEMDigiMatcher.h.

◆ minBXPad_

int GEMDigiMatcher::minBXPad_
private

Definition at line 152 of file GEMDigiMatcher.h.

◆ muonSimHitMatcher_

std::shared_ptr<GEMSimHitMatcher> GEMDigiMatcher::muonSimHitMatcher_
private

Definition at line 140 of file GEMDigiMatcher.h.

Referenced by muonSimHitMatcher().

◆ no_gem_clusters_

GEMPadDigiClusterContainer GEMDigiMatcher::no_gem_clusters_
private

Definition at line 186 of file GEMDigiMatcher.h.

◆ no_gem_copads_

GEMCoPadDigiContainer GEMDigiMatcher::no_gem_copads_
private

Definition at line 187 of file GEMDigiMatcher.h.

◆ no_gem_digis_

GEMDigiContainer GEMDigiMatcher::no_gem_digis_
private

Definition at line 184 of file GEMDigiMatcher.h.

◆ no_gem_pads_

GEMPadDigiContainer GEMDigiMatcher::no_gem_pads_
private

Definition at line 185 of file GEMDigiMatcher.h.

◆ no_gem_simLinks_

GEMDigiSimLinkContainer GEMDigiMatcher::no_gem_simLinks_
private

Definition at line 183 of file GEMDigiMatcher.h.

◆ simMuOnly_

bool GEMDigiMatcher::simMuOnly_
private

Definition at line 148 of file GEMDigiMatcher.h.

◆ superchamber_to_clusters_

std::map<unsigned int, GEMPadDigiClusterContainer> GEMDigiMatcher::superchamber_to_clusters_
private

Definition at line 179 of file GEMDigiMatcher.h.

◆ superchamber_to_copads_

std::map<unsigned int, GEMCoPadDigiContainer> GEMDigiMatcher::superchamber_to_copads_
private

Definition at line 181 of file GEMDigiMatcher.h.

◆ superchamber_to_digis_

std::map<unsigned int, GEMDigiContainer> GEMDigiMatcher::superchamber_to_digis_
private

Definition at line 171 of file GEMDigiMatcher.h.

◆ superchamber_to_pads_

std::map<unsigned int, GEMPadDigiContainer> GEMDigiMatcher::superchamber_to_pads_
private

Definition at line 175 of file GEMDigiMatcher.h.

◆ verboseCluster_

bool GEMDigiMatcher::verboseCluster_
private

Definition at line 161 of file GEMDigiMatcher.h.

◆ verboseCoPad_

bool GEMDigiMatcher::verboseCoPad_
private

Definition at line 162 of file GEMDigiMatcher.h.

◆ verboseDigi_

bool GEMDigiMatcher::verboseDigi_
private

Definition at line 159 of file GEMDigiMatcher.h.

◆ verbosePad_

bool GEMDigiMatcher::verbosePad_
private

Definition at line 160 of file GEMDigiMatcher.h.

◆ verboseSimLink_

bool GEMDigiMatcher::verboseSimLink_
private

Definition at line 158 of file GEMDigiMatcher.h.