ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetRecTools
TRT_ElectronPidTools
TRT_ElectronPidTools
BaseTRTPIDCalculator.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// TRT_ElectronPidTool.h, (c) ATLAS Detector software
8
9
#ifndef INDETTRT_BASETRTPIDCALCULATOR_H
10
#define INDETTRT_BASETRTPIDCALCULATOR_H
11
12
#include "
AthenaBaseComps/AthAlgTool.h
"
13
14
#include <vector>
15
#include <string>
16
17
namespace
InDet
18
{
19
class
BaseTRTPIDCalculator
{
20
public
:
21
//Class to encode those aspects of the ToT and HT calculator that they have in common
22
AthAlgTool
&
parent
;
23
const
char
*
my_name
;
24
int
BLOB_SIZE
;
25
unsigned
char
*
Blob
;
26
27
float
&
UpperLimit
;
28
float
&
LowerLimit
;
29
30
bool
HasBeenInitialized
;
31
32
static
const
int
SIZE_OF_HEADER
= 12;
33
34
// |
35
// | The following are all the major offsets from the blob start:
36
37
//versioning check constants
38
int
CurrentVersion
;
39
static
const
int
_Version
= 0;
40
static
const
int
_Day
= 1;
41
static
const
int
_Month
= 2;
42
static
const
int
_Year
= 3;
43
44
static
const
int
OFF_UpperLim
= 4;
45
static
const
int
OFF_LowerLim
= 8;
46
47
BaseTRTPIDCalculator
(
AthAlgTool
& p,
int
size
,
const
char
* name):
parent
(p),
48
my_name
(name),
49
BLOB_SIZE
(
size
),
50
Blob
(new unsigned char[
size
]),
51
UpperLimit
( * (reinterpret_cast<float*>(
Blob
+
OFF_UpperLim
) ) ),
52
LowerLimit
( * (reinterpret_cast<float*>(
Blob
+
OFF_LowerLim
) ) ),
53
HasBeenInitialized
(0)
54
{
55
CurrentVersion
= -1;
56
}
57
58
~BaseTRTPIDCalculator
(){
59
delete
[]
Blob
;
60
}
61
62
BaseTRTPIDCalculator
(
const
BaseTRTPIDCalculator
&) =
delete
;
63
BaseTRTPIDCalculator
&
operator=
(
const
BaseTRTPIDCalculator
&) =
delete
;
64
65
// set constants to hard coded defaults
66
virtual
void
setDefaultCalibrationConstants
()=0;
67
68
public
:
69
void
checkInitialization
();
70
71
// Fill the data blob from a given pointer
72
bool
FillBlob
(
const
unsigned
char
*);
73
74
// Limit the allowed PID value to lie between a lower and an upper limt
75
float
Limit
(
float
prob)
const
;
76
77
};
78
}
79
80
#endif
AthAlgTool.h
size
size_t size() const
Number of registered mappings.
AthAlgTool
Definition
AthAlgTool.h:26
InDet::BaseTRTPIDCalculator::~BaseTRTPIDCalculator
~BaseTRTPIDCalculator()
Definition
BaseTRTPIDCalculator.h:58
InDet::BaseTRTPIDCalculator::LowerLimit
float & LowerLimit
Definition
BaseTRTPIDCalculator.h:28
InDet::BaseTRTPIDCalculator::FillBlob
bool FillBlob(const unsigned char *)
Definition
BaseTRTPIDCalculator.cxx:29
InDet::BaseTRTPIDCalculator::Blob
unsigned char * Blob
Definition
BaseTRTPIDCalculator.h:25
InDet::BaseTRTPIDCalculator::operator=
BaseTRTPIDCalculator & operator=(const BaseTRTPIDCalculator &)=delete
InDet::BaseTRTPIDCalculator::CurrentVersion
int CurrentVersion
Definition
BaseTRTPIDCalculator.h:38
InDet::BaseTRTPIDCalculator::HasBeenInitialized
bool HasBeenInitialized
Definition
BaseTRTPIDCalculator.h:30
InDet::BaseTRTPIDCalculator::OFF_LowerLim
static const int OFF_LowerLim
Definition
BaseTRTPIDCalculator.h:45
InDet::BaseTRTPIDCalculator::setDefaultCalibrationConstants
virtual void setDefaultCalibrationConstants()=0
InDet::BaseTRTPIDCalculator::checkInitialization
void checkInitialization()
Definition
BaseTRTPIDCalculator.cxx:38
InDet::BaseTRTPIDCalculator::SIZE_OF_HEADER
static const int SIZE_OF_HEADER
Definition
BaseTRTPIDCalculator.h:32
InDet::BaseTRTPIDCalculator::BLOB_SIZE
int BLOB_SIZE
Definition
BaseTRTPIDCalculator.h:24
InDet::BaseTRTPIDCalculator::_Year
static const int _Year
Definition
BaseTRTPIDCalculator.h:42
InDet::BaseTRTPIDCalculator::parent
AthAlgTool & parent
Definition
BaseTRTPIDCalculator.h:22
InDet::BaseTRTPIDCalculator::OFF_UpperLim
static const int OFF_UpperLim
Definition
BaseTRTPIDCalculator.h:44
InDet::BaseTRTPIDCalculator::_Version
static const int _Version
Definition
BaseTRTPIDCalculator.h:39
InDet::BaseTRTPIDCalculator::_Day
static const int _Day
Definition
BaseTRTPIDCalculator.h:40
InDet::BaseTRTPIDCalculator::my_name
const char * my_name
Definition
BaseTRTPIDCalculator.h:23
InDet::BaseTRTPIDCalculator::BaseTRTPIDCalculator
BaseTRTPIDCalculator(AthAlgTool &p, int size, const char *name)
Definition
BaseTRTPIDCalculator.h:47
InDet::BaseTRTPIDCalculator::BaseTRTPIDCalculator
BaseTRTPIDCalculator(const BaseTRTPIDCalculator &)=delete
InDet::BaseTRTPIDCalculator::_Month
static const int _Month
Definition
BaseTRTPIDCalculator.h:41
InDet::BaseTRTPIDCalculator::UpperLimit
float & UpperLimit
Definition
BaseTRTPIDCalculator.h:27
InDet::BaseTRTPIDCalculator::Limit
float Limit(float prob) const
Definition
BaseTRTPIDCalculator.cxx:45
InDet
Primary Vertex Finder.
Definition
VP1ErrorUtils.h:36
Generated on
for ATLAS Offline Software by
1.17.0