Commit 60021624 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

New detector role: "auxiliary" will allow to drop devices like TLU from the reco

parent c72f0687
Pipeline #1021302 passed with stages
in 23 minutes and 30 seconds
......@@ -169,9 +169,9 @@ The detector configuration consists of a set of sections describing the detector
Each section starts with a header describing the name used to identify the detector; all names are required to be unique.
Every detector should contain all of the following parameters:
\begin{itemize}
\item The \parameter{role} parameter is an array of strings indicating the function(s) of the respective detector. This can be \parameter{dut} or \parameter{reference}, the default is \parameter{none}. With the default, the respective detector participates in tracking but is neither used as reference plane for alignment and correlations, nur treated as DUT. As reference, the detector is used as anchor for relative alignments, and its position and orientation is used to produce correlation plots. As DUT, the detector is by default excluded from tracking, and all DUT-type modules are executed for this detector.
\item The \parameter{role} parameter is an array of strings indicating the function(s) of the respective detector. This can be \parameter{dut}, \parameter{reference} or \parameter{auxiliary}, the default is \parameter{none}. With the default, the respective detector participates in tracking but is neither used as reference plane for alignment and correlations, nur treated as DUT. As reference, the detector is used as anchor for relative alignments, and its position and orientation is used to produce correlation plots. As DUT, the detector is by default excluded from tracking, and all DUT-type modules are executed for this detector. As auxiliary device, the detector may provide additional information but does not partake in the reconstruction, this is useful to e.g. include trigger logic units (TLUs) providing timing information.
\begin{warning}
There always has to be exactly \emph{one} reference detector in the setup. For setups with a single detector only, the role should be configured as \parameter{dut, reference} for the detector to act as both.
There always has to be exactly \emph{one} reference detector in the setup. For setups with a single detector only, the role should be configured as \parameter{dut, reference} for the detector to act as both. Auxiliary devices cannot have any other role simultaneously.
\end{warning}
\item The \parameter{type} parameter is a string describing the type of detector, e.g.\ \parameter{Timepix3} or \parameter{CLICpix2}. This value might be used by some modules to distinguish between different types.
......
......@@ -33,11 +33,18 @@ Detector::Detector(const Configuration& config) : m_role(DetectorRole::NONE) {
m_role |= DetectorRole::REFERENCE;
} else if(role == "dut") {
m_role |= DetectorRole::DUT;
} else if(role == "auxiliary" || role == "aux") {
m_role |= DetectorRole::AUXILIARY;
} else {
throw InvalidValueError(config, "role", "Detector role does not exist.");
}
}
// Auxiliary devices cannot hold other roles:
if(static_cast<bool>(m_role & DetectorRole::AUXILIARY) && m_role != DetectorRole::AUXILIARY) {
throw InvalidValueError(config, "role", "Auxiliary devices cannot hold any other detector role");
}
// Detector position and orientation
m_displacement = config.get<ROOT::Math::XYZPoint>("position", ROOT::Math::XYZPoint());
m_orientation = config.get<ROOT::Math::XYZVector>("orientation", ROOT::Math::XYZVector());
......@@ -105,6 +112,10 @@ bool Detector::isDUT() const {
return static_cast<bool>(m_role & DetectorRole::DUT);
}
bool Detector::isAuxiliary() const {
return static_cast<bool>(m_role & DetectorRole::AUXILIARY);
}
// Functions to set and check channel masking
void Detector::setMaskFile(std::string file) {
m_maskfile = file;
......
......@@ -34,6 +34,8 @@ namespace corryvreckan {
NONE = 0x0, ///< No specific detector role
REFERENCE = 0x1, ///< Reference detector
DUT = 0x2, ///< Detector used as device under test
AUXILIARY = 0x4, ///< Auxiliary device which should not participate in regular reconstruction but might provide
/// additional information
};
inline constexpr DetectorRole operator&(DetectorRole x, DetectorRole y) {
......@@ -96,6 +98,12 @@ namespace corryvreckan {
*/
bool isDUT() const;
/**
* @brief Check whether detector is registered as auxiliary device and should not parttake in the reconstruction
* @return Auxiliary status
*/
bool isAuxiliary() const;
/**
* @brief Retrieve configuration object from detector, containing all (potentially updated) parameters
* @return Configuration object for this detector
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment