CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
reco::MuonChamberMatch Class Reference

#include <MuonChamberMatch.h>

Public Member Functions

int detector () const
 
float dist () const
 
float distErr () const
 
std::pair< float, float > getDistancePair (float edgeX, float edgeY, float xErr, float yErr) const
 
int station () const
 

Public Attributes

float dXdZ
 
float dXdZErr
 
float dYdZ
 
float dYdZErr
 
float edgeX
 
float edgeY
 
std::vector< reco::MuonSegmentMatchgemMatches
 
DetId id
 
std::vector< reco::MuonSegmentMatchme0Matches
 
int nDigisInRange
 
std::vector< reco::MuonRPCHitMatchrpcMatches
 
std::vector< reco::MuonSegmentMatchsegmentMatches
 
std::vector< reco::MuonSegmentMatchtruthMatches
 
float x
 
float xErr
 
float y
 
float yErr
 

Detailed Description

Definition at line 10 of file MuonChamberMatch.h.

Member Function Documentation

◆ detector()

int reco::MuonChamberMatch::detector ( ) const
inline

Definition at line 31 of file MuonChamberMatch.h.

31 { return id.subdetId(); }

Referenced by MuonShowerDigiFiller::fill(), and station().

◆ dist()

float reco::MuonChamberMatch::dist ( ) const
inline

Definition at line 35 of file MuonChamberMatch.h.

35 { return getDistancePair(edgeX, edgeY, xErr, yErr).first; } // distance to absolute closest edge

References edgeX, edgeY, getDistancePair(), xErr, and yErr.

◆ distErr()

float reco::MuonChamberMatch::distErr ( ) const
inline

Definition at line 36 of file MuonChamberMatch.h.

36  {
37  return getDistancePair(edgeX, edgeY, xErr, yErr).second;
38  } // propagation uncertainty in above distance

References edgeX, edgeY, getDistancePair(), xErr, and yErr.

◆ getDistancePair()

std::pair< float, float > MuonChamberMatch::getDistancePair ( float  edgeX,
float  edgeY,
float  xErr,
float  yErr 
) const

Definition at line 35 of file MuonChamberMatch.cc.

35  {
36  if (edgeX > 9E5 && edgeY > 9E5 && xErr > 9E5 && yErr > 9E5) // there is no track
37  return std::make_pair(999999, 999999);
38 
39  float distance = 999999;
40  float error = 999999;
41 
42  if (edgeX < 0 && edgeY < 0) {
43  if (edgeX < edgeY) {
44  distance = edgeY;
45  error = yErr;
46  } else {
47  distance = edgeX;
48  error = xErr;
49  }
50  }
51  if (edgeX < 0 && edgeY > 0) {
52  distance = edgeY;
53  error = yErr;
54  }
55  if (edgeX > 0 && edgeY < 0) {
56  distance = edgeX;
57  error = xErr;
58  }
59  if (edgeX > 0 && edgeY > 0) {
61  error = distance ? sqrt(edgeX * edgeX * xErr * xErr + edgeY * edgeY * yErr * yErr) / fabs(distance) : 0;
62  }
63 
64  return std::make_pair(distance, error);
65 }

References HLT_FULL_cff::distance, edgeX, edgeY, relativeConstraints::error, mathSSE::sqrt(), xErr, and yErr.

Referenced by dist(), and distErr().

◆ station()

int MuonChamberMatch::station ( ) const

Definition at line 11 of file MuonChamberMatch.cc.

11  {
12  if (detector() == MuonSubdetId::DT) { // DT
13  DTChamberId segId(id.rawId());
14  return segId.station();
15  }
16  if (detector() == MuonSubdetId::CSC) { // CSC
17  CSCDetId segId(id.rawId());
18  return segId.station();
19  }
20  if (detector() == MuonSubdetId::RPC) { //RPC
21  RPCDetId segId(id.rawId());
22  return segId.station();
23  }
24  if (detector() == MuonSubdetId::GEM) { //GEM
25  GEMDetId segId(id.rawId());
26  return segId.station();
27  }
28  if (detector() == MuonSubdetId::ME0) { //ME0
29  ME0DetId segId(id.rawId());
30  return segId.station();
31  }
32  return -1; // is this appropriate? fix this
33 }

