CMS 3D CMS Logo

List of all members | Private Member Functions
CmsTrackerDiskBuilder Class Reference

#include <CmsTrackerDiskBuilder.h>

Inheritance diagram for CmsTrackerDiskBuilder:
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 contructs PixelForward/Disk.

Definition at line 11 of file CmsTrackerDiskBuilder.h.

Member Function Documentation

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

Implements CmsTrackerLevelBuilder.

Definition at line 15 of file CmsTrackerDiskBuilder.cc.

References GeometricDet::addComponent(), CmsTrackerLevelBuilder::build(), ExtractStringFromDDD::getString(), and GeometricDet::panel.

16 {
17  CmsTrackerPanelBuilder theCmsTrackerPanelBuilder;
19 
21  {
23  theCmsTrackerPanelBuilder.build( fv, subdet, s );
24  break;
25  default:
26  edm::LogError( "CmsTrackerDiskBuilder" ) << " ERROR - I was expecting a Panel, I got a " << ExtractStringFromDDD::getString( s, &fv );
27  }
28  g->addComponent( subdet );
29 }
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 CmsTrackerDiskBuilder::sortNS ( DDFilteredView fv,
GeometricDet det 
)
privatevirtual

Reimplemented from CmsTrackerLevelBuilder.

Definition at line 32 of file CmsTrackerDiskBuilder.cc.

References GeometricDet::addComponents(), GeometricDet::clearComponents(), AlCaHLTBitMon_QueryRunRegistry::comp, GeometricDet::component(), GeometricDet::components(), GeometricDet::panel, groupFilesInBlocks::temp, and TrackerStablePhiSort().

33 {
34 
35 
37 
38  switch( det->components().front()->type())
39  {
41  TrackerStablePhiSort( comp.begin(), comp.end(), ExtractPhi());
42  break;
43  default:
44  edm::LogError( "CmsTrackerDiskBuilder" ) << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
45  }
46 
47  GeometricDet::GeometricDetContainer zminpanels; // Here z refers abs(z);
48  GeometricDet::GeometricDetContainer zmaxpanels; // So, zmin panel is always closer to ip.
49 
50  uint32_t totalblade = comp.size()/2;
51  // std::cout << "pixel_disk " << pixel_disk << endl;
52 
53  zminpanels.reserve( totalblade );
54  zmaxpanels.reserve( totalblade );
55  for( uint32_t j = 0; j < totalblade; j++ )
56  {
57  if( fabs( comp[2*j]->translation().z()) > fabs( comp[ 2*j +1 ]->translation().z()))
58  {
59  zmaxpanels.push_back( det->component(2*j) );
60  zminpanels.push_back( det->component(2*j+1) );
61 
62  }
63  else if( fabs( comp[2*j]->translation().z()) < fabs( comp[ 2*j +1 ]->translation().z()))
64  {
65  zmaxpanels.push_back( det->component(2*j+1) );
66  zminpanels.push_back( det->component(2*j) );
67  }
68  else
69  {
70  edm::LogWarning( "CmsTrackerDiskBuilder" ) << "WARNING - The Z of both panels are equal! ";
71  }
72  }
73 
74  for( uint32_t fn = 0; fn < zminpanels.size(); fn++ )
75  {
76  uint32_t blade = fn + 1;
77  uint32_t panel = 1;
78  uint32_t temp = ( blade << 2 ) | panel;
79  zminpanels[fn]->setGeographicalID( temp );
80  }
81 
82  for( uint32_t bn = 0; bn < zmaxpanels.size(); bn++)
83  {
84  uint32_t blade = bn + 1;
85  uint32_t panel = 2;
86  uint32_t temp = ( blade << 2) | panel;
87  zmaxpanels[bn]->setGeographicalID( temp );
88  }
89 
90  det->clearComponents();
91  det->addComponents( zminpanels );
92  det->addComponents( zmaxpanels );
93 
94 }
void clearComponents()
Definition: GeometricDet.h:98
std::vector< GeometricDet * > GeometricDetContainer
Definition: GeometricDet.h:37
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:176
void TrackerStablePhiSort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
GeometricDet * component(size_t index)
Definition: GeometricDet.h:114
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:36
void addComponents(GeometricDetContainer const &cont)