14#include <boost/serialization/access.hpp>
15#include <boost/serialization/utility.hpp>
22#include <fmt/format.h>
52 friend class boost::serialization::access;
61 template<
class EDetId>
72 template<
class EDetId =
int>
73 std::pair<EDetId, int> GlobalToLocal(
int globId)
const;
81 template<
class EDetId>
91 template<
class EDetId>
92 void Disable(EDetId detId,
int locId);
98 std::string
ToString(
int indentLevel = 0)
const;
103 template<
class EDetId>
109 template<
class Archive>
146 template<
class EDetId>
147 void AddComponent(EDetId detId,
int locId,
double z);
161 template<
class EDetId>
165 auto iDetIntDsbl{
fvDetExtToInt[
static_cast<int>(detIdDisable)]};
177 if (val > iGlbDsbl) {
188 template<
class EDetId>
191 const auto& [iDetExt, iLoc] =
fvGlbToLoc[globId];
192 return std::pair(
static_cast<EDetId
>(iDetExt), iLoc);
197 template<
class EDetId>
201 std::stringstream msg;
202 msg <<
"ModuleIndexMapFactory: attempt of adding a duplicating component with z = " << z
203 <<
", detID = " <<
static_cast<int>(detId) <<
" and locId = " << locId
204 <<
".\n The next components were already added:";
206 msg <<
"\n\t- {z, detId, locId} = {" << c.fZ <<
", " << c.fDetId <<
", " << c.fLocId <<
"}";
208 throw std::logic_error(msg.str());
std::string ToString(CbmCutId id)
Convert CbmCutId to a string representation.
Common constant definitions for the Kalman Filter library.
Creates a valid module mapper.
void AddComponent(EDetId detId, int locId, double z)
Adds component info.
std::set< Component > fvComponentLayers
Maps local detector and station indices to the material maps and field slices.
int GetNofLayers(EDetId detId) const
Gets number of layers of a given EDetId.
void Disable(EDetId detId, int locId)
Disables a component.
std::vector< int > fvNofLayersIntDet
Number of layers in a detector.
std::vector< int > fvDetLocOffset
First index of component for det.
int LocalToGlobal(EDetId detId, int locId) const
Converts external pair (detID, locID) to internal layer index.
void serialize(Archive &ar, const unsigned int)
std::vector< int > fvDetIntToExt
Maps external detID to internal.
int GetNofLayers() const
Gets total number of components.
std::vector< int > fvLocToGlb
std::vector< std::pair< int, int > > fvGlbToLoc
int GetIntDetIndex(EDetId detId) const
Gets internal index of the detector ID.
std::vector< int > fvDetExtToInt
Maps internal detID to external.
std::pair< EDetId, int > GlobalToLocal(int globId) const
Converts internal layer index to pair (detID, locID)
friend class ModuleIndexMapFactory
bool operator<(const Component &rhs) const
int fDetId
External index of detector subsystem.
double fZ
Reference z-coordinate of the component.
int fLocId
Local index of component.
Component(int detId, int locId, double z)