CMS 3D CMS Logo

List of all members | Private Member Functions
CmsTrackerWheelBuilder< FilteredView > Class Template Reference

#include <CmsTrackerWheelBuilder.h>

Inheritance diagram for CmsTrackerWheelBuilder< FilteredView >:
CmsTrackerLevelBuilder< FilteredView > CmsTrackerAbstractConstruction< FilteredView >

Private Member Functions

void buildComponent (FilteredView &, GeometricDet *, const std::string &) override
 
void sortNS (FilteredView &, GeometricDet *) override
 

Additional Inherited Members

- Public Member Functions inherited from CmsTrackerLevelBuilder< FilteredView >
template<>
void build (cms::DDFilteredView &fv, GeometricDet *tracker, const std::string &attribute)
 
template<>
void build (DDFilteredView &fv, GeometricDet *tracker, const std::string &attribute)
 
void build (FilteredView &, GeometricDet *, const std::string &) override
 
 ~CmsTrackerLevelBuilder () override
 
- Public Member Functions inherited from CmsTrackerAbstractConstruction< FilteredView >
virtual ~CmsTrackerAbstractConstruction ()=default
 
- Protected Attributes inherited from CmsTrackerLevelBuilder< FilteredView >
CmsTrackerStringToEnum theCmsTrackerStringToEnum
 

Detailed Description

template<class FilteredView>
class CmsTrackerWheelBuilder< FilteredView >

Class which builds TEC wheels

Definition at line 12 of file CmsTrackerWheelBuilder.h.

Member Function Documentation

◆ buildComponent()

template<class FilteredView >
void CmsTrackerWheelBuilder< FilteredView >::buildComponent ( FilteredView &  fv,
GeometricDet g,
const std::string &  s 
)
overrideprivatevirtual

Implements CmsTrackerLevelBuilder< FilteredView >.

Definition at line 16 of file CmsTrackerWheelBuilder.cc.

16  {
17  CmsTrackerRingBuilder<FilteredView> theCmsTrackerRingBuilder;
18  CmsTrackerPetalBuilder<FilteredView> theCmsTrackerPetalBuilder;
19 
20  GeometricDet* subdet = new GeometricDet(&fv,
25  case GeometricDet::ring:
26  theCmsTrackerRingBuilder.build(fv, subdet, s);
27  break;
29  theCmsTrackerPetalBuilder.build(fv, subdet, s);
30  break;
31  default:
32  edm::LogError("CmsTrackerWheelBuilder") << " ERROR - I was expecting a Ring or Petal, I got a "
34  }
35  g->addComponent(subdet);
36 }

References CmsTrackerLevelBuilder< FilteredView >::build(), g, ExtractStringFromDDD< FilteredView >::getString(), GeometricDet::petal, GeometricDet::ring, and alignCSCRings::s.

◆ sortNS()

template<class FilteredView >
void CmsTrackerWheelBuilder< FilteredView >::sortNS ( FilteredView &  fv,
GeometricDet det 
)
overrideprivatevirtual

Reimplemented from CmsTrackerLevelBuilder< FilteredView >.

Definition at line 39 of file CmsTrackerWheelBuilder.cc.

39  {
41 
42  if (!comp.empty()) {
43  if (comp.front()->type() == GeometricDet::petal) {
46  compfw.clear();
47  compbw.clear();
48  for (uint32_t i = 0; i < comp.size(); i++) {
49  if (std::abs(comp[i]->translation().z()) < std::abs(det->translation().z())) {
50  compfw.emplace_back(det->component(i));
51  } else {
52  compbw.emplace_back(det->component(i));
53  }
54  }
55 
58 
59  //
60  // TEC
61  // Wheel Part: 3 bits [back:1 front:2]
62  // Petal Number: 4 bits [1,...,8]
63  //
64  for (uint32_t i = 0; i < compbw.size(); i++) {
65  uint32_t temp = i + 1;
66  temp |= (1 << 4);
67  compbw[i]->setGeographicalID(DetId(temp));
68  }
69  for (uint32_t i = 0; i < compfw.size(); i++) {
70  uint32_t temp = i + 1;
71  temp |= (2 << 4);
72  compfw[i]->setGeographicalID(DetId(temp));
73  }
74 
75  det->clearComponents();
76  det->addComponents(compfw);
77  det->addComponents(compbw);
78 
79  } else {
80  std::stable_sort(comp.begin(), comp.end(), CmsTrackerLevelBuilderHelper::isLessRModule);
81 
82  // TID
83  // Disk Number: 2 bits [1,2,3]
84  for (uint32_t i = 0; i < comp.size(); i++) {
85  det->component(i)->setGeographicalID(DetId(i + 1));
86  }
87  }
88  } else {
89  edm::LogError("CmsTrackerWheelBuilder") << "Where are the Petals or Rings?";
90  }
91 }

References funct::abs(), GeometricDet::addComponents(), GeometricDet::clearComponents(), AlCaHLTBitMon_QueryRunRegistry::comp, GeometricDet::component(), GeometricDet::components(), CmsTrackerLevelBuilderHelper::getPhiModule(), mps_fire::i, CmsTrackerLevelBuilderHelper::isLessRModule(), GeometricDet::petal, GeometricDet::setGeographicalID(), groupFilesInBlocks::temp, trackerStablePhiSort(), GeometricDet::translation(), and detailsBasic3DVector::z.

ExtractStringFromDDD::getString
static std::string getString(const std::string &, FilteredView *)
CmsTrackerLevelBuilder
Definition: CmsTrackerLevelBuilder.h:31
mps_fire.i
i
Definition: mps_fire.py:428
GeometricDet::petal
Definition: GeometricDet.h:61
GeometricDet::components
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:149
trackerStablePhiSort
void trackerStablePhiSort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
Definition: trackerStablePhiSort.h:9
GeometricDet::ring
Definition: GeometricDet.h:62
GeometricDet::translation
const Translation & translation() const
Definition: GeometricDet.h:100
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
ExtractStringFromDDD
Definition: ExtractStringFromDDD.h:12
CmsTrackerLevelBuilderHelper::getPhiModule
static double getPhiModule(const GeometricDet *a)
Definition: CmsTrackerLevelBuilder.cc:49
DetId
Definition: DetId.h:17
alignCSCRings.s
s
Definition: alignCSCRings.py:92
GeometricDet::setGeographicalID
void setGeographicalID(DetId id)
Definition: GeometricDet.h:97
DDAxes::z
CmsTrackerPetalBuilder
Definition: CmsTrackerPetalBuilder.h:12
GeometricDet
Definition: GeometricDet.h:31
CmsTrackerLevelBuilder::build
void build(FilteredView &, GeometricDet *, const std::string &) override
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
GeometricDet::addComponents
void addComponents(GeometricDetContainer const &cont)
Definition: GeometricDet.cc:240
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
CmsTrackerLevelBuilderHelper::isLessRModule
static bool isLessRModule(const GeometricDet *a, const GeometricDet *b)
Definition: CmsTrackerLevelBuilder.cc:136
CmsTrackerRingBuilder
Definition: CmsTrackerRingBuilder.h:12
GeometricDet::component
GeometricDet * component(size_t index)
Definition: GeometricDet.h:145
GeometricDet::ConstGeometricDetContainer
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:34
GeometricDet::GeometricDetContainer
std::vector< GeometricDet * > GeometricDetContainer
Definition: GeometricDet.h:35
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GeometricDet::clearComponents
void clearComponents()
Definition: GeometricDet.h:160
g
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4