ATLAS Offline Software
InnerDetector
InDetRecTools
TRT_ElectronPidTools
src
BaseTRTPIDCalculator.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// BaseTRTPIDCalculator.cxx, (c) ATLAS Detector software
8
9
10
#include "
TRT_ElectronPidTools/BaseTRTPIDCalculator.h
"
11
12
// StoreGate, Athena, and Database stuff:
13
#include "Identifier/Identifier.h"
14
#include "
AthenaPoolUtilities/CondAttrListCollection.h
"
15
#include "
AthenaPoolUtilities/AthenaAttributeList.h
"
16
#include "CoralBase/AttributeListSpecification.h"
17
#include "CoralBase/Blob.h"
18
19
// Math functions:
20
#include <cmath>
21
22
/**************************************************************************** \
23
|*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*|
24
|*%%% BaseTRTPIDCalculator class %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*|
25
|*%%% common funtionality of the other two Calculator classes %%%%%%%%%%%%%*|
26
|*%%% is implemented here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*|
27
|*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*|
28
\*****************************************************************************/
29
bool
InDet::BaseTRTPIDCalculator::FillBlob
(
const
unsigned
char
*
source
){
30
//Copy the Coral Blob into a local array
31
for
(
int
i
=0;
i
<
BLOB_SIZE
;
i
++){
32
Blob
[
i
]=
source
[
i
];
33
}
34
HasBeenInitialized
=1;
35
return
1;
36
}
37
38
void
InDet::BaseTRTPIDCalculator::checkInitialization
(){
39
if
( not
HasBeenInitialized
) {
40
setDefaultCalibrationConstants
();
41
HasBeenInitialized
=1;
42
}
43
}
44
45
float
InDet::BaseTRTPIDCalculator::Limit
(
float
prob
)
const
{
46
if
(
prob
>
UpperLimit
){
47
return
UpperLimit
;
48
}
49
if
(
prob
<
LowerLimit
){
50
return
LowerLimit
;
51
}
52
53
return
prob
;
54
}
55
InDet::BaseTRTPIDCalculator::BLOB_SIZE
int BLOB_SIZE
Definition:
BaseTRTPIDCalculator.h:24
CondAttrListCollection.h
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
InDet::BaseTRTPIDCalculator::Blob
unsigned char * Blob
Definition:
BaseTRTPIDCalculator.h:25
InDet::BaseTRTPIDCalculator::Limit
float Limit(float prob) const
Definition:
BaseTRTPIDCalculator.cxx:45
InDet::BaseTRTPIDCalculator::UpperLimit
float & UpperLimit
Definition:
BaseTRTPIDCalculator.h:27
covarianceTool.prob
prob
Definition:
covarianceTool.py:678
AthenaAttributeList.h
InDet::BaseTRTPIDCalculator::FillBlob
bool FillBlob(const unsigned char *)
Definition:
BaseTRTPIDCalculator.cxx:29
InDet::BaseTRTPIDCalculator::HasBeenInitialized
bool HasBeenInitialized
Definition:
BaseTRTPIDCalculator.h:30
lumiFormat.i
int i
Definition:
lumiFormat.py:85
BaseTRTPIDCalculator.h
copySelective.source
string source
Definition:
copySelective.py:32
InDet::BaseTRTPIDCalculator::checkInitialization
void checkInitialization()
Definition:
BaseTRTPIDCalculator.cxx:38
InDet::BaseTRTPIDCalculator::LowerLimit
float & LowerLimit
Definition:
BaseTRTPIDCalculator.h:28
InDet::BaseTRTPIDCalculator::setDefaultCalibrationConstants
virtual void setDefaultCalibrationConstants()=0
Generated on Sun Dec 22 2024 21:07:23 for ATLAS Offline Software by
1.8.18