1 #ifndef ALIGNMENT_OFFLINEVALIDATION_PVVALIDATIONHELPER_H 2 #define ALIGNMENT_OFFLINEVALIDATION_PVVALIDATIONHELPER_H 11 #ifndef PLOTTING_MACRO 13 #define COUT edm::LogWarning("PVValidationHelpers") 16 #define COUT std::cout << "PVValidationHelpers: " 29 template <
typename T,
size_t N>
31 const T minLog10 = std::log10(
min);
32 const T maxLog10 = std::log10(
max);
33 const T width = (maxLog10 - minLog10) /
N;
34 std::array<T, N + 1>
ret;
37 for (
size_t i = 1;
i <=
N; ++
i) {
87 std::map<std::pair<residualType, plotVariable>, std::pair<float, float>>
range;
88 std::map<plotVariable, std::vector<float>>
trendbins;
99 COUT <<
"Trying to get range for non-existent combination " << std::endl;
100 return std::make_pair(0., 0.);
108 COUT <<
"Trying to get low end of range for non-existent combination " << std::endl;
117 COUT <<
"Trying get high end of range for non-existent combination " << std::endl;
123 typedef std::tuple<std::string, std::string, std::string>
plotLabels;
127 void add(std::map<std::string, TH1*>&
h, TH1*
hist);
131 void fill(std::map<std::string, TH1*>&
h,
const std::string&
s,
double x,
double y);
Measurement1D getMedian(TH1F *histo)
std::pair< Measurement1D, Measurement1D > fitResiduals(TH1 *hist)
ret
prodAgent to be discontinued
std::vector< float > generateBins(int n, float start, float range)
std::map< std::pair< residualType, plotVariable >, std::pair< float, float > > range
constexpr double max_eta_phase2
Measurement1D getMAD(TH1F *histo)
plotLabels getVarString(plotVariable var)
std::map< plotVariable, std::vector< float > > trendbins
constexpr double max_eta_phase1
float getHigh(residualType type, plotVariable plot)
float getLow(residualType type, plotVariable plot)
void fill(std::map< std::string, TH1 *> &h, const std::string &s, double x)
void setMap(residualType type, plotVariable plot, float low, float high)
void shrinkHistVectorToFit(std::vector< TH1F *> &h, unsigned int desired_size)
plotLabels getTypeString(residualType type)
std::array< T, N+1 > makeLogBins(const T &min, const T &max)
constexpr double max_eta_phase0
void add(std::map< std::string, TH1 *> &h, TH1 *hist)
std::pair< float, float > getRange(residualType type, plotVariable plot)
std::tuple< std::string, std::string, std::string > plotLabels
void fillByIndex(std::vector< TH1F *> &h, unsigned int index, double x, std::string tag="")
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.