DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
DDRec
include
DDRec
CellIDPositionConverter.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
// Author : F.Gaede
11
//
12
//==========================================================================
13
#ifndef DDREC_CELLIDPOSITIONCONVERTER_H
14
#define DDREC_CELLIDPOSITIONCONVERTER_H
15
16
#include "
DD4hep/Detector.h
"
17
#include "
DD4hep/Readout.h
"
18
#include "
DD4hep/VolumeManager.h
"
19
20
#include "
DDSegmentation/Segmentation.h
"
21
22
#include <set>
23
#include <string>
24
25
26
namespace
dd4hep
{
27
namespace
rec {
28
29
typedef
DDSegmentation::CellID
CellID
;
30
typedef
DDSegmentation::VolumeID
VolumeID
;
31
39
class
CellIDPositionConverter
{
40
#if defined(G__ROOT)
41
CellIDPositionConverter
() = default ;
42
#else
43
CellIDPositionConverter
() = delete ;
44
#endif
45
CellIDPositionConverter
(
const
CellIDPositionConverter
&) = delete ;
46
void
operator=
(
const
CellIDPositionConverter
&) = delete ;
47
48
public
:
49
51
CellIDPositionConverter
(
const
Detector
& description ) :
_description
( &description ) {
52
_volumeManager
=
VolumeManager::getVolumeManager
(description);
53
}
54
56
virtual
~CellIDPositionConverter
(){} ;
57
62
Position
positionNominal
(
const
CellID
&
cellID
)
const
;
63
68
Position
position
(
const
CellID
&
cellID
)
const
;
69
70
75
CellID
cellID
(
const
Position
& global)
const
;
76
77
78
82
const
VolumeManagerContext
*
findContext
(
const
CellID
&
cellID
)
const
;
83
84
85
89
DetElement
findDetElement
(
const
Position
& global,
90
const
DetElement
&
det
=
DetElement
() )
const
;
91
92
98
PlacedVolume
findPlacement
(
const
Position
& point,
const
PlacedVolume
& mother,
double
locPos[3],
PlacedVolume::VolIDs
& volIDs)
const
;
99
100
106
Readout
findReadout
(
const
DetElement
&
det
)
const
;
107
108
112
Readout
findReadout
(
const
PlacedVolume
& pv)
const
;
113
117
std::vector<double>
cellDimensions
(
const
CellID
& cell)
const
;
118
119
protected
:
120
VolumeManager
_volumeManager
{} ;
121
const
Detector
*
_description
;
122
123
};
124
125
}
/* namespace rec */
126
}
/* namespace dd4hep */
127
128
129
130
131
132
133
134
#endif // DDREC_CELLIDPOSITIONCONVERTER_H
dd4hep::DDSegmentation::VolumeID
uint64_t VolumeID
Definition:
BitFieldCoder.h:27
dd4hep::rec::CellIDPositionConverter::findContext
const VolumeManagerContext * findContext(const CellID &cellID) const
Definition:
CellIDPositionConverter.cpp:27
dd4hep::rec::CellIDPositionConverter::cellDimensions
std::vector< double > cellDimensions(const CellID &cell) const
Definition:
CellIDPositionConverter.cpp:342
dd4hep::rec::CellIDPositionConverter::CellIDPositionConverter
CellIDPositionConverter(const Detector &description)
The constructor - takes the main description object.
Definition:
CellIDPositionConverter.h:51
Detector.h
dd4hep::rec::CellIDPositionConverter::CellIDPositionConverter
CellIDPositionConverter()=delete
dd4hep::PlacedVolume
Handle class holding a placed volume (also called physical volume)
Definition:
Volumes.h:163
dd4hep::rec::CellIDPositionConverter::_volumeManager
VolumeManager _volumeManager
Definition:
CellIDPositionConverter.h:120
dd4hep::rec::CellIDPositionConverter::findReadout
Readout findReadout(const DetElement &det) const
Definition:
CellIDPositionConverter.cpp:302
dd4hep::rec::CellIDPositionConverter::positionNominal
Position positionNominal(const CellID &cellID) const
Definition:
CellIDPositionConverter.cpp:39
dd4hep::rec::CellIDPositionConverter::~CellIDPositionConverter
virtual ~CellIDPositionConverter()
Destructor.
Definition:
CellIDPositionConverter.h:56
dd4hep::rec::CellIDPositionConverter::cellID
CellID cellID(const Position &global) const
Definition:
CellIDPositionConverter.cpp:87
dd4hep::rec::CellIDPositionConverter::CellIDPositionConverter
CellIDPositionConverter(const CellIDPositionConverter &)=delete
dd4hep::rec::CellIDPositionConverter::findPlacement
PlacedVolume findPlacement(const Position &point, const PlacedVolume &mother, double locPos[3], PlacedVolume::VolIDs &volIDs) const
Definition:
CellIDPositionConverter.cpp:248
VolumeManager.h
dd4hep::DetElement
Handle class describing a detector element.
Definition:
DetElement.h:188
dd4hep::PlacedVolumeExtension::VolIDs
Volume ID container.
Definition:
Volumes.h:88
dd4hep::VolumeManager
Class to support the retrieval of detector elements and volumes given a valid identifier.
Definition:
VolumeManager.h:135
Readout.h
dd4hep::VolumeManager::getVolumeManager
static VolumeManager getVolumeManager(const Detector &description)
static accessor calling DD4hepVolumeManagerPlugin if necessary
Definition:
VolumeManager.cpp:420
dd4hep::rec::CellIDPositionConverter::findDetElement
DetElement findDetElement(const Position &global, const DetElement &det=DetElement()) const
Definition:
CellIDPositionConverter.cpp:209
dd4hep::DDSegmentation::CellID
uint64_t CellID
Definition:
BitFieldCoder.h:26
dd4hep::Position
ROOT::Math::XYZVector Position
Definition:
Objects.h:81
dd4hep
Namespace for the AIDA detector description toolkit.
Definition:
AlignmentsCalib.h:28
det
DetElement::Object * det
Definition:
AlignmentsCalculator.cpp:66
dd4hep::rec::CellIDPositionConverter::operator=
void operator=(const CellIDPositionConverter &)=delete
dd4hep::VolumeManagerContext
This structure describes the cached data for one placement held by the volume manager.
Definition:
VolumeManager.h:50
dd4hep::Detector
The main interface to the dd4hep detector description package.
Definition:
Detector.h:90
dd4hep::Readout
Handle to the implementation of the readout structure of a subdetector.
Definition:
Readout.h:38
dd4hep::rec::CellIDPositionConverter::_description
const Detector * _description
Definition:
CellIDPositionConverter.h:121
Segmentation.h
dd4hep::rec::CellID
DDSegmentation::CellID CellID
Definition:
CellIDPositionConverter.h:29
dd4hep::rec::CellIDPositionConverter::position
Position position(const CellID &cellID) const
Definition:
CellIDPositionConverter.cpp:32
dd4hep::rec::CellIDPositionConverter
Definition:
CellIDPositionConverter.h:39
dd4hep::rec::VolumeID
DDSegmentation::VolumeID VolumeID
Definition:
CellIDPositionConverter.h:30
Generated on Tue Dec 10 2024 18:30:10 for DD4hep by
1.8.18