ATLAS Offline Software
Loading...
Searching...
No Matches
PixelRIO_OnTrackErrorScaling Class Referencefinal

#include <PixelRIO_OnTrackErrorScaling.h>

Inheritance diagram for PixelRIO_OnTrackErrorScaling:
Collaboration diagram for PixelRIO_OnTrackErrorScaling:

Public Types

enum  EPixelErrorScalingRegions {
  kPixBarrelPhi , kPixBarrelEta , kPixEndcapPhi , kPixEndcapEta ,
  kPixIBLPhi , kPixIBLEta , kNParamTypes
}
enum  Type {
  Pixel = 0 , SCT = 1 , TRT = 2 , MuonEtaPhi = 3 ,
  Unknown = 99
}

Public Member Functions

virtual CLID clid () const override final
Amg::MatrixX getScaledCovariance (Amg::MatrixX &&cov_input, const PixelID &pixel_id, const Identifier &id) const
virtual bool postProcess () override final
virtual Type type () const override final
std::vector< std::vector< double > > & params ()
const std::vector< std::vector< double > > & params () const

Static Public Member Functions

static const char *const * paramNames ()

Static Public Attributes

static constexpr RIO_OnTrackErrorScaling::Type s_type = RIO_OnTrackErrorScaling::Pixel

Protected Member Functions

void checkParameters (const char *label, unsigned int n_paramter_sets, const char *const *param_names, unsigned int n_paramters) const
 Convenience function to check whether the number of parameters is correct.

Static Protected Attributes

static const char *const s_names [kNParamTypes]

Private Attributes

std::vector< std::vector< double > > m_params

Detailed Description

Definition at line 11 of file PixelRIO_OnTrackErrorScaling.h.

Member Enumeration Documentation

◆ EPixelErrorScalingRegions

◆ Type

Enumerator
Pixel 
SCT 
TRT 
MuonEtaPhi 
Unknown 

Definition at line 16 of file RIO_OnTrackErrorScaling.h.

Member Function Documentation

◆ checkParameters()

void RIO_OnTrackErrorScaling::checkParameters ( const char * label,
unsigned int n_paramter_sets,
const char *const * param_names,
unsigned int n_paramters ) const
protectedinherited

Convenience function to check whether the number of parameters is correct.

Parameters
labela label for the error scaling class in case an error is issued.
n_paramter_setsthe number of parameter sets
param_namesthe names of the parameter sets
n_paramtersthe number of parameters per set.

Definition at line 14 of file RIO_OnTrackErrorScaling.cxx.

18{
19 if (params().size() != n_paramter_sets ) {
20 std::stringstream message;
21 message << label << ": Expecting parameters for 2 parameters for";
22 for (unsigned int idx=0; idx < n_paramter_sets; ++idx) {
23 message << " " << param_names[idx];
24 }
25 message << " But got " << params().size() << ".";
26 throw std::runtime_error( message.str() );
27 }
28 for (unsigned int idx=0; idx<params().size(); ++idx) {
29 if (params()[idx].size() != n_paramters) {
30 assert( idx < n_paramter_sets );
31 std::stringstream message;
32 message << label << ": Expected 2 parameters for " << param_names[idx] << " but got " << params()[idx].size()
33 << ".";
34 throw std::runtime_error( message.str() );
35 }
36 }
37}
std::vector< std::vector< double > > & params()
std::string label(const std::string &format, int i)
Definition label.h:19

◆ clid()

CLID PixelRIO_OnTrackErrorScaling::clid ( ) const
finaloverridevirtual

Reimplemented from RIO_OnTrackErrorScaling.

Definition at line 38 of file PixelRIO_OnTrackErrorScaling.cxx.

38 {
39 return ClassID_traits<CondCont<PixelRIO_OnTrackErrorScaling> >::ID();
40}
std::vector< Identifier > ID

◆ getScaledCovariance()

Amg::MatrixX PixelRIO_OnTrackErrorScaling::getScaledCovariance ( Amg::MatrixX && cov_input,
const PixelID & pixel_id,
const Identifier & id ) const

Definition at line 72 of file PixelRIO_OnTrackErrorScaling.cxx.

