CMS 3D CMS Logo

Public Member Functions | Protected Attributes

DDDCmsTrackerContruction Class Reference

#include <DDDCmsTrackerContruction.h>

List of all members.

Public Member Functions

const GeometricDetconstruct (const DDCompactView *cpv)
 DDDCmsTrackerContruction ()

Protected Attributes

std::string attribute
CmsTrackerStringToEnum theCmsTrackerStringToEnum

Detailed Description

High level class to build a tracker. It will only build subdets, then call subdet builders

Definition at line 16 of file DDDCmsTrackerContruction.h.


Constructor & Destructor Documentation

DDDCmsTrackerContruction::DDDCmsTrackerContruction ( )

Definition at line 11 of file DDDCmsTrackerContruction.cc.

                                                  {

}

Member Function Documentation

const GeometricDet * DDDCmsTrackerContruction::construct ( const DDCompactView cpv)

Definition at line 15 of file DDDCmsTrackerContruction.cc.

References DDFilteredView::addFilter(), CmsTrackerLevelBuilder::build(), CmsTrackerDetIdBuilder::buildId(), Exception, alcazmumu_cfi::filter, DDFilteredView::firstChild(), ExtractStringFromDDD::getString(), DDSpecificsFilter::not_equals, DDFilteredView::parent(), DDSpecificsFilter::setCriteria(), patCandidatesForDimuonsSequences_cff::tracker, GeometricDet::Tracker, align::Tracker, and relativeConstraints::value.

Referenced by TrackerGeometricDetESModule::produce().

                                                                               {
  attribute = "TkDDDStructure"; // could come from .orcarc
  std::string value     = "any";
  DDSpecificsFilter filter;
  DDValue ddv(attribute,value,0);
  filter.setCriteria(ddv,DDSpecificsFilter::not_equals);
  
  DDFilteredView fv(*cpv); 
  fv.addFilter(filter);
  if (theCmsTrackerStringToEnum.type(ExtractStringFromDDD::getString(attribute,&fv)) != GeometricDet::Tracker){
    fv.firstChild();
    if (theCmsTrackerStringToEnum.type(ExtractStringFromDDD::getString(attribute,&fv)) != GeometricDet::Tracker){
      
      throw cms::Exception("Configuration") <<" The first child of the DDFilteredView is not what is expected \n"
                                            <<ExtractStringFromDDD::getString(attribute,&fv)<<"\n";
    }
  }
  
  GeometricDet* tracker  = new GeometricDet(&fv,GeometricDet::Tracker);
  CmsTrackerBuilder theCmsTrackerBuilder;
  theCmsTrackerBuilder.build(fv,tracker,attribute);

  
  CmsTrackerDetIdBuilder theCmsTrackerDetIdBuilder;
  
  tracker = theCmsTrackerDetIdBuilder.buildId(tracker);
  fv.parent();
  //
  // set the Tracker
  //
  //TrackerMapDDDtoID::instance().setTracker(tracker);
  //NOTE: If it is decided that the TrackerMapDDDtoID should be
  // constructed here, then we should return from this
  // function so that the EventSetup can manage it

  return tracker;
}

Member Data Documentation

std::string DDDCmsTrackerContruction::attribute [protected]

Definition at line 23 of file DDDCmsTrackerContruction.h.

Definition at line 24 of file DDDCmsTrackerContruction.h.