ATLAS Offline Software
BaseTRTPIDCalculator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 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 
13 
14 #include <vector>
15 #include <string>
16 
17 namespace InDet
18 {
20  public:
21  //Class to encode those aspects of the ToT and HT calculator that they have in common
23  const char * my_name;
24  int BLOB_SIZE;
25  unsigned char * Blob;
26 
27  float & UpperLimit;
28  float & LowerLimit;
29 
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
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),
51  UpperLimit( * ((float*)( Blob + OFF_UpperLim) ) ),
52  LowerLimit( * ((float*)( Blob + OFF_LowerLim) ) ),
54  {
55  CurrentVersion = -1;
56  }
57 
59  delete [] Blob;
60  }
61 
64 
65  // set constants to hard coded defaults
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
InDet::BaseTRTPIDCalculator::BLOB_SIZE
int BLOB_SIZE
Definition: BaseTRTPIDCalculator.h:24
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
InDet::BaseTRTPIDCalculator::parent
AthAlgTool & parent
Definition: BaseTRTPIDCalculator.h:22
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
xAOD::char
char
Definition: TrigDecision_v1.cxx:38
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
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
InDet::BaseTRTPIDCalculator::_Day
static const int _Day
Definition: BaseTRTPIDCalculator.h:40
xAOD::unsigned
unsigned
Definition: RingSetConf_v1.cxx:662
InDet::BaseTRTPIDCalculator::OFF_LowerLim
static const int OFF_LowerLim
Definition: BaseTRTPIDCalculator.h:45
InDet::BaseTRTPIDCalculator::FillBlob
bool FillBlob(const unsigned char *)
Definition: BaseTRTPIDCalculator.cxx:29
InDet::BaseTRTPIDCalculator::BaseTRTPIDCalculator
BaseTRTPIDCalculator(const BaseTRTPIDCalculator &)=delete
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
InDet::BaseTRTPIDCalculator::OFF_UpperLim
static const int OFF_UpperLim
Definition: BaseTRTPIDCalculator.h:44
InDet::BaseTRTPIDCalculator::HasBeenInitialized
bool HasBeenInitialized
Definition: BaseTRTPIDCalculator.h:30
InDet::BaseTRTPIDCalculator::~BaseTRTPIDCalculator
~BaseTRTPIDCalculator()
Definition: BaseTRTPIDCalculator.h:58
InDet::BaseTRTPIDCalculator::CurrentVersion
int CurrentVersion
Definition: BaseTRTPIDCalculator.h:38
AthAlgTool.h
InDet::BaseTRTPIDCalculator::_Year
static const int _Year
Definition: BaseTRTPIDCalculator.h:42
InDet::BaseTRTPIDCalculator
Definition: BaseTRTPIDCalculator.h:19
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
InDet::BaseTRTPIDCalculator::my_name
const char * my_name
Definition: BaseTRTPIDCalculator.h:23
InDet::BaseTRTPIDCalculator::operator=
BaseTRTPIDCalculator & operator=(const BaseTRTPIDCalculator &)=delete
AthAlgTool
Definition: AthAlgTool.h:26
InDet::BaseTRTPIDCalculator::_Version
static const int _Version
Definition: BaseTRTPIDCalculator.h:39
InDet::BaseTRTPIDCalculator::checkInitialization
void checkInitialization()
Definition: BaseTRTPIDCalculator.cxx:38
InDet::BaseTRTPIDCalculator::LowerLimit
float & LowerLimit
Definition: BaseTRTPIDCalculator.h:28
readCCLHist.float
float
Definition: readCCLHist.py:83
InDet::BaseTRTPIDCalculator::SIZE_OF_HEADER
static const int SIZE_OF_HEADER
Definition: BaseTRTPIDCalculator.h:32
InDet::BaseTRTPIDCalculator::setDefaultCalibrationConstants
virtual void setDefaultCalibrationConstants()=0
InDet::BaseTRTPIDCalculator::_Month
static const int _Month
Definition: BaseTRTPIDCalculator.h:41
InDet::BaseTRTPIDCalculator::BaseTRTPIDCalculator
BaseTRTPIDCalculator(AthAlgTool &p, int size, const char *name)
Definition: BaseTRTPIDCalculator.h:47