75{
76
77 Amg::MatrixX newCov = std::move(cov_input);
78
79 // from SiDetectorElement::isEndcap
80 bool is_endcap = !(pixel_id.is_barrel(id) || pixel_id.is_dbm(id));
81 unsigned int idx=kNParamTypes;
82
83 if (is_endcap) {
85 } else {
86
87 // from PixelDigitizationTool::getReadoutTech
88 int barrel_ec = pixel_id.barrel_ec(id);
89 bool is_ibl = abs(barrel_ec)==4 || pixel_id.eta_module_max(id)>6;
90 if (is_ibl) {
92 }
93 else {
95 }
96 }
97
98 // checked in postprocess
99 assert(params().size() > idx + 1);
100 assert(params()[idx].size() > 1 && params()[idx + 1].size() > 1);
101
102 scale2by2(newCov,params()[idx] /* phi */ ,params()[idx+1] /* eta */);
103 return newCov;
104}
bool is_dbm(const Identifier &id) const
Test for dbm - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for gene...
Definition PixelID.h:593
int eta_module_max(const Identifier &id) const
Definition PixelID.cxx:79
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition PixelID.h:600
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for g...
Definition PixelID.h:586
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.

◆ paramNames()

const char *const * PixelRIO_OnTrackErrorScaling::paramNames ( )
inlinestatic

Definition at line 32 of file PixelRIO_OnTrackErrorScaling.h.

32{ return s_names; }
static const char *const s_names[kNParamTypes]

◆ params() [1/2]

std::vector< std::vector< double > > & RIO_OnTrackErrorScaling::params ( )
inlineinherited

Definition at line 29 of file RIO_OnTrackErrorScaling.h.

29{ return m_params; }
std::vector< std::vector< double > > m_params

◆ params() [2/2]

const std::vector< std::vector< double > > & RIO_OnTrackErrorScaling::params ( ) const
inlineinherited

Definition at line 30 of file RIO_OnTrackErrorScaling.h.

30{ return m_params; }

◆ postProcess()

bool PixelRIO_OnTrackErrorScaling::postProcess ( )
finaloverridevirtual

Reimplemented from RIO_OnTrackErrorScaling.

Definition at line 42 of file PixelRIO_OnTrackErrorScaling.cxx.

42 {
43 if (params().size() != kPixIBLPhi && params().size() != kNParamTypes ) {
44 std::stringstream message;
45 message << " PixelRIO_OnTrackErrorScaling: Expecting parameters for";
46 {
47 unsigned int idx=0;
48 for (; idx < kPixIBLPhi; ++idx) {
49 message << " " << s_names[idx];
50 }
51 message << "(" << kPixIBLPhi << ")" << " and ";
52 for (; idx < kNParamTypes; ++idx) {
53 message << " " << s_names[idx];
54 }
55 message << "(" << kNParamTypes << ") for run2.";
56 }
57 message << " But got " << params().size() << ".";
58 throw std::runtime_error( message.str() );
59 }
60 for (unsigned int idx=0; idx <params().size(); ++idx) {
61 if (params()[idx].size()!=2 ) {
62 assert( idx < kNParamTypes);
63 std::stringstream message;
64 message << " PixelRIO_OnTrackErrorScaling: Expected 2 parameters for " << s_names[idx] << " but got " << params()[idx].size()
65 << ".";
66 throw std::runtime_error( message.str() );
67 }
68 }
69 return true;
70}

◆ type()

virtual Type PixelRIO_OnTrackErrorScaling::type ( ) const
inlinefinaloverridevirtual

Reimplemented from RIO_OnTrackErrorScaling.

Definition at line 35 of file PixelRIO_OnTrackErrorScaling.h.

35{return s_type;}
static constexpr RIO_OnTrackErrorScaling::Type s_type

Member Data Documentation

◆ m_params

std::vector<std::vector<double> > RIO_OnTrackErrorScaling::m_params
privateinherited

Definition at line 47 of file RIO_OnTrackErrorScaling.h.

◆ s_names

const char *const PixelRIO_OnTrackErrorScaling::s_names
staticprotected
Initial value:
={
"PixPhi Barrel",
"PixEta Barrel",
"PixPhi Endcap",
"PixEta Endcap",
"PixPhi IBL",
"PixEta IBL"
}

Definition at line 7 of file PixelRIO_OnTrackErrorScaling.h.

◆ s_type

RIO_OnTrackErrorScaling::Type PixelRIO_OnTrackErrorScaling::s_type = RIO_OnTrackErrorScaling::Pixel
staticconstexpr

Definition at line 14 of file PixelRIO_OnTrackErrorScaling.h.


The documentation for this class was generated from the following files: