DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
CartesianStripZ.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 //==========================================================================
11 
12 /*
13  * CartesianStripZ.h
14  *
15  * Created on: Jun 28, 2013
16  * Author: Christian Grefe, CERN
17  * David Blyth, ANL
18  */
19 
20 #ifndef DDSEGMENTATION_CARTESIANSTRIPZ_H
21 #define DDSEGMENTATION_CARTESIANSTRIPZ_H
22 
24 
25 namespace dd4hep {
26  namespace DDSegmentation {
27 
30  public:
32  CartesianStripZ(const std::string& cellEncoding = "");
36  virtual ~CartesianStripZ();
37 
39  virtual Vector3D position(const CellID& cellID) const;
41  virtual CellID cellID(const Vector3D& localPosition, const Vector3D& globalPosition,
42  const VolumeID& volumeID) const;
44  double stripSizeZ() const { return _stripSizeZ; }
46  double offsetZ() const { return _offsetZ; }
48  const std::string& fieldNameZ() const { return _xId; }
50  void setStripSizeZ(double cellSize) { _stripSizeZ = cellSize; }
52  void setOffsetZ(double offset) { _offsetZ = offset; }
54  void setFieldNameZ(const std::string& fieldName) { _xId = fieldName; }
63  virtual std::vector<double> cellDimensions(const CellID& cellID) const;
64 
65  protected:
67  double _stripSizeZ;
69  double _offsetZ;
71  std::string _xId;
72  };
73  } // namespace DDSegmentation
74 } /* namespace dd4hep */
75 #endif // DDSEGMENTATION_CARTESIANSTRIPZ_H
dd4hep::DDSegmentation::VolumeID
uint64_t VolumeID
Definition: BitFieldCoder.h:27
dd4hep::DDSegmentation::CartesianStripZ::_stripSizeZ
double _stripSizeZ
the strip size in Z
Definition: CartesianStripZ.h:67
dd4hep::DDSegmentation::Vector3D
Simple container for a physics vector.
Definition: Segmentation.h:48
dd4hep::DDSegmentation::CartesianStripZ::cellDimensions
virtual std::vector< double > cellDimensions(const CellID &cellID) const
Returns a vector<double> of the cellDimensions of the given cell ID in natural order of dimensions,...
Definition: CartesianStripZ.cpp:65
dd4hep::DDSegmentation::BitFieldCoder
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
Definition: BitFieldCoder.h:114
dd4hep::DDSegmentation::CartesianStripZ::offsetZ
double offsetZ() const
access the coordinate offset in Z
Definition: CartesianStripZ.h:46
dd4hep::DDSegmentation::CartesianStripZ::cellID
virtual CellID cellID(const Vector3D &localPosition, const Vector3D &globalPosition, const VolumeID &volumeID) const
determine the cell ID based on the position
Definition: CartesianStripZ.cpp:58
dd4hep::DDSegmentation::CartesianStripZ::~CartesianStripZ
virtual ~CartesianStripZ()
destructor
Definition: CartesianStripZ.cpp:48
dd4hep::DDSegmentation::CartesianStripZ::setFieldNameZ
void setFieldNameZ(const std::string &fieldName)
set the field name used for Z
Definition: CartesianStripZ.h:54
dd4hep::DDSegmentation::CartesianStripZ::_xId
std::string _xId
the field name used for Z
Definition: CartesianStripZ.h:71
dd4hep::DDSegmentation::CartesianStripZ::setStripSizeZ
void setStripSizeZ(double cellSize)
set the strip size in Z
Definition: CartesianStripZ.h:50
dd4hep::DDSegmentation::CartesianStripZ
Segmentation base class describing cartesian strip segmentation in Z.
Definition: CartesianStripZ.h:29
CartesianStrip.h
dd4hep::DDSegmentation::CartesianStripZ::fieldNameZ
const std::string & fieldNameZ() const
access the field name used for Z
Definition: CartesianStripZ.h:48
dd4hep::DDSegmentation::CartesianStripZ::setOffsetZ
void setOffsetZ(double offset)
set the coordinate offset in Z
Definition: CartesianStripZ.h:52
dd4hep::DDSegmentation::Segmentation::decoder
virtual const BitFieldCoder * decoder() const
Access the underlying decoder.
Definition: Segmentation.h:112
dd4hep::DDSegmentation::CartesianStripZ::stripSizeZ
double stripSizeZ() const
access the strip size in Z
Definition: CartesianStripZ.h:44
dd4hep::DDSegmentation::CartesianStripZ::_offsetZ
double _offsetZ
the coordinate offset in Z
Definition: CartesianStripZ.h:69
dd4hep::DDSegmentation::CellID
uint64_t CellID
Definition: BitFieldCoder.h:26
dd4hep::DDSegmentation::CartesianStripZ::CartesianStripZ
CartesianStripZ(const std::string &cellEncoding="")
Default constructor passing the encoding string.
Definition: CartesianStripZ.cpp:24
dd4hep::DDSegmentation::Segmentation::volumeID
virtual VolumeID volumeID(const CellID &cellID) const
Determine the volume ID from the full cell ID by removing all local fields.
Definition: Segmentation.cpp:66
dd4hep::DDSegmentation::CartesianStripZ::position
virtual Vector3D position(const CellID &cellID) const
determine the position based on the cell ID
Definition: CartesianStripZ.cpp:51
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::DDSegmentation::CartesianStrip
Segmentation base class describing cartesian strip segmentation.
Definition: CartesianStrip.h:28