CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Private Member Functions
CmsTrackerPetalBuilder Class Reference

#include <CmsTrackerPetalBuilder.h>

Inheritance diagram for CmsTrackerPetalBuilder:
CmsTrackerLevelBuilder CmsTrackerAbstractConstruction

Private Member Functions

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

Additional Inherited Members

- Public Member Functions inherited from CmsTrackerLevelBuilder
virtual void build (DDFilteredView &, GeometricDet *, std::string)
 
virtual ~CmsTrackerLevelBuilder ()
 
- Protected Attributes inherited from CmsTrackerLevelBuilder
CmsTrackerStringToEnum theCmsTrackerStringToEnum
 

Detailed Description

Class which constructs TEC petals

Definition at line 10 of file CmsTrackerPetalBuilder.h.

Member Function Documentation

void CmsTrackerPetalBuilder::buildComponent ( DDFilteredView fv,
GeometricDet g,
std::string  s 
)
privatevirtual

Implements CmsTrackerLevelBuilder.

Definition at line 11 of file CmsTrackerPetalBuilder.cc.

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

11  {
12 
13  GeometricDet * det =
14  new GeometricDet(&fv,
16  CmsTrackerRingBuilder theCmsTrackerRingBuilder;
17  theCmsTrackerRingBuilder.build(fv,det,s);
18  g->addComponent(det);
19 }
static std::string getString(std::string const &, DDFilteredView *)
void addComponent(GeometricDet *)
virtual void build(DDFilteredView &, GeometricDet *, std::string)
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum
void CmsTrackerPetalBuilder::sortNS ( DDFilteredView fv,
GeometricDet det 
)
privatevirtual

Reimplemented from CmsTrackerLevelBuilder.

Definition at line 21 of file CmsTrackerPetalBuilder.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, GeometricDet::component(), GeometricDet::components(), i, GeometricDet::ring, GeometricDet::setGeographicalID(), and python.multivaluedict::sort().

21  {
23 
24  if (comp.front()->type()==GeometricDet::ring)
25  std::sort(comp.begin(),comp.end(),LessR_module());
26  else
27  edm::LogError("CmsTrackerPetalBuilder")<<"ERROR - wrong SubDet to sort..... "<<det->components().front()->type();
28 
29  // Maximum Number fo TEC Rings is 7 in order
30  // to discover from which number we have to start
31  // the operation is MaxRing - RealRingNumber + 1 (C++)
32 
33  uint32_t startring = 8 - comp.size();
34 
35  for(uint32_t i=0; i<comp.size(); i++){
36  det->component(i)->setGeographicalID(startring+i);
37  }
38 }
int i
Definition: DBlmapReader.cc:9
void setGeographicalID(DetId id)
Definition: GeometricDet.h:75
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:169
GeometricDet * component(size_t index)
Definition: GeometricDet.h:107
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:36