34 #define PRINT(x) std::cout << x << ' '
36 #define PRINT(x) edm::LogInfo(x)
42 PRINT(
"MuonNavigationPrinter")<<
"MuonNavigationPrinter::MuonNavigationPrinter" << std::endl;
43 PRINT(
"MuonNavigationPrinter")<<
"================================" << std::endl;
44 PRINT(
"MuonNavigationPrinter")<<
"BARREL:" << std::endl;
45 vector<const DetLayer*>
barrel;
49 PRINT(
"MuonNavigationPrinter")<<
"There are "<<barrel.size()<<
" Barrel DetLayers";
51 PRINT(
"MuonNavigationPrinter")<<
"================================" << std::endl;
52 PRINT(
"MuonNavigationPrinter") <<
"BACKWARD:" << std::endl;
54 vector<const DetLayer*> backward;
58 PRINT(
"MuonNavigationPrinter")<<
"There are "<<backward.size()<<
" Backward DetLayers";
60 PRINT(
"MuonNavigationPrinter") <<
"==============================" << std::endl;
61 PRINT(
"MuonNavigationPrinter") <<
"FORWARD:" << std::endl;
62 vector<const DetLayer*> forward;
66 PRINT(
"MuonNavigationPrinter")<<
"There are "<<forward.size()<<
" Forward DetLayers" << std::endl;
74 PRINT(
"MuonNavigationPrinter")<<
"MuonNavigationPrinter::MuonNavigationPrinter" << std::endl ;
77 PRINT(
"MuonNavigationPrinter")<<
"================================" << std::endl;
78 PRINT(
"MuonNavigationPrinter")<<
"BARREL:" << std::endl;
79 vector<const BarrelDetLayer*> tkbarrel = tracker->
barrelLayers();
80 PRINT(
"MuonNavigationPrinter")<<
"There are "<<tkbarrel.size()<<
" Tk Barrel DetLayers" << std::endl;
83 PRINT(
"MuonNavigationPrinter")<<
"There are "<<barrel.size()<<
" Mu Barrel DetLayers";
85 PRINT(
"MuonNavigationPrinter")<<
"================================" << std::endl;
86 PRINT(
"MuonNavigationPrinter") <<
"BACKWARD:" << std::endl;
88 PRINT(
"MuonNavigationPrinter")<<
"There are "<<tkbackward.size()<<
" Tk Backward DetLayers" << std::endl;
91 PRINT(
"MuonNavigationPrinter")<<
"There are "<<backward.size()<<
" Mu Backward DetLayers << std::endl";
93 PRINT(
"MuonNavigationPrinter") <<
"==============================" << std::endl;
94 PRINT(
"MuonNavigationPrinter") <<
"FORWARD:" << std::endl;
96 PRINT(
"MuonNavigationPrinter")<<
"There are "<<tkforward.size()<<
" Tk Forward DetLayers" << std::endl;
100 PRINT(
"MuonNavigationPrinter")<<
"There are "<<forward.size()<<
" Mu Forward DetLayers";
109 if (
const BarrelDetLayer* bdl = dynamic_cast<const BarrelDetLayer*>(layer)) {
110 PRINT(
"MuonNavigationPrinter")
112 << setiosflags(ios::showpoint | ios::fixed)
113 << setw(8) << setprecision(2)
114 << bdl->specificSurface().radius() <<
" length: "
115 << setw(6) << setprecision(2)
119 else if (
const ForwardDetLayer* fdl = dynamic_cast<const ForwardDetLayer*>(layer)) {
120 PRINT(
"MuonNavigationPrinter") << endl
122 << setiosflags(ios::showpoint | ios::fixed)
123 << setw(8) << setprecision(2)
125 << setw(6) << setprecision(2)
126 << fdl->specificSurface().innerRadius() <<
" outer r: "
127 << setw(6) << setprecision(2)
128 << fdl->specificSurface().outerRadius() << std::endl;
130 PRINT(
"MuonNavigationPrinter") <<
" has " << nextLayers.size() <<
" next layers in the direction inside-out: " << std::endl;
136 PRINT(
"MuonNavigationPrinter") <<
" has " << nextLayers.size() <<
" next layers in the direction outside-in: " << std::endl;
139 PRINT(
"MuonNavigationPrinter") <<
" has " << compatibleLayers.size() <<
" compatible layers in the direction inside-out:: " << std::endl;
141 compatibleLayers.clear();
144 PRINT(
"MuonNavigationPrinter") <<
" has " << compatibleLayers.size() <<
" compatible layers in the direction outside-in: " << std::endl;
152 for ( vector<const DetLayer*>::const_iterator inext = nextLayers.begin();
153 inext != nextLayers.end(); inext++ ) {
155 PRINT(
"MuonNavigationPrinter") <<
" --> " << std::endl;
158 PRINT(
"MuonNavigationPrinter") << (*inext)->location() <<
" "
159 << (*inext)->subDetector()
161 << setiosflags(ios::showpoint | ios::fixed)
162 << setw(8) << setprecision(2)
167 PRINT(
"MuonNavigationPrinter") << (*inext)->location() <<
" "
168 << (*inext)->subDetector()
170 << setiosflags(ios::showpoint | ios::fixed)
171 << setw(8) << setprecision(2)
174 PRINT(
"MuonNavigationPrinter") << setiosflags(ios::showpoint | ios::fixed)
176 << setw(6) << (*inext)->surface().bounds().length() <<
", "
177 << setw(6) << (*inext)->surface().bounds().width() <<
", "
178 << setw(4) <<(*inext)->surface().bounds().thickness() <<
" : "
179 << (*inext)->surface().position() << std::endl;
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
virtual float length() const =0
std::vector< ForwardDetLayer const * > const & posForwardLayers() const
virtual Location location() const =0
Which part of the detector (barrel, endcap)
MuonNavigationPrinter(const MuonDetLayerGeometry *, MuonNavigationSchool const &, bool enableRPC=true)
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
const Bounds & bounds() const
void printLayers(const std::vector< const DetLayer * > &) const
print next layers
MuonNavigationSchool const * school
return detector part (barrel, forward, backward)
const std::vector< const DetLayer * > & allForwardLayers() const
return all forward (+Z) layers (CSC+RPC), inside-out
virtual const BoundSurface & surface() const GCC11_FINAL
The surface of the GeometricSearchDet.
std::vector< const DetLayer * > compatibleLayers(const DetLayer &detLayer, Args &&...args) const
Returns all layers compatible.
std::vector< ForwardDetLayer const * > const & negForwardLayers() const
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel DetLayers (DT+RPC), inside-out
const std::vector< const DetLayer * > & allDTLayers() const
return the DT DetLayers (barrel), inside-out
const std::vector< const DetLayer * > & forwardCSCLayers() const
return the forward (+Z) CSC DetLayers, inside-out
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&...args) const
NavigationDirection.
const std::vector< const DetLayer * > & allBackwardLayers() const
return all backward (-Z) layers (CSC+RPC), inside-out
const std::vector< const DetLayer * > & backwardCSCLayers() const
return the backward (-Z) CSC DetLayers, inside-out
const PositionType & position() const
virtual const BoundCylinder & specificSurface() const GCC11_FINAL
Extension of the interface.
void printLayer(const DetLayer *) const
print layer
std::vector< BarrelDetLayer const * > const & barrelLayers() const