References MuonSubdetId::CSC, detector(), MuonSubdetId::DT, MuonSubdetId::GEM, MuonSubdetId::ME0, MuonSubdetId::RPC, DTChamberId::station(), ME0DetId::station(), RPCDetId::station(), CSCDetId::station(), and GEMDetId::station().

Referenced by geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

Member Data Documentation

◆ dXdZ

float reco::MuonChamberMatch::dXdZ

◆ dXdZErr

float reco::MuonChamberMatch::dXdZErr

◆ dYdZ

float reco::MuonChamberMatch::dYdZ

◆ dYdZErr

float reco::MuonChamberMatch::dYdZErr

◆ edgeX

float reco::MuonChamberMatch::edgeX

Definition at line 17 of file MuonChamberMatch.h.

Referenced by dist(), distErr(), MuonIdProducer::fillMuonId(), and getDistancePair().

◆ edgeY

float reco::MuonChamberMatch::edgeY

Definition at line 18 of file MuonChamberMatch.h.

Referenced by dist(), distErr(), MuonIdProducer::fillMuonId(), and getDistancePair().

◆ gemMatches

std::vector<reco::MuonSegmentMatch> reco::MuonChamberMatch::gemMatches

Definition at line 13 of file MuonChamberMatch.h.

Referenced by MuonIdProducer::fillMuonId().

◆ id

DetId reco::MuonChamberMatch::id

◆ me0Matches

std::vector<reco::MuonSegmentMatch> reco::MuonChamberMatch::me0Matches

Definition at line 14 of file MuonChamberMatch.h.

Referenced by MuonIdProducer::fillMuonId().

◆ nDigisInRange

int reco::MuonChamberMatch::nDigisInRange

◆ rpcMatches

std::vector<reco::MuonRPCHitMatch> reco::MuonChamberMatch::rpcMatches

Definition at line 16 of file MuonChamberMatch.h.

Referenced by MuonIdProducer::fillMuonId().

◆ segmentMatches

std::vector<reco::MuonSegmentMatch> reco::MuonChamberMatch::segmentMatches

Definition at line 12 of file MuonChamberMatch.h.

Referenced by MuonIdProducer::fillMuonId().

◆ truthMatches

std::vector<reco::MuonSegmentMatch> reco::MuonChamberMatch::truthMatches

Definition at line 15 of file MuonChamberMatch.h.

◆ x

float reco::MuonChamberMatch::x

◆ xErr

float reco::MuonChamberMatch::xErr

◆ y

float reco::MuonChamberMatch::y

◆ yErr

float reco::MuonChamberMatch::yErr
MuonSubdetId::GEM
static constexpr int GEM
Definition: MuonSubdetId.h:14
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
RPCDetId
Definition: RPCDetId.h:16
relativeConstraints.error
error
Definition: relativeConstraints.py:53
reco::MuonChamberMatch::detector
int detector() const
Definition: MuonChamberMatch.h:31
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
GEMDetId
Definition: GEMDetId.h:18
CSCDetId
Definition: CSCDetId.h:26
reco::MuonChamberMatch::xErr
float xErr
Definition: MuonChamberMatch.h:21
ME0DetId
Definition: ME0DetId.h:16
MuonSubdetId::ME0
static constexpr int ME0
Definition: MuonSubdetId.h:15
reco::MuonChamberMatch::yErr
float yErr
Definition: MuonChamberMatch.h:22
reco::MuonChamberMatch::edgeY
float edgeY
Definition: MuonChamberMatch.h:18
MuonSubdetId::RPC
static constexpr int RPC
Definition: MuonSubdetId.h:13
reco::MuonChamberMatch::edgeX
float edgeX
Definition: MuonChamberMatch.h:17
DTChamberId
Definition: DTChamberId.h:14
reco::MuonChamberMatch::getDistancePair
std::pair< float, float > getDistancePair(float edgeX, float edgeY, float xErr, float yErr) const
Definition: MuonChamberMatch.cc:35
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7733