5 TProfile *
p1 = (TProfile*) th2->ProfileX();
9 throw cms::Exception(
"MultiTrackValidator") <<
"Different number of bins!";
15 for (
unsigned int j=0;
j<vec.size();
j++){
25 for (
unsigned int j=0;
j<numerator.size();
j++){
26 if (denominator[
j]!=0){
28 value = ((double) numerator[
j])*1./((double) denominator[j]);
29 err =
sqrt( value*(1-value)/(
double) denominator[j] );
30 }
else if (type==
"fakerate"){
31 value = 1-((double) numerator[
j])*1./((double) denominator[j]);
32 err =
sqrt( value*(1-value)/(
double) denominator[j] );
33 }
else if (type==
"pileup"){
34 value = ((double) numerator[
j])*1./((double) denominator[j]);
35 err =
sqrt( value*(1+value)/(
double) denominator[j] );
51 TAxis *axis = h->GetXaxis();
52 int bins = axis->GetNbins();
54 float from = axis->GetXmin();
55 float to = axis->GetXmax();
56 float width = (to - from) / bins;
57 float *new_bins =
new float[bins + 1];
59 for (
int i = 0;
i <= bins;
i++) {
60 new_bins[
i] = TMath::Power(10, from +
i * width);
63 axis->Set(bins, new_bins);
void setBinContent(int binx, double content)
set content of bin (1-D)
void fillPlotFromVectors(MonitorElement *h, std::vector< int > &numerator, std::vector< int > &denominator, std::string type)
void doProfileX(TH2 *th2, MonitorElement *me)
void fillPlotFromVector(MonitorElement *h, std::vector< int > &vec)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
TProfile * getTProfile(void) const
int getNbinsX(void) const
get # of bins in X-axis