CMS 3D CMS Logo

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

#include <L1TTwinMuxAlgorithm.h>

Public Member Functions

L1MuDTChambPhContainer get_ph_tm_output ()
 Return Output PhContainer. More...
 
 L1TTwinMuxAlgorithm ()
 
void run (edm::Handle< L1MuDTChambPhContainer > phiDigis, edm::Handle< L1MuDTChambThContainer > thetaDigis, edm::Handle< RPCDigiCollection > rpcDigis, const edm::EventSetup &c)
 
 ~L1TTwinMuxAlgorithm ()
 

Private Member Functions

int radialAngle (RPCDetId, const edm::EventSetup &, int)
 

Private Attributes

L1MuDTChambPhContainer m_tm_phi_output
 Output PhContainer. More...
 
edm::ESHandle< L1TTwinMuxParamstmParamsHandle
 Event Setup Handler. More...
 

Detailed Description

Definition at line 33 of file L1TTwinMuxAlgorithm.h.

Constructor & Destructor Documentation

◆ L1TTwinMuxAlgorithm()

L1TTwinMuxAlgorithm::L1TTwinMuxAlgorithm ( )
inline

Definition at line 35 of file L1TTwinMuxAlgorithm.h.

35 {};

◆ ~L1TTwinMuxAlgorithm()

L1TTwinMuxAlgorithm::~L1TTwinMuxAlgorithm ( )
inline

Definition at line 36 of file L1TTwinMuxAlgorithm.h.

36 {};

Member Function Documentation

◆ get_ph_tm_output()

L1MuDTChambPhContainer L1TTwinMuxAlgorithm::get_ph_tm_output ( )
inline

Return Output PhContainer.

Definition at line 44 of file L1TTwinMuxAlgorithm.h.

44 { return m_tm_phi_output; }

References m_tm_phi_output.

◆ radialAngle()

int L1TTwinMuxAlgorithm::radialAngle ( RPCDetId  ,
const edm::EventSetup ,
int   
)
private

◆ run()

void L1TTwinMuxAlgorithm::run ( edm::Handle< L1MuDTChambPhContainer phiDigis,
edm::Handle< L1MuDTChambThContainer thetaDigis,
edm::Handle< RPCDigiCollection rpcDigis,
const edm::EventSetup c 
)

ES Parameters

Align track segments that are coming in bx-1.

Clean RPC hits

Translate RPC digis to DT primitives.

Match low q DT primitives with RPC hits in dphiWindow

Correct(in bx) DT primitives by comparing them to RPC.

Add RPC primitives in case that there are no DT primitives.

Definition at line 32 of file L1TTwinMuxAlgorithm.cc.

