CMS 3D CMS Logo

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

#include <CmsTrackerOTLayerBuilder.h>

Inheritance diagram for CmsTrackerOTLayerBuilder< 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 >
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 CmsTrackerOTLayerBuilder< FilteredView >

Class which contructs TIB/TOB layers

Definition at line 12 of file CmsTrackerOTLayerBuilder.h.

Member Function Documentation

◆ buildComponent()

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

Implements CmsTrackerLevelBuilder< FilteredView >.

Definition at line 16 of file CmsTrackerOTLayerBuilder.cc.

16  {
17  LogTrace("DetConstruction") << " CmsTrackerOTLayerBuilder::buildComponent ";
18  CmsTrackerLadderBuilder<FilteredView> theCmsTrackerLadderBuilder;
19  CmsTrackerOTRingBuilder<FilteredView> theCmsTrackerOTRingBuilder;
20 
21  GeometricDet* subdet = new GeometricDet(&fv,
27  theCmsTrackerLadderBuilder.build(fv, subdet, s);
28  break;
30  theCmsTrackerOTRingBuilder.build(fv, subdet, s);
31  break;
32  default:
33  edm::LogError("CmsTrackerOTLayerBuilder") << " ERROR - I was expecting a ladder or a panel, I got a "
35  }
36  g->addComponent(subdet);
37 }

References CmsTrackerLevelBuilder< FilteredView >::build(), g, ExtractStringFromDDD< FilteredView >::getString(), GeometricDet::ladder, LogTrace, GeometricDet::panel, and alignCSCRings::s.

◆ sortNS()

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

Reimplemented from CmsTrackerLevelBuilder< FilteredView >.

Definition at line 40 of file CmsTrackerOTLayerBuilder.cc.

40  {
42 
43  //order ladder and rings together
47  rods.clear();
48  ringsNeg.clear();
49  ringsPos.clear();
50 
51  for (uint32_t i = 0; i < comp.size(); i++) {
52  auto component = det->component(i);
53  if (component->type() == GeometricDet::ladder) {
54  rods.emplace_back(component);
55  } else if (component->type() == GeometricDet::panel) {
56  if (component->translation().z() < 0.) {
57  ringsNeg.emplace_back(component);
58  } else if (component->translation().z() > 0.) {
59  ringsPos.emplace_back(component);
60  }
61  } else {
62  edm::LogError("CmsTrackerOTLayerBuilder")
63  << "ERROR - wrong SubDet to sort..... " << det->components().front()->type();
64  }
65  }
66 
67  // negative rings
68  if (!ringsNeg.empty()) {
69  std::sort(ringsNeg.begin(), ringsNeg.end(), CmsTrackerLevelBuilderHelper::isLessZ);
70  uint32_t totalringsNeg = ringsNeg.size();
71 
72  LogTrace("DetConstruction") << " Neg rings ordered by z: ";
73  for (uint32_t ring = 0; ring < totalringsNeg; ring++) {
74  uint32_t temp = ring + 1;
75  temp |= (1 << 8);
76  ringsNeg[ring]->setGeographicalID(temp);
77  LogTrace("BuildingTrackerDetId") << "\t\t\t DetId >> " << temp
78  << "(r: " << sqrt(ringsNeg[ring]->translation().Perp2())
79  << ", phi: " << ringsNeg[ring]->phi()
80  << ", z: " << ringsNeg[ring]->translation().z() << ")";
81  }
82  }
83 
84  // rods
85  if (!rods.empty()) {
87  uint32_t totalrods = rods.size();
88 
89  LogTrace("DetConstruction") << " Rods ordered by phi: ";
90  for (uint32_t rod = 0; rod < totalrods; rod++) {
91  uint32_t temp = rod + 1;
92  temp |= (3 << 8);
93  rods[rod]->setGeographicalID(DetId(temp));
94  LogTrace("BuildingTrackerDetId") << "\t\t\t DetId >> " << temp << "(r: " << sqrt(rods[rod]->translation().Perp2())
95  << ", phi: " << rods[rod]->phi() << ", z: " << rods[rod]->translation().z()
96  << ")";
97  }
98  }
99 
100  // positive rings
101  if (!ringsPos.empty()) {
102  std::sort(ringsPos.begin(), ringsPos.end(), CmsTrackerLevelBuilderHelper::isLessZ);
103  uint32_t totalringsPos = ringsPos.size();
104 
105  LogTrace("DetConstruction") << " Pos rings ordered by z: ";
106  for (uint32_t ring = 0; ring < totalringsPos; ring++) {
107  uint32_t temp = ring + 1;
108  temp |= (2 << 8);
109  ringsPos[ring]->setGeographicalID(temp);
110  LogTrace("BuildingTrackerDetId") << "\t\t\t DetId >> " << temp
111  << "(r: " << sqrt(ringsPos[ring]->translation().Perp2())
112  << ", phi: " << ringsPos[ring]->phi()
113  << ", z: " << ringsPos[ring]->translation().z() << ")";
114  }
115  }
116 
117  det->clearComponents();
118  det->addComponents(ringsNeg);
119  det->addComponents(rods);
120  det->addComponents(ringsPos);
121 }

