CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
GEMPadDigiContainer
allPads () 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,
GEMPadDigiClusterContainer
chamber_to_clusters_
 
std::map< unsigned int,
GEMDigiContainer
chamber_to_digis_
 
std::map< unsigned int,
GEMPadDigiContainer
chamber_to_pads_
 
std::map< unsigned int,
GEMPadDigiClusterContainer
detid_to_clusters_
 
std::map< unsigned int,
GEMDigiContainer
detid_to_digis_
 
std::map< unsigned int,
GEMPadDigiContainer
detid_to_pads_
 
std::map< unsigned int,
GEMDigiSimLinkContainer
detid_to_simLinks_
 
bool discardEleHits_
 
edm::Handle
< GEMPadDigiClusterCollection
gemClustersH_
 
edm::EDGetTokenT
< GEMPadDigiClusterCollection
gemClusterToken_
 
edm::Handle
< GEMCoPadDigiCollection
gemCoPadsH_
 
edm::EDGetTokenT
< GEMCoPadDigiCollection
gemCoPadToken_
 
edm::Handle< GEMDigiCollectiongemDigisH_
 
edm::Handle< edm::DetSetVector
< GEMDigiSimLink > > 
gemDigisSLH_
 
edm::EDGetTokenT
< GEMDigiCollection
gemDigiToken_
 
const GEMGeometrygemGeometry_
 
edm::Handle< GEMPadDigiCollectiongemPadsH_
 
edm::EDGetTokenT
< GEMPadDigiCollection
gemPadToken_
 
edm::EDGetTokenT
< edm::DetSetVector
< GEMDigiSimLink > > 
gemSimLinkToken_
 
edm::ESGetToken< GEMGeometry,
MuonGeometryRecord
geomToken_
 
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,
GEMPadDigiClusterContainer
superchamber_to_clusters_
 
std::map< unsigned int,
GEMCoPadDigiContainer
superchamber_to_copads_
 
std::map< unsigned int,
GEMDigiContainer
superchamber_to_digis_
 
std::map< unsigned int,
GEMPadDigiContainer
superchamber_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 ( edm::ParameterSet const &  iPS,
edm::ConsumesCollector &&  iC 
)

Definition at line 5 of file GEMDigiMatcher.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), and eostools::move().

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_)
38  iC.consumes<edm::DetSetVector<GEMDigiSimLink>>(gemSimLink.getParameter<edm::InputTag>("inputTag"));
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_
def move
Definition: eostools.py:511
edm::EDGetTokenT< GEMDigiCollection > gemDigiToken_
edm::EDGetTokenT< GEMPadDigiCollection > gemPadToken_
GEMDigiMatcher::~GEMDigiMatcher ( )
inline

Definition at line 37 of file GEMDigiMatcher.h.

37 {}

Member Function Documentation

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_
std::set< unsigned int > GEMDigiMatcher::chamberIdsCluster ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 336 of file GEMDigiMatcher.cc.

