#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 87 of file CovarianceParameterization.cc.
References GetRecoTauVFromDQM_MC_cff::cl, CompressionElement::CompressionElement(), printsummarytable::folder, cmsPerfStripChart::format, edm::FileInPath::fullPath(), mps_fire::i, createfilelist::int, gen::k, crabWrapper::key, GetRecoTauVFromDQM_MC_cff::next, AlCaHLTBitMon_ParallelJobs::p, dataDML::schema, dqmstorepb::protobuf_DQMServices_2fCore_2fsrc_2fROOTFilePB_2eproto::schemas, harvestTrackValidationPlots::str, AlCaHLTBitMon_QueryRunRegistry::string, and jetIDSelector_cfi::version.
93 if(fileToRead.IsOpen()) {
96 TIter
next(((TDirectoryFile*)fileToRead.Get(
"schemas"))->GetListOfKeys());
98 while ((key = (TKey*)
next())) {
99 TClass *
cl = gROOT->GetClass(key->GetClassName());
100 if (!cl->InheritsFrom(
"TDirectoryFile"))
continue;
101 std::string schemaNumber = key->ReadObj()->GetName();
102 uint16_t schemaN = std::stoi(schemaNumber);
105 for (
int i = 0;
i < 5;
i++) {
106 for (
int j =
i; j < 5; j++) {
111 std::vector<float> vParams ;
112 TVector *
p=(TVector*) fileToRead.Get((folder+
"/param").c_str());
113 for(
int k = 0 ;
k < p->GetNoElements() ;
k++){
114 vParams.push_back((*p)[
k]);
119 (
int) ((TParameter<int>*) fileToRead.Get(bitString.c_str()))->GetVal(), vParams);
format
Some error handling for the usage.
std::unordered_map< uint16_t, CompressionSchema > schemas
int CovarianceParameterization::loadedVersion |
( |
| ) |
const |
|
inline |
Definition at line 38 of file CovarianceParameterization.h.
References stringResolutionProvider_cfi::eta, mps_fire::i, svgfig::load(), CompressionElement::pack(), NuclearInteractionSecond_cff::pixelHits, EnergyCorrector::pt, dataDML::schema, Validation_hcalonly_cfi::sign, AlCaHLTBitMon_QueryRunRegistry::string, CompressionElement::unpack(), and jetIDSelector_cfi::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 162 of file CovarianceParameterization.cc.
References funct::abs(), conversionPostprocessing_cfi::etaBin, mps_fire::i, and electronConversionRejectionValidator::ptBin.
163 int hitNumberToUse = nHits;
164 if (hitNumberToUse < 2 ) hitNumberToUse = 2;
165 if (hitNumberToUse > 32 ) hitNumberToUse = 32;
177 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 190 of file CovarianceParameterization.cc.
References EnergyCorrector::pt, dqmstorepb::protobuf_DQMServices_2fCore_2fsrc_2fROOTFilePB_2eproto::schemas, edm::second(), and std::swap().
Referenced by pyrootRender.interactiveRender::draw(), and pat::PackedCandidate::packCovarianceElement().
U second(std::pair< T, U > const &p)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::unordered_map< uint16_t, CompressionSchema > schemas
float meanValue(int i, int j, int sign, float pt, float eta, int nHits, int pixelHits, float cii=1., float cjj=1.) const
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 203 of file CovarianceParameterization.cc.
References MillePedeFileConverter_cfg::e, EnergyCorrector::pt, dqmstorepb::protobuf_DQMServices_2fCore_2fsrc_2fROOTFilePB_2eproto::schemas, edm::second(), and std::swap().
Referenced by pat::PackedCandidate::unpackCovarianceElement().
U second(std::pair< T, U > const &p)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::unordered_map< uint16_t, CompressionSchema > schemas
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 *> CovarianceParameterization::cov_elements_noPixelHit |
|
private |
std::vector<TH3D *> CovarianceParameterization::cov_elements_pixelHit |
|
private |
TFile* CovarianceParameterization::fileToRead_ |
|
private |
int CovarianceParameterization::loadedVersion_ |
|
private |