|
|
#include <MuonNavigationPrinter.h>
Description: class to print the MuonNavigationSchool
- Author
- : Stefano Lacaprara - INFN Padova stefa.nosp@m.no.l.nosp@m.acapr.nosp@m.ara@.nosp@m.pd.in.nosp@m.fn.i.nosp@m.t
Modification:
Chang Liu: The class prints nextLayers and compatibleLayers Add new constructor for MuonTkNavigationSchool
Cesare Calabria: GEMs implementation.
David Nash: ME0s implementation
Description: class to print the MuonNavigationSchool
- Author
- : Stefano Lacaprara - INFN Padova stefa.nosp@m.no.l.nosp@m.acapr.nosp@m.ara@.nosp@m.pd.in.nosp@m.fn.i.nosp@m.t
Modification:
Chang Liu: add compatibleLayers add constructor for MuonTkNavigation
Cesare Calabria: GEMs implementation. David Nash: ME0s implementation.
Definition at line 33 of file MuonNavigationPrinter.h.
◆ MuonNavigationPrinter() [1/2]
MuonNavigationPrinter::MuonNavigationPrinter |
( |
const MuonDetLayerGeometry * |
muonLayout, |
|
|
MuonNavigationSchool const & |
sh, |
|
|
bool |
enableRPC = true , |
|
|
bool |
enableCSC = true , |
|
|
bool |
enableGEM = false , |
|
|
bool |
enableME0 = false |
|
) |
| |
Definition at line 44 of file MuonNavigationPrinter.cc.
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)
References MuonDetLayerGeometry::allBackwardLayers(), MuonDetLayerGeometry::allBarrelLayers(), MuonDetLayerGeometry::allCscGemBackwardLayers(), MuonDetLayerGeometry::allCscGemForwardLayers(), MuonDetLayerGeometry::allCscME0BackwardLayers(), MuonDetLayerGeometry::allCscME0ForwardLayers(), MuonDetLayerGeometry::allDTLayers(), MuonDetLayerGeometry::allForwardLayers(), MuonDetLayerGeometry::backwardCSCLayers(), MuonDetLayerGeometry::backwardGEMLayers(), MuonDetLayerGeometry::backwardME0Layers(), Reference_intrackfit_cff::barrel, MuonDetLayerGeometry::forwardCSCLayers(), MuonDetLayerGeometry::forwardGEMLayers(), MuonDetLayerGeometry::forwardME0Layers(), mps_fire::i, PRINT, and printLayer().
◆ MuonNavigationPrinter() [2/2]
for ( tkfiter = tkbackward.begin(); tkfiter != tkbackward.end(); tkfiter++ ) printLayer(*tkfiter);
Definition at line 110 of file MuonNavigationPrinter.cc.
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)
References MuonDetLayerGeometry::allBackwardLayers(), MuonDetLayerGeometry::allBarrelLayers(), MuonDetLayerGeometry::allForwardLayers(), Reference_intrackfit_cff::barrel, mps_fire::i, PRINT, printLayer(), and PbPb_ZMuSkimMuonDPG_cff::tracker.
◆ printLayer()
void MuonNavigationPrinter::printLayer |
( |
const DetLayer * |
layer | ) |
const |
|
private |
print layer
Definition at line 148 of file MuonNavigationPrinter.cc.
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;
References Surface::bounds(), NavigationSchool::compatibleLayers(), alignBH_cfg::fixed, insideOut, Bounds::length(), DetLayer::location(), NavigationSchool::nextLayers(), outsideIn, GloballyPositioned< T >::position(), PRINT, printLayers(), school, DetLayer::subDetector(), GeometricSearchDet::surface(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by MuonNavigationPrinter().
◆ printLayers()
void MuonNavigationPrinter::printLayers |
( |
const std::vector< const DetLayer * > & |
nextLayers | ) |
const |
|
private |
print next layers
Definition at line 189 of file MuonNavigationPrinter.cc.
190 for (vector<const DetLayer*>::const_iterator inext = nextLayers.begin(); inext != nextLayers.end(); inext++) {
191 PRINT(
"MuonNavigationPrinter") <<
" --> " << std::endl;
193 const BarrelDetLayer*
l = dynamic_cast<const BarrelDetLayer*>(&(**inext));
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;
198 const ForwardDetLayer*
l = dynamic_cast<const ForwardDetLayer*>(&(**inext));
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;
References GeomDetEnumerators::barrel, alignBH_cfg::fixed, cmsLHEtoEOSManager::l, and PRINT.
Referenced by printLayer().
◆ school
return detector part (barrel, forward, backward)
return detector module (pixel, silicon, msgc, dt, csc, rpc)
Definition at line 51 of file MuonNavigationPrinter.h.
Referenced by printLayer().
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel DetLayers (DT+RPC), inside-out
const std::vector< const DetLayer * > & backwardGEMLayers() const
return the backward (-Z) GEM DetLayers, inside-out
const std::vector< const DetLayer * > & forwardGEMLayers() const
return the forward (+Z) GEM DetLayers, inside-out
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel,...
void printLayers(const std::vector< const DetLayer * > &) const
print next layers
const std::vector< const DetLayer * > & backwardME0Layers() const
return the backward (-Z) ME0 DetLayers, inside-out
const std::vector< const DetLayer * > & allDTLayers() const
return the DT DetLayers (barrel), inside-out
virtual float length() const =0
const std::vector< const DetLayer * > & forwardME0Layers() const
return the forward (+Z) ME0 DetLayers, inside-out
const std::vector< const DetLayer * > & backwardCSCLayers() const
return the backward (-Z) CSC DetLayers, inside-out
virtual Location location() const =0
Which part of the detector (barrel, endcap)
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&... args) const
const Bounds & bounds() const
const std::vector< const DetLayer * > & forwardCSCLayers() const
return the forward (+Z) CSC DetLayers, inside-out
const std::vector< const DetLayer * > & allCscGemBackwardLayers() const
return all endcap DetLayers (CSC+GEM), -Z to +Z
const std::vector< const DetLayer * > & allForwardLayers() const
return all forward (+Z) layers (CSC+RPC+GEM+ME0), inside-out
void printLayer(const DetLayer *) const
print layer
std::vector< const DetLayer * > compatibleLayers(const DetLayer &detLayer, Args &&... args) const
Returns all layers compatible.
const PositionType & position() const
const std::vector< const DetLayer * > & allBackwardLayers() const
return all backward (-Z) layers (CSC+RPC+GEM+ME0), inside-out
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
const MuonNavigationSchool * school
return detector part (barrel, forward, backward)
const std::vector< const DetLayer * > & allCscME0BackwardLayers() const
return all endcap DetLayers (CSC+ME0), -Z to +Z
const std::vector< const DetLayer * > & allCscME0ForwardLayers() const
return all endcap DetLayers (CSC+ME0), -Z to +Z
const std::vector< const DetLayer * > & allCscGemForwardLayers() const
return all endcap DetLayers (CSC+GEM), -Z to +Z