CMS 3D CMS Logo

List of all members | Public Member Functions
IOPrinter Class Reference

#include <IOPrinter.h>

Public Member Functions

 IOPrinter ()
 
void run (edm::Handle< L1MuDTChambPhContainer >, const L1MuDTChambPhContainer &, edm::Handle< RPCDigiCollection >, const edm::EventSetup &)
 
void run (L1MuDTChambPhContainer const *, const L1MuDTChambPhContainer &, RPCDigiCollection const *, const edm::EventSetup &)
 
 ~IOPrinter ()
 

Detailed Description

Definition at line 27 of file IOPrinter.h.

Constructor & Destructor Documentation

◆ IOPrinter()

IOPrinter::IOPrinter ( )
inline

Definition at line 29 of file IOPrinter.h.

29 {};

◆ ~IOPrinter()

IOPrinter::~IOPrinter ( )
inline

Definition at line 30 of file IOPrinter.h.

30 {};

Member Function Documentation

◆ run() [1/2]

void IOPrinter::run ( edm::Handle< L1MuDTChambPhContainer inphiDigis,
const L1MuDTChambPhContainer outphiDigis,
edm::Handle< RPCDigiCollection rpcDigis,
const edm::EventSetup c 
)

Align track segments that are coming in bx-1.

for digicout

for chamber

Definition at line 17 of file IOPrinter.cc.

20  {
21  cout << "======================================================" << endl;
22  int bx = 0, wheel = 0, sector = 0, station = 1;
23 
25  cout << "DT Inputs/RPCDT Inputs" << endl;
26  cout << "bx\twheel\tsector\tstation\tphi\tphib\tcode\tts2tag\tbxcnt\trpcbit" << endl;
27 
28  for (bx = -2; bx <= 2; bx++) {
29  for (wheel = -2; wheel <= 2; wheel++) {
30  for (sector = 0; sector < 12; sector++) {
31  for (station = 1; station <= 4; station++) {
32  auto dtts1 = inphiDigis->chPhiSegm1(wheel, station, sector, bx);
33  auto dtts2 = inphiDigis->chPhiSegm2(wheel, station, sector, bx - 1);
34  if (dtts1 && dtts1->code() != 7) {
35  L1MuDTChambPhDigi dt_ts1 = *dtts1;
36  cout << dtts1->bxNum() << "\t" << dtts1->whNum() << "\t" << dtts1->scNum() << "\t" << dtts1->stNum() << "\t"
37  << dtts1->phi() << "\t" << dtts1->phiB() << "\t" << dtts1->code() << "\t" << dtts1->Ts2Tag() << "\t"
38  << dtts1->BxCnt() << "\t0" << endl;
39  }
40  if (dtts2 && dtts2->code() != 7) {
41  L1MuDTChambPhDigi dt_ts2 = *dtts2;
42  cout << dtts2->bxNum() << "\t" << dtts2->whNum() << "\t" << dtts2->scNum() << "\t" << dtts2->stNum() << "\t"
43  << dtts2->phi() << "\t" << dtts2->phiB() << "\t" << dtts2->code() << "\t" << dtts2->Ts2Tag() << "\t"
44  << dtts2->BxCnt() << "\t0" << endl;
45  }
46  }
47  }
48  }
49  }
50 
51  cout << endl;
52 
53  cout << "RPC Inputs" << endl;
54  cout << "bx\tring\tsector\tstation\troll\tlayer\tstrip\tphi\tlocalX" << endl;
55  //cout<<"RPCHitCleaner"<<endl;
56  for (auto chamber = rpcDigis->begin(); chamber != rpcDigis->end(); ++chamber) {
57  RPCDetId detid = (*chamber).first;
58  for (auto digi = (*chamber).second.first; digi != (*chamber).second.second; ++digi) {
59  RPCDigi digi_out(digi->strip(), digi->bx());
60  //if(digi->bx()!=0) continue;
61  int phi = RPCtoDTTranslator::radialAngle(detid, c, digi->strip()) << 2;
62  float localx = RPCtoDTTranslator::localX(detid, c, digi->strip());
63  cout << digi->bx() << "\t" << detid.ring() << "\t" << detid.sector() - 1 << "\t" << detid.station() << "\t"
64  << detid.roll() << "\t" << detid.layer() << "\t" << digi->strip() << "\t" << phi << "\t" << localx << endl;
65  }
66  }
67  cout << endl;
68 
69  cout << "TwinMux Output" << endl;
70  cout << "bx\twheel\tsector\tstation\tphi\tphib\tcode\tts2tag\tbxcnt\trpcbit" << endl;
71 
72  for (bx = -2; bx <= 2; bx++) {
73  for (wheel = -2; wheel <= 2; wheel++) {
74  for (sector = 0; sector < 12; sector++) {
75  for (station = 1; station <= 4; station++) {
76  auto dtts1 = outphiDigis.chPhiSegm1(wheel, station, sector, bx);
77  auto dtts2 = outphiDigis.chPhiSegm2(wheel, station, sector, bx - 1);
78  if (dtts1 && dtts1->code() != 7) {
79  L1MuDTChambPhDigi dt_ts1 = *dtts1;
80  cout << dtts1->bxNum() << "\t" << dtts1->whNum() << "\t" << dtts1->scNum() << "\t" << dtts1->stNum() << "\t"
81  << dtts1->phi() << "\t" << dtts1->phiB() << "\t" << dtts1->code() << "\t" << dtts1->Ts2Tag() << "\t"
82  << dtts1->BxCnt() << "\t" << dtts1->RpcBit() << endl;
83  }
84  if (dtts2 && dtts2->code() != 7) {
85  L1MuDTChambPhDigi dt_ts2 = *dtts2;
86  cout << dtts2->bxNum() << "\t" << dtts2->whNum() << "\t" << dtts2->scNum() << "\t" << dtts2->stNum() << "\t"
87  << dtts2->phi() << "\t" << dtts2->phiB() << "\t" << dtts2->code() << "\t" << dtts2->Ts2Tag() << "\t"
88  << dtts2->BxCnt() << "\t" << dtts2->RpcBit() << endl;
89  }
90  }
91  }
92  }
93  }
94 
95  cout << "======================================================" << endl;
96 }

