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";
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)
152 PRINT(
"MuonNavigationPrinter") <<
layer->location() <<
" " <<
layer->subDetector()
153 <<
" layer at R: " << setiosflags(ios::showpoint |
ios::fixed) << setw(8)
154 << setprecision(2) << bdl->specificSurface().radius() <<
" length: " << setw(6)
155 << setprecision(2) <<
layer->surface().bounds().length() << std::endl;
158 PRINT(
"MuonNavigationPrinter") << endl
159 <<
layer->location() <<
" " <<
layer->subDetector()
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)
201 << setprecision(2) <<
l->surface().position().z() <<
" " << std::endl;
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;
const std::vector< const DetLayer * > & allBackwardLayers() const
return all backward (-Z) layers (CSC+RPC+GEM+ME0), inside-out
const std::vector< const DetLayer * > & forwardCSCLayers() const
return the forward (+Z) CSC DetLayers, inside-out
const std::vector< const DetLayer * > & allCscGemForwardLayers() const
return all endcap DetLayers (CSC+GEM), -Z to +Z
MuonNavigationPrinter(const MuonDetLayerGeometry *, MuonNavigationSchool const &, bool enableRPC=true, bool enableCSC=true, bool enableGEM=false, bool enableME0=false)
const std::vector< const DetLayer * > & backwardME0Layers() const
return the backward (-Z) ME0 DetLayers, inside-out
const std::vector< const DetLayer * > & allForwardLayers() const
return all forward (+Z) layers (CSC+RPC+GEM+ME0), inside-out
const std::vector< const DetLayer * > & allDTLayers() const
return the DT DetLayers (barrel), inside-out
const std::vector< const DetLayer * > & forwardME0Layers() const
return the forward (+Z) ME0 DetLayers, inside-out
MuonNavigationSchool const * school
return detector part (barrel, forward, backward)
std::vector< const DetLayer * > compatibleLayers(const DetLayer &detLayer, Args &&... args) const
Returns all layers compatible.
const std::vector< const DetLayer * > & forwardGEMLayers() const
return the forward (+Z) GEM DetLayers, inside-out
const std::vector< const DetLayer * > & allCscGemBackwardLayers() const
return all endcap DetLayers (CSC+GEM), -Z to +Z
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 * > & backwardGEMLayers() const
return the backward (-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 * > & allCscME0BackwardLayers() const
return all endcap DetLayers (CSC+ME0), -Z to +Z
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel DetLayers (DT+RPC), inside-out
const std::vector< const DetLayer * > & allCscME0ForwardLayers() const
return all endcap DetLayers (CSC+ME0), -Z to +Z