CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
GeometricDet Class Reference

#include <GeometricDet.h>

Public Types

using ConstGeometricDetContainer = std::vector< GeometricDet const * >
 
enum  GDEnumType {
  unknown = 100, Tracker = 0, PixelBarrel = 1, PixelEndCap = 2,
  TIB = 3, TID = 4, TOB = 5, TEC = 6,
  layer = 8, wheel = 9, strng = 10, rod = 11,
  petal = 12, ring = 13, ladder = 14, mergedDet = 15,
  DetUnit = 16, disk = 17, panel = 18, PixelPhase1Barrel = 101,
  PixelPhase1EndCap = 102, PixelPhase1Disk = 117, ITPhase2Combined = 180, OTPhase2EndCap = 204,
  OTPhase2Barrel = 205, OTPhase2Layer = 208, OTPhase2Stack = 215, PixelPhase2Barrel = 201,
  PixelPhase2EndCap = 202, OTPhase2Wheel = 209, PixelPhase2FullDisk = 217, PixelPhase2ReducedDisk = 227,
  PixelPhase2TDRDisk = 237, PixelPhase2DoubleDisk = 347, PixelPhase2SubDisk = 357
}
 
using GeometricDetContainer = std::vector< GeometricDet * >
 
typedef enum GeometricDet::GDEnumType GeometricEnumType
 
using nav_type = std::vector< int >
 
using NavRange = std::pair< int const *, size_t >
 
using Position = Surface::PositionType
 
using Rotation = Surface::RotationType
 
using RotationMatrix = ROOT::Math::Rotation3D
 
using Translation = ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > >
 

Public Member Functions

void addComponent (GeometricDet *)
 
void addComponents (GeometricDetContainer const &cont)
 
void addComponents (ConstGeometricDetContainer const &cont)
 
float bigPixelsPitchx () const
 
float bigPixelsPitchy () const
 
int bigPixelsx () const
 
int bigPixelsy () const
 
std::unique_ptr< Boundsbounds () const
 
void clearComponents ()
 
GeometricDetcomponent (size_t index)
 
ConstGeometricDetContainercomponents ()
 
const ConstGeometricDetContainercomponents () const
 
ConstGeometricDetContainer deepComponents () const
 
void deepComponents (ConstGeometricDetContainer &cont) const
 
void deleteComponents ()
 
const DetIdgeographicalId () const
 
 GeometricDet (DDFilteredView *fv, GeometricEnumType dd)
 
 GeometricDet (cms::DDFilteredView *fv, GeometricEnumType dd)
 
 GeometricDet (const PGeometricDet::Item &onePGD, GeometricEnumType dd)
 
bool isFirstSensor () const
 
bool isFromDD4hep () const
 
bool isLeaf () const
 
bool isLowerSensor () const
 
bool isSecondSensor () const
 
bool isUpperSensor () const
 
const std::string & name () const
 
NavRange navpos () const
 
const nav_typenavType () const
 
const std::vector< double > & params () const
 
double phi () const
 
double pixROCCols () const
 
double pixROCRows () const
 
double pixROCx () const
 
double pixROCy () const
 
Position positionBounds () const
 
double radLength () const
 
double rho () const
 
const RotationMatrixrotation () const
 
Rotation rotationBounds () const
 
void setGeographicalID (DetId id)
 
LegacySolidShape shape () const
 
const cms::DDSolidShapeshape_dd4hep () const
 
double siliconAPVNum () const
 
bool stereo () const
 
const Translationtranslation () const
 
const GeometricEnumTypetype () const
 
double xi () const
 
 ~GeometricDet ()
 

Static Public Member Functions

static std::string printNavType (int const *n, size_t sz)
 

Private Member Functions

std::vector< double > computeLegacyShapeParameters (const cms::DDSolidShape &mySolidShape, const dd4hep::Solid &mySolid) const
 

Private Attributes

float bigPixelsPitchx_ = 0.
 
float bigPixelsPitchy_ = 0.
 
int bigPixelsx_ = 0
 
int bigPixelsy_ = 0
 
ConstGeometricDetContainer container_
 
nav_type ddd_
 
std::string ddname_
 
DetId geographicalID_ = 0
 
bool isFirstSensor_ = false
 
bool isFromDD4hep_ = false
 
bool isLowerSensor_ = false
 
bool isSecondSensor_ = false
 
bool isUpperSensor_ = false
 
std::vector< double > params_
 
double phi_ = 0.
 
double pixROCCols_ = 0.
 
double pixROCRows_ = 0.
 
double pixROCx_ = 0.
 
double pixROCy_ = 0.
 
double radLength_ = 0.
 
double rho_ = 0.
 
RotationMatrix rot_
 
cms::DDSolidShape shape_
 
double siliconAPVNum_ = 0.
 
bool stereo_ = false
 
Translation trans_
 
GeometricEnumType type_
 
double xi_ = 0.
 

Detailed Description

Composite class GeometricDet. A composite can contain other composites, and so on; You can understand what you are looking at via enum.

Definition at line 31 of file GeometricDet.h.

Member Typedef Documentation

◆ ConstGeometricDetContainer

Definition at line 34 of file GeometricDet.h.

◆ GeometricDetContainer

Definition at line 35 of file GeometricDet.h.

◆ GeometricEnumType

◆ nav_type

using GeometricDet::nav_type = std::vector<int>

Definition at line 42 of file GeometricDet.h.

◆ NavRange

using GeometricDet::NavRange = std::pair<int const*, size_t>

Definition at line 33 of file GeometricDet.h.

◆ Position

Definition at line 45 of file GeometricDet.h.

◆ Rotation

Definition at line 46 of file GeometricDet.h.

◆ RotationMatrix

using GeometricDet::RotationMatrix = ROOT::Math::Rotation3D

Definition at line 36 of file GeometricDet.h.

◆ Translation

using GeometricDet::Translation = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double> >

Definition at line 37 of file GeometricDet.h.

Member Enumeration Documentation

◆ GDEnumType