35  {
37  const L1TTwinMuxParamsRcd& tmParamsRcd = c.get<L1TTwinMuxParamsRcd>();
38  tmParamsRcd.get(tmParamsHandle);
39  const L1TTwinMuxParams& tmParams = *tmParamsHandle.product();
40  bool onlyRPC = tmParams.get_UseOnlyRPC();
41  bool onlyDT = tmParams.get_UseOnlyDT();
42  bool useLowQDT = tmParams.get_UseLowQDT();
43  bool correctBX = tmParams.get_CorrectDTBxwRPC();
44  bool verbose = tmParams.get_Verbose();
45 
47  AlignTrackSegments alignedDTs{*inphiDigis};
48  alignedDTs.run(c);
49  L1MuDTChambPhContainer const& phiDigis = alignedDTs.getDTContainer();
50  //if only DTs are required without bx correction
51  //return the aligned track segments
52  if (onlyDT && !correctBX && !useLowQDT) {
53  m_tm_phi_output = phiDigis;
54  return;
55  }
57  RPCHitCleaner rpcHitCl{*rpcDigis};
58  rpcHitCl.run(c);
59  RPCDigiCollection const& rpcDigisCleaned = rpcHitCl.getRPCCollection();
60 
62  RPCtoDTTranslator dt_from_rpc{rpcDigisCleaned};
63  dt_from_rpc.run(c);
64  L1MuDTChambPhContainer const& rpcPhiDigis =
65  dt_from_rpc.getDTContainer(); //Primitves used for RPC->DT (only station 1 and 2)
66  L1MuDTChambPhContainer const& rpcHitsPhiDigis =
67  dt_from_rpc.getDTRPCHitsContainer(); //Primitves used for bx correction
68 
70  DTLowQMatching dtlowq{&phiDigis, rpcHitsPhiDigis};
71  dtlowq.run(c);
72 
73  if (onlyDT && !correctBX && useLowQDT) {
74  m_tm_phi_output = phiDigis;
75  if (verbose) {
76  IOPrinter ioPrinter;
77  cout << "======DT========" << endl;
78  ioPrinter.run(inphiDigis, m_tm_phi_output, rpcDigis, c);
79  cout << "======RPC========" << endl;
80  ioPrinter.run(&rpcHitsPhiDigis, m_tm_phi_output, &rpcDigisCleaned, c);
81  cout << "+++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
82  }
83 
84  return;
85  }
86 
88  // DTRPCBxCorrection *rpc_dt_bx = new DTRPCBxCorrection(phiDigis,rpcHitsPhiDigis);
89  DTRPCBxCorrection rpc_dt_bx{phiDigis, rpcHitsPhiDigis};
90  rpc_dt_bx.run(c);
91 
92  L1MuDTChambPhContainer const& phiDigiscp = rpc_dt_bx.getDTContainer();
93 
95  std::vector<L1MuDTChambPhDigi> l1ttma_out;
96 
97  int bx = 0, wheel = 0, sector = 0, station = 1;
98 
99  for (bx = -3; bx <= 3; bx++) {
100  for (wheel = -2; wheel <= 2; wheel++) {
101  for (sector = 0; sector < 12; sector++) {
102  for (station = 1; station <= 4; station++) {
103  L1MuDTChambPhDigi const* dtts1 = phiDigiscp.chPhiSegm1(wheel, station, sector, bx);
104  L1MuDTChambPhDigi const* dtts2 = phiDigiscp.chPhiSegm2(wheel, station, sector, bx);
105  L1MuDTChambPhDigi const* rpcts1 = rpcPhiDigis.chPhiSegm1(wheel, station, sector, bx);
106 
107  if (!onlyRPC) {
108  if (!dtts1 && !dtts2 && !rpcts1)
109  continue;
110  if (dtts1 && dtts1->code() != 7) {
111  l1ttma_out.push_back(*dtts1);
112  }
113  if (dtts2 && dtts2->code() != 7) {
114  l1ttma_out.push_back(*dtts2);
115  }
116  if (!onlyDT) {
117  if (!dtts1 && !dtts2 && rpcts1 && station <= 2) {
118  l1ttma_out.emplace_back(rpcts1->bxNum(),
119  rpcts1->whNum(),
120  rpcts1->scNum(),
121  rpcts1->stNum(),
122  rpcts1->phi(),
123  rpcts1->phiB(),
124  rpcts1->code(),
125  rpcts1->Ts2Tag(),
126  rpcts1->BxCnt(),
127  2);
128  }
129  }
130  }
131 
132  else if (onlyRPC) {
133  if (rpcts1 && station <= 2) {
134  l1ttma_out.emplace_back(rpcts1->bxNum(),
135  rpcts1->whNum(),
136  rpcts1->scNum(),
137  rpcts1->stNum(),
138  rpcts1->phi(),
139  rpcts1->phiB(),
140  rpcts1->code(),
141  rpcts1->Ts2Tag(),
142  rpcts1->BxCnt(),
143  2);
144  }
145  }
146  }
147  }
148  }
149  }
150 
151  m_tm_phi_output.setContainer(l1ttma_out);
152 
153  if (verbose) {
154  IOPrinter ioPrinter;
155  cout << "======DT========" << endl;
156  ioPrinter.run(inphiDigis, m_tm_phi_output, rpcDigis, c);
157  cout << "======RPC========" << endl;
158  ioPrinter.run(&rpcHitsPhiDigis, m_tm_phi_output, &rpcDigisCleaned, c);
159  cout << "+++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
160  }
161 }

References simKBmtfDigis_cfi::bx, L1MuDTChambPhDigi::BxCnt(), L1MuDTChambPhDigi::bxNum(), HltBtagPostValidation_cff::c, L1MuDTChambPhContainer::chPhiSegm1(), L1MuDTChambPhContainer::chPhiSegm2(), L1MuDTChambPhDigi::code(), gather_cfg::cout, edm::eventsetup::EventSetupRecordImplementation< T >::get(), L1TTwinMuxParams::get_CorrectDTBxwRPC(), L1TTwinMuxParams::get_UseLowQDT(), L1TTwinMuxParams::get_UseOnlyDT(), L1TTwinMuxParams::get_UseOnlyRPC(), L1TTwinMuxParams::get_Verbose(), L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), IOPrinter::run(), L1MuDTChambPhDigi::scNum(), relativeConstraints::station, L1MuDTChambPhDigi::stNum(), L1MuDTChambPhDigi::Ts2Tag(), fakeTwinMuxParams_cfi::useLowQDT, verbose, makeMuonMisalignmentScenario::wheel, and L1MuDTChambPhDigi::whNum().

Member Data Documentation

◆ m_tm_phi_output

