1 #ifndef ALIGNMENT_OFFLINEVALIDATION_PVVALIDATIONHELPER_H 2 #define ALIGNMENT_OFFLINEVALIDATION_PVVALIDATIONHELPER_H 60 std::map<std::pair<residualType,plotVariable>,std::pair<float,float>>
range;
61 std::map<plotVariable,std::vector<float> >
trendbins;
65 range[std::make_pair(type,plot)] = std::make_pair(low,high);
69 if (range.find(std::make_pair(type,plot)) != range.end()) {
70 return range[std::make_pair(type,plot)];
72 edm::LogWarning(
"PVValidationHelpers") <<
"Trying to get range for non-existent combination "<< std::endl;
73 return std::make_pair(0.,0.);
78 if (range.find(std::make_pair(type,plot)) != range.end()) {
79 return range[std::make_pair(type,plot)].first;
81 edm::LogWarning(
"PVValidationHelpers") <<
"Trying to get low end of range for non-existent combination "<< std::endl;
87 if (range.find(std::make_pair(type,plot)) != range.end()) {
88 return range[std::make_pair(type,plot)].second;
90 edm::LogWarning(
"PVValidationHelpers") <<
"Trying get high end of range for non-existent combination "<< std::endl;
96 typedef std::tuple<std::string,std::string,std::string>
plotLabels;
100 void add(std::map<std::string,TH1*>&
h, TH1*
hist);
104 void fill(std::map<std::string, TH1*>&
h,
const std::string&
s,
double x,
double y);
Measurement1D getMedian(TH1F *histo)
void fillByIndex(std::vector< TH1F * > &h, unsigned int index, double x, std::string tag="")
std::tuple< std::string, std::string, std::string > plotLabels
std::pair< Measurement1D, Measurement1D > fitResiduals(TH1 *hist)
std::vector< float > generateBins(int n, float start, float range)
Measurement1D getMAD(TH1F *histo)
plotLabels getVarString(plotVariable var)
float getHigh(residualType type, plotVariable plot)
float getLow(residualType type, plotVariable plot)
std::map< plotVariable, std::vector< float > > trendbins
void setMap(residualType type, plotVariable plot, float low, float high)
std::map< std::pair< residualType, plotVariable >, std::pair< float, float > > range
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
plotLabels getTypeString(residualType type)
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
void shrinkHistVectorToFit(std::vector< TH1F * > &h, unsigned int desired_size)
std::pair< float, float > getRange(residualType type, plotVariable plot)