Enumerator
unknown 
Tracker 
PixelBarrel 
PixelEndCap 
TIB 
TID 
TOB 
TEC 
layer 
wheel 
strng 
rod 
petal 
ring 
ladder 
mergedDet 
DetUnit 
disk 
panel 
PixelPhase1Barrel 
PixelPhase1EndCap 
PixelPhase1Disk 
ITPhase2Combined 
OTPhase2EndCap 
OTPhase2Barrel 
OTPhase2Layer 
OTPhase2Stack 
PixelPhase2Barrel 
PixelPhase2EndCap 
OTPhase2Wheel 
PixelPhase2FullDisk 
PixelPhase2ReducedDisk 
PixelPhase2TDRDisk 
PixelPhase2DoubleDisk 
PixelPhase2SubDisk 

Definition at line 48 of file GeometricDet.h.

48  {
49  unknown = 100,
50  Tracker = 0,
51  PixelBarrel = 1,
52  PixelEndCap = 2,
53  TIB = 3,
54  TID = 4,
55  TOB = 5,
56  TEC = 6,
57  layer = 8,
58  wheel = 9,
59  strng = 10,
60  rod = 11,
61  petal = 12,
62  ring = 13,
63  ladder = 14,
64  mergedDet = 15,
65  DetUnit = 16,
66  disk = 17,
67  panel = 18,
68  PixelPhase1Barrel = 101,
69  PixelPhase1EndCap = 102,
70  PixelPhase1Disk = 117,
71  ITPhase2Combined = 180,
72  OTPhase2EndCap = 204,
73  OTPhase2Barrel = 205,
74  OTPhase2Layer = 208,
75  OTPhase2Stack = 215,
76  PixelPhase2Barrel = 201,
77  PixelPhase2EndCap = 202,
78  OTPhase2Wheel = 209,
79  PixelPhase2FullDisk = 217,
81  PixelPhase2TDRDisk = 237,
83  PixelPhase2SubDisk = 357
enum GeometricDet::GDEnumType GeometricEnumType

Constructor & Destructor Documentation

◆ GeometricDet() [1/3]

GeometricDet::GeometricDet ( DDFilteredView fv,
GeometricEnumType  dd 
)

Definition at line 73 of file GeometricDet.cc.

References bigPixelsPitchx_, bigPixelsPitchy_, bigPixelsx_, bigPixelsy_, ddd_, DetUnit, isFirstSensor_, isLowerSensor_, isSecondSensor_, isUpperSensor_, DDFilteredView::navPos(), nt, pixROCCols_, pixROCRows_, pixROCx_, pixROCy_, radLength_, siliconAPVNum_, stereo_, type_, and xi_.

74  : ddname_(fv->name()),
75  type_(type),
76  ddd_(), // To remove after DetExtra is removed (not used)
77  trans_(fv->translation()),
78  rho_(trans_.Rho()),
79  phi_(trans_.Phi()),
80  rot_(fv->rotation()),
82  params_(fv->parameters()),
83  isFromDD4hep_(false) {
84  // workaround instead of this at initialization
85  const DDFilteredView::nav_type& nt = fv->navPos();
86  ddd_ = nav_type(nt.begin(), nt.end());
87 
88  // Only look for sensor-related info on sensor volumes!
89  if (type_ == DetUnit) {
90  radLength_ = getDouble("TrackerRadLength", *fv);
91  xi_ = getDouble("TrackerXi", *fv);
92  pixROCRows_ = getDouble("PixelROCRows", *fv);
93  pixROCCols_ = getDouble("PixelROCCols", *fv);
94  pixROCx_ = getDouble("PixelROC_X", *fv);
95  pixROCy_ = getDouble("PixelROC_Y", *fv);
96  bigPixelsx_ = getDouble("BigPixels_X", *fv);
97  bigPixelsy_ = getDouble("BigPixels_Y", *fv);
98  bigPixelsPitchx_ = getDouble("BigPixels_Pitch_X", *fv);
99  bigPixelsPitchy_ = getDouble("BigPixels_Pitch_Y", *fv);
100  isFirstSensor_ = (getString("TrackerFirstDetectors", *fv) == strue);
101  isSecondSensor_ = (getString("TrackerSecondDetectors", *fv) == strue);
102  stereo_ = (getString("TrackerStereoDetectors", *fv) == strue);
103  isLowerSensor_ = (getString("TrackerLowerDetectors", *fv) == strue);
104  isUpperSensor_ = (getString("TrackerUpperDetectors", *fv) == strue);
105  siliconAPVNum_ = getDouble("SiliconAPVNumber", *fv);
106  }
107 }
float bigPixelsPitchy_
Definition: GeometricDet.h:205
cms::DDSolidShape shape_
Definition: GeometricDet.h:193
bool isLowerSensor_
Definition: GeometricDet.h:209
double pixROCCols_
Definition: GeometricDet.h:199
std::vector< double > params_
Definition: GeometricDet.h:194
const std::vector< double > & parameters() const
const std::string & name() const
The name of a logical-part of the current node in the filtered-view.
std::vector< int > nav_type
Definition: GeometricDet.h:42
bool isUpperSensor_
Definition: GeometricDet.h:210
nav_type ddd_
Definition: GeometricDet.h:185
double pixROCx_
Definition: GeometricDet.h:200
bool isFromDD4hep_
Definition: GeometricDet.h:213
GeometricEnumType type_
Definition: GeometricDet.h:183
double radLength_
Definition: GeometricDet.h:196
bool isFirstSensor_
Definition: GeometricDet.h:206
const std::array< const cms::dd::ValuePair< LegacySolidShape, cms::DDSolidShape >, 21 > LegacySolidShapeMap
int nt
Definition: AMPTWrapper.h:42
double pixROCy_
Definition: GeometricDet.h:201
double pixROCRows_
Definition: GeometricDet.h:198
float bigPixelsPitchx_
Definition: GeometricDet.h:204
const DDSolidShape shape() const
bool isSecondSensor_
Definition: GeometricDet.h:207
Translation trans_
Definition: GeometricDet.h:188
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
DDExpandedView::nav_type nav_type
std::string ddname_
Definition: GeometricDet.h:182
nav_type navPos() const
return the stack of sibling numbers
Mapping::value_type::name_type name_from_value(Mapping a, V value)
Definition: DDSolidShapes.h:62
RotationMatrix rot_
Definition: GeometricDet.h:191
const DDTranslation & translation() const
The absolute translation of the current node.
double siliconAPVNum_
Definition: GeometricDet.h:211

◆ GeometricDet() [2/3]

GeometricDet::GeometricDet ( cms::DDFilteredView fv,
GeometricEnumType  dd 
)

Definition at line 112 of file GeometricDet.cc.

References angle_units::operators::almostEqual(), bigPixelsPitchx_, bigPixelsPitchy_, bigPixelsx_, bigPixelsy_, DetUnit, cms::DDFilteredView::findSpecPar(), cms::DDFilteredView::get(), cms::DDFilteredView::getNextValue(), isFirstSensor_, isLowerSensor_, isSecondSensor_, isUpperSensor_, phi_, pixROCCols_, pixROCRows_, pixROCx_, pixROCy_, radLength_, siliconAPVNum_, stereo_, type_, and xi_.

113  : ddname_(dd4hep::dd::noNamespace(fv->name())),
114  type_(type),
115  ddd_(fv->navPos()), // To remove after DetExtra is removed (not used)
116  trans_((fv->translation()) / dd4hep::mm),
117  rho_(trans_.Rho()),
118  phi_(trans_.Phi()),
119  rot_(fv->rotation()),
120  shape_(fv->shape()),
122  isFromDD4hep_(true) {
123  using namespace angle_units::operators;
124  if (almostEqual(phi_, -1._pi, 10)) {
125  phi_ = 1._pi;
126  // Standardize phi values of |pi| to be always +pi instead of sometimes -pi.
127  }
128 
129  // Only look for sensor-related info on sensor volumes!
130  if (type_ == DetUnit) {
131  // IT sensors only (NB: hence could add a branch here, but not a critical part on perf)
132  pixROCRows_ = fv->get<double>("PixelROCRows");
133  pixROCCols_ = fv->get<double>("PixelROCCols");
134  pixROCx_ = fv->get<double>("PixelROC_X");
135  pixROCy_ = fv->get<double>("PixelROC_Y");
136  bigPixelsx_ = fv->get<double>("BigPixels_X");
137  bigPixelsy_ = fv->get<double>("BigPixels_Y");
138  bigPixelsPitchx_ = fv->get<double>("BigPixels_Pitch_X");
139  bigPixelsPitchy_ = fv->get<double>("BigPixels_Pitch_Y");
140 
141  // Phase 2 IT 3D sensors only
142  isFirstSensor_ = (fv->get<std::string_view>("TrackerFirstDetectors") == strue);
143  isSecondSensor_ = (fv->get<std::string_view>("TrackerSecondDetectors") == strue);
144 
145  // Phase 1 OT sensors only (NB: hence could add a branch here, but not a critical part on perf)
146  stereo_ = (fv->get<std::string_view>("TrackerStereoDetectors") == strue);
147  siliconAPVNum_ = fv->get<double>("SiliconAPVNumber");
148 
149  // Phase 2 OT sensors only (NB: hence could add a branch here, but not a critical part on perf)
150  isLowerSensor_ = (fv->get<std::string_view>("TrackerLowerDetectors") == strue);
151  isUpperSensor_ = (fv->get<std::string_view>("TrackerUpperDetectors") == strue);
152 
153  // All sensors: IT or OT, Phase 1 or Phase 2 (NB: critical part on perf)
154  fv->findSpecPar("TrackerRadLength", "TrackerXi");
155  radLength_ = fv->getNextValue("TrackerRadLength");
156  xi_ = fv->getNextValue("TrackerXi");
157  }
158 }
float bigPixelsPitchy_
Definition: GeometricDet.h:205
cms::DDSolidShape shape_
Definition: GeometricDet.h:193
bool isLowerSensor_
Definition: GeometricDet.h:209
double pixROCCols_
Definition: GeometricDet.h:199
const cms::DDSolidShape shape() const
std::vector< double > params_
Definition: GeometricDet.h:194
std::enable_if<!std::numeric_limits< NumType >::is_integer, bool >::type almostEqual(NumType x, NumType y, int ulp)
Definition: angle_units.h:33
bool isUpperSensor_
Definition: GeometricDet.h:210
nav_type ddd_
Definition: GeometricDet.h:185
std::string_view name() const
double pixROCx_
Definition: GeometricDet.h:200
bool isFromDD4hep_
Definition: GeometricDet.h:213
double getNextValue(const std::string &) const
extract another value from the same SpecPar
GeometricEnumType type_
Definition: GeometricDet.h:183
double radLength_
Definition: GeometricDet.h:196
bool isFirstSensor_
Definition: GeometricDet.h:206
double pixROCy_
Definition: GeometricDet.h:201
std::vector< double > computeLegacyShapeParameters(const cms::DDSolidShape &mySolidShape, const dd4hep::Solid &mySolid) const
double pixROCRows_
Definition: GeometricDet.h:198
float bigPixelsPitchx_
Definition: GeometricDet.h:204
T get(const std::string &)
extract attribute value
bool isSecondSensor_
Definition: GeometricDet.h:207
Translation trans_
Definition: GeometricDet.h:188
dd4hep::Solid solid() const
const RotationMatrix rotation() const
std::string ddname_
Definition: GeometricDet.h:182
nav_type navPos() const
return the stack of sibling numbers which indicates
RotationMatrix rot_
Definition: GeometricDet.h:191
double siliconAPVNum_
Definition: GeometricDet.h:211
void findSpecPar(T const &first, Ts const &... rest)
find a current Node SpecPar that has at least
const Translation translation() const

◆ GeometricDet() [3/3]

GeometricDet::GeometricDet ( const PGeometricDet::Item onePGD,
GeometricEnumType  dd 
)

Definition at line 163 of file GeometricDet.cc.

References PGeometricDet::Item::_nt0, PGeometricDet::Item::_nt1, PGeometricDet::Item::_nt10, PGeometricDet::Item::_nt2, PGeometricDet::Item::_nt3, PGeometricDet::Item::_nt4, PGeometricDet::Item::_nt5, PGeometricDet::Item::_nt6, PGeometricDet::Item::_nt7, PGeometricDet::Item::_nt8, PGeometricDet::Item::_nt9, PGeometricDet::Item::_numnt, PGeometricDet::Item::_params0, PGeometricDet::Item::_params1, PGeometricDet::Item::_params10, PGeometricDet::Item::_params2, PGeometricDet::Item::_params3, PGeometricDet::Item::_params4, PGeometricDet::Item::_params5, PGeometricDet::Item::_params6, PGeometricDet::Item::_params7, PGeometricDet::Item::_params8, PGeometricDet::Item::_params9, PGeometricDet::Item::_shape, ddd_, and params_.

164  : ddname_(onePGD._name),
165  type_(type),
166  ddd_(),
168  trans_(onePGD._x, onePGD._y, onePGD._z),
169  rho_(onePGD._rho),
170  phi_(onePGD._phi),
171  rot_(onePGD._a11,
172  onePGD._a12,
173  onePGD._a13,
174  onePGD._a21,
175  onePGD._a22,
176  onePGD._a23,
177  onePGD._a31,
178  onePGD._a32,
179  onePGD._a33),
180  shape_(cms::dd::name_from_value(cms::LegacySolidShapeMap, static_cast<LegacySolidShape>(onePGD._shape))),
181  params_(),
182  radLength_(onePGD._radLength),
183  xi_(onePGD._xi),
184  pixROCRows_(onePGD._pixROCRows),
185  pixROCCols_(onePGD._pixROCCols),
186  pixROCx_(onePGD._pixROCx),
187  pixROCy_(onePGD._pixROCy),
188  stereo_(onePGD._stereo),
190 // NB: what about new data members isLowerSensor_, isUpperSensor_, isFromDD4hep_?
191 // They are presently not added to PGeometricDet (no change in info stored into DB).
192 {
193  // Solid shape parameters: only for box (1) and trapezoid (3)
194  if (onePGD._shape == 1 || onePGD._shape == 3) {
195  params_.reserve(11);
196  params_.emplace_back(onePGD._params0);
197  params_.emplace_back(onePGD._params1);
198  params_.emplace_back(onePGD._params2);
199  params_.emplace_back(onePGD._params3);
200  params_.emplace_back(onePGD._params4);
201  params_.emplace_back(onePGD._params5);
202  params_.emplace_back(onePGD._params6);
203  params_.emplace_back(onePGD._params7);
204  params_.emplace_back(onePGD._params8);
205  params_.emplace_back(onePGD._params9);
206  params_.emplace_back(onePGD._params10);
207  }
208 
209  ddd_.reserve(onePGD._numnt);
210  ddd_.emplace_back(onePGD._nt0);
211  ddd_.emplace_back(onePGD._nt1);
212  ddd_.emplace_back(onePGD._nt2);
213  ddd_.emplace_back(onePGD._nt3);
214  if (onePGD._numnt > 4) {
215  ddd_.emplace_back(onePGD._nt4);
216  if (onePGD._numnt > 5) {
217  ddd_.emplace_back(onePGD._nt5);
218  if (onePGD._numnt > 6) {
219  ddd_.emplace_back(onePGD._nt6);
220  if (onePGD._numnt > 7) {
221  ddd_.emplace_back(onePGD._nt7);
222  if (onePGD._numnt > 8) {
223  ddd_.emplace_back(onePGD._nt8);
224  if (onePGD._numnt > 9) {
225  ddd_.emplace_back(onePGD._nt9);
226  if (onePGD._numnt > 10) {
227  ddd_.emplace_back(onePGD._nt10);
228  }
229  }
230  }
231  }
232  }
233  }
234  }
235 }
cms::DDSolidShape shape_
Definition: GeometricDet.h:193
double pixROCCols_
Definition: GeometricDet.h:199
std::vector< double > params_
Definition: GeometricDet.h:194
DetId geographicalID_
Definition: GeometricDet.h:186
nav_type ddd_
Definition: GeometricDet.h:185
double pixROCx_
Definition: GeometricDet.h:200
GeometricEnumType type_
Definition: GeometricDet.h:183
double radLength_
Definition: GeometricDet.h:196
const std::array< const cms::dd::ValuePair< LegacySolidShape, cms::DDSolidShape >, 21 > LegacySolidShapeMap
double pixROCy_
Definition: GeometricDet.h:201
double pixROCRows_
Definition: GeometricDet.h:198
Translation trans_
Definition: GeometricDet.h:188
std::string ddname_
Definition: GeometricDet.h:182
Mapping::value_type::name_type name_from_value(Mapping a, V value)
Definition: DDSolidShapes.h:62
RotationMatrix rot_
Definition: GeometricDet.h:191
double siliconAPVNum_
Definition: GeometricDet.h:211

◆ ~GeometricDet()

GeometricDet::~GeometricDet ( )

What to do in the destructor? destroy all the daughters!

Definition at line 68 of file GeometricDet.cc.

References deleteComponents().

68 { deleteComponents(); }
void deleteComponents()

Member Function Documentation

◆ addComponent()

void GeometricDet::addComponent ( GeometricDet det)

◆ addComponents() [1/2]

void GeometricDet::addComponents ( GeometricDetContainer const &  cont)

◆ addComponents() [2/2]

void GeometricDet::addComponents ( ConstGeometricDetContainer const &  cont)

Definition at line 283 of file GeometricDet.cc.

References generateEDF::cont, container_, and filterCSVwithJSON::copy.

283  {
284  container_.reserve(container_.size() + cont.size());
285  std::copy(cont.begin(), cont.end(), back_inserter(container_));
286 }
ConstGeometricDetContainer container_
Definition: GeometricDet.h:215
cont
load Luminosity info ##
Definition: generateEDF.py:620

◆ bigPixelsPitchx()

float GeometricDet::bigPixelsPitchx ( ) const
inline

Definition at line 140 of file GeometricDet.h.

References bigPixelsPitchx_.

140 { return bigPixelsPitchx_; }
float bigPixelsPitchx_
Definition: GeometricDet.h:204

◆ bigPixelsPitchy()

float GeometricDet::bigPixelsPitchy ( ) const
inline

Definition at line 141 of file GeometricDet.h.

References bigPixelsPitchy_.

141 { return bigPixelsPitchy_; }
float bigPixelsPitchy_
Definition: GeometricDet.h:205

◆ bigPixelsx()

int GeometricDet::bigPixelsx ( ) const
inline

Definition at line 138 of file GeometricDet.h.

References bigPixelsx_.

138 { return bigPixelsx_; }

◆ bigPixelsy()

int GeometricDet::bigPixelsy ( ) const
inline

Definition at line 139 of file GeometricDet.h.

References bigPixelsy_.

139 { return bigPixelsy_; }

◆ bounds()

std::unique_ptr< Bounds > GeometricDet::bounds ( ) const

Definition at line 237 of file GeometricDet.cc.

References TrackerShapeToBounds::buildBounds(), params_, and shape_.

Referenced by TrackerGeometry::fillTestMap(), and PlaneBuilderFromGeometricDet::plane().

237  {
238  TrackerShapeToBounds shapeToBounds;
239  return std::unique_ptr<Bounds>(shapeToBounds.buildBounds(shape_, params_));
240 }
cms::DDSolidShape shape_
Definition: GeometricDet.h:193
std::vector< double > params_
Definition: GeometricDet.h:194
Bounds * buildBounds(const cms::DDSolidShape &, const std::vector< double > &) const

◆ clearComponents()

void GeometricDet::clearComponents ( )
inline

◆ component()

GeometricDet* GeometricDet::component ( size_t  index)
inline

Definition at line 154 of file GeometricDet.h.

References container_.

Referenced by CmsTrackerDiskBuilder< FilteredView >::sortNS(), CmsTrackerWheelBuilder< FilteredView >::sortNS(), CmsTrackerLayerBuilder< FilteredView >::sortNS(), CmsTrackerStringBuilder< FilteredView >::sortNS(), CmsTrackerRodBuilder< FilteredView >::sortNS(), CmsTrackerRingBuilder< FilteredView >::sortNS(), CmsTrackerPanelBuilder< FilteredView >::sortNS(), CmsTrackerPixelPhase2RingBuilder< FilteredView >::sortNS(), CmsTrackerPixelPhase2SubDiskBuilder< FilteredView >::sortNS(), CmsTrackerPixelPhase2DoubleDiskBuilder< FilteredView >::sortNS(), CmsTrackerPixelPhase2DiskBuilder< FilteredView >::sortNS(), CmsTrackerPetalBuilder< FilteredView >::sortNS(), CmsTrackerPhase2TPDiskBuilder< FilteredView >::sortNS(), CmsTrackerOTDiscBuilder< FilteredView >::sortNS(), CmsTrackerPhase1DiskBuilder< FilteredView >::sortNS(), CmsTrackerLadderBuilder< FilteredView >::sortNS(), CmsTrackerOTRingBuilder< FilteredView >::sortNS(), CmsTrackerOTLayerBuilder< FilteredView >::sortNS(), CmsTrackerPixelPhase1EndcapBuilder< FilteredView >::sortNS(), CmsTrackerSubStrctBuilder< FilteredView >::sortNS(), CmsTrackerPixelPhase2EndcapBuilder< FilteredView >::sortNS(), and CmsTrackerBuilder< FilteredView >::sortNS().

154 { return const_cast<GeometricDet*>(container_[index]); }
ConstGeometricDetContainer container_
Definition: GeometricDet.h:215

◆ components() [1/2]

ConstGeometricDetContainer& GeometricDet::components ( )
inline

Definition at line 158 of file GeometricDet.h.

References container_.

Referenced by Phase2EndcapLayerBuilder::build(), Phase2EndcapSubDiskBuilder::build(), Phase2OTBarrelLayerBuilder::build(), Phase2OTBarrelRodBuilder::build(), TIDLayerBuilder::build(), PixelBarrelLayerBuilder::build(), PixelRodBuilder::build(), TECLayerBuilder::build(), TECPetalBuilder::build(), TECWedgeBuilder::build(), TIBLayerBuilder::build(), TIDRingBuilder::build(), TOBLayerBuilder::build(), TOBRodBuilder::build(), Phase2EndcapLayerDoubleDiskBuilder::build(), Phase2EndcapRingBuilder::build(), Phase2EndcapSingleRingBuilder::build(), GeometricSearchTrackerBuilder::build(), TrackerGeomBuilderFromGeometricDet::build(), PixelForwardLayerBuilder< T1, T2 >::build(), PixelBladeBuilder< T >::build(), CmsTrackerDetIdBuilder::iterate(), DDDCmsTrackerContruction::printAllTrackerGeometricDets(), CmsTrackerPhase1DiskBuilder< FilteredView >::sortNS(), CmsTrackerOTLayerBuilder< FilteredView >::sortNS(), CmsTrackerPetalBuilder< FilteredView >::sortNS(), CmsTrackerPixelPhase2SubDiskBuilder< FilteredView >::sortNS(), CmsTrackerDiskBuilder< FilteredView >::sortNS(), CmsTrackerOTRingBuilder< FilteredView >::sortNS(), CmsTrackerRingBuilder< FilteredView >::sortNS(), CmsTrackerOTDiscBuilder< FilteredView >::sortNS(), CmsTrackerPanelBuilder< FilteredView >::sortNS(), CmsTrackerPixelPhase2DiskBuilder< FilteredView >::sortNS(), CmsTrackerLayerBuilder< FilteredView >::sortNS(), CmsTrackerPixelPhase2DoubleDiskBuilder< FilteredView >::sortNS(), CmsTrackerStringBuilder< FilteredView >::sortNS(), CmsTrackerRodBuilder< FilteredView >::sortNS(), CmsTrackerPixelPhase2RingBuilder< FilteredView >::sortNS(), CmsTrackerWheelBuilder< FilteredView >::sortNS(), CmsTrackerLadderBuilder< FilteredView >::sortNS(), CmsTrackerPhase2TPDiskBuilder< FilteredView >::sortNS(), CmsTrackerSubStrctBuilder< FilteredView >::sortNS(), CmsTrackerPixelPhase1EndcapBuilder< FilteredView >::sortNS(), CmsTrackerPixelPhase2EndcapBuilder< FilteredView >::sortNS(), CmsTrackerBuilder< FilteredView >::sortNS(), and TrackerGeometry::TrackerGeometry().

158 { return container_; }
ConstGeometricDetContainer container_
Definition: GeometricDet.h:215

◆ components() [2/2]

const ConstGeometricDetContainer& GeometricDet::components ( ) const
inline

Definition at line 159 of file GeometricDet.h.

References container_.

159 { return container_; }
ConstGeometricDetContainer container_
Definition: GeometricDet.h:215

◆ computeLegacyShapeParameters()

std::vector< double > GeometricDet::computeLegacyShapeParameters ( const cms::DDSolidShape mySolidShape,
const dd4hep::Solid &  mySolid 
) const
private

Definition at line 312 of file GeometricDet.cc.

References angle_units::operators::convertDegToRad(), cms::ddbox, cms::ddtrap, cms::ddtubs, angle0to2pi::make0To2pi(), and cms_rounding::roundIfNear0().

313  {
314  std::vector<double> myOldDDShapeParameters;
315 
316  // Box
317  if (mySolidShape == cms::DDSolidShape::ddbox) {
318  const dd4hep::Box& myBox = dd4hep::Box(mySolid);
319  myOldDDShapeParameters = {(myBox.x()) / dd4hep::mm, (myBox.y()) / dd4hep::mm, (myBox.z()) / dd4hep::mm};
320  }
321 
322  // Trapezoid
323  else if (mySolidShape == cms::DDSolidShape::ddtrap) {
324  const dd4hep::Trap& myTrap = dd4hep::Trap(mySolid);
325  myOldDDShapeParameters = {(myTrap->GetDZ()) / dd4hep::mm,
326  static_cast<double>(angle_units::operators::convertDegToRad(myTrap->GetTheta())),
327  static_cast<double>(angle_units::operators::convertDegToRad(myTrap->GetPhi())),
328  (myTrap->GetH1()) / dd4hep::mm,
329  (myTrap->GetBl1()) / dd4hep::mm,
330  (myTrap->GetTl1()) / dd4hep::mm,
331  static_cast<double>(angle_units::operators::convertDegToRad(myTrap->GetAlpha1())),
332  (myTrap->GetH2()) / dd4hep::mm,
333  (myTrap->GetBl2()) / dd4hep::mm,
334  (myTrap->GetTl2()) / dd4hep::mm,
335  static_cast<double>(angle_units::operators::convertDegToRad(myTrap->GetAlpha2()))};
336  }
337 
338  // Tub
339  else if (mySolidShape == cms::DDSolidShape::ddtubs) {
340  const dd4hep::Tube& myTube = dd4hep::Tube(mySolid);
341  double phi1 = static_cast<double>(angle_units::operators::convertDegToRad(myTube->GetPhi1()));
342  phi1 = cms_rounding::roundIfNear0(phi1);
343  if (phi1 != 0.0) {
344  using namespace angle0to2pi;
345  phi1 = make0To2pi(phi1) - 2._pi;
346  // Turn positive angle to negative
347  }
348  myOldDDShapeParameters = {
349  (myTube->GetDz()) / dd4hep::mm,
350  (myTube->GetRmin()) / dd4hep::mm,
351  (myTube->GetRmax()) / dd4hep::mm,
352  phi1,
353  static_cast<double>(angle_units::operators::convertDegToRad(myTube->GetPhi2() - myTube->GetPhi1()))};
354  }
355 
356  return myOldDDShapeParameters;
357 }
constexpr double convertDegToRad(NumType degrees)
Definition: angle_units.h:27
constexpr valType roundIfNear0(valType value, double tolerance=1.e-7)
Definition: Rounding.h:11
constexpr valType make0To2pi(valType angle)
Definition: deltaPhi.h:67

◆ deepComponents() [1/2]

GeometricDet::ConstGeometricDetContainer GeometricDet::deepComponents ( ) const

Definition at line 264 of file GeometricDet.cc.

Referenced by PTrackerAdditionalParametersPerDetDBBuilder::beginRun(), TrackerGeomBuilderFromGeometricDet::build(), TrackerG4SimHitNumberingScheme::buildAll(), TrackerGeometryUtils::getOuterTrackerDetIds(), TrackerGeometryUtils::getSiStripDetIds(), and TrackerGeometry::TrackerGeometry().

264  {
265  // iterate on all the DESCENDANTS!!
267  deepComponents(temp_);
268  return temp_;
269 }
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:34
ConstGeometricDetContainer deepComponents() const

◆ deepComponents() [2/2]

void GeometricDet::deepComponents ( ConstGeometricDetContainer cont) const

Definition at line 271 of file GeometricDet.cc.

References generateEDF::cont, container_, and isLeaf().

271  {
272  if (isLeaf())
273  cont.emplace_back(this);
274  else
275  std::for_each(container_.begin(), container_.end(), [&](const GeometricDet* iDet) { iDet->deepComponents(cont); });
276 }
ConstGeometricDetContainer container_
Definition: GeometricDet.h:215
bool isLeaf() const
Definition: GeometricDet.h:155
cont
load Luminosity info ##
Definition: generateEDF.py:620

◆ deleteComponents()

void GeometricDet::deleteComponents ( )

Definition at line 296 of file GeometricDet.cc.

References container_.

Referenced by ~GeometricDet().

296  {
297  std::for_each(container_.begin(), container_.end(), Deleter());
298  container_.clear();
299 }
ConstGeometricDetContainer container_
Definition: GeometricDet.h:215

◆ geographicalId()

const DetId& GeometricDet::geographicalId ( ) const
inline

◆ isFirstSensor()

bool GeometricDet::isFirstSensor ( ) const
inline

◆ isFromDD4hep()

bool GeometricDet::isFromDD4hep ( ) const
inline

Definition at line 151 of file GeometricDet.h.

References isFromDD4hep_.

151 { return isFromDD4hep_; }
bool isFromDD4hep_
Definition: GeometricDet.h:213

◆ isLeaf()

bool GeometricDet::isLeaf ( ) const
inline

Definition at line 155 of file GeometricDet.h.

References container_.

Referenced by deepComponents().

155 { return container_.empty(); }
ConstGeometricDetContainer container_
Definition: GeometricDet.h:215

◆ isLowerSensor()

bool GeometricDet::isLowerSensor ( ) const
inline

◆ isSecondSensor()

bool GeometricDet::isSecondSensor ( ) const
inline

◆ isUpperSensor()

bool GeometricDet::isUpperSensor ( ) const
inline

◆ name()

const std::string& GeometricDet::name ( void  ) const
inline

◆ navpos()

NavRange GeometricDet::navpos ( ) const
inline

Definition at line 98 of file GeometricDet.h.

References ddd_.

98 { return NavRange(&ddd_.front(), ddd_.size()); }
nav_type ddd_
Definition: GeometricDet.h:185
std::pair< int const *, size_t > NavRange
Definition: GeometricDet.h:33

◆ navType()

const nav_type& GeometricDet::navType ( ) const
inline

Definition at line 97 of file GeometricDet.h.

References ddd_.

Referenced by PGeometricDetBuilder::putOne().

97 { return ddd_; }
nav_type ddd_
Definition: GeometricDet.h:185

◆ params()

const std::vector<double>& GeometricDet::params ( ) const
inline

Definition at line 119 of file GeometricDet.h.

References cms::ddbox, cms::ddtrap, cms::ddtubs, params_, and shape_.

Referenced by DDDCmsTrackerContruction::printAllTrackerGeometricDets(), PGeometricDetBuilder::putOne(), and CmsTrackerLayerBuilder< FilteredView >::sortNS().

119  {
122  edm::LogError("GeometricDet::params()")
123  << "Called on a shape which is neither a box, a trap, nor a tub. This is not supported!";
124  }
125  return params_;
126  } // in mm
cms::DDSolidShape shape_
Definition: GeometricDet.h:193
std::vector< double > params_
Definition: GeometricDet.h:194
Log< level::Error, false > LogError

