39 #define PRINT(x) std::cout << x << ' '
41 #define PRINT(x) edm::LogInfo(x)
47 PRINT(
"MuonNavigationPrinter")<<
"MuonNavigationPrinter::MuonNavigationPrinter" << std::endl;
48 PRINT(
"MuonNavigationPrinter")<<
"================================" << std::endl;
49 PRINT(
"MuonNavigationPrinter")<<
"BARREL:" << std::endl;
50 vector<const DetLayer*>
barrel;
54 PRINT(
"MuonNavigationPrinter")<<
"There are "<<barrel.size()<<
" Barrel DetLayers";
56 PRINT(
"MuonNavigationPrinter")<<
"================================" << std::endl;
57 PRINT(
"MuonNavigationPrinter") <<
"BACKWARD:" << std::endl;
59 vector<const DetLayer*> backward;
61 if ( enableCSC & enableGEM & enableRPC & enableME0) backward = muonLayout->
allBackwardLayers();
63 else if ( !enableCSC & enableGEM & !enableRPC & !enableME0 ) backward = muonLayout->
backwardGEMLayers();
64 else if ( enableCSC & !enableGEM & !enableRPC & !enableME0 ) backward = muonLayout->
backwardCSCLayers();
66 else if ( !enableCSC & !enableGEM & !enableRPC & enableME0) backward = muonLayout->
backwardME0Layers();
69 PRINT(
"MuonNavigationPrinter")<<
"There are "<<backward.size()<<
" Backward DetLayers";
71 PRINT(
"MuonNavigationPrinter") <<
"==============================" << std::endl;
72 PRINT(
"MuonNavigationPrinter") <<
"FORWARD:" << std::endl;
73 vector<const DetLayer*> forward;
75 if ( enableCSC & enableGEM & enableRPC & enableME0 ) forward = muonLayout->
allForwardLayers();
77 else if ( !enableCSC & enableGEM & !enableRPC & !enableME0 ) forward = muonLayout->
forwardGEMLayers();
78 else if ( enableCSC & !enableGEM & !enableRPC & !enableME0 ) forward = muonLayout->
forwardCSCLayers();
80 else if ( !enableCSC & !enableGEM & !enableRPC & enableME0) forward = muonLayout->
forwardME0Layers();
83 PRINT(
"MuonNavigationPrinter")<<
"There are "<<forward.size()<<
" Forward DetLayers" << std::endl;
91 PRINT(
"MuonNavigationPrinter")<<
"MuonNavigationPrinter::MuonNavigationPrinter" << std::endl ;
94 PRINT(
"MuonNavigationPrinter")<<
"================================" << std::endl;
95 PRINT(
"MuonNavigationPrinter")<<
"BARREL:" << std::endl;
96 vector<const BarrelDetLayer*> tkbarrel = tracker->
barrelLayers();
97 PRINT(
"MuonNavigationPrinter")<<
"There are "<<tkbarrel.size()<<
" Tk Barrel DetLayers" << std::endl;
100 PRINT(
"MuonNavigationPrinter")<<
"There are "<<barrel.size()<<
" Mu Barrel DetLayers";
102 PRINT(
"MuonNavigationPrinter")<<
"================================" << std::endl;
103 PRINT(
"MuonNavigationPrinter") <<
"BACKWARD:" << std::endl;
105 PRINT(
"MuonNavigationPrinter")<<
"There are "<<tkbackward.size()<<
" Tk Backward DetLayers" << std::endl;
108 PRINT(
"MuonNavigationPrinter")<<
"There are "<<backward.size()<<
" Mu Backward DetLayers << std::endl";
110 PRINT(
"MuonNavigationPrinter") <<
"==============================" << std::endl;
111 PRINT(
"MuonNavigationPrinter") <<
"FORWARD:" << std::endl;
113 PRINT(
"MuonNavigationPrinter")<<
"There are "<<tkforward.size()<<
" Tk Forward DetLayers" << std::endl;
117 PRINT(
"MuonNavigationPrinter")<<
"There are "<<forward.size()<<
" Mu Forward DetLayers";
126 if (
const BarrelDetLayer* bdl = dynamic_cast<const BarrelDetLayer*>(layer)) {
127 PRINT(
"MuonNavigationPrinter")
129 << setiosflags(ios::showpoint | ios::fixed)
130 << setw(8) << setprecision(2)
131 << bdl->specificSurface().radius() <<
" length: "
132 << setw(6) << setprecision(2)
136 else if (
const ForwardDetLayer* fdl = dynamic_cast<const ForwardDetLayer*>(layer)) {
137 PRINT(
"MuonNavigationPrinter") << endl
139 << setiosflags(ios::showpoint | ios::fixed)
140 << setw(8) << setprecision(2)
142 << setw(6) << setprecision(2)
143 << fdl->specificSurface().innerRadius() <<
" outer r: "
144 << setw(6) << setprecision(2)
145 << fdl->specificSurface().outerRadius() << std::endl;
147 PRINT(
"MuonNavigationPrinter") <<
" has " << nextLayers.size() <<
" next layers in the direction inside-out: " << std::endl;
153 PRINT(
"MuonNavigationPrinter") <<
" has " << nextLayers.size() <<
" next layers in the direction outside-in: " << std::endl;
156 PRINT(
"MuonNavigationPrinter") <<
" has " << compatibleLayers.size() <<
" compatible layers in the direction inside-out:: " << std::endl;
158 compatibleLayers.clear();
161 PRINT(
"MuonNavigationPrinter") <<
" has " << compatibleLayers.size() <<
" compatible layers in the direction outside-in: " << std::endl;
169 for ( vector<const DetLayer*>::const_iterator inext = nextLayers.begin();
170 inext != nextLayers.end(); inext++ ) {
172 PRINT(
"MuonNavigationPrinter") <<
" --> " << std::endl;
175 PRINT(
"MuonNavigationPrinter") << (*inext)->location() <<
" "
176 << (*inext)->subDetector()
178 << setiosflags(ios::showpoint | ios::fixed)
179 << setw(8) << setprecision(2)
184 PRINT(
"MuonNavigationPrinter") << (*inext)->location() <<
" "
185 << (*inext)->subDetector()
187 << setiosflags(ios::showpoint | ios::fixed)
188 << setw(8) << setprecision(2)
191 PRINT(
"MuonNavigationPrinter") << setiosflags(ios::showpoint | ios::fixed)
193 << setw(6) << (*inext)->surface().bounds().length() <<
", "
194 << setw(6) << (*inext)->surface().bounds().width() <<
", "
195 << setw(4) <<(*inext)->surface().bounds().thickness() <<
" : "
196 << (*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
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
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
NavigationDirection.
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
virtual const BoundSurface & surface() const final
The surface of the GeometricSearchDet.
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