CMS 3D CMS Logo

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

#include <DTLowQMatching.h>

Public Member Functions

 DTLowQMatching (L1MuDTChambPhContainer const *, L1MuDTChambPhContainer const &)
 
void run (const edm::EventSetup &c)
 

Static Public Member Functions

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

Public Attributes

edm::ESHandle< L1TTwinMuxParamstmParamsHandle
 

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 32 of file DTLowQMatching.h.

Constructor & Destructor Documentation

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

Definition at line 22 of file DTLowQMatching.cc.

22  : m_phiDTDigis(inphiDTDigis),m_phiRPCDigis(inphiRPCDigis) {
23 // m_phiDTDigis=inphiDTDigis;
24 // m_phiRPCDigis=inphiRPCDigis;
25 };
L1MuDTChambPhContainer const * m_phiDTDigis
L1MuDTChambPhContainer const & m_phiRPCDigis

Member Function Documentation

int DTLowQMatching::deltaPhi ( int  dt_phi,
int  rpc_strip 
)
private
void DTLowQMatching::Matching ( int  track_seg)
private

Definition at line 40 of file DTLowQMatching.cc.

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

Referenced by run().

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

Definition at line 28 of file DTLowQMatching.cc.

References edm::EventSetup::get(), edm::eventsetup::EventSetupRecordImplementation< T >::get(), L1TTwinMuxParams::get_DphiWindowBxShift(), m_DphiWindow, Matching(), edm::ESHandle< T >::product(), and tmParamsHandle.

28  {
29 
30  const L1TTwinMuxParamsRcd& tmParamsRcd = c.get<L1TTwinMuxParamsRcd>();
31  tmParamsRcd.get(tmParamsHandle);
32  const L1TTwinMuxParams& tmParams = *tmParamsHandle.product();
33 
35 
36  Matching(0);
37  Matching(1);
38 }
int get_DphiWindowBxShift() const
edm::ESHandle< L1TTwinMuxParams > tmParamsHandle
void Matching(int track_seg)
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
T get() const
Definition: EventSetup.h:71
T const * product() const
Definition: ESHandle.h:86

Member Data Documentation

int DTLowQMatching::m_DphiWindow
private

Definition at line 52 of file DTLowQMatching.h.

Referenced by Matching(), and run().

L1MuDTChambPhContainer const* DTLowQMatching::m_phiDTDigis
private

Definition at line 47 of file DTLowQMatching.h.

Referenced by Matching().

L1MuDTChambPhContainer const& DTLowQMatching::m_phiRPCDigis
private

Definition at line 48 of file DTLowQMatching.h.

Referenced by Matching().

edm::ESHandle< L1TTwinMuxParams > DTLowQMatching::tmParamsHandle

Definition at line 38 of file DTLowQMatching.h.

Referenced by run().