Belle II Software development
CDClayerTimeCut Class Reference

Database object for timing offset (t0). More...

#include <CDClayerTimeCut.h>

Inheritance diagram for CDClayerTimeCut:

Public Member Functions

 CDClayerTimeCut ()=default
 Default constructor.
 
 CDClayerTimeCut (boost::property_tree::ptree tree)
 Constructor using a boost::property_tree.
 
float getLayerTimeCut (int layer) const
 Return cut value for a given layer.
 
void dump () const
 Dump information.
 

Private Member Functions

 ClassDef (CDClayerTimeCut, 1)
 ClassDef.
 

Private Attributes

std::array< float, TrackFindingCDC::ISuperLayerUtil::c_Nm_maxDriftTimes = { -1, -1, -1, -1, -1, -1, -1, -1, -1}
 Cut for approximate drift time (super-layer dependent)
 

Detailed Description

Database object for timing offset (t0).

Definition at line 24 of file CDClayerTimeCut.h.

Constructor & Destructor Documentation

◆ CDClayerTimeCut()

CDClayerTimeCut ( boost::property_tree::ptree  tree)
inlineexplicit

Constructor using a boost::property_tree.

Definition at line 35 of file CDClayerTimeCut.h.

36 {
37 try {
38 int iLayer = 0;
39 for (auto& value : tree.get_child("LayerTimeCut")) {
40
41 m_maxDriftTimes[iLayer] = value.second.get_value<float>();
42 iLayer += 1;
44 B2FATAL("Cannot parse CDClayerTimeCut: too many layers");
45 }
46 }
47 } catch (boost::property_tree::ptree_error& e) {
48 // Any problem when parsing the tree?
49 B2FATAL("Cannot parse CDClayerTimeCut requirement information: " << e.what());
50 }
51
52
53 }
std::array< float, TrackFindingCDC::ISuperLayerUtil::c_N > m_maxDriftTimes
Cut for approximate drift time (super-layer dependent)
static const ISuperLayer c_N
Constant representing the total number of cdc superlayers.
Definition: ISuperLayer.h:56

Member Function Documentation

◆ dump()

void dump ( ) const
inline

Dump information.

Definition at line 66 of file CDClayerTimeCut.h.

67 {
68 std::cout << "Content of CDClayerTimeCut" << std::endl;
69 for (int iLayer = 0; iLayer < TrackFindingCDC::ISuperLayerUtil::c_N; iLayer++) {
70 std::cout << " Layer :" << iLayer << " Cut:" << getLayerTimeCut(iLayer) << std::endl;
71 }
72 }
float getLayerTimeCut(int layer) const
Return cut value for a given layer.

◆ getLayerTimeCut()

float getLayerTimeCut ( int  layer) const
inline

Return cut value for a given layer.

Definition at line 58 of file CDClayerTimeCut.h.

59 {
60 return m_maxDriftTimes[layer];
61 }

Member Data Documentation

◆ m_maxDriftTimes

std::array<float, TrackFindingCDC::ISuperLayerUtil::c_N> m_maxDriftTimes = { -1, -1, -1, -1, -1, -1, -1, -1, -1}
private

Cut for approximate drift time (super-layer dependent)

Definition at line 76 of file CDClayerTimeCut.h.


The documentation for this class was generated from the following file: