DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
CartesianStripX.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  * CartesianStripX.h
14  *
15  * Created on: Jun 28, 2013
16  * Author: Christian Grefe, CERN
17  * David Blyth, ANL
18  */
19 
20 #ifndef DDSEGMENTATION_CARTESIANSTRIPX_H
21 #define DDSEGMENTATION_CARTESIANSTRIPX_H
22 
24 
25 namespace dd4hep {
26 namespace DDSegmentation {
27 
30  public:
32  CartesianStripX(const std::string& cellEncoding = "");
36  virtual ~CartesianStripX();
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 stripSizeX() const { return _stripSizeX; }
46  double offsetX() const { return _offsetX; }
48  const std::string& fieldNameX() const { return _xId; }
50  void setStripSizeX(double cellSize) { _stripSizeX = cellSize; }
52  void setOffsetX(double offset) { _offsetX = offset; }
54  void setFieldNameX(const std::string& fieldName) { _xId = fieldName; }
63  virtual std::vector<double> cellDimensions(const CellID& cellID) const;
64 
65  protected:
67  double _stripSizeX;
69  double _offsetX;
71  std::string _xId;
72 };
73 } // namespace DDSegmentation
74 } /* namespace dd4hep */
75 #endif // DDSEGMENTATION_CARTESIANSTRIPX_H
dd4hep::DDSegmentation::VolumeID
uint64_t VolumeID
Definition: BitFieldCoder.h:27
dd4hep::DDSegmentation::Vector3D
Simple container for a physics vector.
Definition: Segmentation.h:48
dd4hep::DDSegmentation::CartesianStripX::stripSizeX
double stripSizeX() const
access the strip size in X
Definition: CartesianStripX.h:44
dd4hep::DDSegmentation::BitFieldCoder
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
Definition: BitFieldCoder.h:114
dd4hep::DDSegmentation::CartesianStripX::~CartesianStripX
virtual ~CartesianStripX()
destructor
Definition: CartesianStripX.cpp:48
dd4hep::DDSegmentation::CartesianStripX::setOffsetX
void setOffsetX(double offset)
set the coordinate offset in X
Definition: CartesianStripX.h:52
dd4hep::DDSegmentation::CartesianStripX::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: CartesianStripX.cpp:65
dd4hep::DDSegmentation::CartesianStripX::_xId
std::string _xId
the field name used for X
Definition: CartesianStripX.h:71
dd4hep::DDSegmentation::CartesianStripX::_stripSizeX
double _stripSizeX
the strip size in X
Definition: CartesianStripX.h:67
dd4hep::DDSegmentation::CartesianStripX::fieldNameX
const std::string & fieldNameX() const
access the field name used for X
Definition: CartesianStripX.h:48
CartesianStrip.h
dd4hep::DDSegmentation::Segmentation::decoder
virtual const BitFieldCoder * decoder() const
Access the underlying decoder.
Definition: Segmentation.h:112
dd4hep::DDSegmentation::CellID
uint64_t CellID
Definition: BitFieldCoder.h:26
dd4hep::DDSegmentation::CartesianStripX::setStripSizeX
void setStripSizeX(double cellSize)
set the strip size in X
Definition: CartesianStripX.h:50
dd4hep::DDSegmentation::CartesianStripX::offsetX
double offsetX() const
access the coordinate offset in X
Definition: CartesianStripX.h:46
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
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
dd4hep::DDSegmentation::CartesianStripX::position
virtual Vector3D position(const CellID &cellID) const
determine the position based on the cell ID
Definition: CartesianStripX.cpp:51
dd4hep::DDSegmentation::CartesianStripX
Segmentation base class describing cartesian strip segmentation in X.
Definition: CartesianStripX.h:29
dd4hep::DDSegmentation::CartesianStripX::cellID
virtual CellID cellID(const Vector3D &localPosition, const Vector3D &globalPosition, const VolumeID &volumeID) const
determine the cell ID based on the position
Definition: CartesianStripX.cpp:58
dd4hep::DDSegmentation::CartesianStripX::_offsetX
double _offsetX
the coordinate offset in X
Definition: CartesianStripX.h:69
dd4hep::DDSegmentation::CartesianStripX::CartesianStripX
CartesianStripX(const std::string &cellEncoding="")
Default constructor passing the encoding string.
Definition: CartesianStripX.cpp:24
dd4hep::DDSegmentation::CartesianStripX::setFieldNameX
void setFieldNameX(const std::string &fieldName)
set the field name used for X
Definition: CartesianStripX.h:54