CMS 3D CMS Logo

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

#include <DTLowQMatching.h>

Public Member Functions

 DTLowQMatching (L1MuDTChambPhContainer const *, L1MuDTChambPhContainer const &)
 
void run (const L1TTwinMuxParams &)
 

Static Public Member Functions

static int noRPCHits (L1MuDTChambPhContainer inCon, int bx, int wh, int sec, int st)
 

Private Member Functions

int deltaPhi (int dt_phi, int rpc_strip)
 
void Matching (int track_seg)
 

Private Attributes

int m_DphiWindow
 
L1MuDTChambPhContainer const * m_phiDTDigis
 
L1MuDTChambPhContainer const & m_phiRPCDigis
 

Detailed Description

Definition at line 31 of file DTLowQMatching.h.

Constructor & Destructor Documentation

◆ DTLowQMatching()

DTLowQMatching::DTLowQMatching ( L1MuDTChambPhContainer const *  inphiDTDigis,
L1MuDTChambPhContainer const &  inphiRPCDigis 
)

Definition at line 22 of file DTLowQMatching.cc.

23  : m_phiDTDigis(inphiDTDigis), m_phiRPCDigis(inphiRPCDigis) {}
L1MuDTChambPhContainer const * m_phiDTDigis
L1MuDTChambPhContainer const & m_phiRPCDigis

Member Function Documentation

◆ deltaPhi()

int DTLowQMatching::deltaPhi ( int  dt_phi,
int  rpc_strip 
)
private

◆ Matching()

void DTLowQMatching::Matching ( int  track_seg)
private

Definition at line 32 of file DTLowQMatching.cc.

References nano_mu_digi_cff::bx, L1MuDTChambPhDigi::BxCnt(), L1MuDTChambPhDigi::bxNum(), L1MuTMChambPhContainer::chPhiSegm(), L1MuDTChambPhDigi::code(), DTRPCBxCorrection::deltaPhi(), L1MuDTChambPhContainer::getContainer(), m_DphiWindow, m_phiDTDigis, m_phiRPCDigis, muonTagProbeFilters_cff::matched, TrackingDataMCValidation_Standalone_cff::nhits, DTRPCBxCorrection::nRPCHits(), L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), L1MuDTChambPhDigi::RpcBit(), L1MuDTChambPhDigi::scNum(), nano_mu_digi_cff::sector, L1MuTMChambPhContainer::setContainer(), relativeConstraints::station, L1MuDTChambPhDigi::stNum(), L1MuDTChambPhDigi::Ts2Tag(), makeMuonMisalignmentScenario::wheel, and L1MuDTChambPhDigi::whNum().

Referenced by run().

32  {
33  L1MuDTChambPhDigi* dtts = nullptr;
34  L1MuDTChambPhDigi* rpcts1 = nullptr;
35  L1MuTMChambPhContainer m_phiRPCDigis_tm;
36  const std::vector<L1MuDTChambPhDigi>* phiChambVector;
37  phiChambVector = m_phiRPCDigis.getContainer();
38  m_phiRPCDigis_tm.setContainer(*phiChambVector);
39 
40  L1MuTMChambPhContainer m_phiDTDigis_tm;
41  const std::vector<L1MuDTChambPhDigi>* phiChambVectorDT;
42  phiChambVectorDT = m_phiDTDigis->getContainer();
43  m_phiDTDigis_tm.setContainer(*phiChambVectorDT);
44 
45  int bx = 0, wheel = 0, sector = 0, station = 1;
46  //cout<<"LowQ Matching "<<track_seg<<endl;
47  for (wheel = -2; wheel <= 2; wheel++) {
48  for (sector = 0; sector < 12; sector++) {
49  for (station = 1; station <= 4; station++) {
50  for (bx = -3; bx <= 3; bx++) {
51  int matched = 0;
52  for (int rpcbx = bx - 1; rpcbx <= bx + 1; rpcbx++) {
53  dtts = nullptr;
54  rpcts1 = nullptr;
55  dtts = m_phiDTDigis_tm.chPhiSegm(wheel, station, sector, bx, track_seg);
56  if (!dtts || dtts->code() >= 2)
57  continue;
58  int nhits = 0;
60  for (int hit = 0; hit < nhits; hit++) {
61  rpcts1 = m_phiRPCDigis_tm.chPhiSegm(wheel, station, sector, rpcbx, hit);
62  //If DT primitives with q<2 match with rpc hits do nothing else
63  //'remove' the primitive by setting is quality to 7
64  if (rpcts1 && DTRPCBxCorrection::deltaPhi(dtts->phi(), rpcts1->phi()) < m_DphiWindow) {
65  matched++;
66  continue;
67  }
68  }
69  } //end of rpc bx
70  if (matched == 0 && dtts && dtts->code() < 2) { //dtts->setCode(7);
71  // int bx=dtts->bxNum(); cout<<bx<<endl;
72  L1MuDTChambPhDigi dtts2(dtts->bxNum(),
73  dtts->whNum(),
74  dtts->scNum(),
75  dtts->stNum(),
76  dtts->phi(),
77  dtts->phiB(),
78  7,
79  dtts->Ts2Tag(),
80  dtts->BxCnt(),
81  dtts->RpcBit());
82  *dtts = dtts2;
83  }
84  } //end of dt bx
85  } //end of station
86  } //end of sc
87  } //end of wheel
88 }
L1MuDTChambPhDigi * chPhiSegm(int wheel, int stat, int sect, int bx, int ts2tag)
void setContainer(const Phi_Container &inputSegments)
Phi_Container const * getContainer() const
static int deltaPhi(int dt_phi, int rpc_strip)
static int nRPCHits(L1MuTMChambPhContainer inCon, int bx, int wh, int sec, int st)
L1MuDTChambPhContainer const * m_phiDTDigis
L1MuDTChambPhContainer const & m_phiRPCDigis

◆ noRPCHits()

static int DTLowQMatching::noRPCHits ( L1MuDTChambPhContainer  inCon,
int  bx,
int  wh,
int  sec,
int  st 
)
static

◆ run()

void DTLowQMatching::run ( const L1TTwinMuxParams tmParams)

Definition at line 25 of file DTLowQMatching.cc.

References L1TTwinMuxParams::get_DphiWindowBxShift(), m_DphiWindow, and Matching().

25  {
27 
28  Matching(0);
29  Matching(1);
30 }
int get_DphiWindowBxShift() const
void Matching(int track_seg)

Member Data Documentation

◆ m_DphiWindow

int DTLowQMatching::m_DphiWindow
private

Definition at line 48 of file DTLowQMatching.h.

Referenced by Matching(), and run().

◆ m_phiDTDigis

L1MuDTChambPhContainer const* DTLowQMatching::m_phiDTDigis
private

Definition at line 44 of file DTLowQMatching.h.

Referenced by Matching().

◆ m_phiRPCDigis

L1MuDTChambPhContainer const& DTLowQMatching::m_phiRPCDigis
private

Definition at line 45 of file DTLowQMatching.h.

Referenced by Matching().