From 75c3e841400a6bca9c56c06f9a1a8a4a4ebbdaf9 Mon Sep 17 00:00:00 2001 From: Giovanni Marchiori <39376142+giovannimarchiori@users.noreply.github.com> Date: Tue, 26 Sep 2023 10:51:56 +0200 Subject: [PATCH] Implement module-theta readout (with per-layer merging) (#56) * implement module-theta (with per-layer merging) readout * implement module-theta (with per-layer merging) readout * cleanup * cleanup * cleanup * performance improvements * little fix for granularity * read number of modules from xml * add protection to check that calculated numPlanes is consistent with constant in xml * small updates after review of PR * add a comment to the code * add number of layers info (currently only for printout of merging config but could be used to enforce that length of vector passed via xml to configure merging per layer is correct --------- Co-authored-by: Giovanni Marchiori --- .../FCCee_ECalBarrel_thetamodulemerged.xml | 143 ++++++++++++++++ .../FCCee_DectMaster_thetamodulemerged.xml | 45 +++++ .../src/ECalBarrelInclined_geo.cpp | 42 +++++ .../FCCSWGridModuleThetaMerged.h | 117 +++++++++++++ .../FCCSWGridModuleThetaMergedHandle.h | 124 ++++++++++++++ .../include/DetSegmentation/GridTheta.h | 2 +- .../src/FCCSWGridModuleThetaMerged.cpp | 156 ++++++++++++++++++ .../src/FCCSWGridModuleThetaMergedHandle.cpp | 4 + Detector/DetSegmentation/src/GridEta.cpp | 8 +- .../src/plugins/SegmentationFactories.cpp | 3 + 10 files changed, 639 insertions(+), 5 deletions(-) create mode 100644 Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_thetamodulemerged.xml create mode 100644 Detector/DetFCCeeIDEA-LAr/compact/FCCee_DectMaster_thetamodulemerged.xml create mode 100644 Detector/DetSegmentation/include/DetSegmentation/FCCSWGridModuleThetaMerged.h create mode 100644 Detector/DetSegmentation/include/DetSegmentation/FCCSWGridModuleThetaMergedHandle.h create mode 100644 Detector/DetSegmentation/src/FCCSWGridModuleThetaMerged.cpp create mode 100644 Detector/DetSegmentation/src/FCCSWGridModuleThetaMergedHandle.cpp diff --git a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_thetamodulemerged.xml b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_thetamodulemerged.xml new file mode 100644 index 00000000..c9a8f312 --- /dev/null +++ b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_thetamodulemerged.xml @@ -0,0 +1,143 @@ + + + + + + Settings for the inclined EM calorimeter. + The barrel is filled with liquid argon. Passive material includes lead in the middle and steal on the outside, glued together. + Passive plates are inclined by a certain angle from the radial direction. + In between of two passive plates there is a readout. + Space between the plate and readout is of trapezoidal shape and filled with liquid argon. + Definition of sizes, visualization settings, readout and longitudinal segmentation are specified. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + system:4,cryo:1,type:3,subtype:3,layer:8,module:11,theta:10 + + + + + + system:4,cryo:1,type:3,subtype:3,layer:8,module:11,theta:10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detector/DetFCCeeIDEA-LAr/compact/FCCee_DectMaster_thetamodulemerged.xml b/Detector/DetFCCeeIDEA-LAr/compact/FCCee_DectMaster_thetamodulemerged.xml new file mode 100644 index 00000000..d6afbbda --- /dev/null +++ b/Detector/DetFCCeeIDEA-LAr/compact/FCCee_DectMaster_thetamodulemerged.xml @@ -0,0 +1,45 @@ + + + + + + Master compact file describing the latest developments of the FCCee IDEA detector concept with a LAr calorimeter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detector/DetFCChhECalInclined/src/ECalBarrelInclined_geo.cpp b/Detector/DetFCChhECalInclined/src/ECalBarrelInclined_geo.cpp index 956879ae..31abfcfa 100644 --- a/Detector/DetFCChhECalInclined/src/ECalBarrelInclined_geo.cpp +++ b/Detector/DetFCChhECalInclined/src/ECalBarrelInclined_geo.cpp @@ -66,6 +66,25 @@ static dd4hep::detail::Ref_t createECalBarrelInclined(dd4hep::Detector& aLcdd, layersTotalHeight += layer.repeat() * layer.thickness(); } lLog << MSG::DEBUG << "Number of layers: " << numLayers << " total thickness " << layersTotalHeight << endmsg; + // The following code checks if the xml geometry file contains a constant defining + // the number of layers the barrel. In that case, it makes the program abort + // if the number of planes in the xml is different from the one calculated from + // the geometry. This is because the number of layers is needed + // in other parts of the code (the readout for the FCC-ee ECAL with + // inclined modules). + int nLayers = -1; + try { + nLayers = aLcdd.constant("ECalBarrelNumLayers"); + } + catch(...) { + ; + } + if (nLayers > 0 && nLayers != numLayers) { + lLog << MSG::ERROR << "Incorrect number of layers (ECalBarrelNumLayers) in xml file!" << endmsg; + // todo: incidentSvc->fireIncident(Incident("ECalConstruction", "GeometryFailure")); + // make the code crash (incidentSvc does not work) + assert(nLayers == numLayers); + } dd4hep::xml::DetElement readout = calo.child(_Unicode(readout)); std::string readoutMaterial = readout.materialStr(); @@ -185,6 +204,29 @@ static dd4hep::detail::Ref_t createECalBarrelInclined(dd4hep::Detector& aLcdd, << " rotation angle = " << angle << endmsg; uint numPlanes = round(M_PI / asin((passiveThickness + activeThickness + readoutThickness) / (2. * caloDim.rmin() * cos(angle)))); + + // The following code checks if the xml geometry file contains a constant defining + // the number of planes in the barrel. In that case, it makes the program abort + // if the number of planes in the xml is different from the one calculated from + // the geometry. This is because the number of plane information (retrieved from the + // xml) is used in other parts of the code (the readout for the FCC-ee ECAL with + // inclined modules). In principle the code above should be refactored so that the number + // of planes is one of the inputs of the calculation and other geometrical parameters + // are adjusted accordingly. This is left for the future, and we use the workaround + // below to enforce for the time being that the number of planes is "correct" + int nModules = -1; + try { + nModules = aLcdd.constant("ECalBarrelNumPlanes"); + } + catch(...) { + ; + } + if (nModules > 0 && nModules != numPlanes) { + lLog << MSG::ERROR << "Incorrect number of planes (ECalBarrelNumPlanes) in xml file!" << endmsg; + // todo: incidentSvc->fireIncident(Incident("ECalConstruction", "GeometryFailure")); + // make the code crash (incidentSvc does not work) + assert(nModules == numPlanes); + } double dPhi = 2. * M_PI / numPlanes; lLog << MSG::INFO << "number of passive plates = " << numPlanes << " azim. angle difference = " << dPhi << endmsg; lLog << MSG::INFO << " distance at inner radius (cm) = " << 2. * M_PI * caloDim.rmin() / numPlanes << "\n" diff --git a/Detector/DetSegmentation/include/DetSegmentation/FCCSWGridModuleThetaMerged.h b/Detector/DetSegmentation/include/DetSegmentation/FCCSWGridModuleThetaMerged.h new file mode 100644 index 00000000..c549eabe --- /dev/null +++ b/Detector/DetSegmentation/include/DetSegmentation/FCCSWGridModuleThetaMerged.h @@ -0,0 +1,117 @@ +#ifndef DETSEGMENTATION_FCCSWGRIDMODULETHETAMERGED_H +#define DETSEGMENTATION_FCCSWGRIDMODULETHETAMERGED_H + +// FCCSW +#include "DetSegmentation/GridTheta.h" +#include "DD4hep/VolumeManager.h" + +/** FCCSWGridModuleThetaMerged Detector/DetSegmentation/DetSegmentation/FCCSWGridModuleThetaMerged.h FCCSWGridModuleThetaMerged.h + * + * Segmentation in theta and module. + * Based on GridTheta, merges modules and theta cells based on layer number + * + */ + +namespace dd4hep { +namespace DDSegmentation { +class FCCSWGridModuleThetaMerged : public GridTheta { +public: + /// default constructor using an arbitrary type + FCCSWGridModuleThetaMerged(const std::string& aCellEncoding); + /// Default constructor used by derived classes passing an existing decoder + FCCSWGridModuleThetaMerged(const BitFieldCoder* decoder); + + /// destructor + virtual ~FCCSWGridModuleThetaMerged() = default; + + /// read n(modules) from detector metadata + void GetNModulesFromGeom(); + + /// read n(layers) from detector metadata + void GetNLayersFromGeom(); + + /** Determine the local position based on the cell ID. + * @param[in] aCellId ID of a cell. + * return Position (relative to R, phi of Geant4 volume it belongs to, scaled for R=1). + */ + virtual Vector3D position(const CellID& aCellID) const; + /** Determine the cell ID based on the position. + * @param[in] aLocalPosition (not used). + * @param[in] aGlobalPosition + * @param[in] aVolumeId ID of the Geant4 volume + * return Cell ID. + */ + virtual CellID cellID(const Vector3D& aLocalPosition, const Vector3D& aGlobalPosition, + const VolumeID& aVolumeID) const; + /** Determine the azimuthal angle (relative to the G4 volume) based on the cell ID. + * @param[in] aCellId ID of a cell. + * return Phi. + */ + double phi(const CellID& aCellID) const; + /** Determine the polar angle (relative to the G4 volume) based on the cell ID. + * @param[in] aCellId ID of a cell. + * return Theta. + */ + double theta(const CellID& aCellID) const; + /** Determine the radius based on the cell ID. + * @param[in] aCellId ID of a cell. + * return Radius. + */ + // double radius(const CellID& aCellID) const; + /** Get the number of merged cells in theta for given layer + * @param[in] layer + * return The number of merged cells in theta + */ + inline int mergedThetaCells(const int layer) const { + if (layer m_mergedCellsTheta; + /// vector of number of modules to be merged for each layer + std::vector m_mergedModules; + + /// number of modules (or, equivalently, the deltaPhi between adjacent modules) + int m_nModules; + + /// number of layers (from the geometry) + int m_nLayers; + +}; +} +} +#endif /* DETSEGMENTATION_FCCSWGRIDMODULETHETAMERGED_H */ diff --git a/Detector/DetSegmentation/include/DetSegmentation/FCCSWGridModuleThetaMergedHandle.h b/Detector/DetSegmentation/include/DetSegmentation/FCCSWGridModuleThetaMergedHandle.h new file mode 100644 index 00000000..bf6b6bcb --- /dev/null +++ b/Detector/DetSegmentation/include/DetSegmentation/FCCSWGridModuleThetaMergedHandle.h @@ -0,0 +1,124 @@ +#ifndef DD4HEP_DDCORE_GRIDMODULETHETAMERGED_H +#define DD4HEP_DDCORE_GRIDMODULETHETAMERGED_H 1 + +// FCCSW +#include "DetSegmentation/FCCSWGridModuleThetaMerged.h" + +// DD4hep +#include "DD4hep/Segmentations.h" +#include "DD4hep/detail/SegmentationsInterna.h" + +/// Namespace for the AIDA detector description toolkit +namespace dd4hep { + +/// Namespace for base segmentations + + +// Forward declarations +class Segmentation; +template +class SegmentationWrapper; + +/// We need some abbreviation to make the code more readable. +typedef Handle> FCCSWGridModuleThetaMergedHandle; + +/// Implementation class for the module-theta (with per-layer merging) segmentation. +/** + * Concrete user handle to serve specific needs of client code + * which requires access to the base functionality not served + * by the super-class Segmentation. + * + * Note: + * We only check the validity of the underlying handle. + * If for whatever reason the implementation object is not valid + * This is not checked. + * In principle this CANNOT happen unless some brain-dead has + * fiddled with the handled object directly..... + * + * Note: + * The handle base corrsponding to this object in for + * conveniance reasons instantiated in DD4hep/src/Segmentations.cpp. + * + */ +class FCCSWGridModuleThetaMerged : public FCCSWGridModuleThetaMergedHandle { +public: + /// Definition of the basic handled object + typedef FCCSWGridModuleThetaMergedHandle::Object Object; + +public: + /// Default constructor + FCCSWGridModuleThetaMerged() = default; + /// Copy constructor + FCCSWGridModuleThetaMerged(const FCCSWGridModuleThetaMerged& e) = default; + /// Copy Constructor from segmentation base object + FCCSWGridModuleThetaMerged(const Segmentation& e) : Handle(e) {} + /// Copy constructor from handle + FCCSWGridModuleThetaMerged(const Handle& e) : Handle(e) {} + /// Copy constructor from other polymorph/equivalent handle + template + FCCSWGridModuleThetaMerged(const Handle& e) : Handle(e) {} + /// Assignment operator + FCCSWGridModuleThetaMerged& operator=(const FCCSWGridModuleThetaMerged& seg) = default; + /// Equality operator + bool operator==(const FCCSWGridModuleThetaMerged& seg) const { return m_element == seg.m_element; } + + /// determine the position based on the cell ID + inline Position position(const CellID& id) const { return Position(access()->implementation->position(id)); } + + /// determine the cell ID based on the position + inline dd4hep::CellID cellID(const Position& local, const Position& global, const VolumeID& volID) const { + return access()->implementation->cellID(local, global, volID); + } + + /// access the grid size in theta + inline double gridSizeTheta() const { return access()->implementation->gridSizeTheta(); } + + /// access the coordinate offset in theta + inline double offsetTheta() const { return access()->implementation->offsetTheta(); } + + /// access the number of theta cells merged for given layer + inline int mergedThetaCells(const int layer) const { return access()->implementation->mergedThetaCells(layer); } + + /// access the number of modules + inline int nModules() const { return access()->implementation->nModules(); } + + /// access the number of layers + inline int nLayers() const { return access()->implementation->nLayers(); } + + /// access the number of merged modules for given layer + inline int mergedModules(const int layer) const { return access()->implementation->mergedModules(layer); } + + /// set the coordinate offset in theta + inline void setOffsetTheta(double offset) const { access()->implementation->setOffsetTheta(offset); } + + /// set the grid size in theta + inline void setGridSizeTheta(double cellSize) const { access()->implementation->setGridSizeTheta(cellSize); } + + /// access the field name used for theta + inline const std::string& fieldNameTheta() const { return access()->implementation->fieldNameTheta(); } + + /// access the field name used for module + inline const std::string& fieldNameModule() const { return access()->implementation->fieldNameModule(); } + + /// access the field name used for layer + inline const std::string& fieldNameLayer() const { return access()->implementation->fieldNameLayer(); } + + + /** \brief Returns a std::vector of the cellDimensions of the given cell ID + in natural order of dimensions (nModules, dTheta) + + Returns a std::vector of the cellDimensions of the given cell ID + \param cellID + \return std::vector size 2: + -# size in module + -# size in theta + */ + inline std::vector cellDimensions(const CellID& /*id*/) const { + //return {access()->implementation->gridSizePhi(), access()->implementation->gridSizeTheta()}; + // not implemented + return {0., 0.}; + } +}; + +} /* End namespace dd4hep */ +#endif // DD4HEP_DDCORE_GRIDMODULETHETAMERGED_H diff --git a/Detector/DetSegmentation/include/DetSegmentation/GridTheta.h b/Detector/DetSegmentation/include/DetSegmentation/GridTheta.h index cc8c6cdd..5707d2e7 100644 --- a/Detector/DetSegmentation/include/DetSegmentation/GridTheta.h +++ b/Detector/DetSegmentation/include/DetSegmentation/GridTheta.h @@ -69,7 +69,7 @@ class GridTheta : public Segmentation { inline void setFieldNameTheta(const std::string& fieldName) { m_thetaID = fieldName; } /// calculates the Cartesian position from cylindrical coordinates (r, phi, theta) inline Vector3D positionFromRThetaPhi(double ar, double atheta, double aphi) const { - return Vector3D(ar * std::cos(aphi), ar * std::sin(aphi), ar / std::tan(atheta)); + return Vector3D(ar * std::cos(aphi), ar * std::sin(aphi), ar * std::cos(atheta)/std::sin(atheta)); } /// calculates the theta angle from Cartesian coordinates inline double thetaFromXYZ(const Vector3D& aposition) const { diff --git a/Detector/DetSegmentation/src/FCCSWGridModuleThetaMerged.cpp b/Detector/DetSegmentation/src/FCCSWGridModuleThetaMerged.cpp new file mode 100644 index 00000000..8feb2681 --- /dev/null +++ b/Detector/DetSegmentation/src/FCCSWGridModuleThetaMerged.cpp @@ -0,0 +1,156 @@ +#include "DetSegmentation/FCCSWGridModuleThetaMerged.h" + +#include +#include "DD4hep/Detector.h" + +namespace dd4hep { +namespace DDSegmentation { + +/// default constructor using an encoding string +FCCSWGridModuleThetaMerged::FCCSWGridModuleThetaMerged(const std::string& cellEncoding) : GridTheta(cellEncoding) { + // define type and description + _type = "FCCSWGridModuleThetaMerged"; + _description = "Module-theta segmentation with per-layer merging along theta and/or module"; + + // register all necessary parameters (additional to those registered in GridTheta) + registerIdentifier("identifier_layer", "Cell ID identifier for layer", m_layerID, "layer"); + registerIdentifier("identifier_module", "Cell ID identifier for readout module", m_moduleID, "module"); + registerParameter("mergedCells_Theta", "Numbers of merged cells in theta per layer", m_mergedCellsTheta, std::vector()); + registerParameter("mergedModules", "Numbers of merged modules per layer", m_mergedModules, std::vector()); + GetNModulesFromGeom(); + GetNLayersFromGeom(); +} + +FCCSWGridModuleThetaMerged::FCCSWGridModuleThetaMerged(const BitFieldCoder* decoder) : GridTheta(decoder) { + // define type and description + _type = "FCCSWGridModuleThetaMerged"; + _description = "Module-theta segmentation with per-layer merging along theta and/or module"; + + // register all necessary parameters (additional to those registered in GridTheta) + registerIdentifier("identifier_layer", "Cell ID identifier for layer", m_layerID, "layer"); + registerIdentifier("identifier_module", "Cell ID identifier for module", m_moduleID, "module"); + registerParameter("mergedCells_Theta", "Numbers of merged cells in theta per layer", m_mergedCellsTheta, std::vector()); + registerParameter("mergedModules", "Numbers of merged modules per layer", m_mergedModules, std::vector()); + GetNModulesFromGeom(); + GetNLayersFromGeom(); +} + +void FCCSWGridModuleThetaMerged::GetNModulesFromGeom() { + dd4hep::Detector* dd4hepgeo = &(dd4hep::Detector::getInstance()); + try { + m_nModules = dd4hepgeo->constant("ECalBarrelNumPlanes"); + } + catch(...) { + std::cout << "Number of modules not found in detector metadata, exiting..." << std::endl; + exit(1); + } + std::cout << "Number of modules read from detector metadata and used in readout class: " << m_nModules << std::endl; +} + +void FCCSWGridModuleThetaMerged::GetNLayersFromGeom() { + dd4hep::Detector* dd4hepgeo = &(dd4hep::Detector::getInstance()); + try { + m_nLayers = dd4hepgeo->constant("ECalBarrelNumLayers"); + } + catch(...) { + std::cout << "Number of layers not found in detector metadata, exiting..." << std::endl; + exit(1); + } + std::cout << "Number of layers read from detector metadata and used in readout class: " << m_nLayers << std::endl; +} + +/// determine the local position based on the cell ID +Vector3D FCCSWGridModuleThetaMerged::position(const CellID& cID) const { + + // debug + // std::cout << "cellID: " << cID << std::endl; + + // cannot return for R=0 otherwise will lose phi info, return for R=1 + return positionFromRThetaPhi(1.0, theta(cID), phi(cID)); +} + +/// determine the cell ID based on the global position +CellID FCCSWGridModuleThetaMerged::cellID(const Vector3D& /* localPosition */, const Vector3D& globalPosition, + const VolumeID& vID) const { + CellID cID = vID; + + // retrieve layer (since merging depends on layer) + int layer = _decoder->get(vID, m_layerID); + + // retrieve theta + double lTheta = thetaFromXYZ(globalPosition); + + // calculate theta bin with original segmentation + int thetaBin = positionToBin(lTheta, m_gridSizeTheta, m_offsetTheta); + + // adjust theta bin if cells are merged along theta in this layer + // assume that m_mergedCellsTheta[layer]>=1 + thetaBin -= (thetaBin % m_mergedCellsTheta[layer]); + + // set theta field of cellID + _decoder->set(cID, m_thetaID, thetaBin); + + // retrieve module number + int module = _decoder->get(vID, m_moduleID); + + // adjust module number if modules are merged in this layer + // assume that m_mergedModules[layer]>=1 + module -= (module % m_mergedModules[layer]); + + // set module field of cellID + _decoder->set(cID, m_moduleID, module); + + return cID; +} + +/// determine the azimuth based on the cell ID +/// the value returned is the relative shift in phi +/// with respect to the first module in the group of +/// merged ones - which will be then added on top of +/// the phi of the volume containing the first cell +/// by the positioning tool +double FCCSWGridModuleThetaMerged::phi(const CellID& cID) const { + + // retrieve layer + int layer = _decoder->get(cID, m_layerID); + + // calculate phi offset due to merging + // assume that m_mergedModules[layer]>=1 + double phi = (m_mergedModules[layer]-1) * M_PI / m_nModules ; + + // debug + // std::cout << "layer: " << layer << std::endl; + // std::cout << "merged modules: " << m_mergedModules[layer] << std::endl; + // std::cout << "phi: " << phi << std::endl; + + return phi; +} + +/// determine the polar angle based on the cell ID and the +/// number of merged theta cells +double FCCSWGridModuleThetaMerged::theta(const CellID& cID) const { + + // retrieve layer + int layer = _decoder->get(cID, m_layerID); + + // retrieve theta bin from cellID and determine theta position + CellID thetaValue = _decoder->get(cID, m_thetaID); + double _theta = binToPosition(thetaValue, m_gridSizeTheta, m_offsetTheta); + + // adjust return value if cells are merged along theta in this layer + // shift by (N-1)*half theta grid size + // assume that m_mergedCellsTheta[layer]>=1 + _theta += (m_mergedCellsTheta[layer]-1) * m_gridSizeTheta / 2.0 ; + + // debug + // std::cout << "layer: " << layer << std::endl; + // std::cout << "theta bin: " << thetaValue << std::endl; + // std::cout << "gridSizeTheta, offsetTheta: " << m_gridSizeTheta << " , " << m_offsetTheta << std::endl; + // std::cout << "merged cells: " << m_mergedCellsTheta[layer] << std::endl; + // std::cout << "theta: " << _theta << std::endl; + + return _theta; +} + +} +} diff --git a/Detector/DetSegmentation/src/FCCSWGridModuleThetaMergedHandle.cpp b/Detector/DetSegmentation/src/FCCSWGridModuleThetaMergedHandle.cpp new file mode 100644 index 00000000..e4b49941 --- /dev/null +++ b/Detector/DetSegmentation/src/FCCSWGridModuleThetaMergedHandle.cpp @@ -0,0 +1,4 @@ +#include "DetSegmentation/FCCSWGridModuleThetaMergedHandle.h" +#include "DD4hep/detail/Handle.inl" + +DD4HEP_INSTANTIATE_HANDLE_UNNAMED(dd4hep::DDSegmentation::FCCSWGridModuleThetaMerged); diff --git a/Detector/DetSegmentation/src/GridEta.cpp b/Detector/DetSegmentation/src/GridEta.cpp index 6e118d4d..232d0b50 100644 --- a/Detector/DetSegmentation/src/GridEta.cpp +++ b/Detector/DetSegmentation/src/GridEta.cpp @@ -11,7 +11,7 @@ GridEta::GridEta(const std::string& cellEncoding) : Segmentation(cellEncoding) { _description = "Eeta segmentation in the global coordinates"; // register all necessary parameters - registerParameter("grid_size_eta", "Cell size in Eta", m_gridSizeEta, 1., SegmentationParameter::LengthUnit); + registerParameter("grid_size_eta", "Cell size in eta", m_gridSizeEta, 1., SegmentationParameter::LengthUnit); registerParameter("offset_eta", "Angular offset in eta", m_offsetEta, 0., SegmentationParameter::AngleUnit, true); registerIdentifier("identifier_eta", "Cell ID identifier for eta", m_etaID, "eta"); } @@ -19,10 +19,10 @@ GridEta::GridEta(const std::string& cellEncoding) : Segmentation(cellEncoding) { GridEta::GridEta(const BitFieldCoder* decoder) : Segmentation(decoder) { // define type and description _type = "GridEta"; - _description = "Eeta segmentation in the global coordinates"; + _description = "Eta segmentation in the global coordinates"; // register all necessary parameters - registerParameter("grid_size_eta", "Cell size in Eta", m_gridSizeEta, 1., SegmentationParameter::LengthUnit); + registerParameter("grid_size_eta", "Cell size in eta", m_gridSizeEta, 1., SegmentationParameter::LengthUnit); registerParameter("offset_eta", "Angular offset in eta", m_offsetEta, 0., SegmentationParameter::AngleUnit, true); registerIdentifier("identifier_eta", "Cell ID identifier for eta", m_etaID, "eta"); } @@ -46,7 +46,7 @@ CellID GridEta::cellID(const Vector3D& /* localPosition */, const Vector3D& glob // return binToPosition(etaValue, m_gridSizeEta, m_offsetEta); //} -/// determine the polar angle theta based on the cell ID +/// determine the pseudorapidity based on the cell ID double GridEta::eta(const CellID& cID) const { CellID etaValue = _decoder->get(cID, m_etaID); return binToPosition(etaValue, m_gridSizeEta, m_offsetEta); diff --git a/Detector/DetSegmentation/src/plugins/SegmentationFactories.cpp b/Detector/DetSegmentation/src/plugins/SegmentationFactories.cpp index 4758e476..7a1f8c15 100644 --- a/Detector/DetSegmentation/src/plugins/SegmentationFactories.cpp +++ b/Detector/DetSegmentation/src/plugins/SegmentationFactories.cpp @@ -17,6 +17,9 @@ DECLARE_SEGMENTATION(GridTheta, create_segmentation) +#include "DetSegmentation/FCCSWGridModuleThetaMerged.h" +DECLARE_SEGMENTATION(FCCSWGridModuleThetaMerged, create_segmentation) + #include "DetSegmentation/FCCSWGridPhiEta.h" DECLARE_SEGMENTATION(FCCSWGridPhiEta, create_segmentation)