Belle II Software
development
CDClayerTimeCut.h
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
#pragma once
9
10
#include <TObject.h>
11
#include "tracking/trackFindingCDC/topology/ISuperLayer.h"
12
#include <boost/property_tree/ptree.hpp>
13
#include <boost/property_tree/json_parser.hpp>
14
15
namespace
Belle2
{
20
24
class
CDClayerTimeCut
:
public
TObject {
25
public
:
26
30
CDClayerTimeCut
() =
default
;
31
35
explicit
CDClayerTimeCut
(boost::property_tree::ptree tree)
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;
43
if
(iLayer >
TrackFindingCDC::ISuperLayerUtil::c_N
) {
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
}
54
58
float
getLayerTimeCut
(
int
layer)
const
59
{
60
return
m_maxDriftTimes
[layer];
61
}
62
66
void
dump
()
const
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
}
73
74
private
:
76
std::array<float, TrackFindingCDC::ISuperLayerUtil::c_N>
m_maxDriftTimes
= { -1, -1, -1, -1, -1, -1, -1, -1, -1};
77
ClassDef
(
CDClayerTimeCut
, 1);
78
};
79
81
}
// end namespace Belle2
82
Belle2::CDClayerTimeCut::CDClayerTimeCut
CDClayerTimeCut(boost::property_tree::ptree tree)
Constructor using a boost::property_tree.
Definition
CDClayerTimeCut.h:35
Belle2::CDClayerTimeCut::ClassDef
ClassDef(CDClayerTimeCut, 1)
ClassDef.
Belle2::CDClayerTimeCut::m_maxDriftTimes
std::array< float, TrackFindingCDC::ISuperLayerUtil::c_N > m_maxDriftTimes
Cut for approximate drift time (super-layer dependent)
Definition
CDClayerTimeCut.h:76
Belle2::CDClayerTimeCut::CDClayerTimeCut
CDClayerTimeCut()=default
Default constructor.
Belle2::CDClayerTimeCut::dump
void dump() const
Dump information.
Definition
CDClayerTimeCut.h:66
Belle2::CDClayerTimeCut::getLayerTimeCut
float getLayerTimeCut(int layer) const
Return cut value for a given layer.
Definition
CDClayerTimeCut.h:58
Belle2
Abstract base class for different kinds of events.
Definition
MillepedeAlgorithm.h:17
Belle2::TrackFindingCDC::ISuperLayerUtil::c_N
static const ISuperLayer c_N
Constant representing the total number of cdc superlayers.
Definition
ISuperLayer.h:56
cdc
dbobjects
include
CDClayerTimeCut.h
Generated on Mon Sep 1 2025 02:48:11 for Belle II Software by
1.13.2