◆ phi()

double GeometricDet::phi ( void  ) const
inline

◆ pixROCCols()

double GeometricDet::pixROCCols ( ) const
inline

Definition at line 135 of file GeometricDet.h.

References pixROCCols_.

Referenced by DDDCmsTrackerContruction::printAllTrackerGeometricDets(), and PGeometricDetBuilder::putOne().

135 { return pixROCCols_; }
double pixROCCols_
Definition: GeometricDet.h:199

◆ pixROCRows()

double GeometricDet::pixROCRows ( ) const
inline

Definition at line 134 of file GeometricDet.h.

References pixROCRows_.

Referenced by DDDCmsTrackerContruction::printAllTrackerGeometricDets(), and PGeometricDetBuilder::putOne().

134 { return pixROCRows_; }
double pixROCRows_
Definition: GeometricDet.h:198

◆ pixROCx()

double GeometricDet::pixROCx ( ) const
inline

Definition at line 136 of file GeometricDet.h.

References pixROCx_.

Referenced by DDDCmsTrackerContruction::printAllTrackerGeometricDets(), and PGeometricDetBuilder::putOne().

136 { return pixROCx_; }
double pixROCx_
Definition: GeometricDet.h:200

◆ pixROCy()

double GeometricDet::pixROCy ( ) const
inline

