CMS 3D CMS Logo

DTLowQMatching.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: DTLowQMatching
4 //
5 // DTLowQMatching
6 //
7 //
8 // Author :
9 // G. Flouris U Ioannina Nov. 2016
10 // modifications: GKarathanasis UAthens
11 //--------------------------------------------------
12 #include <iostream>
13 #include <iomanip>
14 #include <iterator>
15 
19 
20 using namespace std;
21 
23  : m_phiDTDigis(inphiDTDigis),
24  m_phiRPCDigis(inphiRPCDigis){
25  // m_phiDTDigis=inphiDTDigis;
26  // m_phiRPCDigis=inphiRPCDigis;
27  };
28 
29 void DTLowQMatching::run(const L1TTwinMuxParams& tmParams) {
31 
32  Matching(0);
33  Matching(1);
34 }
35 
36 void DTLowQMatching::Matching(int track_seg) {
37  L1MuDTChambPhDigi* dtts = nullptr;
38  L1MuDTChambPhDigi* rpcts1 = nullptr;
39  L1MuTMChambPhContainer m_phiRPCDigis_tm;
40  const std::vector<L1MuDTChambPhDigi>* phiChambVector;
41  phiChambVector = m_phiRPCDigis.getContainer();
42  m_phiRPCDigis_tm.setContainer(*phiChambVector);
43 
44  L1MuTMChambPhContainer m_phiDTDigis_tm;
45  const std::vector<L1MuDTChambPhDigi>* phiChambVectorDT;
46  phiChambVectorDT = m_phiDTDigis->getContainer();
47  m_phiDTDigis_tm.setContainer(*phiChambVectorDT);
48 
49  int bx = 0, wheel = 0, sector = 0, station = 1;
50  //cout<<"LowQ Matching "<<track_seg<<endl;
51  for (wheel = -2; wheel <= 2; wheel++) {
52  for (sector = 0; sector < 12; sector++) {
53  for (station = 1; station <= 4; station++) {
54  for (bx = -3; bx <= 3; bx++) {
55  int matched = 0;
56  for (int rpcbx = bx - 1; rpcbx <= bx + 1; rpcbx++) {
57  dtts = nullptr;
58  rpcts1 = nullptr;
59  dtts = m_phiDTDigis_tm.chPhiSegm(wheel, station, sector, bx, track_seg);
60  if (!dtts || dtts->code() >= 2)
61  continue;
62  int nhits = 0;
64  for (int hit = 0; hit < nhits; hit++) {
65  rpcts1 = m_phiRPCDigis_tm.chPhiSegm(wheel, station, sector, rpcbx, hit);
66  //If DT primitives with q<2 match with rpc hits do nothing else
67  //'remove' the primitive by setting is quality to 7
68  if (rpcts1 && DTRPCBxCorrection::deltaPhi(dtts->phi(), rpcts1->phi()) < m_DphiWindow) {
69  matched++;
70  continue;
71  }
72  }
73  } //end of rpc bx
74  if (matched == 0 && dtts && dtts->code() < 2) { //dtts->setCode(7);
75  // int bx=dtts->bxNum(); cout<<bx<<endl;
76  L1MuDTChambPhDigi dtts2(dtts->bxNum(),
77  dtts->whNum(),
78  dtts->scNum(),
79  dtts->stNum(),
80  dtts->phi(),
81  dtts->phiB(),
82  7,
83  dtts->Ts2Tag(),
84  dtts->BxCnt(),
85  dtts->RpcBit());
86  *dtts = dtts2;
87  }
88  } //end of dt bx
89  } //end of station
90  } //end of sc
91  } //end of wheel
92 }
muonTagProbeFilters_cff.matched
matched
Definition: muonTagProbeFilters_cff.py:62
DTRPCBxCorrection.h
DTLowQMatching::m_DphiWindow
int m_DphiWindow
Definition: DTLowQMatching.h:49
L1MuDTChambPhDigi::stNum
int stNum() const
Definition: L1MuDTChambPhDigi.cc:72
L1MuTMChambPhContainer::setContainer
void setContainer(const Phi_Container &inputSegments)
Definition: L1MuTMChambPhContainer.cc:44
relativeConstraints.station
station
Definition: relativeConstraints.py:67
L1MuDTChambPhDigi::RpcBit
int RpcBit() const
Definition: L1MuDTChambPhDigi.cc:84
L1MuDTChambPhDigi::whNum
int whNum() const
Definition: L1MuDTChambPhDigi.cc:70
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
L1MuDTChambPhDigi::phiB
int phiB() const
Definition: L1MuDTChambPhDigi.cc:76
L1MuDTChambPhContainer
Definition: L1MuDTChambPhContainer.h:33
L1MuDTChambPhContainer::getContainer
Phi_Container const * getContainer() const
Definition: L1MuDTChambPhContainer.cc:41
DTLowQMatching::Matching
void Matching(int track_seg)
Definition: DTLowQMatching.cc:36
DTLowQMatching::DTLowQMatching
DTLowQMatching(L1MuDTChambPhContainer const *, L1MuDTChambPhContainer const &)
Definition: DTLowQMatching.cc:22
L1MuDTChambPhDigi::BxCnt
int BxCnt() const
Definition: L1MuDTChambPhDigi.cc:82
L1TTwinMuxParams::get_DphiWindowBxShift
int get_DphiWindowBxShift() const
Definition: L1TTwinMuxParams.h:75
L1MuDTChambPhDigi::phi
int phi() const
Definition: L1MuDTChambPhDigi.cc:74
DTLowQMatching::run
void run(const L1TTwinMuxParams &)
Definition: DTLowQMatching.cc:29
DTLowQMatching.h
nhits
Definition: HIMultiTrackSelector.h:42
L1MuTMChambPhContainer
Definition: L1MuTMChambPhContainer.h:33
L1MuDTChambPhDigi::bxNum
int bxNum() const
Definition: L1MuDTChambPhDigi.cc:68
DTLowQMatching::m_phiRPCDigis
L1MuDTChambPhContainer const & m_phiRPCDigis
Definition: DTLowQMatching.h:46
DTRPCBxCorrection::nRPCHits
static int nRPCHits(L1MuTMChambPhContainer inCon, int bx, int wh, int sec, int st)
Definition: DTRPCBxCorrection.cc:205
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
DTRPCBxCorrection::deltaPhi
static int deltaPhi(int dt_phi, int rpc_strip)
Definition: DTRPCBxCorrection.cc:192
L1MuDTChambPhDigi::scNum
int scNum() const
Definition: L1MuDTChambPhDigi.cc:71
DTLowQMatching::m_phiDTDigis
L1MuDTChambPhContainer const * m_phiDTDigis
Definition: DTLowQMatching.h:45
L1MuTMChambPhContainer.h
std
Definition: JetResolutionObject.h:76
L1MuTMChambPhContainer::chPhiSegm
L1MuDTChambPhDigi * chPhiSegm(int wheel, int stat, int sect, int bx, int ts2tag)
Definition: L1MuTMChambPhContainer.cc:92
L1MuDTChambPhDigi::Ts2Tag
int Ts2Tag() const
Definition: L1MuDTChambPhDigi.cc:80
L1MuDTChambPhDigi::code
int code() const
Definition: L1MuDTChambPhDigi.cc:78
hit
Definition: SiStripHitEffFromCalibTree.cc:88
L1MuDTChambPhDigi
Definition: L1MuDTChambPhDigi.h:31
L1TTwinMuxParams
Definition: L1TTwinMuxParams.h:19