L1MuDTChambPhContainer L1TTwinMuxAlgorithm::m_tm_phi_output
private

Output PhContainer.

Definition at line 49 of file L1TTwinMuxAlgorithm.h.

Referenced by get_ph_tm_output().

◆ tmParamsHandle

edm::ESHandle<L1TTwinMuxParams> L1TTwinMuxAlgorithm::tmParamsHandle
private

Event Setup Handler.

Definition at line 52 of file L1TTwinMuxAlgorithm.h.

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1MuDTChambPhDigi::stNum
int stNum() const
Definition: L1MuDTChambPhDigi.cc:72
L1MuDTChambPhContainer::chPhiSegm1
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
Definition: L1MuDTChambPhContainer.cc:67
relativeConstraints.station
station
Definition: relativeConstraints.py:67
RPCHitCleaner
Definition: RPCHitCleaner.h:29
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1MuDTChambPhDigi::whNum
int whNum() const
Definition: L1MuDTChambPhDigi.cc:70
L1TTwinMuxAlgorithm::m_tm_phi_output
L1MuDTChambPhContainer m_tm_phi_output
Output PhContainer.
Definition: L1TTwinMuxAlgorithm.h:49
fakeTwinMuxParams_cfi.useLowQDT
useLowQDT
Definition: fakeTwinMuxParams_cfi.py:7
L1TTwinMuxParams::get_UseOnlyRPC
int get_UseOnlyRPC() const
Definition: L1TTwinMuxParams.h:60
AlignTrackSegments
Definition: AlignTrackSegments.h:31
DTLowQMatching
Definition: DTLowQMatching.h:32
IOPrinter
Definition: IOPrinter.h:27
L1MuDTChambPhDigi::phiB
int phiB() const
Definition: L1MuDTChambPhDigi.cc:76
L1MuDTChambPhContainer
Definition: L1MuDTChambPhContainer.h:33
simKBmtfDigis_cfi.bx
bx
Definition: simKBmtfDigis_cfi.py:55
RPCDigiCollection
L1TTwinMuxAlgorithm::tmParamsHandle
edm::ESHandle< L1TTwinMuxParams > tmParamsHandle
Event Setup Handler.
Definition: L1TTwinMuxAlgorithm.h:52
L1MuDTChambPhContainer::setContainer
void setContainer(Phi_Container inputSegments)
Definition: L1MuDTChambPhContainer.cc:39
L1MuDTChambPhDigi::BxCnt
int BxCnt() const
Definition: L1MuDTChambPhDigi.cc:82
L1MuDTChambPhDigi::phi
int phi() const
Definition: L1MuDTChambPhDigi.cc:74
RPCtoDTTranslator
Definition: RPCtoDTTranslator.h:31
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
DTRPCBxCorrection
Definition: DTRPCBxCorrection.h:32
L1MuDTChambPhDigi::bxNum
int bxNum() const
Definition: L1MuDTChambPhDigi.cc:68
L1TTwinMuxParams::get_CorrectDTBxwRPC
int get_CorrectDTBxwRPC() const
Definition: L1TTwinMuxParams.h:69
L1MuDTChambPhContainer::chPhiSegm2
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
Definition: L1MuDTChambPhContainer.cc:78
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
L1TTwinMuxParams::get_UseLowQDT
int get_UseLowQDT() const
Definition: L1TTwinMuxParams.h:66
L1TTwinMuxParamsRcd
Definition: L1TTwinMuxParamsRcd.h:14
L1MuDTChambPhDigi::scNum
int scNum() const
Definition: L1MuDTChambPhDigi.cc:71
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
AlignTrackSegments::run
void run(const edm::EventSetup &c)
Definition: AlignTrackSegments.cc:25
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition: EventSetupRecordImplementation.h:74
L1MuDTChambPhDigi::Ts2Tag
int Ts2Tag() const
Definition: L1MuDTChambPhDigi.cc:80
IOPrinter::run
void run(edm::Handle< L1MuDTChambPhContainer >, const L1MuDTChambPhContainer &, edm::Handle< RPCDigiCollection >, const edm::EventSetup &)
Definition: IOPrinter.cc:17
L1MuDTChambPhDigi::code
int code() const
Definition: L1MuDTChambPhDigi.cc:78
L1TTwinMuxParams::get_UseOnlyDT
int get_UseOnlyDT() const
Definition: L1TTwinMuxParams.h:63
L1TTwinMuxParams::get_Verbose
int get_Verbose() const
Definition: L1TTwinMuxParams.h:72
L1MuDTChambPhDigi
Definition: L1MuDTChambPhDigi.h:31
L1TTwinMuxParams
Definition: L1TTwinMuxParams.h:19