 |
Belle II Software
release-05-01-25
|
14 #include <framework/logging/Logger.h>
15 #include <boost/property_tree/ptree.hpp>
16 #include <boost/property_tree/json_parser.hpp>
36 class CDCWireHitRequirements:
public TObject {
67 tree.get<
short>(
"FirstSuperLayer.ADC.max"));
69 tree.get<
short>(
"OuterSuperLayers.ADC.max"));
72 tree.get<
short>(
"FirstSuperLayer.TOT.max"));
74 tree.get<
short>(
"OuterSuperLayers.TOT.max"));
77 tree.get<
float>(
"FirstSuperLayer.ADCOverTOT.max"));
79 tree.get<
float>(
"OuterSuperLayers.ADCOverTOT.max"));
81 for (boost::property_tree::ptree::value_type& row : tree.get_child(
"FirstSuperLayer.MaxADCGivenTOT")) {
83 row.second.get<
short>(
"maxADC")));
85 for (boost::property_tree::ptree::value_type& row : tree.get_child(
"OuterSuperLayers.MaxADCGivenTOT")) {
87 row.second.get<
short>(
"maxADC")));
90 }
catch (boost::property_tree::ptree_error& e) {
92 B2FATAL(
"Cannot parse CDCWireHit requirement information: " <<
e.what());
231 std::string MaxADCGivenTOTFirstSuperLayer =
"";
233 MaxADCGivenTOTFirstSuperLayer +=
"If TOT == " + std::to_string(v.first) +
234 ", then ADC <= " + std::to_string(v.second) +
"\n";
237 std::string MaxADCGivenTOTOuterSuperLayers =
"";
239 MaxADCGivenTOTOuterSuperLayers +=
"If TOT == " + std::to_string(v.first) +
240 ", then ADC <= " + std::to_string(v.second) +
"\n";
243 B2INFO(
" " << std::endl
244 <<
"=======================================================" << std::endl
245 <<
"CDCWireHit requirements (-1 values stand for unbounded)" << std::endl
246 <<
"=======================================================" << std::endl
247 <<
"First Super Layer: " << std::endl
251 << MaxADCGivenTOTFirstSuperLayer << std::endl
252 <<
"Outer Super Layers: " << std::endl
256 << MaxADCGivenTOTOuterSuperLayers
257 <<
"=======================================================" << std::endl);
void setADCOverTOTRangeFirstSuperLayer(const floatRange_t &ADCOverTOTRangeFirstSuperLayer)
Set allowed ADC/TOT range (first super layer of CDC). An upper value of -1 stands for unbounded.
const intRange_t & getTOTRangeOuterSuperLayers() const
Get allowed TOT range (outer super layers of CDC). An upper value of -1 stands for unbounded.
ClassDef(CDCWireHitRequirements, 2)
ROOT ClassDef.
void dump() const
Print content.
intRange_t m_ADCRangeOuterSuperLayers
Allowed ADC range (outer super layers of CDC).
const intRange_t & getADCRangeFirstSuperLayer() const
Get allowed ADC range (first super layer of CDC). An upper value of -1 stands for unbounded.
intRange_t m_ADCRangeFirstSuperLayer
Allowed ADC range (first super layer of CDC).
const intRange_t & getTOTRangeFirstSuperLayer() const
Get allowed TOT range (first super layer of CDC). An upper value of -1 stands for unbounded.
const floatRange_t & getADCOverTOTRangeOuterSuperLayers() const
Get allowed ADC/TOT range (outer super layers of CDC). An upper value of -1 stands for unbounded.
const floatRange_t & getADCOverTOTRangeFirstSuperLayer() const
Get allowed ADC/TOT range (first super layer of CDC). An upper value of -1 stands for unbounded.
void setADCOverTOTRangeOuterSuperLayers(const floatRange_t &ADCOverTOTRangeOuterSuperLayers)
Set allowed ADC/TOT range (outer super layers of CDC). An upper value of -1 stands for unbounded.
void setTOTRangeOuterSuperLayers(const intRange_t &TOTRangeOuterSuperLayers)
Set allowed TOT range (outer super layers of CDC). An upper value of -1 stands for unbounded.
const std::map< short, short > getMaxADCGivenTOTFirstSuperLayer() const
Get map of maximum allowed ADC given TOT (first super layer of CDC). An upper value of -1 stands for ...
std::map< short, short > m_MaxADCGivenTOTFirstSuperLayer
Map of conditions of the type: if TOT==x, then ADC<=y (first super layer of CDC).
intRange_t m_TOTRangeFirstSuperLayer
Allowed TOT range (first super layer of CDC).
floatRange_t m_ADCOverTOTRangeFirstSuperLayer
Allowed ADC/TOT range (first super layer of CDC).
CDCWireHitRequirements()=default
Default constructor.
void setADCRangeOuterSuperLayers(const intRange_t &ADCRangeOuterSuperLayers)
Set allowed ADC range (outer super layers of CDC). An upper value of -1 stands for unbounded.
std::map< short, short > m_MaxADCGivenTOTOuterSuperLayers
Map of conditions of the type: if TOT==x, then ADC<=y (outer super layers of CDC).
Abstract base class for different kinds of events.
floatRange_t m_ADCOverTOTRangeOuterSuperLayers
Allowed ADC/TOT range (outer super layers of CDC).
~CDCWireHitRequirements()=default
Destructor.
std::pair< float, float > floatRange_t
Float range.
void setADCRangeFirstSuperLayer(const intRange_t &ADCRangeFirstSuperLayer)
Set allowed ADC range (first super layer of CDC). An upper value of -1 stands for unbounded.
std::pair< short, short > intRange_t
Integer range.
intRange_t m_TOTRangeOuterSuperLayers
Allowed TOT range (outer super layers of CDC).
void setTOTRangeFirstSuperLayer(const intRange_t &TOTRangeFirstSuperLayer)
Set allowed TOT range (first super layer of CDC). An upper value of -1 stands for unbounded.
const std::map< short, short > getMaxADCGivenTOTOuterSuperLayers() const
Get map of maximum allowed ADC given TOT (outer super layers of CDC). An upper value of -1 stands for...
void setMaxADCGivenTOTFirstSuperLayer(const std::map< short, short > &MaxADCGivenTOTFirstSuperLayer)
Set map of maximum allowed ADC given TOT (first super layer of CDC). An upper value of -1 stands for ...
const intRange_t & getADCRangeOuterSuperLayers() const
Get allowed ADC range (outer super layers of CDC). An upper value of -1 stands for unbounded.
void setMaxADCGivenTOTOuterSuperLayers(const std::map< short, short > &MaxADCGivenTOTOuterSuperLayers)
Set map of maximum allowed ADC given TOT (outer super layers of CDC). An upper value of -1 stands for...