46 vector<const DetLayer*>
barrel;
50 for (
auto i = barrel.begin();
i != barrel.end();
i++ ) {
52 if ( mbp == 0 )
throw cms::Exception(
"MuonNavigationSchool",
"Bad BarrelDetLayer");
57 vector<const DetLayer*>
endcap;
61 for (
auto i = endcap.begin();
i != endcap.end();
i++ ) {
63 if ( mep == 0 )
throw cms::Exception(
"MuonNavigationSchool",
"Bad ForwardDetLayer");
94 vector<MuonBarrelNavigableLayer*>::const_iterator
ib;
95 vector<MuonForwardNavigableLayer*>::const_iterator ie;
98 result.push_back(*ib);
102 result.push_back(*ie);
106 result.push_back(*ie);
118 float radius = bc.radius();
119 float length = bc.bounds().length()/2.;
122 float eta_min = -eta_max;
133 float outRadius = bd.outerRadius();
134 float inRadius = bd.innerRadius();
135 float thick = bd.bounds().length()/2.;
136 float z = bd.position().z();
154 if ( z > 0 )
return -
log((
tan(atan(r/z)/2.)));
155 return log(-(
tan(atan(r/z)/2.)));
172 if ( plusOne !=
theBarrelLayers.end() ) { outerBarrel.insert(*plusOne);}
175 allOuterBarrel.insert(*iMBI);
178 MapE allOuterBackward;
181 if ( (*el).second.isCompatible(range) ) {
182 allOuterBackward.insert(*el);
189 if ( (*el).second.isCompatible(range) ) {
190 outerBackward.insert(*el);
196 MapE allOuterForward;
199 if ( (*el).second.isCompatible(range) ) {
200 allOuterForward.insert(*el);
208 if ( (*el).second.isCompatible(range) ) {
209 outerForward.insert(*el);
215 (*bl).first,outerBarrel, outerBackward, outerForward,
216 allOuterBarrel,allOuterBackward,allOuterForward));
223 vector<MuonForwardNavigableLayer*>&
result) {
225 for (
MapEI el = layers.begin(); el != layers.end(); el++) {
232 if ( plusOne != layers.end() && (*plusOne).second.isCompatible(range) ) {
233 outerLayers.insert(*plusOne);
234 if ( !range.
isInside((*plusOne).second) ) {
236 MapEI tmpel(plusOne);
239 for (
MapEI l = tmpel;
l != layers.end();
l++ ) {
244 outerLayers.insert(*
l);
251 for (
MapEI iMEI = plusOne; iMEI!=layers.end(); iMEI++){
252 if ((*iMEI).second.isCompatible(range)) allOuterLayers.insert(*iMEI);
256 (*el).first,outerLayers, allOuterLayers));
272 typedef map<const DetLayer*, MapB, less<const DetLayer*> > BarrelMapType;
273 typedef map<const DetLayer*, MapE, less<const DetLayer*> > ForwardMapType;
276 BarrelMapType reachedBarrelLayersMap;
277 ForwardMapType reachedForwardLayersMap;
280 BarrelMapType compatibleBarrelLayersMap;
281 ForwardMapType compatibleForwardLayersMap;
290 for (
MapBI i = reacheableB.begin();
i != reacheableB.end();
i++ ) {
291 reachedBarrelLayersMap[(*i).first].insert(*bli);
294 for (
MapBI i = compatibleB.begin();
i != compatibleB.end();
i++ ) {
295 compatibleBarrelLayersMap[(*i).first].insert(*bli);
298 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
299 reachedBarrelLayersMap[(*i).first].insert(*bli);
302 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
303 reachedBarrelLayersMap[(*i).first].insert(*bli);
306 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
307 compatibleBarrelLayersMap[(*i).first].insert(*bli);
310 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
311 compatibleBarrelLayersMap[(*i).first].insert(*bli);
321 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
322 reachedForwardLayersMap[(*i).first].insert(*eli);
327 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
328 compatibleForwardLayersMap[(*i).first].insert(*eli);
337 for (
MapEI i = reacheableE.begin();
i != reacheableE.end();
i++ ) {
338 reachedForwardLayersMap[(*i).first].insert(*eli);
343 for (
MapEI i = compatibleE.begin();
i != compatibleE.end();
i++ ) {
344 compatibleForwardLayersMap[(*i).first].insert(*eli);
364 reachedForwardLayersMap[(*eli).first]);
367 compatibleForwardLayersMap[(*eli).first]);
376 reachedForwardLayersMap[(*eli).first]);
379 compatibleForwardLayersMap[(*eli).first]);
void createInverseLinks()
establish inward links
virtual StateType navigableLayers() override
return navigable layers, from base class
std::vector< MuonForwardNavigableLayer * > theForwardNLC
MapB getOuterBarrelLayers() const
static std::vector< std::string > checklist log
MapE getAllOuterForwardLayers() const
MuonEtaRange add(const MuonEtaRange &) const
create maximum of ranges
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
MapE theBackwardLayers
+z endcap
const std::vector< const DetLayer * > & allEndcapLayers() const
return all endcap DetLayers (CSC+RPC), -Z to +Z
void addEndcapLayer(const ForwardDetLayer *)
add endcap layer (backward and forward)
MapB::const_iterator MapBI
std::map< const BarrelDetLayer *, MuonEtaRange, MuonDetLayerComp > MapB
const std::vector< const DetLayer * > & allCSCLayers() const
return the CSC DetLayers (endcap), -Z to +Z
MuonNavigationSchool(const MuonDetLayerGeometry *, bool enableRPC=true)
Constructor.
MapB getAllOuterBarrelLayers() const
void setInwardLinks(const MapB &, const MapE &)
set inward links
MapE getAllOuterBackwardLayers() const
void setInwardCompatibleLinks(const MapB &)
std::vector< MuonForwardNavigableLayer * > theBackwardNLC
float calculateEta(const float &, const float &) const
calculate pseudorapidity from r and z
MapE::const_iterator MapEI
std::vector< MuonBarrelNavigableLayer * > theBarrelNLC
-z endcap
StateType theAllNavigableLayer
virtual const BoundDisk & specificSurface() const
Tan< T >::type tan(const T &t)
void linkBarrelLayers()
link barrel layers
MapE getOuterBackwardLayers() const
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel DetLayers (DT+RPC), inside-out
std::vector< NavigableLayer * > StateType
const std::vector< const DetLayer * > * theAllDetLayersInSystem
std::map< const ForwardDetLayer *, MuonEtaRange, MuonDetLayerComp > MapE
const std::vector< const DetLayer * > & allDTLayers() const
return the DT DetLayers (barrel), inside-out
MapE getOuterForwardLayers() const
void addBarrelLayer(const BarrelDetLayer *)
add barrel layer
bool isInside(float eta, float error=0.) const
virtual const BoundCylinder & specificSurface() const
Extension of the interface.
void linkEndcapLayers(const MapE &, std::vector< MuonForwardNavigableLayer * > &)
link endcap layers
~MuonNavigationSchool()
Destructor.
bool isCompatible(const MuonEtaRange &range) const
true if this overlaps with range
void setInwardLinks(const MapB &)
set inward links
void setInwardCompatibleLinks(const MapB &, const MapE &)
const std::vector< const DetLayer * > & allLayers() const
return all layers (DT+CSC+RPC), order: backward, barrel, forward
MuonEtaRange subtract(const MuonEtaRange &) const
create new range of size this minus range
MapE theForwardLayers
barrel
void setState(const StateType &state)