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;
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;
166 PRINT(
"MTDNavigationPrinter") << (*inext)->location() <<
" " << (*inext)->subDetector()
167 <<
" layer at z: " << setiosflags(ios::showpoint |
ios::fixed) << setw(8)
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()
virtual float length() const =0
MTDNavigationSchool const * school
return detector part (barrel, forward, backward)
std::vector< ForwardDetLayer const * > const & posForwardLayers() const
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
virtual Location location() const =0
Which part of the detector (barrel, endcap)
const Bounds & bounds() const
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
const std::vector< const DetLayer * > & allBackwardLayers() const
return all endcap layers
std::vector< const DetLayer * > compatibleLayers(const DetLayer &detLayer, Args &&...args) const
Returns all layers compatible.
std::vector< ForwardDetLayer const * > const & negForwardLayers() const
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
void printLayers(const std::vector< const DetLayer * > &) const
print next layers
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&...args) const
void printLayer(const DetLayer *) const
print layer
const std::vector< const DetLayer * > & allForwardLayers() const
return all endcap layers
const BoundSurface & surface() const final
The surface of the GeometricSearchDet.
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel layers
MTDNavigationPrinter(const MTDDetLayerGeometry *, MTDNavigationSchool const &, bool enableBTL=true, bool enableETL=true)
const PositionType & position() const
std::vector< BarrelDetLayer const * > const & barrelLayers() const