#include <CovarianceParameterization.h>
|
| CovarianceParameterization () |
|
bool | isValid () const |
|
void | load (int version) |
|
int | loadedVersion () const |
|
float | meanValue (int i, int j, int sign, float pt, float eta, int nHits, int pixelHits, float cii=1., float cjj=1.) const |
|
float | pack (float value, int schema, int i, int j, float pt, float eta, int nHits, int pixelHits, float cii=1., float cjj=1.) const |
|
float | unpack (uint16_t packed, int schema, int i, int j, float pt, float eta, int nHits, int pixelHits, float cii=1., float cjj=1.) const |
|
|
static int | index (int i, int j) |
|
|
void | addTheHistogram (std::vector< TH3D * > *HistoVector, std::string StringToAddInTheName, int i, int j, TFile &fileToRead) |
|
void | readFile (TFile &) |
|
CovarianceParameterization::CovarianceParameterization |
( |
| ) |
|
|
inline |
void CovarianceParameterization::addTheHistogram |
( |
std::vector< TH3D * > * |
HistoVector, |
|
|
std::string |
StringToAddInTheName, |
|
|
int |
i, |
|
|
int |
j, |
|
|
TFile & |
fileToRead |
|
) |
| |
|
private |
static int CovarianceParameterization::index |
( |
int |
i, |
|
|
int |
j |
|
) |
| |
|
inlinestatic |
bool CovarianceParameterization::isValid |
( |
void |
| ) |
const |
|
inline |
void CovarianceParameterization::load |
( |
int |
version | ) |
|
Definition at line 78 of file CovarianceParameterization.cc.
References GetRecoTauVFromDQM_MC_cff::cl, CompressionElement::CompressionElement(), printsummarytable::folder, dqm-mbProfile::format, edm::FileInPath::fullPath(), mps_fire::i, createfilelist::int, dqmiolumiharvest::j, dqmdumpme::k, crabWrapper::key, GetRecoTauVFromDQM_MC_cff::next, AlCaHLTBitMon_ParallelJobs::p, dtResolutionTest_cfi::readFile, str, AlCaHLTBitMon_QueryRunRegistry::string, and BeamSplash_cfg::version.
84 if (fileToRead.IsOpen()) {
87 TIter
next(((TDirectoryFile *)fileToRead.Get(
"schemas"))->GetListOfKeys());
89 while ((key = (TKey *)
next())) {
90 TClass *
cl = gROOT->GetClass(key->GetClassName());
91 if (!cl->InheritsFrom(
"TDirectoryFile"))
93 std::string schemaNumber = key->ReadObj()->GetName();
94 uint16_t schemaN = std::stoi(schemaNumber);
96 CompressionSchema schema;
97 for (
int i = 0;
i < 5;
i++) {
98 for (
int j =
i;
j < 5;
j++) {
103 std::vector<float> vParams;
104 TVector *
p = (TVector *)fileToRead.Get((folder +
"/param").c_str());
105 for (
int k = 0;
k < p->GetNoElements();
k++) {
106 vParams.push_back((*p)[
k]);
112 (
int)((TParameter<int> *)fileToRead.Get(bitString.c_str()))->GetVal(),
std::unordered_map< uint16_t, CompressionSchema > schemas
int CovarianceParameterization::loadedVersion |
( |
| ) |
const |
|
inline |
Definition at line 40 of file CovarianceParameterization.h.
References PVValHelper::eta, mps_fire::i, dqmiolumiharvest::j, svgfig::load(), CompressionElement::pack(), DiDispStaMuonMonitor_cfi::pt, dtResolutionTest_cfi::readFile, Validation_hcalonly_cfi::sign, AlCaHLTBitMon_QueryRunRegistry::string, CompressionElement::unpack(), and BeamSplash_cfg::version.
float CovarianceParameterization::meanValue |
( |
int |
i, |
|
|
int |
j, |
|
|
int |
sign, |
|
|
float |
pt, |
|
|
float |
eta, |
|
|
int |
nHits, |
|
|
int |
pixelHits, |
|
|
float |
cii = 1. , |
|
|
float |
cjj = 1. |
|
) |
| const |
Definition at line 147 of file CovarianceParameterization.cc.
References funct::abs(), muonRecoAnalyzer_cfi::etaBin, mps_fire::i, dqmiolumiharvest::j, and muonRecoAnalyzer_cfi::ptBin.
149 int hitNumberToUse = nHits;
150 if (hitNumberToUse < 2)
152 if (hitNumberToUse > 32)
165 int indexOfTheHitogramInTheList = ((9 - min_idx) * min_idx) / 2 + max_idx;
Abs< T >::type abs(const T &t)
std::vector< TH3D * > cov_elements_pixelHit
float meanValue(int i, int j, int sign, float pt, float eta, int nHits, int pixelHits, float cii=1., float cjj=1.) const
std::vector< TH3D * > cov_elements_noPixelHit
float CovarianceParameterization::pack |
( |
float |
value, |
|
|
int |
schema, |
|
|
int |
i, |
|
|
int |
j, |
|
|
float |
pt, |
|
|
float |
eta, |
|
|
int |
nHits, |
|
|
int |
pixelHits, |
|
|
float |
cii = 1. , |
|
|
float |
cjj = 1. |
|
) |
| const |
Definition at line 176 of file CovarianceParameterization.cc.
References DiDispStaMuonMonitor_cfi::pt, edm::second(), and std::swap().
Referenced by pat::PackedCandidate::packCovarianceElement().
184 if (schema == 0 &&
i ==
j && (
i == 2 ||
i == 0))
185 ref = 1. / (
pt *
pt);
U second(std::pair< T, U > const &p)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
float meanValue(int i, int j, int sign, float pt, float eta, int nHits, int pixelHits, float cii=1., float cjj=1.) const
std::unordered_map< uint16_t, CompressionSchema > schemas
void CovarianceParameterization::readFile |
( |
TFile & |
f | ) |
|
|
private |
float CovarianceParameterization::unpack |
( |
uint16_t |
packed, |
|
|
int |
schema, |
|
|
int |
i, |
|
|
int |
j, |
|
|
float |
pt, |
|
|
float |
eta, |
|
|
int |
nHits, |
|
|
int |
pixelHits, |
|
|
float |
cii = 1. , |
|
|
float |
cjj = 1. |
|
) |
| const |
Definition at line 192 of file CovarianceParameterization.cc.
References MillePedeFileConverter_cfg::e, DiDispStaMuonMonitor_cfi::pt, edm::second(), and std::swap().
Referenced by pat::PackedCandidate::unpackCovarianceElement().
201 if (schema == 0 &&
i ==
j && (
i == 2 ||
i == 0))
202 ref = 1. / (
pt *
pt);
U second(std::pair< T, U > const &p)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
float meanValue(int i, int j, int sign, float pt, float eta, int nHits, int pixelHits, float cii=1., float cjj=1.) const
std::unordered_map< uint16_t, CompressionSchema > schemas
std::vector<TH3D *> CovarianceParameterization::cov_elements_noPixelHit |
|
private |
std::vector<TH3D *> CovarianceParameterization::cov_elements_pixelHit |
|
private |
TFile* CovarianceParameterization::fileToRead_ |
|
private |
int CovarianceParameterization::loadedVersion_ |
|
private |