419 int nBinsX = diffHist->GetNbinsX();
420 int nBinsY = diffHist->GetNbinsY();
425 int maxBinStrip, centralBinStrip;
427 maxBinStrip = nBinsX;
433 double pAxisSymmetryValue = ps.
getParameter <
double>(
"axisSymmetryValue");
438 int upBinStrip = centralBinStrip;
439 int lowBinStrip = centralBinStrip;
442 if(nBinsX%2==0){lowBinStrip--;}
445 double* maxAvgs =
new double[maxBinStrip-upBinStrip+1];
447 for(
int i=0,
j=upBinStrip,
k=lowBinStrip;
j<=maxBinStrip;
i++,
j++,
k--) {
448 double avg1 =
getAvrg(diffHist,iTestName,pAxis,nBinsY,j,pAverageMode);
449 double avg2 =
getAvrg(diffHist,iTestName,pAxis,nBinsY,
k,pAverageMode);
458 vector<double> defaultMu0up;
459 defaultMu0up.push_back(13.7655);
460 defaultMu0up.push_back(184.742);
461 defaultMu0up.push_back(50735.3);
462 defaultMu0up.push_back(-97.6793);
464 TF1* tf =
new TF1(
"myFunc",
"[0]*(TMath::Log(x*[1]+[2]))+[3]",10.,11000.);
466 for(
unsigned int i=0;
i<params.size();
i++) {tf->SetParameter(
i,params[
i]);}
469 vector<double> defaultMu0low;
470 defaultMu0low.push_back(2.19664);
471 defaultMu0low.push_back(1.94546);
472 defaultMu0low.push_back(-99.3263);
473 defaultMu0low.push_back(19.388);
476 for(
unsigned int i=0;
i<params.size();
i++) {tf->SetParameter(
i,params[
i]);}
481 cout <<
"statsup= " << statsup <<
", statslow= " << statslow << endl;
484 enoughStats = TMath::MinElement(nActualStrips,maxAvgs)>
TMath::Max(statsup,statslow);
486 cout <<
"stats: " << TMath::MinElement(nActualStrips,maxAvgs) <<
", statsAvg: " << diffHist->GetEntries()/
hservice_->
getNBinsHistogram(iTestName) <<
", threshold: " <<
TMath::Max(statsup,statslow) << endl;
492 for(;upBinStrip<=maxBinStrip;upBinStrip++,lowBinStrip--) {
493 double avg =
getAvrg(diffHist, iTestName, pAxis, nBinsY, upBinStrip, pAverageMode);
494 compareWithStrip(diffHist,iTestName,lowBinStrip,nBinsY,pAxis,avg,ps,deadChannels);
496 avg =
getAvrg(diffHist, iTestName, pAxis, nBinsY, lowBinStrip, pAverageMode);
497 compareWithStrip(diffHist,iTestName,upBinStrip,nBinsY,pAxis,avg,ps,deadChannels);
504 int maxBinStrip, centralBinStrip;
506 maxBinStrip = nBinsY;
511 double pAxisSymmetryValue = ps.
getParameter<
double>(
"axisSymmetryValue");
517 int lowBinStrip = centralBinStrip, upBinStrip = centralBinStrip;
526 double* maxAvgs =
new double[maxBinStrip-upBinStrip+1];
527 int nActualStrips = 0;
528 for(
int i=0, j=upBinStrip,
k=lowBinStrip;j<=maxBinStrip;
i++,j++,
k--) {
529 double avg1 =
getAvrg(diffHist, iTestName, pAxis, nBinsX, j, pAverageMode);
530 double avg2 =
getAvrg(diffHist, iTestName, pAxis, nBinsX,
k, pAverageMode);
537 vector<double> defaultMu0up;
538 defaultMu0up.push_back(13.7655);
539 defaultMu0up.push_back(184.742);
540 defaultMu0up.push_back(50735.3);
541 defaultMu0up.push_back(-97.6793);
543 vector<double> params = ps.
getUntrackedParameter<std::vector<double> >(
"params_mu0_up",defaultMu0up);
544 TF1* tf =
new TF1(
"myFunc",
"[0]*(TMath::Log(x*[1]+[2]))+[3]",10.,11000.);
545 for(
unsigned int i=0;
i<params.size();
i++) {
546 tf->SetParameter(
i,params[
i]);
550 vector<double> defaultMu0low;
551 defaultMu0low.push_back(2.19664);
552 defaultMu0low.push_back(1.94546);
553 defaultMu0low.push_back(-99.3263);
554 defaultMu0low.push_back(19.388);
557 for(
unsigned int i=0;
i<params.size();
i++) {
558 tf->SetParameter(
i,params[
i]);
562 cout <<
"statsup= " << statsup <<
", statslow= " << statslow << endl;
564 enoughStats = TMath::MinElement(nActualStrips,maxAvgs)>
TMath::Max(statsup,statslow);
566 cout <<
"stats: " << TMath::MinElement(nActualStrips,maxAvgs) <<
", statsAvg: " << diffHist->GetEntries()/
hservice_->
getNBinsHistogram(iTestName) <<
", threshold: " <<
TMath::Max(statsup,statslow) << endl;
572 for(;upBinStrip<=maxBinStrip;upBinStrip++,lowBinStrip--) {
573 double avg =
getAvrg(diffHist, iTestName, pAxis, nBinsX, upBinStrip, pAverageMode);
574 compareWithStrip(diffHist,iTestName, lowBinStrip,nBinsX,pAxis,avg,ps,deadChannels);
576 avg =
getAvrg(diffHist, iTestName, pAxis, nBinsX, lowBinStrip, pAverageMode);
577 compareWithStrip(diffHist,iTestName, upBinStrip,nBinsX,pAxis,avg,ps,deadChannels);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void getBinCoordinateOnAxisWithValue(TH2F *h2f, double content, int &coord, int axis)
double getAvrg(TH2F *h2f, std::string test, int axis, int nBins, int binStrip, int avrgMode)
bool isStripMasked(std::string test, int binStrip, int axis)
unsigned int getNBinsHistogram(std::string test)
int compareWithStrip(TH2F *histo, std::string test, int binStrip, int nBins, int axis, double avg, const edm::ParameterSet &ps, std::vector< std::pair< int, double > > &deadChannels)
unsigned int getNBinsMasked(std::string test)
TH2F * getDifferentialHistogram(std::string test)
L1TOccupancyClientHistogramService * hservice_