ATLAS Offline Software
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
InDet::TRT_ElectronPidTool::ToTcalculator Class Reference

#include <TRT_ElectronPidTool_ToTcalculation.h>

Inheritance diagram for InDet::TRT_ElectronPidTool::ToTcalculator:
Collaboration diagram for InDet::TRT_ElectronPidTool::ToTcalculator:

Public Member Functions

 ToTcalculator (AthAlgTool &)
 
virtual ~ToTcalculator ()
 
void setDefaultCalibrationConstants ()
 
double GetToT (unsigned int bitpattern, double HitZ, double HitR, int BEC, int Layer, int Strawlayer)
 
double GetD (double R_track)
 
double GetElProb (double ToTbyD)
 
void checkInitialization ()
 
bool FillBlob (const unsigned char *)
 
float Limit (float prob) const
 
bool msgLvl (const MSG::Level lvl) const
 Test the output level. More...
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

Public Attributes

AthAlgToolparent
 
const char * my_name
 
int BLOB_SIZE
 
unsigned char * Blob
 
float & UpperLimit
 
float & LowerLimit
 
bool HasBeenInitialized
 
int CurrentVersion
 

Static Public Attributes

static const int my_CurrentVersion = 4
 
static const int _Version = 0
 
static const int _Day = 1
 
static const int _Month = 2
 
static const int _Year = 3
 
static const int OFF_UpperLim = 4
 
static const int OFF_LowerLim = 8
 

Private Member Functions

double ExtractToT (unsigned int bitpattern)
 
double correctToT (double ToT, double HitZ, double HitR, int BEC, int Layer, int Strawlayer)
 
double BarrelLongToTCorrection (double, double, const float *)
 
double BarrelShortToTCorrection (double, double, const float *)
 
double EndcapToTCorrection (double, double, const float *)
 
int resolveIndex (int BEC, int Layer, int Strawlayer)
 
void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

float * ToTCorrectionConstants
 
float * gausParametersElectron
 
float * gausParametersPion
 
float & parValBarrelLongNeg
 
float & parValBarrelLongPos
 
float & parValBarrelShortNeg
 
float & parValBarrelShortPos
 
std::string m_nm
 Message source name. More...
 
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels) More...
 
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer. More...
 
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level. More...
 
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging) More...
 

Static Private Attributes

static const int NparsBarrel = 3
 
static const int NparsEndcap = 4
 
static const int NparametrizedSectionsBarrel = 73
 
static const int NparametrizedSectionsEndcap = 14
 
static const int SIZE_OF_HEADER = 16
 
static const int SIZE_GAUS_PARS = 9 * sizeof(float)
 
static const int N_TOT_CONSTANTS
 
static const int SIZE_TOT_CONSTANTS = N_TOT_CONSTANTS * sizeof(float)
 
static const int SIZE_PAR_VAL = 4 * sizeof(float)
 
static const int OFF_GAUS_PARS_ELE = SIZE_OF_HEADER
 
static const int OFF_GAUS_PARS_PIO = OFF_GAUS_PARS_ELE + SIZE_GAUS_PARS
 
static const int OFF_TOT_CONSTANTS = OFF_GAUS_PARS_PIO + SIZE_GAUS_PARS
 
static const int OFF_PAR_VALS = OFF_TOT_CONSTANTS + SIZE_TOT_CONSTANTS
 
static const int PAR0 = 0
 
static const int PAR1 = 1
 
static const int PAR2 = 2
 
static const int PAR3 = 3
 

Detailed Description

Definition at line 21 of file TRT_ElectronPidTool_ToTcalculation.h.

Constructor & Destructor Documentation

◆ ToTcalculator()

InDet::TRT_ElectronPidTool::ToTcalculator::ToTcalculator ( AthAlgTool )

◆ ~ToTcalculator()

virtual InDet::TRT_ElectronPidTool::ToTcalculator::~ToTcalculator ( )
virtual

Member Function Documentation

◆ BarrelLongToTCorrection()

double InDet::TRT_ElectronPidTool::ToTcalculator::BarrelLongToTCorrection ( double  ,
double  ,
const float *   
)
private

