CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
cms::dd::DDTruncTubs Class Reference

A truncated tube section. More...

#include <DDShapes.h>

Public Member Functions

double cutAtDelta (void) const
 truncation at end of the tube-section More...
 
double cutAtStart (void) const
 truncation at begin of the tube-section More...
 
bool cutInside (void) const
 true, if truncation is on the inner side of the tube-section More...
 
 DDTruncTubs (const cms::DDFilteredView &fview)
 
 DDTruncTubs (void)=delete
 
double deltaPhi (void) const
 angular span of the tube-section More...
 
double rIn (void) const
 inner radius More...
 
double rOut (void) const
 outer radius More...
 
double startPhi (void) const
 angular start of the tube-section More...
 
double zHalf (void) const
 half of the z-Axis More...
 

Public Attributes

const bool valid
 

Private Attributes

double cutAtDelta_
 
double cutAtStart_
 
bool cutInside_
 
double deltaPhi_
 
double rIn_
 
double rOut_
 
double startPhi_
 
double zHalf_
 

Detailed Description

A truncated tube section.

Definition at line 177 of file DDShapes.h.

Constructor & Destructor Documentation

◆ DDTruncTubs() [1/2]

DDTruncTubs::DDTruncTubs ( const cms::DDFilteredView fview)

Definition at line 133 of file DDShapes.cc.

133  : valid{fv.isATruncTube()} {
134  if (valid) {
135  auto tube = fv.solid();
136  std::vector<double> params = tube.dimensions();
137  if (params.size() < 8) {
138  edm::LogError("DDShapes DDTruncTubs") << "Truncated tube parameters list too small: " << params.size();
139  return;
140  }
141  LogTrace("DDShapes DDTruncTubs") << "DDTruncTubs zHalf = " << params[0];
142  LogTrace("DDShapes DDTruncTubs") << "DDTruncTubs rIn = " << params[1];
143  LogTrace("DDShapes DDTruncTubs") << "DDTruncTubs rOut = " << params[2];
144  LogTrace("DDShapes DDTruncTubs") << "DDTruncTubs startPhi = " << params[3];
145  LogTrace("DDShapes DDTruncTubs") << "DDTruncTubs deltaPhi = " << params[4];
146  LogTrace("DDShapes DDTruncTubs") << "DDTruncTubs cutAtStart = " << params[5];
147  LogTrace("DDShapes DDTruncTubs") << "DDTruncTubs cutAtDelta = " << params[6];
148  LogTrace("DDShapes DDTruncTubs") << "DDTruncTubs cutInside = " << params[7];
149 
150  zHalf_ = params[0]; // This order determined by reading DD4hep source code
151  rIn_ = params[1];
152  rOut_ = params[2];
153  startPhi_ = params[3];
154  deltaPhi_ = params[4];
155  cutAtStart_ = params[5];
156  cutAtDelta_ = params[6];
157  cutInside_ = (params[7] != 0);
158 
159  /* Previous versions of DD4hep output parameters that required more complex conversion
160  * to produce the values CMS needs. Now the desired values are returned directly by the
161  * "dimensions" function. If the more complex conversion is ever needed again, the git history
162  * of this file from before 2019-11-25 has code for converting from the internal DD4hep parameters
163  * for a TruncatedTube to the eight parameters used by CMS.
164  * There is also example code for checking the parameters of the TGeoCompositeShape.
165  */
166  }
167 }

References cms::DDFilteredView::isATruncTube().

◆ DDTruncTubs() [2/2]

cms::dd::DDTruncTubs::DDTruncTubs ( void  )
delete

Member Function Documentation

◆ cutAtDelta()

double cms::dd::DDTruncTubs::cutAtDelta ( void  ) const
inline

truncation at end of the tube-section

Definition at line 201 of file DDShapes.h.

201 { return (cutAtDelta_); }

References cutAtDelta_.

◆ cutAtStart()

double cms::dd::DDTruncTubs::cutAtStart ( void  ) const
inline

