29 #define PRINT(x) std::cout << x << ' '
31 #define PRINT(x) edm::LogInfo(x)
39 PRINT(
"MTDNavigationPrinter") <<
"MTDNavigationPrinter::MTDNavigationPrinter" << std::endl;
40 PRINT(
"MTDNavigationPrinter") <<
"================================" << std::endl;
41 PRINT(
"MTDNavigationPrinter") <<
"BARREL:" << std::endl;
42 vector<const DetLayer*>
barrel;
48 PRINT(
"MTDNavigationPrinter") <<
"There are " <<
barrel.size() <<
" Barrel DetLayers";
51 PRINT(
"MTDNavigationPrinter") <<
"================================" << std::endl;
52 PRINT(
"MTDNavigationPrinter") <<
"BACKWARD:" << std::endl;
54 vector<const DetLayer*> backward;
61 PRINT(
"MTDNavigationPrinter") <<
"There are " << backward.size() <<
" Backward DetLayers";
62 for (
auto i : backward)
64 PRINT(
"MTDNavigationPrinter") <<
"==============================" << std::endl;
65 PRINT(
"MTDNavigationPrinter") <<
"FORWARD:" << std::endl;
66 vector<const DetLayer*> forward;
73 PRINT(
"MTDNavigationPrinter") <<
"There are " << forward.size() <<
" Forward DetLayers" << std::endl;
74 for (
auto i : forward)
82 PRINT(
"MTDNavigationPrinter") <<
"MTDNavigationPrinter::MTDNavigationPrinter" << std::endl;
85 PRINT(
"MTDNavigationPrinter") <<
"================================" << std::endl;
86 PRINT(
"MTDNavigationPrinter") <<
"BARREL:" << std::endl;
87 const vector<const BarrelDetLayer*>& tkbarrel =
tracker->barrelLayers();
88 PRINT(
"MTDNavigationPrinter") <<
"There are " << tkbarrel.size() <<
" Tk Barrel DetLayers" << std::endl;
91 PRINT(
"MTDNavigationPrinter") <<
"There are " <<
barrel.size() <<
" Mu Barrel DetLayers";
94 PRINT(
"MTDNavigationPrinter") <<
"================================" << std::endl;
95 PRINT(
"MTDNavigationPrinter") <<
"BACKWARD:" << std::endl;
96 const vector<const ForwardDetLayer*>& tkbackward =
tracker->negForwardLayers();
97 PRINT(
"MTDNavigationPrinter") <<
"There are " << tkbackward.size() <<
" Tk Backward DetLayers" << std::endl;
100 PRINT(
"MTDNavigationPrinter") <<
"There are " << backward.size() <<
" Mu Backward DetLayers << std::endl";
101 for (
auto i : backward)
103 PRINT(
"MTDNavigationPrinter") <<
"==============================" << std::endl;
104 PRINT(
"MTDNavigationPrinter") <<
"FORWARD:" << std::endl;
105 const vector<const ForwardDetLayer*>& tkforward =
tracker->posForwardLayers();
106 PRINT(
"MTDNavigationPrinter") <<
"There are " << tkforward.size() <<
" Tk Forward DetLayers" << std::endl;
110 PRINT(
"MTDNavigationPrinter") <<
"There are " << forward.size() <<
" Mu Forward DetLayers";
111 for (
auto i : forward)
119 if (
const BarrelDetLayer* bdl = dynamic_cast<const BarrelDetLayer*>(layer)) {
121 <<
" layer at R: " << setiosflags(ios::showpoint |
ios::fixed) << setw(8)
122 << setprecision(2) << bdl->specificSurface().radius() <<
" length: " << setw(6)
125 }
else if (
const ForwardDetLayer* fdl = dynamic_cast<const ForwardDetLayer*>(layer)) {
126 PRINT(
"MTDNavigationPrinter") << endl
128 <<
"layer at z: " << setiosflags(ios::showpoint |
ios::fixed) << setw(8)
129 << setprecision(2) << layer->
surface().
position().
z() <<
" inner r: " << setw(6)
130 << setprecision(2) << fdl->specificSurface().innerRadius() <<
" outer r: " << setw(6)
131 << setprecision(2) << fdl->specificSurface().outerRadius() << std::endl;
133 PRINT(
"MTDNavigationPrinter") <<
" has " << nextLayers.size()
134 <<
" next layers in the direction inside-out: " << std::endl;
140 PRINT(
"MTDNavigationPrinter") <<
" has " << nextLayers.size()
141 <<
" next layers in the direction outside-in: " << std::endl;
144 PRINT(
"MTDNavigationPrinter") <<
" has " << compatibleLayers.size()
145 <<
" compatible layers in the direction inside-out:: " << std::endl;
147 compatibleLayers.clear();
150 PRINT(
"MTDNavigationPrinter") <<
" has " << compatibleLayers.size()
151 <<
" compatible layers in the direction outside-in: " << std::endl;
157 for (vector<const DetLayer*>::const_iterator inext = nextLayers.begin(); inext != nextLayers.end(); inext++) {
158 PRINT(
"MTDNavigationPrinter") <<
" --> " << std::endl;
160 const BarrelDetLayer*
l = dynamic_cast<const BarrelDetLayer*>(&(**inext));
161 PRINT(
"MTDNavigationPrinter") << (*inext)->location() <<
" " << (*inext)->subDetector()
162 <<
" layer at R: " << setiosflags(ios::showpoint |
ios::fixed) << setw(8)
163 << setprecision(2) <<
l->specificSurface().radius() <<
" " << std::endl;
165 const ForwardDetLayer*
l = dynamic_cast<const ForwardDetLayer*>(&(**inext));
166 PRINT(
"MTDNavigationPrinter") << (*inext)->location() <<
" " << (*inext)->subDetector()
167 <<
" layer at z: " << setiosflags(ios::showpoint |
ios::fixed) << setw(8)
168 << setprecision(2) <<
l->surface().position().z() <<
" " << std::endl;
170 PRINT(
"MTDNavigationPrinter") << setiosflags(ios::showpoint |
ios::fixed) << setprecision(1) << setw(6)
171 << (*inext)->surface().bounds().length() <<
", " << setw(6)
172 << (*inext)->surface().bounds().width() <<
", " << setw(4)
173 << (*inext)->surface().bounds().thickness() <<
" : " << (*inext)->surface().position()