29 #define PRINT(x) std::cout << x << ' ' 31 #define PRINT(x) edm::LogInfo(x) 37 PRINT(
"MTDNavigationPrinter")<<
"MTDNavigationPrinter::MTDNavigationPrinter" << std::endl;
38 PRINT(
"MTDNavigationPrinter")<<
"================================" << std::endl;
39 PRINT(
"MTDNavigationPrinter")<<
"BARREL:" << std::endl;
40 vector<const DetLayer*>
barrel;
44 PRINT(
"MTDNavigationPrinter")<<
"There are "<<barrel.size()<<
" Barrel DetLayers";
46 PRINT(
"MTDNavigationPrinter")<<
"================================" << std::endl;
47 PRINT(
"MTDNavigationPrinter") <<
"BACKWARD:" << std::endl;
49 vector<const DetLayer*> backward;
54 PRINT(
"MTDNavigationPrinter")<<
"There are "<<backward.size()<<
" Backward DetLayers";
56 PRINT(
"MTDNavigationPrinter") <<
"==============================" << std::endl;
57 PRINT(
"MTDNavigationPrinter") <<
"FORWARD:" << std::endl;
58 vector<const DetLayer*> forward;
63 PRINT(
"MTDNavigationPrinter")<<
"There are "<<forward.size()<<
" Forward DetLayers" << std::endl;
71 PRINT(
"MTDNavigationPrinter")<<
"MTDNavigationPrinter::MTDNavigationPrinter" << std::endl ;
74 PRINT(
"MTDNavigationPrinter")<<
"================================" << std::endl;
75 PRINT(
"MTDNavigationPrinter")<<
"BARREL:" << std::endl;
76 const vector<const BarrelDetLayer*>& tkbarrel = tracker->
barrelLayers();
77 PRINT(
"MTDNavigationPrinter")<<
"There are "<<tkbarrel.size()<<
" Tk Barrel DetLayers" << std::endl;
80 PRINT(
"MTDNavigationPrinter")<<
"There are "<<barrel.size()<<
" Mu Barrel DetLayers";
82 PRINT(
"MTDNavigationPrinter")<<
"================================" << std::endl;
83 PRINT(
"MTDNavigationPrinter") <<
"BACKWARD:" << std::endl;
84 const vector<const ForwardDetLayer*>& tkbackward = tracker->
negForwardLayers();
85 PRINT(
"MTDNavigationPrinter")<<
"There are "<<tkbackward.size()<<
" Tk Backward DetLayers" << std::endl;
88 PRINT(
"MTDNavigationPrinter")<<
"There are "<<backward.size()<<
" Mu Backward DetLayers << std::endl";
90 PRINT(
"MTDNavigationPrinter") <<
"==============================" << std::endl;
91 PRINT(
"MTDNavigationPrinter") <<
"FORWARD:" << std::endl;
92 const vector<const ForwardDetLayer*>& tkforward = tracker->
posForwardLayers();
93 PRINT(
"MTDNavigationPrinter")<<
"There are "<<tkforward.size()<<
" Tk Forward DetLayers" << std::endl;
97 PRINT(
"MTDNavigationPrinter")<<
"There are "<<forward.size()<<
" Mu Forward DetLayers";
106 if (
const BarrelDetLayer* bdl = dynamic_cast<const BarrelDetLayer*>(layer)) {
107 PRINT(
"MTDNavigationPrinter")
110 << setw(8) << setprecision(2)
111 << bdl->specificSurface().radius() <<
" length: " 112 << setw(6) << setprecision(2)
116 else if (
const ForwardDetLayer* fdl = dynamic_cast<const ForwardDetLayer*>(layer)) {
117 PRINT(
"MTDNavigationPrinter") << endl
120 << setw(8) << setprecision(2)
122 << setw(6) << setprecision(2)
123 << fdl->specificSurface().innerRadius() <<
" outer r: " 124 << setw(6) << setprecision(2)
125 << fdl->specificSurface().outerRadius() << std::endl;
127 PRINT(
"MTDNavigationPrinter") <<
" has " << nextLayers.size() <<
" next layers in the direction inside-out: " << std::endl;
133 PRINT(
"MTDNavigationPrinter") <<
" has " << nextLayers.size() <<
" next layers in the direction outside-in: " << std::endl;
136 PRINT(
"MTDNavigationPrinter") <<
" has " << compatibleLayers.size() <<
" compatible layers in the direction inside-out:: " << std::endl;
138 compatibleLayers.clear();
141 PRINT(
"MTDNavigationPrinter") <<
" has " << compatibleLayers.size() <<
" compatible layers in the direction outside-in: " << std::endl;
149 for ( vector<const DetLayer*>::const_iterator inext = nextLayers.begin();
150 inext != nextLayers.end(); inext++ ) {
152 PRINT(
"MTDNavigationPrinter") <<
" --> " << std::endl;
155 PRINT(
"MTDNavigationPrinter") << (*inext)->location() <<
" " 156 << (*inext)->subDetector()
159 << setw(8) << setprecision(2)
164 PRINT(
"MTDNavigationPrinter") << (*inext)->location() <<
" " 165 << (*inext)->subDetector()
168 << setw(8) << setprecision(2)
171 PRINT(
"MTDNavigationPrinter") << setiosflags(ios::showpoint |
ios::fixed)
173 << setw(6) << (*inext)->surface().bounds().length() <<
", " 174 << setw(6) << (*inext)->surface().bounds().width() <<
", " 175 << setw(4) <<(*inext)->surface().bounds().thickness() <<
" : " 176 << (*inext)->surface().position() << std::endl;
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
NavigationDirection.
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