Definition at line 137 of file GeometricDet.h.

References pixROCy_.

Referenced by DDDCmsTrackerContruction::printAllTrackerGeometricDets(), and PGeometricDetBuilder::putOne().

137 { return pixROCy_; }
double pixROCy_
Definition: GeometricDet.h:201

◆ positionBounds()

GeometricDet::Position GeometricDet::positionBounds ( ) const

Definition at line 242 of file GeometricDet.cc.

References angle_units::operators::convertMmToCm(), and trans_.

Referenced by PlaneBuilderFromGeometricDet::plane().

242  {
243  Position pos_(static_cast<float>(geant_units::operators::convertMmToCm(trans_.x())),
244  static_cast<float>(geant_units::operators::convertMmToCm(trans_.y())),
245  static_cast<float>(geant_units::operators::convertMmToCm(trans_.z())));
246  return pos_;
247 }
constexpr NumType convertMmToCm(NumType millimeters)
Definition: angle_units.h:44
Translation trans_
Definition: GeometricDet.h:188
Surface::PositionType Position
Definition: GeometricDet.h:45

◆ printNavType()

std::string GeometricDet::printNavType ( int const *  n,
size_t  sz 
)
static

Definition at line 359 of file GeometricDet.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and dqmiodumpmetadata::n.

