File DD4hepBinningHelpers.hpp
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
Functions
-
std::vector<Acts::Experimental::ProtoBinning> convertBinning(const dd4hep::DetElement &dd4hepElement, const std::string &bname)
This method converts the DD4hep binning into the Acts ProtoBinning.
- Parameters
dd4hepElement – the element which has a binning description attached
bname – the binning base name, e.g. surface_binning, material_binning
- Returns
a vector of proto binning descriptions
-
void decodeBinning(dd4hep::rec::VariantParameters &variantParams, const xml_comp_t &xmlBinning, const std::string &bname, const std::vector<std::string> &bvals)
Helper method to decode the binning from what would appear in the xml into variant parameters, such that it can be understood in the downstream processing.
This parses the dediced < surface_binning > tag
allowed/understood binnings are x,y,z,phi,r
allowed/unserstood types are equidistant/variable (those are auto-detected)
Example for e.g. bname = “surface_binning”:
Equidistant binning in r and phi: < surface_binning nr=”2” rmin=”25” rmax=”100” nphi=”22” phimin=”-3.1415” phimax=”3.1415” \/ >
Variable binning in z: < surface_binning zboundaries=”-100,-90,90,100” \/ >
And 2D combinations of this are allowed.
- Parameters
variantParams – [in,out] the variant parameters that will be overwritten
xmlBinning – the surface binning
bname – the binning base name, e.g. surface_binning, material_binning
bvals – the boundary values, i.e. x,y,z,phi,r
-
std::vector<Acts::Experimental::ProtoBinning> convertBinning(const dd4hep::DetElement &dd4hepElement, const std::string &bname)