truncation at begin of the tube-section

Definition at line 198 of file DDShapes.h.

198 { return (cutAtStart_); }

References cutAtStart_.

◆ cutInside()

bool cms::dd::DDTruncTubs::cutInside ( void  ) const
inline

true, if truncation is on the inner side of the tube-section

Definition at line 204 of file DDShapes.h.

204 { return (cutInside_); }

References cutInside_.

◆ deltaPhi()

double cms::dd::DDTruncTubs::deltaPhi ( void  ) const
inline

angular span of the tube-section

Definition at line 195 of file DDShapes.h.

195 { return (deltaPhi_); }

References deltaPhi_.

◆ rIn()

double cms::dd::DDTruncTubs::rIn ( void  ) const
inline

inner radius

Definition at line 186 of file DDShapes.h.

186 { return (rIn_); }

References rIn_.

◆ rOut()

double cms::dd::DDTruncTubs::rOut ( void  ) const
inline

outer radius

Definition at line 189 of file DDShapes.h.

189 { return (rOut_); }

References rOut_.

◆ startPhi()

double cms::dd::DDTruncTubs::startPhi ( void  ) const
inline

angular start of the tube-section

Definition at line 192 of file DDShapes.h.

192 { return (startPhi_); }

References startPhi_.

◆ zHalf()

double cms::dd::DDTruncTubs::zHalf ( void  ) const
inline

half of the z-Axis

Definition at line 183 of file DDShapes.h.

183 { return (zHalf_); }

References zHalf_.

Member Data Documentation

◆ cutAtDelta_

double cms::dd::DDTruncTubs::cutAtDelta_
private

Definition at line 215 of file DDShapes.h.

Referenced by cutAtDelta().

◆ cutAtStart_

double cms::dd::DDTruncTubs::cutAtStart_
private

Definition at line 214 of file DDShapes.h.

Referenced by cutAtStart().

◆ cutInside_

bool cms::dd::DDTruncTubs::cutInside_
private

Definition at line 216 of file DDShapes.h.

Referenced by cutInside().

◆ deltaPhi_

double cms::dd::DDTruncTubs::deltaPhi_
private

Definition at line 213 of file DDShapes.h.

Referenced by deltaPhi().

◆ rIn_

double cms::dd::DDTruncTubs::rIn_
private

Definition at line 210 of file DDShapes.h.

Referenced by rIn().

◆ rOut_

double cms::dd::DDTruncTubs::rOut_
private

Definition at line 211 of file DDShapes.h.

Referenced by rOut().

◆ startPhi_

double cms::dd::DDTruncTubs::startPhi_
private

Definition at line 212 of file DDShapes.h.

Referenced by startPhi().

◆ valid

const bool cms::dd::DDTruncTubs::valid

Definition at line 206 of file DDShapes.h.

◆ zHalf_

double cms::dd::DDTruncTubs::zHalf_
private

Definition at line 209 of file DDShapes.h.

Referenced by zHalf().

CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
cms::dd::DDTruncTubs::valid
const bool valid
Definition: DDShapes.h:206
cms::dd::DDTruncTubs::deltaPhi_
double deltaPhi_
Definition: DDShapes.h:213
cms::dd::DDTruncTubs::rIn_
double rIn_
Definition: DDShapes.h:210
cms::dd::DDTruncTubs::cutInside_
bool cutInside_
Definition: DDShapes.h:216
cms::dd::DDTruncTubs::rOut_
double rOut_
Definition: DDShapes.h:211
edm::LogError
Definition: MessageLogger.h:183
cms::dd::DDTruncTubs::startPhi_
double startPhi_
Definition: DDShapes.h:212
cms::dd::DDTruncTubs::zHalf_
double zHalf_
Definition: DDShapes.h:209
cms::dd::DDTruncTubs::cutAtDelta_
double cutAtDelta_
Definition: DDShapes.h:215
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
cms::dd::DDTruncTubs::cutAtStart_
double cutAtStart_
Definition: DDShapes.h:214