References l1GtPatternGenerator_cfi::bx, c, relativeConstraints::chamber, L1MuDTChambPhContainer::chPhiSegm1(), L1MuDTChambPhContainer::chPhiSegm2(), gather_cfg::cout, RPCDetId::layer(), RPCtoDTTranslator::localX(), RPCtoDTTranslator::radialAngle(), RPCDetId::ring(), RPCDetId::roll(), RPCDetId::sector(), relativeConstraints::station, RPCDetId::station(), and makeMuonMisalignmentScenario::wheel.

Referenced by L1TTwinMuxAlgorithm::run().

◆ run() [2/2]

void IOPrinter::run ( L1MuDTChambPhContainer const *  inphiDigis,
const L1MuDTChambPhContainer outphiDigis,
RPCDigiCollection const *  rpcDigis,
const edm::EventSetup c 
)

Align track segments that are coming in bx-1.

for digicout

for chamber

Definition at line 98 of file IOPrinter.cc.

101  {
102  cout << "======================================================" << endl;
103  int bx = 0, wheel = 0, sector = 0, station = 1;
104  L1MuTMChambPhContainer inphiDigis_tm;
105  const std::vector<L1MuDTChambPhDigi>* vInCon = inphiDigis->getContainer();
106  inphiDigis_tm.setContainer(*vInCon);
107 
109  cout << "RPC->DT Inputs" << endl;
110  cout << "bx\twheel\tsector\tstation\tphi\tphib\tcode\tts2tag\tbxcnt\trpcbit" << endl;
111 
112  for (bx = -2; bx <= 2; bx++) {
113  for (wheel = -2; wheel <= 2; wheel++) {
114  for (sector = 0; sector < 12; sector++) {
115  for (station = 1; station <= 4; station++) {
116  int nhits = DTRPCBxCorrection::nRPCHits(*inphiDigis, bx, wheel, sector, station);
117  for (int hit = 0; hit < nhits; hit++) {
118  auto dtts1 = inphiDigis_tm.chPhiSegm(wheel, station, sector, bx, hit);
119  if (dtts1) {
120  cout << dtts1->bxNum() << "\t" << dtts1->whNum() << "\t" << dtts1->scNum() << "\t" << dtts1->stNum()
121  << "\t" << dtts1->phi() << "\t" << dtts1->phiB() << "\t" << dtts1->code() << "\t" << dtts1->Ts2Tag()
122  << "\t" << dtts1->BxCnt() << "\t0" << endl;
123  }
124  }
125  }
126  }
127  }
128  }
129 
130  cout << endl;
131 
132  cout << "RPC Inputs" << endl;
133  cout << "bx\tring\tsector\tstation\troll\tlayer\tstrip\tphi\tlocalX" << endl;
134  //cout<<"RPCHitCleaner"<<endl;
135  for (auto chamber = rpcDigis->begin(); chamber != rpcDigis->end(); ++chamber) {
136  RPCDetId detid = (*chamber).first;
137  for (auto digi = (*chamber).second.first; digi != (*chamber).second.second; ++digi) {
138  RPCDigi digi_out(digi->strip(), digi->bx());
139  //if(digi->bx()!=0) continue;
140  int phi = RPCtoDTTranslator::radialAngle(detid, c, digi->strip()) << 2;
141  float localx = RPCtoDTTranslator::localX(detid, c, digi->strip());
142  cout << digi->bx() << "\t" << detid.ring() << "\t" << detid.sector() - 1 << "\t" << detid.station() << "\t"
143  << detid.roll() << "\t" << detid.layer() << "\t" << digi->strip() << "\t" << phi << "\t" << localx << endl;
144  }
145  }
146  cout << endl;
147 
148  cout << "TwinMux Output" << endl;
149  cout << "bx\twheel\tsector\tstation\tphi\tphib\tcode\tts2tag\tbxcnt\trpcbit" << endl;
150 
151  for (bx = -2; bx <= 2; bx++) {
152  for (wheel = -2; wheel <= 2; wheel++) {
153  for (sector = 0; sector < 12; sector++) {
154  for (station = 1; station <= 4; station++) {
155  auto dtts1 = outphiDigis.chPhiSegm1(wheel, station, sector, bx);
156  auto dtts2 = outphiDigis.chPhiSegm2(wheel, station, sector, bx - 1);
157  if (dtts1 && dtts1->code() != 7) {
158  L1MuDTChambPhDigi dt_ts1 = *dtts1;
159  cout << dtts1->bxNum() << "\t" << dtts1->whNum() << "\t" << dtts1->scNum() << "\t" << dtts1->stNum() << "\t"
160  << dtts1->phi() << "\t" << dtts1->phiB() << "\t" << dtts1->code() << "\t" << dtts1->Ts2Tag() << "\t"
161  << dtts1->BxCnt() << "\t" << dtts1->RpcBit() << endl;
162  }
163  if (dtts2 && dtts2->code() != 7) {
164  L1MuDTChambPhDigi dt_ts2 = *dtts2;
165  cout << dtts2->bxNum() << "\t" << dtts2->whNum() << "\t" << dtts2->scNum() << "\t" << dtts2->stNum() << "\t"
166  << dtts2->phi() << "\t" << dtts2->phiB() << "\t" << dtts2->code() << "\t" << dtts2->Ts2Tag() << "\t"
167  << dtts2->BxCnt() << "\t" << dtts2->RpcBit() << endl;
168  }
169  }
170  }
171  }
172  }
173 
174  cout << "======================================================" << endl;
175 }

