CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

CmsTrackerSubStrctBuilder Class Reference

#include <CmsTrackerSubStrctBuilder.h>

Inheritance diagram for CmsTrackerSubStrctBuilder:
CmsTrackerLevelBuilder CmsTrackerAbstractConstruction

List of all members.

Public Member Functions

 CmsTrackerSubStrctBuilder (unsigned int totalBlade)

Private Member Functions

virtual void buildComponent (DDFilteredView &, GeometricDet *, std::string)
virtual void sortNS (DDFilteredView &, GeometricDet *)

Private Attributes

unsigned int m_totalBlade

Detailed Description

Classes which abuilds all the tracker substructures

Definition at line 11 of file CmsTrackerSubStrctBuilder.h.


Constructor & Destructor Documentation

CmsTrackerSubStrctBuilder::CmsTrackerSubStrctBuilder ( unsigned int  totalBlade)

Definition at line 14 of file CmsTrackerSubStrctBuilder.cc.

  : m_totalBlade( totalBlade )
{}

Member Function Documentation

void CmsTrackerSubStrctBuilder::buildComponent ( DDFilteredView fv,
GeometricDet g,
std::string  s 
) [private, virtual]

Implements CmsTrackerLevelBuilder.

Definition at line 19 of file CmsTrackerSubStrctBuilder.cc.

References GeometricDet::addComponent(), CmsTrackerLevelBuilder::build(), GeometricDet::disk, ExtractStringFromDDD::getString(), GeometricDet::layer, m_totalBlade, CmsTrackerLevelBuilder::theCmsTrackerStringToEnum, CmsTrackerStringToEnum::type(), and GeometricDet::wheel.

{
  CmsTrackerLayerBuilder theCmsTrackerLayerBuilder;
  CmsTrackerWheelBuilder theCmsTrackerWheelBuilder;
  CmsTrackerDiskBuilder  theCmsTrackerDiskBuilder( m_totalBlade );   

  GeometricDet * subdet = new GeometricDet( &fv, theCmsTrackerStringToEnum.type( ExtractStringFromDDD::getString( s, &fv )));
  switch( theCmsTrackerStringToEnum.type( ExtractStringFromDDD::getString( s, &fv )))
  {
  case GeometricDet::layer:
    theCmsTrackerLayerBuilder.build(fv,subdet,s);      
    break;
  case GeometricDet::wheel:
    theCmsTrackerWheelBuilder.build(fv,subdet,s);      
    break;
  case GeometricDet::disk:    
    theCmsTrackerDiskBuilder.build(fv,subdet,s);
    break;

  default:
    edm::LogError("CmsTrackerSubStrctBuilder")<<" ERROR - I was expecting a Layer ,Wheel or Disk... I got a "<<ExtractStringFromDDD::getString(s,&fv);
  }  
  
  g->addComponent(subdet);

}
void CmsTrackerSubStrctBuilder::sortNS ( DDFilteredView fv,
GeometricDet det 
) [private, virtual]

Reimplemented from CmsTrackerLevelBuilder.

Definition at line 47 of file CmsTrackerSubStrctBuilder.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, GeometricDet::components(), GeometricDet::disk, i, GeometricDet::layer, python::multivaluedict::sort(), and GeometricDet::wheel.

{
  GeometricDet::GeometricDetContainer & comp = det->components();

  switch( comp.front()->type())
  {
  case GeometricDet::layer:
    std::sort( comp.begin(), comp.end(), LessR());
    break;      
  case GeometricDet::wheel:
    std::sort( comp.begin(), comp.end(), LessModZ());
    break;      
  case GeometricDet::disk:
    std::sort( comp.begin(), comp.end(), LessModZ());
    break;
  default:
    edm::LogError( "CmsTrackerSubStrctBuilder" ) << "ERROR - wrong SubDet to sort..... " << det->components().front()->type(); 
  }
  
  for( uint32_t i = 0; i < comp.size(); i++ )
  {
    comp[i]->setGeographicalID(i+1); // Every subdetector: Layer/Disk/Wheel Number
  }
}

Member Data Documentation

Definition at line 19 of file CmsTrackerSubStrctBuilder.h.

Referenced by buildComponent().