DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
CartesianStripY.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  * CartesianStripY.h
13  *
14  * Created on: Jun 28, 2013
15  * Author: Christian Grefe, CERN
16  * David Blyth, ANL
17  */
18 
19 #ifndef DDSEGMENTATION_CARTESIANSTRIPY_H
20 #define DDSEGMENTATION_CARTESIANSTRIPY_H
21 
23 
24 namespace dd4hep {
25  namespace DDSegmentation {
26 
29  public:
31  CartesianStripY(const std::string& cellEncoding = "");
35  virtual ~CartesianStripY();
36 
38  virtual Vector3D position(const CellID& cellID) const;
40  virtual CellID cellID(const Vector3D& localPosition, const Vector3D& globalPosition,
41  const VolumeID& volumeID) const;
43  double stripSizeY() const { return _stripSizeY; }
45  double offsetY() const { return _offsetY; }
47  const std::string& fieldNameY() const { return _xId; }
49  void setStripSizeY(double cellSize) { _stripSizeY = cellSize; }
51  void setOffsetY(double offset) { _offsetY = offset; }
53  void setFieldNameY(const std::string& fieldName) { _xId = fieldName; }
62  virtual std::vector<double> cellDimensions(const CellID& cellID) const;
63 
64  protected:
66  double _stripSizeY;
68  double _offsetY;
70  std::string _xId;
71  };
72  } // namespace DDSegmentation
73 } /* namespace dd4hep */
74 #endif // DDSEGMENTATION_CARTESIANSTRIPY_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::CartesianStripY::_stripSizeY
double _stripSizeY
the strip size in Y
Definition: CartesianStripY.h:66
dd4hep::DDSegmentation::BitFieldCoder
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
Definition: BitFieldCoder.h:114
dd4hep::DDSegmentation::CartesianStripY::_offsetY
double _offsetY
the coordinate offset in Y
Definition: CartesianStripY.h:68
dd4hep::DDSegmentation::CartesianStripY::cellID
virtual CellID cellID(const Vector3D &localPosition, const Vector3D &globalPosition, const VolumeID &volumeID) const
determine the cell ID based on the position
Definition: CartesianStripY.cpp:58
dd4hep::DDSegmentation::CartesianStripY::_xId
std::string _xId
the field name used for Y
Definition: CartesianStripY.h:70
dd4hep::DDSegmentation::CartesianStripY::setStripSizeY
void setStripSizeY(double cellSize)
set the strip size in Y
Definition: CartesianStripY.h:49
dd4hep::DDSegmentation::CartesianStripY::~CartesianStripY
virtual ~CartesianStripY()
destructor
Definition: CartesianStripY.cpp:48
CartesianStrip.h
dd4hep::DDSegmentation::CartesianStripY::CartesianStripY
CartesianStripY(const std::string &cellEncoding="")
Default constructor passing the encoding string.
Definition: CartesianStripY.cpp:24
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::CartesianStripY
Segmentation base class describing cartesian strip segmentation in Y.
Definition: CartesianStripY.h:28
dd4hep::DDSegmentation::CartesianStripY::setFieldNameY
void setFieldNameY(const std::string &fieldName)
set the field name used for Y
Definition: CartesianStripY.h:53
dd4hep::DDSegmentation::CartesianStripY::fieldNameY
const std::string & fieldNameY() const
access the field name used for Y
Definition: CartesianStripY.h:47
dd4hep::DDSegmentation::CartesianStripY::position
virtual Vector3D position(const CellID &cellID) const
determine the position based on the cell ID
Definition: CartesianStripY.cpp:51
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::CartesianStripY::offsetY
double offsetY() const
access the coordinate offset in Y
Definition: CartesianStripY.h:45
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::DDSegmentation::CartesianStripY::setOffsetY
void setOffsetY(double offset)
set the coordinate offset in Y
Definition: CartesianStripY.h:51
dd4hep::DDSegmentation::CartesianStrip
Segmentation base class describing cartesian strip segmentation.
Definition: CartesianStrip.h:28
dd4hep::DDSegmentation::CartesianStripY::stripSizeY
double stripSizeY() const
access the strip size in Y
Definition: CartesianStripY.h:43
dd4hep::DDSegmentation::CartesianStripY::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: CartesianStripY.cpp:65