References l1GtPatternGenerator_cfi::bx, c, relativeConstraints::chamber, L1MuTMChambPhContainer::chPhiSegm(), L1MuDTChambPhContainer::chPhiSegm1(), L1MuDTChambPhContainer::chPhiSegm2(), gather_cfg::cout, L1MuDTChambPhContainer::getContainer(), RPCDetId::layer(), RPCtoDTTranslator::localX(), nhits, DTRPCBxCorrection::nRPCHits(), RPCtoDTTranslator::radialAngle(), RPCDetId::ring(), RPCDetId::roll(), RPCDetId::sector(), L1MuTMChambPhContainer::setContainer(), relativeConstraints::station, RPCDetId::station(), and makeMuonMisalignmentScenario::wheel.

RPCtoDTTranslator::localX
static int localX(RPCDetId, const edm::EventSetup &, int)
function - will be replaced by LUTs(?)
Definition: RPCtoDTTranslator.cc:372
RPCDetId::station
int station() const
Definition: RPCDetId.h:78
L1MuDTChambPhContainer::chPhiSegm1
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
Definition: L1MuDTChambPhContainer.cc:67
L1MuTMChambPhContainer::setContainer
void setContainer(const Phi_Container &inputSegments)
Definition: L1MuTMChambPhContainer.cc:44
relativeConstraints.station
station
Definition: relativeConstraints.py:67
RPCDetId
Definition: RPCDetId.h:16
gather_cfg.cout
cout
Definition: gather_cfg.py:144
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
L1MuTMChambPhContainer::getContainer
Phi_Container const * getContainer() const
Definition: L1MuTMChambPhContainer.cc:46
nhits
Definition: HIMultiTrackSelector.h:42
L1MuTMChambPhContainer
Definition: L1MuTMChambPhContainer.h:33
RPCDetId::roll
int roll() const
Definition: RPCDetId.h:92
DTRPCBxCorrection::nRPCHits
static int nRPCHits(L1MuTMChambPhContainer inCon, int bx, int wh, int sec, int st)
Definition: DTRPCBxCorrection.cc:208
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
RPCtoDTTranslator::radialAngle
static int radialAngle(RPCDetId, const edm::EventSetup &, int)
function - will be replaced by LUTs(?)
Definition: RPCtoDTTranslator.cc:349
RPCDetId::ring
int ring() const
Definition: RPCDetId.h:59
DDAxes::phi
RPCDigi
Definition: RPCDigi.h:19
RPCDetId::sector
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:81
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
L1MuTMChambPhContainer::chPhiSegm
L1MuDTChambPhDigi * chPhiSegm(int wheel, int stat, int sect, int bx, int ts2tag)
Definition: L1MuTMChambPhContainer.cc:92
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
RPCDetId::layer
int layer() const
Definition: RPCDetId.h:85
hit
Definition: SiStripHitEffFromCalibTree.cc:88
L1MuDTChambPhDigi
Definition: L1MuDTChambPhDigi.h:31