1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
#ifndef Geometry_ForwardGeometry_CastorGeometry_h
#define Geometry_ForwardGeometry_CastorGeometry_h 1
#include "CondFormats/AlignmentRecord/interface/CastorAlignmentRcd.h"
#include "DataFormats/HcalDetId/interface/HcalCastorDetId.h"
#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
#include "Geometry/ForwardGeometry/interface/IdealCastorTrapezoid.h"
#include "Geometry/ForwardGeometry/interface/CastorTopology.h"
#include "Geometry/Records/interface/CastorGeometryRecord.h"
#include "Geometry/Records/interface/PCastorRcd.h"
#include <vector>
class CastorGeometry : public CaloSubdetectorGeometry {
public:
typedef std::vector<IdealCastorTrapezoid> CellVec;
typedef CaloCellGeometry::CCGFloat CCGFloat;
typedef CaloCellGeometry::Pt3D Pt3D;
typedef CaloCellGeometry::Pt3DVec Pt3DVec;
typedef CaloCellGeometry::Tr3D Tr3D;
typedef CastorAlignmentRcd AlignmentRecord;
typedef CastorGeometryRecord AlignedRecord;
typedef PCastorRcd PGeometryRecord;
typedef HcalCastorDetId DetIdType;
static constexpr int k_NumberOfCellsForCorners = HcalCastorDetId::kSizeForDenseIndexing;
static constexpr int k_NumberOfShapes = 4;
static constexpr int k_NumberOfParametersPerShape = 6;
static std::string dbString() { return "PCastorRcd"; }
unsigned int numberOfTransformParms() const override { return 3; }
unsigned int numberOfShapes() const override { return k_NumberOfShapes; }
unsigned int numberOfParametersPerShape() const override { return k_NumberOfParametersPerShape; }
CastorGeometry();
explicit CastorGeometry(const CastorTopology* topology);
~CastorGeometry() override;
DetId getClosestCell(const GlobalPoint& r) const override;
static std::string producerTag() { return "CASTOR"; }
static unsigned int numberOfAlignments() { return 1; }
static unsigned int alignmentTransformIndexLocal(const DetId& id);
static unsigned int alignmentTransformIndexGlobal(const DetId& id);
static void localCorners(Pt3DVec& lc, const CCGFloat* pv, unsigned int i, Pt3D& ref);
void newCell(const GlobalPoint& f1,
const GlobalPoint& f2,
const GlobalPoint& f3,
const CCGFloat* parm,
const DetId& detId) override;
protected:
// Modify the RawPtr class
CaloCellGeometryPtr getGeometryRawPtr(uint32_t index) const override;
private:
const CastorTopology* theTopology;
bool m_ownsTopology;
CellVec m_cellVec;
};
#endif
|