Referenced by geometric_det_ns::operator<<().

359  {
360  std::ostringstream oss;
361  oss << '(';
362  for (int const* it = n; it != n + sz; ++it) {
363  oss << *it << ',';
364  }
365  oss << ')';
366  return oss.str();
367 }

◆ radLength()

double GeometricDet::radLength ( ) const
inline

◆ rho()

double GeometricDet::rho ( ) const
inline

◆ rotation()

const RotationMatrix& GeometricDet::rotation ( void  ) const
inline

Definition at line 106 of file GeometricDet.h.

References rot_.

Referenced by DDDCmsTrackerContruction::printAllTrackerGeometricDets(), and PGeometricDetBuilder::putOne().

106 { return rot_; }
RotationMatrix rot_
Definition: GeometricDet.h:191

◆ rotationBounds()

GeometricDet::Rotation GeometricDet::rotationBounds ( ) const

Definition at line 249 of file GeometricDet.cc.

References rot_, x, y, and z.

Referenced by PlaneBuilderFromGeometricDet::plane().

249  {
250  Translation x, y, z;
251  rot_.GetComponents(x, y, z);
252  Rotation rotation_(float(x.X()),
253  float(x.Y()),
254  float(x.Z()),
255  float(y.X()),
256  float(y.Y()),
257  float(y.Z()),
258  float(z.X()),
259  float(z.Y()),
260  float(z.Z()));
261  return rotation_;
262 }
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > Translation
Surface::RotationType Rotation
Definition: GeometricDet.h:46
RotationMatrix rot_
Definition: GeometricDet.h:191