References GeometricDet::addComponents(), GeometricDet::clearComponents(), AlCaHLTBitMon_QueryRunRegistry::comp, GeometricDet::component(), GeometricDet::components(), CmsTrackerLevelBuilderHelper::getPhi(), mps_fire::i, CmsTrackerLevelBuilderHelper::isLessZ(), GeometricDet::ladder, LogTrace, GeometricDet::panel, relativeConstraints::ring, mathSSE::sqrt(), groupFilesInBlocks::temp, and trackerStablePhiSort().

ExtractStringFromDDD::getString
static std::string getString(const std::string &, FilteredView *)
CmsTrackerLevelBuilder
Definition: CmsTrackerLevelBuilder.h:31
mps_fire.i
i
Definition: mps_fire.py:355
GeometricDet::components
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:139
CmsTrackerOTRingBuilder
Definition: CmsTrackerOTRingBuilder.h:12
GeometricDet::ladder
Definition: GeometricDet.h:67
trackerStablePhiSort
void trackerStablePhiSort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
Definition: trackerStablePhiSort.h:9
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
CmsTrackerLevelBuilderHelper::isLessZ
static bool isLessZ(const GeometricDet *a, const GeometricDet *b)
Definition: CmsTrackerLevelBuilder.cc:28
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
ExtractStringFromDDD
Definition: ExtractStringFromDDD.h:12
CmsTrackerLevelBuilderHelper::getPhi
static double getPhi(const GeometricDet *a)
Definition: CmsTrackerLevelBuilder.cc:42
DetId
Definition: DetId.h:17
alignCSCRings.s
s
Definition: alignCSCRings.py:92
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
GeometricDet
Definition: GeometricDet.h:30
edm::LogError
Definition: MessageLogger.h:183
CmsTrackerLevelBuilder::build
void build(FilteredView &, GeometricDet *, const std::string &) override
Definition: CmsTrackerLevelBuilder.cc:141
GeometricDet::addComponents
void addComponents(GeometricDetContainer const &cont)
Definition: GeometricDet.cc:200
GeometricDet::panel
Definition: GeometricDet.h:71
type
type
Definition: HCALResponse.h:21
GeometricDet::component
GeometricDet * component(size_t index)
Definition: GeometricDet.h:114
GeometricDet::ConstGeometricDetContainer
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:33
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
CmsTrackerLadderBuilder
Definition: CmsTrackerLadderBuilder.h:12
GeometricDet::GeometricDetContainer
std::vector< GeometricDet * > GeometricDetContainer
Definition: GeometricDet.h:34
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
GeometricDet::clearComponents
void clearComponents()
Definition: GeometricDet.h:104
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