39 #define PRINT(x) std::cout << x << ' '
41 #define PRINT(x) edm::LogInfo(x)
51 PRINT(
"MuonNavigationPrinter") <<
"MuonNavigationPrinter::MuonNavigationPrinter" << std::endl;
52 PRINT(
"MuonNavigationPrinter") <<
"================================" << std::endl;
53 PRINT(
"MuonNavigationPrinter") <<
"BARREL:" << std::endl;
54 vector<const DetLayer*>
barrel;
60 PRINT(
"MuonNavigationPrinter") <<
"There are " <<
barrel.size() <<
" Barrel DetLayers";
63 PRINT(
"MuonNavigationPrinter") <<
"================================" << std::endl;
64 PRINT(
"MuonNavigationPrinter") <<
"BACKWARD:" << std::endl;
66 vector<const DetLayer*> backward;
68 if (enableCSC & enableGEM & enableRPC & enableME0)
70 else if (enableCSC & enableGEM & !enableRPC & !enableME0)
72 else if (!enableCSC & enableGEM & !enableRPC & !enableME0)
74 else if (enableCSC & !enableGEM & !enableRPC & !enableME0)
76 else if (enableCSC & !enableGEM & !enableRPC & enableME0)
78 else if (!enableCSC & !enableGEM & !enableRPC & enableME0)
83 PRINT(
"MuonNavigationPrinter") <<
"There are " << backward.size() <<
" Backward DetLayers";
84 for (
auto i : backward)
86 PRINT(
"MuonNavigationPrinter") <<
"==============================" << std::endl;
87 PRINT(
"MuonNavigationPrinter") <<
"FORWARD:" << std::endl;
88 vector<const DetLayer*> forward;
90 if (enableCSC & enableGEM & enableRPC & enableME0)
92 else if (enableCSC & enableGEM & !enableRPC & !enableME0)
94 else if (!enableCSC & enableGEM & !enableRPC & !enableME0)
96 else if (enableCSC & !enableGEM & !enableRPC & !enableME0)
98 else if (enableCSC & !enableGEM & !enableRPC & enableME0)
100 else if (!enableCSC & !enableGEM & !enableRPC & enableME0)
105 PRINT(
"MuonNavigationPrinter") <<
"There are " << forward.size() <<
" Forward DetLayers" << std::endl;
106 for (
auto i : forward)
114 PRINT(
"MuonNavigationPrinter") <<
"MuonNavigationPrinter::MuonNavigationPrinter" << std::endl;
117 PRINT(
"MuonNavigationPrinter") <<
"================================" << std::endl;
118 PRINT(
"MuonNavigationPrinter") <<
"BARREL:" << std::endl;
119 const vector<const BarrelDetLayer*>& tkbarrel =
tracker->barrelLayers();
120 PRINT(
"MuonNavigationPrinter") <<
"There are " << tkbarrel.size() <<
" Tk Barrel DetLayers" << std::endl;
123 PRINT(
"MuonNavigationPrinter") <<
"There are " <<
barrel.size() <<
" Mu Barrel DetLayers";
126 PRINT(
"MuonNavigationPrinter") <<
"================================" << std::endl;
127 PRINT(
"MuonNavigationPrinter") <<
"BACKWARD:" << std::endl;
128 const vector<const ForwardDetLayer*>& tkbackward =
tracker->negForwardLayers();
129 PRINT(
"MuonNavigationPrinter") <<
"There are " << tkbackward.size() <<
" Tk Backward DetLayers" << std::endl;
132 PRINT(
"MuonNavigationPrinter") <<
"There are " << backward.size() <<
" Mu Backward DetLayers << std::endl";
133 for (
auto i : backward)
135 PRINT(
"MuonNavigationPrinter") <<
"==============================" << std::endl;
136 PRINT(
"MuonNavigationPrinter") <<
"FORWARD:" << std::endl;
137 const vector<const ForwardDetLayer*>& tkforward =
tracker->posForwardLayers();
138 PRINT(
"MuonNavigationPrinter") <<
"There are " << tkforward.size() <<
" Tk Forward DetLayers" << std::endl;
142 PRINT(
"MuonNavigationPrinter") <<
"There are " << forward.size() <<
" Mu Forward DetLayers";
143 for (
auto i : forward)
152 PRINT(
"MuonNavigationPrinter") <<
layer->location() <<
" " <<
layer->subDetector()
153 <<
" layer at R: " << setiosflags(ios::showpoint |
ios::fixed) << setw(8)
154 << setprecision(2) << bdl->specificSurface().radius() <<
" length: " << setw(6)
155 << setprecision(2) <<
layer->surface().bounds().length() << std::endl;
158 PRINT(
"MuonNavigationPrinter") << endl
159 <<
layer->location() <<
" " <<
layer->subDetector()
160 <<
"layer at z: " << setiosflags(ios::showpoint |
ios::fixed) << setw(8)
161 << setprecision(2) <<
layer->surface().position().z() <<
" inner r: " << setw(6)
162 << setprecision(2) << fdl->specificSurface().innerRadius()
163 <<
" outer r: " << setw(6) << setprecision(2)
164 << fdl->specificSurface().outerRadius() << std::endl;
166 PRINT(
"MuonNavigationPrinter") <<
" has " << nextLayers.size()
167 <<
" next layers in the direction inside-out: " << std::endl;
173 PRINT(
"MuonNavigationPrinter") <<
" has " << nextLayers.size()
174 <<
" next layers in the direction outside-in: " << std::endl;
177 PRINT(
"MuonNavigationPrinter") <<
" has " << compatibleLayers.size()
178 <<
" compatible layers in the direction inside-out:: " << std::endl;
180 compatibleLayers.clear();
183 PRINT(
"MuonNavigationPrinter") <<
" has " << compatibleLayers.size()
184 <<
" compatible layers in the direction outside-in: " << std::endl;
190 for (vector<const DetLayer*>::const_iterator inext = nextLayers.begin(); inext != nextLayers.end(); inext++) {
191 PRINT(
"MuonNavigationPrinter") <<
" --> " << std::endl;
193 const BarrelDetLayer*
l = dynamic_cast<const BarrelDetLayer*>(&(**inext));
194 PRINT(
"MuonNavigationPrinter") << (*inext)->location() <<
" " << (*inext)->subDetector()
195 <<
" layer at R: " << setiosflags(ios::showpoint |
ios::fixed) << setw(8)
196 << setprecision(2) <<
l->specificSurface().radius() <<
" " << std::endl;
198 const ForwardDetLayer*
l = dynamic_cast<const ForwardDetLayer*>(&(**inext));
199 PRINT(
"MuonNavigationPrinter") << (*inext)->location() <<
" " << (*inext)->subDetector()
200 <<
" layer at z: " << setiosflags(ios::showpoint |
ios::fixed) << setw(8)
201 << setprecision(2) <<
l->surface().position().z() <<
" " << std::endl;
203 PRINT(
"MuonNavigationPrinter") << setiosflags(ios::showpoint |
ios::fixed) << setprecision(1) << setw(6)
204 << (*inext)->surface().bounds().length() <<
", " << setw(6)
205 << (*inext)->surface().bounds().width() <<
", " << setw(4)
206 << (*inext)->surface().bounds().thickness() <<
" : "
207 << (*inext)->surface().position() << std::endl;