◆ setGeographicalID()

void GeometricDet::setGeographicalID ( DetId  id)
inline

◆ shape()

LegacySolidShape GeometricDet::shape ( void  ) const
inline

Definition at line 115 of file GeometricDet.h.

References cms::LegacySolidShapeMap, shape_, and cms::dd::value().

Referenced by DDDCmsTrackerContruction::printAllTrackerGeometricDets().

cms::DDSolidShape shape_
Definition: GeometricDet.h:193
Mapping::value_type::value_type value(Mapping a, const std::string &name)
Definition: DDSolidShapes.h:42
const std::array< const cms::dd::ValuePair< LegacySolidShape, cms::DDSolidShape >, 21 > LegacySolidShapeMap

◆ shape_dd4hep()

const cms::DDSolidShape& GeometricDet::shape_dd4hep ( ) const
inline

Definition at line 117 of file GeometricDet.h.

References shape_.

Referenced by DDDCmsTrackerContruction::printAllTrackerGeometricDets(), and PGeometricDetBuilder::putOne().

117 { return shape_; }
cms::DDSolidShape shape_
Definition: GeometricDet.h:193

◆ siliconAPVNum()

double GeometricDet::siliconAPVNum ( ) const
inline

◆ stereo()

bool GeometricDet::stereo ( ) const
inline

