CMS 3D CMS Logo

Static Public Member Functions | Private Member Functions | Static Private Member Functions

MuonCSCDetLayerGeometryBuilder Class Reference

#include <MuonCSCDetLayerGeometryBuilder.h>

List of all members.

Static Public Member Functions

static std::pair< std::vector
< DetLayer * >, std::vector
< DetLayer * > > 
buildLayers (const CSCGeometry &geo)

Private Member Functions

 MuonCSCDetLayerGeometryBuilder ()

Static Private Member Functions

static MuRingForwardDoubleLayerbuildLayer (int endcap, int station, std::vector< int > &rings, const CSCGeometry &geo)
static bool isFront (int station, int ring, int chamber)
static MuDetRingmakeDetRing (std::vector< const GeomDet * > &geomDets)

Detailed Description

Build the CSC DetLayers.

Date:
2007/06/14 23:48:22
Revision:
1.8
Author:
N. Amapane - CERN

Definition at line 20 of file MuonCSCDetLayerGeometryBuilder.h.


Constructor & Destructor Documentation

MuonCSCDetLayerGeometryBuilder::MuonCSCDetLayerGeometryBuilder ( ) [inline, private]

Definition at line 28 of file MuonCSCDetLayerGeometryBuilder.h.

{}

Member Function Documentation

static MuRingForwardDoubleLayer* MuonCSCDetLayerGeometryBuilder::buildLayer ( int  endcap,
int  station,
std::vector< int > &  rings,
const CSCGeometry geo 
) [static, private]
pair< vector< DetLayer * >, vector< DetLayer * > > MuonCSCDetLayerGeometryBuilder::buildLayers ( const CSCGeometry geo) [static]

return.first=forward (+Z), return.second=backward (-Z) both vectors are sorted inside-out

Definition at line 18 of file MuonCSCDetLayerGeometryBuilder.cc.

References Reference_intrackfit_cff::endcap, i, CSCDetId::maxRingId(), CSCDetId::maxStationId(), CSCDetId::minRingId(), query::result, relativeConstraints::ring, RingESSource_cfi::rings, and relativeConstraints::station.

Referenced by MuonDetLayerGeometryESProducer::produce().

                                                                  {

  vector<DetLayer*> result[2]; // one for each endcap
  
  for(int i=0; i<2; i++) {        
    
    int endcap = i+1;
    
    // ME/1/1a (= station 1, ring 4) and ME/1/1b (= station 1, ring 1)
    {
      vector<int> rings;
      rings.push_back(4);
      rings.push_back(1);
      
      MuRingForwardDoubleLayer* layer = buildLayer(endcap, 1, rings, geo);          
      if (layer) result[i].push_back(layer);  
    }
    
    // ME/1/2 and 1/3 (= station 1, ring 2 and 3)
    {
      vector<int> rings;
      rings.push_back(2);
      rings.push_back(3);
      
      MuRingForwardDoubleLayer* layer = buildLayer(endcap, 1, rings, geo);          
      if (layer) result[i].push_back(layer);  
    }    
    
    // Stations 2,3,4
    for(int station = 2; station <= CSCDetId::maxStationId(); station++) {
      vector<int> rings;      
      for(int ring = CSCDetId::minRingId(); ring <= CSCDetId::maxRingId(); ring++) {
        rings.push_back(ring);
      }
      MuRingForwardDoubleLayer* layer = buildLayer(endcap, station, rings, geo);          
      if (layer) result[i].push_back(layer);
    }
  }
  pair<vector<DetLayer*>, vector<DetLayer*> > res_pair(result[0], result[1]); 
  return res_pair;
}
bool MuonCSCDetLayerGeometryBuilder::isFront ( int  station,
int  ring,
int  chamber 
) [static, private]

Definition at line 122 of file MuonCSCDetLayerGeometryBuilder.cc.

References query::result.

{
  bool result = false;
  
  bool isOverlapping = !(station == 1 && ring == 3);
  // not overlapping means back
  if(isOverlapping)
  {
    bool isEven = (chamber%2==0);
    // odd chambers are bolted to the iron, which faces
    // forward in 1&2, backward in 3&4, so...
    result = (station<3) ? isEven : !isEven;
  }
  return result;
}
MuDetRing * MuonCSCDetLayerGeometryBuilder::makeDetRing ( std::vector< const GeomDet * > &  geomDets) [static, private]

Definition at line 140 of file MuonCSCDetLayerGeometryBuilder.cc.

References LogTrace, precomputed_value_sort(), query::result, and AlCaHLTBitMon_QueryRunRegistry::string.

{
    const std::string metname = "Muon|RecoMuon|RecoMuonDetLayers|MuonCSCDetLayerGeometryBuilder";


    precomputed_value_sort(geomDets.begin(), geomDets.end(), geomsort::DetPhi());
    MuDetRing * result = new MuDetRing(geomDets);
    LogTrace(metname) << "New MuDetRing with " << geomDets.size()
                        << " chambers at z="<< result->position().z()
                        << " R1: " << result->specificSurface().innerRadius()
                        << " R2: " << result->specificSurface().outerRadius();
    return result;
}