◆ BarrelShortToTCorrection()

double InDet::TRT_ElectronPidTool::ToTcalculator::BarrelShortToTCorrection ( double  ,
double  ,
const float *   
)
private

◆ checkInitialization()

void InDet::BaseTRTPIDCalculator::checkInitialization ( )
inherited

Definition at line 38 of file BaseTRTPIDCalculator.cxx.

38  {
39  if( not HasBeenInitialized ) {
42  }
43 }

◆ correctToT()

double InDet::TRT_ElectronPidTool::ToTcalculator::correctToT ( double  ToT,
double  HitZ,
double  HitR,
int  BEC,
int  Layer,
int  Strawlayer 
)
private

◆ EndcapToTCorrection()

double InDet::TRT_ElectronPidTool::ToTcalculator::EndcapToTCorrection ( double  ,
double  ,
const float *   
)
private

◆ ExtractToT()

double InDet::TRT_ElectronPidTool::ToTcalculator::ExtractToT ( unsigned int  bitpattern)
private

◆ FillBlob()

bool InDet::BaseTRTPIDCalculator::FillBlob ( const unsigned char *  source)
inherited

Definition at line 29 of file BaseTRTPIDCalculator.cxx.

29  {
30  //Copy the Coral Blob into a local array
31  for(int i=0; i < BLOB_SIZE; i++){
32  Blob[i]=source[i];
33  }
35  return 1;
36 }

◆ GetD()

double InDet::TRT_ElectronPidTool::ToTcalculator::GetD ( double  R_track)

◆ GetElProb()

double InDet::TRT_ElectronPidTool::ToTcalculator::GetElProb ( double  ToTbyD)

◆ GetToT()