◆ translation()

const Translation& GeometricDet::translation ( void  ) const
inline

◆ type()

const GeometricEnumType& GeometricDet::type ( ) const
inline

Definition at line 94 of file GeometricDet.h.

References type_.

Referenced by DDDCmsTrackerContruction::printAllTrackerGeometricDets(), and PGeometricDetBuilder::putOne().

94 { return type_; }
GeometricEnumType type_
Definition: GeometricDet.h:183

◆ xi()

double GeometricDet::xi ( ) const
inline

Member Data Documentation

◆ bigPixelsPitchx_

float GeometricDet::bigPixelsPitchx_ = 0.
private

Definition at line 204 of file GeometricDet.h.

Referenced by bigPixelsPitchx(), and GeometricDet().

◆ bigPixelsPitchy_

float GeometricDet::bigPixelsPitchy_ = 0.
private

Definition at line 205 of file GeometricDet.h.

Referenced by bigPixelsPitchy(), and GeometricDet().

◆ bigPixelsx_

int GeometricDet::bigPixelsx_ = 0
private

Definition at line 202 of file GeometricDet.h.

Referenced by bigPixelsx(), and GeometricDet().

◆ bigPixelsy_

int GeometricDet::bigPixelsy_ = 0
private

Definition at line 203 of file GeometricDet.h.

