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";
124 for (
auto i : barrel)
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)
151 if (
const BarrelDetLayer* bdl = dynamic_cast<const BarrelDetLayer*>(layer)) {
153 <<
" layer at R: " << setiosflags(ios::showpoint | ios::fixed) << setw(8)
154 << setprecision(2) << bdl->specificSurface().radius() <<
" length: " << setw(6)
157 }
else if (
const ForwardDetLayer* fdl = dynamic_cast<const ForwardDetLayer*>(layer)) {
158 PRINT(
"MuonNavigationPrinter") << endl
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;
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;
199 PRINT(
"MuonNavigationPrinter") << (*inext)->location() <<
" " << (*inext)->subDetector()
200 <<
" layer at z: " << setiosflags(ios::showpoint | ios::fixed) << setw(8)
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;
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
const std::vector< const DetLayer * > & backwardGEMLayers() const
return the backward (-Z) GEM DetLayers, inside-out
virtual float length() const =0
MuonNavigationPrinter(const MuonDetLayerGeometry *, MuonNavigationSchool const &, bool enableRPC=true, bool enableCSC=true, bool enableGEM=false, bool enableME0=false)
const std::vector< const DetLayer * > & allCscGemBackwardLayers() const
return all endcap DetLayers (CSC+GEM), -Z to +Z
std::vector< ForwardDetLayer const * > const & posForwardLayers() const
const BoundSurface & surface() const final
The surface of the GeometricSearchDet.
virtual Location location() const =0
Which part of the detector (barrel, endcap)
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 * > & forwardME0Layers() const
return the forward (+Z) ME0 DetLayers, inside-out
constexpr std::array< uint8_t, layerIndexSize > layer
const std::vector< const DetLayer * > & allCscME0ForwardLayers() const
return all endcap DetLayers (CSC+ME0), -Z to +Z
const std::vector< const DetLayer * > & allForwardLayers() const
return all forward (+Z) layers (CSC+RPC+GEM+ME0), inside-out
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 * > & backwardME0Layers() const
return the backward (-Z) ME0 DetLayers, 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
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
const std::vector< const DetLayer * > & allCscME0BackwardLayers() const
return all endcap DetLayers (CSC+ME0), -Z to +Z
const std::vector< const DetLayer * > & allBackwardLayers() const
return all backward (-Z) layers (CSC+RPC+GEM+ME0), inside-out
const std::vector< const DetLayer * > & forwardGEMLayers() const
return the forward (+Z) GEM DetLayers, inside-out
const std::vector< const DetLayer * > & backwardCSCLayers() const
return the backward (-Z) CSC DetLayers, inside-out
const std::vector< const DetLayer * > & allCscGemForwardLayers() const
return all endcap DetLayers (CSC+GEM), -Z to +Z
const PositionType & position() const
void printLayer(const DetLayer *) const
print layer
std::vector< BarrelDetLayer const * > const & barrelLayers() const