double InDet::TRT_ElectronPidTool::ToTcalculator::GetToT ( unsigned int  bitpattern,
double  HitZ,
double  HitR,
int  BEC,
int  Layer,
int  Strawlayer 
)

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40 {
42  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ Limit()

float InDet::BaseTRTPIDCalculator::Limit ( float  prob) const
inherited

Definition at line 45 of file BaseTRTPIDCalculator.cxx.

45  {
46  if( prob > UpperLimit ){
47  return UpperLimit;
48  }
49  if( prob < LowerLimit ){
50  return LowerLimit;
51  }
52 
53  return prob;
54 }

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 164 of file AthMessaging.h.

165 {
166  MsgStream* ms = m_msg_tls.get();
167  if (!ms) {
168  if (!m_initialized.test_and_set()) initMessaging();
169  ms = new MsgStream(m_imsg,m_nm);
170  m_msg_tls.reset( ms );
171  }
172 
173  ms->setLevel (m_lvl);
174  return *ms;
175 }

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level  lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 179 of file AthMessaging.h.

180 { return msg() << lvl; }

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152 {
153  if (!m_initialized.test_and_set()) initMessaging();
154  if (m_lvl <= lvl) {
155  msg() << lvl;
156  return true;
157  } else {
158  return false;
159  }
160 }

◆ resolveIndex()

int InDet::TRT_ElectronPidTool::ToTcalculator::resolveIndex ( int  BEC,
int  Layer,
int  Strawlayer 
)
private

◆ setDefaultCalibrationConstants()

void InDet::TRT_ElectronPidTool::ToTcalculator::setDefaultCalibrationConstants ( )
virtual

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level  lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29 {
30  m_lvl = lvl;
31 }

Member Data Documentation

◆ _Day

const int InDet::BaseTRTPIDCalculator::_Day = 1
staticinherited

Definition at line 40 of file BaseTRTPIDCalculator.h.

◆ _Month

const int InDet::BaseTRTPIDCalculator::_Month = 2
staticinherited

Definition at line 41 of file BaseTRTPIDCalculator.h.

◆ _Version

const int InDet::BaseTRTPIDCalculator::_Version = 0
staticinherited

Definition at line 39 of file BaseTRTPIDCalculator.h.

◆ _Year

const int InDet::BaseTRTPIDCalculator::_Year = 3
staticinherited

Definition at line 42 of file BaseTRTPIDCalculator.h.

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ Blob

unsigned char* InDet::BaseTRTPIDCalculator::Blob
inherited

Definition at line 25 of file BaseTRTPIDCalculator.h.

◆ BLOB_SIZE

int InDet::BaseTRTPIDCalculator::BLOB_SIZE
inherited

Definition at line 24 of file BaseTRTPIDCalculator.h.

◆ CurrentVersion

int InDet::BaseTRTPIDCalculator::CurrentVersion
inherited

Definition at line 38 of file BaseTRTPIDCalculator.h.

◆ gausParametersElectron

float* InDet::TRT_ElectronPidTool::ToTcalculator::gausParametersElectron
private

Definition at line 105 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ gausParametersPion

float* InDet::TRT_ElectronPidTool::ToTcalculator::gausParametersPion
private

Definition at line 106 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ HasBeenInitialized

bool InDet::BaseTRTPIDCalculator::HasBeenInitialized
inherited

Definition at line 30 of file BaseTRTPIDCalculator.h.

◆ LowerLimit

float& InDet::BaseTRTPIDCalculator::LowerLimit
inherited

Definition at line 28 of file BaseTRTPIDCalculator.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ my_CurrentVersion

const int InDet::TRT_ElectronPidTool::ToTcalculator::my_CurrentVersion = 4
static

Definition at line 25 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ my_name

const char* InDet::BaseTRTPIDCalculator::my_name
inherited

Definition at line 23 of file BaseTRTPIDCalculator.h.

◆ N_TOT_CONSTANTS

const int InDet::TRT_ElectronPidTool::ToTcalculator::N_TOT_CONSTANTS
staticprivate

◆ NparametrizedSectionsBarrel

const int InDet::TRT_ElectronPidTool::ToTcalculator::NparametrizedSectionsBarrel = 73
staticprivate

Definition at line 73 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ NparametrizedSectionsEndcap

const int InDet::TRT_ElectronPidTool::ToTcalculator::NparametrizedSectionsEndcap = 14
staticprivate

Definition at line 74 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ NparsBarrel

const int InDet::TRT_ElectronPidTool::ToTcalculator::NparsBarrel = 3
staticprivate

Definition at line 70 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ NparsEndcap

const int InDet::TRT_ElectronPidTool::ToTcalculator::NparsEndcap = 4
staticprivate

Definition at line 71 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ OFF_GAUS_PARS_ELE

const int InDet::TRT_ElectronPidTool::ToTcalculator::OFF_GAUS_PARS_ELE = SIZE_OF_HEADER
staticprivate

Definition at line 84 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ OFF_GAUS_PARS_PIO

const int InDet::TRT_ElectronPidTool::ToTcalculator::OFF_GAUS_PARS_PIO = OFF_GAUS_PARS_ELE + SIZE_GAUS_PARS
staticprivate

Definition at line 85 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ OFF_LowerLim

const int InDet::BaseTRTPIDCalculator::OFF_LowerLim = 8
staticinherited

Definition at line 45 of file BaseTRTPIDCalculator.h.

◆ OFF_PAR_VALS

const int InDet::TRT_ElectronPidTool::ToTcalculator::OFF_PAR_VALS = OFF_TOT_CONSTANTS + SIZE_TOT_CONSTANTS
staticprivate

Definition at line 87 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ OFF_TOT_CONSTANTS

const int InDet::TRT_ElectronPidTool::ToTcalculator::OFF_TOT_CONSTANTS = OFF_GAUS_PARS_PIO + SIZE_GAUS_PARS
staticprivate

Definition at line 86 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ OFF_UpperLim

const int InDet::BaseTRTPIDCalculator::OFF_UpperLim = 4
staticinherited

Definition at line 44 of file BaseTRTPIDCalculator.h.

◆ PAR0

const int InDet::TRT_ElectronPidTool::ToTcalculator::PAR0 = 0
staticprivate

Definition at line 90 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ PAR1

const int InDet::TRT_ElectronPidTool::ToTcalculator::PAR1 = 1
staticprivate

Definition at line 91 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ PAR2

const int InDet::TRT_ElectronPidTool::ToTcalculator::PAR2 = 2
staticprivate

Definition at line 92 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ PAR3

const int InDet::TRT_ElectronPidTool::ToTcalculator::PAR3 = 3
staticprivate

Definition at line 93 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ parent

AthAlgTool& InDet::BaseTRTPIDCalculator::parent
inherited

Definition at line 22 of file BaseTRTPIDCalculator.h.

◆ parValBarrelLongNeg

float& InDet::TRT_ElectronPidTool::ToTcalculator::parValBarrelLongNeg
private

Definition at line 110 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ parValBarrelLongPos

float& InDet::TRT_ElectronPidTool::ToTcalculator::parValBarrelLongPos
private

Definition at line 111 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ parValBarrelShortNeg

float& InDet::TRT_ElectronPidTool::ToTcalculator::parValBarrelShortNeg
private

Definition at line 112 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ parValBarrelShortPos

float& InDet::TRT_ElectronPidTool::ToTcalculator::parValBarrelShortPos
private

Definition at line 113 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ SIZE_GAUS_PARS

const int InDet::TRT_ElectronPidTool::ToTcalculator::SIZE_GAUS_PARS = 9 * sizeof(float)
staticprivate

Definition at line 77 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ SIZE_OF_HEADER

const int InDet::TRT_ElectronPidTool::ToTcalculator::SIZE_OF_HEADER = 16
staticprivate

Definition at line 76 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ SIZE_PAR_VAL

const int InDet::TRT_ElectronPidTool::ToTcalculator::SIZE_PAR_VAL = 4 * sizeof(float)
staticprivate

Definition at line 82 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ SIZE_TOT_CONSTANTS

const int InDet::TRT_ElectronPidTool::ToTcalculator::SIZE_TOT_CONSTANTS = N_TOT_CONSTANTS * sizeof(float)
staticprivate

Definition at line 80 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ ToTCorrectionConstants

float* InDet::TRT_ElectronPidTool::ToTcalculator::ToTCorrectionConstants
private

Definition at line 103 of file TRT_ElectronPidTool_ToTcalculation.h.

◆ UpperLimit

float& InDet::BaseTRTPIDCalculator::UpperLimit
inherited

Definition at line 27 of file BaseTRTPIDCalculator.h.


The documentation for this class was generated from the following file:
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
InDet::TRT_ElectronPidTool::ToTcalculator::NparsBarrel
static const int NparsBarrel
Definition: TRT_ElectronPidTool_ToTcalculation.h:70
InDet::BaseTRTPIDCalculator::BLOB_SIZE
int BLOB_SIZE
Definition: BaseTRTPIDCalculator.h:24
InDet::TRT_ElectronPidTool::ToTcalculator::NparsEndcap
static const int NparsEndcap
Definition: TRT_ElectronPidTool_ToTcalculation.h:71
InDet::TRT_ElectronPidTool::ToTcalculator::NparametrizedSectionsEndcap
static const int NparametrizedSectionsEndcap
Definition: TRT_ElectronPidTool_ToTcalculation.h:74
InDet::BaseTRTPIDCalculator::Blob
unsigned char * Blob
Definition: BaseTRTPIDCalculator.h:25
InDet::BaseTRTPIDCalculator::UpperLimit
float & UpperLimit
Definition: BaseTRTPIDCalculator.h:27
covarianceTool.prob
prob
Definition: covarianceTool.py:678
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
InDet::BaseTRTPIDCalculator::HasBeenInitialized
bool HasBeenInitialized
Definition: BaseTRTPIDCalculator.h:30
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
lumiFormat.i
int i
Definition: lumiFormat.py:85
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
InDet::TRT_ElectronPidTool::ToTcalculator::NparametrizedSectionsBarrel
static const int NparametrizedSectionsBarrel
Definition: TRT_ElectronPidTool_ToTcalculation.h:73
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
copySelective.source
string source
Definition: copySelective.py:32
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
AthMessaging::m_msg_tls
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
Definition: AthMessaging.h:132
InDet::BaseTRTPIDCalculator::LowerLimit
float & LowerLimit
Definition: BaseTRTPIDCalculator.h:28
InDet::BaseTRTPIDCalculator::setDefaultCalibrationConstants
virtual void setDefaultCalibrationConstants()=0