Referenced by bigPixelsy(), and GeometricDet().

◆ container_

ConstGeometricDetContainer GeometricDet::container_
private

◆ ddd_

nav_type GeometricDet::ddd_
private

Definition at line 185 of file GeometricDet.h.

Referenced by GeometricDet(), navpos(), and navType().

◆ ddname_

std::string GeometricDet::ddname_
private

Definition at line 182 of file GeometricDet.h.

Referenced by name().

◆ geographicalID_

DetId GeometricDet::geographicalID_ = 0
private

Definition at line 186 of file GeometricDet.h.

Referenced by geographicalId(), and setGeographicalID().

◆ isFirstSensor_

bool GeometricDet::isFirstSensor_ = false
private

Definition at line 206 of file GeometricDet.h.

Referenced by GeometricDet(), and isFirstSensor().

◆ isFromDD4hep_

bool GeometricDet::isFromDD4hep_ = false
private

Definition at line 213 of file GeometricDet.h.

Referenced by isFromDD4hep().

◆ isLowerSensor_

bool GeometricDet::isLowerSensor_ = false
private

Definition at line 209 of file GeometricDet.h.

Referenced by GeometricDet(), and isLowerSensor().

◆ isSecondSensor_

bool GeometricDet::isSecondSensor_ = false
private

Definition at line 207 of file GeometricDet.h.

Referenced by GeometricDet(), and isSecondSensor().

◆ isUpperSensor_

bool GeometricDet::isUpperSensor_ = false
private

Definition at line 210 of file GeometricDet.h.

Referenced by GeometricDet(), and isUpperSensor().

◆ params_

std::vector<double> GeometricDet::params_
private

Definition at line 194 of file GeometricDet.h.

Referenced by bounds(), GeometricDet(), and params().

◆ phi_

double GeometricDet::phi_ = 0.
private

Definition at line 190 of file GeometricDet.h.

Referenced by GeometricDet(), and phi().

◆ pixROCCols_

double GeometricDet::pixROCCols_ = 0.
private

Definition at line 199 of file GeometricDet.h.

Referenced by GeometricDet(), and pixROCCols().

◆ pixROCRows_

double GeometricDet::pixROCRows_ = 0.
private

Definition at line 198 of file GeometricDet.h.

Referenced by GeometricDet(), and pixROCRows().

◆ pixROCx_

double GeometricDet::pixROCx_ = 0.
private

Definition at line 200 of file GeometricDet.h.

Referenced by GeometricDet(), and pixROCx().

◆ pixROCy_

double GeometricDet::pixROCy_ = 0.
private

Definition at line 201 of file GeometricDet.h.

Referenced by GeometricDet(), and pixROCy().

◆ radLength_

double GeometricDet::radLength_ = 0.
private

Definition at line 196 of file GeometricDet.h.

Referenced by GeometricDet(), and radLength().

◆ rho_

double GeometricDet::rho_ = 0.
private

Definition at line 189 of file GeometricDet.h.

Referenced by rho().

◆ rot_

RotationMatrix GeometricDet::rot_
private

Definition at line 191 of file GeometricDet.h.

Referenced by rotation(), and rotationBounds().

◆ shape_

cms::DDSolidShape GeometricDet::shape_
private

Definition at line 193 of file GeometricDet.h.

Referenced by bounds(), params(), shape(), and shape_dd4hep().

◆ siliconAPVNum_

double GeometricDet::siliconAPVNum_ = 0.
private

Definition at line 211 of file GeometricDet.h.

Referenced by GeometricDet(), and siliconAPVNum().

◆ stereo_

bool GeometricDet::stereo_ = false
private

Definition at line 208 of file GeometricDet.h.

Referenced by GeometricDet(), and stereo().

◆ trans_

Translation GeometricDet::trans_
private

Definition at line 188 of file GeometricDet.h.

Referenced by positionBounds(), and translation().

◆ type_

GeometricEnumType GeometricDet::type_
private

◆ xi_

double GeometricDet::xi_ = 0.
private

Definition at line 197 of file GeometricDet.h.

Referenced by GeometricDet(), and xi().