336  {
337  return selectDetIds(chamber_to_clusters_, gem_type);
338 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMPadDigiClusterContainer > chamber_to_clusters_
std::set< unsigned int > GEMDigiMatcher::chamberIdsDigi ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 328 of file GEMDigiMatcher.cc.

328  {
329  return selectDetIds(chamber_to_digis_, gem_type);
330 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMDigiContainer > chamber_to_digis_
std::set< unsigned int > GEMDigiMatcher::chamberIdsPad ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 332 of file GEMDigiMatcher.cc.

332  {
333  return selectDetIds(chamber_to_pads_, gem_type);
334 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMPadDigiContainer > chamber_to_pads_
void GEMDigiMatcher::clear ( void  )
private

Definition at line 533 of file GEMDigiMatcher.cc.

533  {
534  detid_to_simLinks_.clear();
535 
536  detid_to_digis_.clear();
537  chamber_to_digis_.clear();
538  superchamber_to_digis_.clear();
539 
540  detid_to_pads_.clear();
541  chamber_to_pads_.clear();
542  superchamber_to_pads_.clear();
543 
544  detid_to_clusters_.clear();
545  chamber_to_clusters_.clear();
547 
548  superchamber_to_copads_.clear();
549 }
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_
const GEMPadDigiClusterContainer & GEMDigiMatcher::clustersInChamber ( unsigned int  detid) const

Definition at line 398 of file GEMDigiMatcher.cc.

398  {
399  if (chamber_to_clusters_.find(detid) == chamber_to_clusters_.end())
400  return no_gem_clusters_;
401  return chamber_to_clusters_.at(detid);
402 }
std::map< unsigned int, GEMPadDigiClusterContainer > chamber_to_clusters_
GEMPadDigiClusterContainer no_gem_clusters_
const GEMPadDigiClusterContainer & GEMDigiMatcher::clustersInDetId ( unsigned int  detid) const

Definition at line 392 of file GEMDigiMatcher.cc.

392  {
393  if (detid_to_clusters_.find(detid) == detid_to_clusters_.end())
394  return no_gem_clusters_;
395  return detid_to_clusters_.at(detid);
396 }
std::map< unsigned int, GEMPadDigiClusterContainer > detid_to_clusters_
GEMPadDigiClusterContainer no_gem_clusters_
const GEMPadDigiClusterContainer & GEMDigiMatcher::clustersInSuperChamber ( unsigned int  detid) const

Definition at line 404 of file GEMDigiMatcher.cc.

404  {
405  if (superchamber_to_clusters_.find(detid) == superchamber_to_clusters_.end())
406  return no_gem_clusters_;
407  return superchamber_to_clusters_.at(detid);
408 }
std::map< unsigned int, GEMPadDigiClusterContainer > superchamber_to_clusters_
GEMPadDigiClusterContainer no_gem_clusters_
const GEMCoPadDigiContainer & GEMDigiMatcher::coPadsInSuperChamber ( unsigned int  detid) const

Definition at line 410 of file GEMDigiMatcher.cc.

410  {
411  if (superchamber_to_copads_.find(detid) == superchamber_to_copads_.end())
412  return no_gem_copads_;
413  return superchamber_to_copads_.at(detid);
414 }
GEMCoPadDigiContainer no_gem_copads_
std::map< unsigned int, GEMCoPadDigiContainer > superchamber_to_copads_
std::set< unsigned int > GEMDigiMatcher::detIdsCluster ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 324 of file GEMDigiMatcher.cc.

324  {
325  return selectDetIds(detid_to_clusters_, gem_type);
326 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMPadDigiClusterContainer > detid_to_clusters_
std::set< unsigned int > GEMDigiMatcher::detIdsDigi ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 318 of file GEMDigiMatcher.cc.

318  {
319  return selectDetIds(detid_to_digis_, gem_type);
320 }
std::map< unsigned int, GEMDigiContainer > detid_to_digis_
std::set< unsigned int > selectDetIds(const T &, int) const
std::set< unsigned int > GEMDigiMatcher::detIdsPad ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 322 of file GEMDigiMatcher.cc.

322 { return selectDetIds(detid_to_pads_, gem_type); }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMPadDigiContainer > detid_to_pads_
std::set< unsigned int > GEMDigiMatcher::detIdsSimLink ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 314 of file GEMDigiMatcher.cc.

314  {
315  return selectDetIds(detid_to_simLinks_, gem_type);
316 }
std::map< unsigned int, GEMDigiSimLinkContainer > detid_to_simLinks_
std::set< unsigned int > selectDetIds(const T &, int) const
const GEMDigiContainer & GEMDigiMatcher::digisInChamber ( unsigned int  detid) const

Definition at line 362 of file GEMDigiMatcher.cc.

362  {
363  if (chamber_to_digis_.find(detid) == chamber_to_digis_.end())
364  return no_gem_digis_;
365  return chamber_to_digis_.at(detid);
366 }
std::map< unsigned int, GEMDigiContainer > chamber_to_digis_
GEMDigiContainer no_gem_digis_
const GEMDigiContainer & GEMDigiMatcher::digisInDetId ( unsigned int  detid) const

Definition at line 356 of file GEMDigiMatcher.cc.

356  {
357  if (detid_to_digis_.find(detid) == detid_to_digis_.end())
358  return no_gem_digis_;
359  return detid_to_digis_.at(detid);
360 }
std::map< unsigned int, GEMDigiContainer > detid_to_digis_
GEMDigiContainer no_gem_digis_
const GEMDigiContainer & GEMDigiMatcher::digisInSuperChamber ( unsigned int  detid) const

Definition at line 368 of file GEMDigiMatcher.cc.

368  {
369  if (superchamber_to_digis_.find(detid) == superchamber_to_digis_.end())
370  return no_gem_digis_;
371  return superchamber_to_digis_.at(detid);
372 }
GEMDigiContainer no_gem_digis_
std::map< unsigned int, GEMDigiContainer > superchamber_to_digis_
int GEMDigiMatcher::extrapolateHsfromGEMPad ( unsigned  int,
int   
) const
int GEMDigiMatcher::extrapolateHsfromGEMStrip ( unsigned  int,
int   
) const
GlobalPoint GEMDigiMatcher::getGlobalPointDigi ( unsigned int  rawId,
const GEMDigi d 
) const

Definition at line 519 of file GEMDigiMatcher.cc.

References GEMDigi::strip().

519  {
520  GEMDetId gem_id(rawId);
521  const LocalPoint& gem_lp = gemGeometry_->etaPartition(gem_id)->centreOfStrip(d.strip());
522  const GlobalPoint& gem_gp = gemGeometry_->idToDet(gem_id)->surface().toGlobal(gem_lp);
523  return gem_gp;
524 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
const GeomDet * idToDet(DetId) const override
Definition: GEMGeometry.cc:25
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a GEMEtaPartition given its id.
Definition: GEMGeometry.cc:77
LocalPoint centreOfStrip(int strip) const
uint16_t strip() const
Definition: GEMDigi.h:26
const GEMGeometry * gemGeometry_
GlobalPoint GEMDigiMatcher::getGlobalPointPad ( unsigned int  rawId,
const GEMPadDigi tp 
) const

Definition at line 526 of file GEMDigiMatcher.cc.

References GEMPadDigi::pad().

526  {
527  GEMDetId gem_id(rawId);
528  const LocalPoint& gem_lp = gemGeometry_->etaPartition(gem_id)->centreOfPad(tp.pad());
529  const GlobalPoint& gem_gp = gemGeometry_->idToDet(gem_id)->surface().toGlobal(gem_lp);
530  return gem_gp;
531 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
uint16_t pad() const
Definition: GEMPadDigi.h:38
const GeomDet * idToDet(DetId) const override
Definition: GEMGeometry.cc:25
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a GEMEtaPartition given its id.
Definition: GEMGeometry.cc:77
const GEMGeometry * gemGeometry_
LocalPoint centreOfPad(int pad) const
void GEMDigiMatcher::init ( const edm::Event e,
const edm::EventSetup eventSetup 
)

Definition at line 47 of file GEMDigiMatcher.cc.

References edm::Event::getByToken(), and edm::EventSetup::getData().

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  gemGeometry_ = &iSetup.getData(geomToken_);
58 }
std::shared_ptr< GEMSimHitMatcher > muonSimHitMatcher_
edm::Handle< GEMCoPadDigiCollection > gemCoPadsH_
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
edm::EDGetTokenT< GEMCoPadDigiCollection > gemCoPadToken_
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_
void GEMDigiMatcher::match ( const SimTrack t,
const SimVertex v 
)

do the matching

Definition at line 61 of file GEMDigiMatcher.cc.

References funct::abs(), clear(), and CoreSimTrack::momentum().

61  {
62  // match simhits first
63  muonSimHitMatcher_->match(t, v);
64 
65  // get the digi collections
66  const GEMDigiCollection& gemDigis = *gemDigisH_.product();
67  const GEMPadDigiCollection& gemPads = *gemPadsH_.product();
68  const GEMPadDigiClusterCollection& gemClusters = *gemClustersH_.product();
69  const GEMCoPadDigiCollection& gemCoPads = *gemCoPadsH_.product();
70 
71  clear();
72 
73  // hard cut on non-GEM muons
74  if (std::abs(t.momentum().eta()) < 1.55)
75  return;
76 
77  // now match the digis
78  if (matchToSimLink_) {
80  matchDigisSLToSimTrack(gemDigisSL);
81  }
82  matchDigisToSimTrack(gemDigis);
83  matchPadsToSimTrack(gemPads);
84  matchClustersToSimTrack(gemClusters);
85  matchCoPadsToSimTrack(gemCoPads);
86 }
void matchCoPadsToSimTrack(const GEMCoPadDigiCollection &)
std::shared_ptr< GEMSimHitMatcher > muonSimHitMatcher_
edm::Handle< GEMCoPadDigiCollection > gemCoPadsH_
void matchPadsToSimTrack(const GEMPadDigiCollection &)
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_
T const * product() const
Definition: Handle.h:70
void matchDigisSLToSimTrack(const edm::DetSetVector< GEMDigiSimLink > &)
edm::Handle< GEMPadDigiClusterCollection > gemClustersH_
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:19
edm::Handle< edm::DetSetVector< GEMDigiSimLink > > gemDigisSLH_
void GEMDigiMatcher::matchClustersToSimTrack ( const GEMPadDigiClusterCollection clusters)
private

Definition at line 240 of file GEMDigiMatcher.cc.

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

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

Definition at line 273 of file GEMDigiMatcher.cc.

References ztail::d, gpuClustering::id, AlCaHLTBitMon_ParallelJobs::p, HLT_FULL_cff::region, and relativeConstraints::station.

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

Definition at line 88 of file GEMDigiMatcher.cc.

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

88  {
89  if (verboseSimLink_)
90  edm::LogInfo("GEMDigiMatcher") << "Matching simtrack to GEM simlinks" << endl;
91 
92  // loop on the simlinks
93  for (auto itsimlink = digisSL.begin(); itsimlink != digisSL.end(); itsimlink++) {
94  GEMDetId p_id(itsimlink->id);
95  for (auto sl = itsimlink->data.begin(); sl != itsimlink->data.end(); ++sl) {
96  // ignore simlinks in non-matched chambers
97  const auto& detids(muonSimHitMatcher_->detIds());
98  if (detids.find(p_id.rawId()) == detids.end())
99  continue;
100 
101  // no simhits in this chamber!
102  if (muonSimHitMatcher_->hitsInDetId(p_id.rawId()).empty())
103  continue;
104 
105  if (verboseSimLink_)
106  edm::LogInfo("GEMDigiMatcher") << "GEMDigiSimLink " << p_id << " " << sl->getStrip() << " " << sl->getBx()
107  << " " << sl->getTrackId() << std::endl;
108 
109  // consider only the muon hits
110  if (simMuOnly_ && std::abs(sl->getParticleType()) != 13)
111  continue;
112 
113  // discard electron hits in the GEM chambers
114  if (discardEleHits_ && std::abs(sl->getParticleType()) == 11)
115  continue;
116 
117  // loop on the matched simhits
118  for (const auto& simhit : muonSimHitMatcher_->hitsInDetId(p_id.rawId())) {
119  // check if the simhit properties agree
120  if (simhit.trackId() == sl->getTrackId() and simhit.particleType() == sl->getParticleType()) {
121  detid_to_simLinks_[p_id.rawId()].push_back(*sl);
122  if (verboseSimLink_)
123  edm::LogInfo("GEMDigiMatcher") << "...was matched!" << endl;
124  break;
125  }
126  }
127  }
128  }
129 }
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
void GEMDigiMatcher::matchDigisToSimTrack ( const GEMDigiCollection digis)
private

Definition at line 131 of file GEMDigiMatcher.cc.

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

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

Definition at line 176 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().

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

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

Definition at line 470 of file GEMDigiMatcher.cc.

References dqmiodumpmetadata::n.

470  {
471  int n = 0;
472  const auto& ids = superChamberIdsCoPad();
473  for (const auto& id : ids) {
474  n += coPadsInSuperChamber(id).size();
475  }
476  return n;
477 }
const GEMCoPadDigiContainer & coPadsInSuperChamber(unsigned int) const
std::set< unsigned int > superChamberIdsCoPad(int gem_type=MuonHitHelper::GEM_ALL) const
int GEMDigiMatcher::nLayersWithClustersInSuperChamber ( unsigned int  detid) const

Definition at line 446 of file GEMDigiMatcher.cc.

References GEMDetId::chamber(), HLT_FULL_cff::clusters, LayerTriplets::layers(), GEMDetId::region(), GEMDetId::ring(), and GEMDetId::station().

446  {
447  set<int> layers;
448  GEMDetId sch_id(detid);
449  for (int iLayer = 1; iLayer <= 2; iLayer++) {
450  GEMDetId ch_id(sch_id.region(), sch_id.ring(), sch_id.station(), iLayer, sch_id.chamber(), 0);
451  // get the pads in this chamber
452  const auto& clusters = clustersInChamber(ch_id.rawId());
453  // at least one digi in this layer!
454  if (!clusters.empty()) {
455  layers.insert(iLayer);
456  }
457  }
458  return layers.size();
459 }
const GEMPadDigiClusterContainer & clustersInChamber(unsigned int) const
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
int GEMDigiMatcher::nLayersWithDigisInSuperChamber ( unsigned int  detid) const

Definition at line 416 of file GEMDigiMatcher.cc.

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

416  {
417  set<int> layers;
418  GEMDetId sch_id(detid);
419  for (int iLayer = 1; iLayer <= 2; iLayer++) {
420  GEMDetId ch_id(sch_id.region(), sch_id.ring(), sch_id.station(), iLayer, sch_id.chamber(), 0);
421  // get the digis in this chamber
422  const auto& digis = digisInChamber(ch_id.rawId());
423  // at least one digi in this layer!
424  if (!digis.empty()) {
425  layers.insert(iLayer);
426  }
427  }
428  return layers.size();
429 }
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
const GEMDigiContainer & digisInChamber(unsigned int) const
int GEMDigiMatcher::nLayersWithPadsInSuperChamber ( unsigned int  detid) const

Definition at line 431 of file GEMDigiMatcher.cc.

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

431  {
432  set<int> layers;
433  GEMDetId sch_id(detid);
434  for (int iLayer = 1; iLayer <= 2; iLayer++) {
435  GEMDetId ch_id(sch_id.region(), sch_id.ring(), sch_id.station(), iLayer, sch_id.chamber(), 0);
436  // get the pads in this chamber
437  const auto& pads = padsInChamber(ch_id.rawId());
438  // at least one digi in this layer!
439  if (!pads.empty()) {
440  layers.insert(iLayer);
441  }
442  }
443  return layers.size();
444 }
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
const GEMPadDigiContainer & padsInChamber(unsigned int) const
int GEMDigiMatcher::nPads ( ) const

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

Definition at line 461 of file GEMDigiMatcher.cc.

References dqmiodumpmetadata::n.

461  {
462  int n = 0;
463  const auto& ids = superChamberIdsPad();
464  for (const auto& id : ids) {
465  n += padsInSuperChamber(id).size();
466  }
467  return n;
468 }
std::set< unsigned int > superChamberIdsPad(int gem_type=MuonHitHelper::GEM_ALL) const
const GEMPadDigiContainer & padsInSuperChamber(unsigned int) const
std::set< int > GEMDigiMatcher::padNumbersInDetId ( unsigned int  detid) const

Definition at line 488 of file GEMDigiMatcher.cc.

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

488  {
489  set<int> result;
490  const auto& digis = padsInDetId(detid);
491  for (const auto& d : digis) {
492  result.insert(d.pad());
493  }
494  return result;
495 }
const GEMPadDigiContainer & padsInDetId(unsigned int) const
tuple result
Definition: mps_fire.py:311
tuple d
Definition: ztail.py:151
const GEMPadDigiContainer & GEMDigiMatcher::padsInChamber ( unsigned int  detid) const

Definition at line 380 of file GEMDigiMatcher.cc.

380  {
381  if (chamber_to_pads_.find(detid) == chamber_to_pads_.end())
382  return no_gem_pads_;
383  return chamber_to_pads_.at(detid);
384 }
std::map< unsigned int, GEMPadDigiContainer > chamber_to_pads_
GEMPadDigiContainer no_gem_pads_
const GEMPadDigiContainer & GEMDigiMatcher::padsInDetId ( unsigned int  detid) const

Definition at line 374 of file GEMDigiMatcher.cc.

374  {
375  if (detid_to_pads_.find(detid) == detid_to_pads_.end())
376  return no_gem_pads_;
377  return detid_to_pads_.at(detid);
378 }
std::map< unsigned int, GEMPadDigiContainer > detid_to_pads_
GEMPadDigiContainer no_gem_pads_
const GEMPadDigiContainer & GEMDigiMatcher::padsInSuperChamber ( unsigned int  detid) const

Definition at line 386 of file GEMDigiMatcher.cc.

386  {
387  if (superchamber_to_pads_.find(detid) == superchamber_to_pads_.end())
388  return no_gem_pads_;
389  return superchamber_to_pads_.at(detid);
390 }
std::map< unsigned int, GEMPadDigiContainer > superchamber_to_pads_
GEMPadDigiContainer no_gem_pads_
std::set< int > GEMDigiMatcher::partitionNumbers ( ) const

Definition at line 497 of file GEMDigiMatcher.cc.

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

497  {
498  std::set<int> result;
499 
500  const auto& detids = detIdsDigi();
501  for (const auto& id : detids) {
502  const GEMDetId& idd(id);
503  result.insert(idd.roll());
504  }
505  return result;
506 }
std::set< unsigned int > detIdsDigi(int gem_type=MuonHitHelper::GEM_ALL) const
tuple result
Definition: mps_fire.py:311
std::set< int > GEMDigiMatcher::partitionNumbersWithCoPads ( ) const

Definition at line 508 of file GEMDigiMatcher.cc.

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

508  {
509  std::set<int> result;
510 
511  const auto& detids = superChamberIdsCoPad();
512  for (const auto& id : detids) {
513  const GEMDetId& idd(id);
514  result.insert(idd.roll());
515  }
516  return result;
517 }
tuple result
Definition: mps_fire.py:311
std::set< unsigned int > superChamberIdsCoPad(int gem_type=MuonHitHelper::GEM_ALL) const
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)
tuple result
Definition: mps_fire.py:311
const GEMDigiSimLinkContainer& GEMDigiMatcher::simLinksInDetId ( unsigned  int) const
std::set< int > GEMDigiMatcher::stripNumbersInDetId ( unsigned int  detid) const

Definition at line 479 of file GEMDigiMatcher.cc.

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

479  {
480  set<int> result;
481  const auto& digis = digisInDetId(detid);
482  for (const auto& d : digis) {
483  result.insert(d.strip());
484  }
485  return result;
486 }
tuple result
Definition: mps_fire.py:311
tuple d
Definition: ztail.py:151
const GEMDigiContainer & digisInDetId(unsigned int) const
std::set< unsigned int > GEMDigiMatcher::superChamberIdsCluster ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 348 of file GEMDigiMatcher.cc.

348  {
349  return selectDetIds(superchamber_to_clusters_, gem_type);
350 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMPadDigiClusterContainer > superchamber_to_clusters_
std::set< unsigned int > GEMDigiMatcher::superChamberIdsCoPad ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 352 of file GEMDigiMatcher.cc.

352  {
353  return selectDetIds(superchamber_to_copads_, gem_type);
354 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMCoPadDigiContainer > superchamber_to_copads_
std::set< unsigned int > GEMDigiMatcher::superChamberIdsDigi ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 340 of file GEMDigiMatcher.cc.

340  {
341  return selectDetIds(superchamber_to_digis_, gem_type);
342 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMDigiContainer > superchamber_to_digis_
std::set< unsigned int > GEMDigiMatcher::superChamberIdsPad ( int  gem_type = MuonHitHelper::GEM_ALL) const

Definition at line 344 of file GEMDigiMatcher.cc.

344  {
345  return selectDetIds(superchamber_to_pads_, gem_type);
346 }
std::set< unsigned int > selectDetIds(const T &, int) const
std::map< unsigned int, GEMPadDigiContainer > superchamber_to_pads_

Member Data Documentation

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

Definition at line 178 of file GEMDigiMatcher.h.

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

Definition at line 170 of file GEMDigiMatcher.h.

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

Definition at line 174 of file GEMDigiMatcher.h.

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

Definition at line 177 of file GEMDigiMatcher.h.

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

Definition at line 169 of file GEMDigiMatcher.h.

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

Definition at line 173 of file GEMDigiMatcher.h.

Referenced by allPads().

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

Definition at line 167 of file GEMDigiMatcher.h.

bool GEMDigiMatcher::discardEleHits_
private

Definition at line 149 of file GEMDigiMatcher.h.

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

Definition at line 137 of file GEMDigiMatcher.h.

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

Definition at line 131 of file GEMDigiMatcher.h.

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

Definition at line 138 of file GEMDigiMatcher.h.

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

Definition at line 132 of file GEMDigiMatcher.h.

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

Definition at line 135 of file GEMDigiMatcher.h.

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

Definition at line 134 of file GEMDigiMatcher.h.

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

Definition at line 129 of file GEMDigiMatcher.h.

const GEMGeometry* GEMDigiMatcher::gemGeometry_
private

Definition at line 143 of file GEMDigiMatcher.h.

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

Definition at line 136 of file GEMDigiMatcher.h.

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

Definition at line 130 of file GEMDigiMatcher.h.

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

Definition at line 128 of file GEMDigiMatcher.h.

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

Definition at line 142 of file GEMDigiMatcher.h.

int GEMDigiMatcher::matchDeltaStrip_
private

Definition at line 156 of file GEMDigiMatcher.h.

bool GEMDigiMatcher::matchToSimLink_
private

Definition at line 164 of file GEMDigiMatcher.h.

int GEMDigiMatcher::maxBXCluster_
private

Definition at line 153 of file GEMDigiMatcher.h.

int GEMDigiMatcher::maxBXCoPad_
private

Definition at line 154 of file GEMDigiMatcher.h.

int GEMDigiMatcher::maxBXDigi_
private

Definition at line 151 of file GEMDigiMatcher.h.

int GEMDigiMatcher::maxBXPad_
private

Definition at line 152 of file GEMDigiMatcher.h.

int GEMDigiMatcher::minBXCluster_
private

Definition at line 153 of file GEMDigiMatcher.h.

int GEMDigiMatcher::minBXCoPad_
private

Definition at line 154 of file GEMDigiMatcher.h.

int GEMDigiMatcher::minBXDigi_
private

Definition at line 151 of file GEMDigiMatcher.h.

int GEMDigiMatcher::minBXPad_
private

Definition at line 152 of file GEMDigiMatcher.h.

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

Definition at line 140 of file GEMDigiMatcher.h.

Referenced by muonSimHitMatcher().

GEMPadDigiClusterContainer GEMDigiMatcher::no_gem_clusters_
private

Definition at line 186 of file GEMDigiMatcher.h.

GEMCoPadDigiContainer GEMDigiMatcher::no_gem_copads_
private

Definition at line 187 of file GEMDigiMatcher.h.

GEMDigiContainer GEMDigiMatcher::no_gem_digis_
private

Definition at line 184 of file GEMDigiMatcher.h.

GEMPadDigiContainer GEMDigiMatcher::no_gem_pads_
private

Definition at line 185 of file GEMDigiMatcher.h.

GEMDigiSimLinkContainer GEMDigiMatcher::no_gem_simLinks_
private

Definition at line 183 of file GEMDigiMatcher.h.

bool GEMDigiMatcher::simMuOnly_
private

Definition at line 148 of file GEMDigiMatcher.h.

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

Definition at line 179 of file GEMDigiMatcher.h.

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

Definition at line 181 of file GEMDigiMatcher.h.

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

Definition at line 171 of file GEMDigiMatcher.h.

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

Definition at line 175 of file GEMDigiMatcher.h.

bool GEMDigiMatcher::verboseCluster_
private

Definition at line 161 of file GEMDigiMatcher.h.

bool GEMDigiMatcher::verboseCoPad_
private

Definition at line 162 of file GEMDigiMatcher.h.

bool GEMDigiMatcher::verboseDigi_
private

Definition at line 159 of file GEMDigiMatcher.h.

bool GEMDigiMatcher::verbosePad_
private

Definition at line 160 of file GEMDigiMatcher.h.

bool GEMDigiMatcher::verboseSimLink_
private

Definition at line 158 of file GEMDigiMatcher.h.