388 int nBinsX = diffHist->GetNbinsX();
389 int nBinsY = diffHist->GetNbinsY();
394 int maxBinStrip, centralBinStrip;
396 maxBinStrip = nBinsX;
402 double pAxisSymmetryValue = ps.
getParameter <
double>(
"axisSymmetryValue");
407 int upBinStrip = centralBinStrip;
408 int lowBinStrip = centralBinStrip;
411 if(nBinsX%2==0){lowBinStrip--;}
414 std::unique_ptr<double[]> maxAvgs(
new double[maxBinStrip-upBinStrip+1]);
417 for(
int i=0,
j=upBinStrip,
k=lowBinStrip;
j<=maxBinStrip;
i++,
j++,
k--) {
418 double avg1 =
getAvrg(diffHist,iTestName,pAxis,nBinsY,j,pAverageMode);
419 double avg2 =
getAvrg(diffHist,iTestName,pAxis,nBinsY,
k,pAverageMode);
428 vector<double> defaultMu0up;
429 defaultMu0up.push_back(13.7655);
430 defaultMu0up.push_back(184.742);
431 defaultMu0up.push_back(50735.3);
432 defaultMu0up.push_back(-97.6793);
434 TF1 tf(
"myFunc",
"[0]*(TMath::Log(x*[1]+[2]))+[3]",10.,11000.);
436 for(
unsigned int i=0;
i<params.size();
i++) {tf.SetParameter(
i,params[
i]);}
439 vector<double> defaultMu0low;
440 defaultMu0low.push_back(2.19664);
441 defaultMu0low.push_back(1.94546);
442 defaultMu0low.push_back(-99.3263);
443 defaultMu0low.push_back(19.388);
446 for(
unsigned int i=0;
i<params.size();
i++) {tf.SetParameter(
i,params[
i]);}
451 cout <<
"statsup= " << statsup <<
", statslow= " << statslow << endl;
454 enoughStats = TMath::MinElement(nActualStrips,maxAvgs.get())>
TMath::Max(statsup,statslow);
456 cout <<
"stats: " << TMath::MinElement(nActualStrips,maxAvgs.get()) <<
", statsAvg: " << diffHist->GetEntries()/
hservice_->
getNBinsHistogram(iTestName) <<
", threshold: " <<
TMath::Max(statsup,statslow) << endl;
462 for(;upBinStrip<=maxBinStrip;upBinStrip++,lowBinStrip--) {
463 double avg =
getAvrg(diffHist, iTestName, pAxis, nBinsY, upBinStrip, pAverageMode);
464 compareWithStrip(diffHist,iTestName,lowBinStrip,nBinsY,pAxis,avg,ps,deadChannels);
466 avg =
getAvrg(diffHist, iTestName, pAxis, nBinsY, lowBinStrip, pAverageMode);
467 compareWithStrip(diffHist,iTestName,upBinStrip,nBinsY,pAxis,avg,ps,deadChannels);
474 int maxBinStrip, centralBinStrip;
476 maxBinStrip = nBinsY;
481 double pAxisSymmetryValue = ps.
getParameter<
double>(
"axisSymmetryValue");
487 int lowBinStrip = centralBinStrip, upBinStrip = centralBinStrip;
496 std::unique_ptr<double[]> maxAvgs(
new double[maxBinStrip-upBinStrip+1]);
497 int nActualStrips = 0;
498 for(
int i=0, j=upBinStrip,
k=lowBinStrip;j<=maxBinStrip;
i++,j++,
k--) {
499 double avg1 =
getAvrg(diffHist, iTestName, pAxis, nBinsX, j, pAverageMode);
500 double avg2 =
getAvrg(diffHist, iTestName, pAxis, nBinsX,
k, pAverageMode);
507 vector<double> defaultMu0up;
508 defaultMu0up.push_back(13.7655);
509 defaultMu0up.push_back(184.742);
510 defaultMu0up.push_back(50735.3);
511 defaultMu0up.push_back(-97.6793);
513 vector<double> params = ps.
getUntrackedParameter<std::vector<double> >(
"params_mu0_up",defaultMu0up);
514 TF1 tf(
"myFunc",
"[0]*(TMath::Log(x*[1]+[2]))+[3]",10.,11000.);
515 for(
unsigned int i=0;
i<params.size();
i++) {
516 tf.SetParameter(
i,params[
i]);
520 vector<double> defaultMu0low;
521 defaultMu0low.push_back(2.19664);
522 defaultMu0low.push_back(1.94546);
523 defaultMu0low.push_back(-99.3263);
524 defaultMu0low.push_back(19.388);
527 for(
unsigned int i=0;
i<params.size();
i++) {
528 tf.SetParameter(
i,params[
i]);
532 cout <<
"statsup= " << statsup <<
", statslow= " << statslow << endl;
534 enoughStats = TMath::MinElement(nActualStrips,maxAvgs.get())>
TMath::Max(statsup,statslow);
536 cout <<
"stats: " << TMath::MinElement(nActualStrips,maxAvgs.get()) <<
", statsAvg: " << diffHist->GetEntries()/
hservice_->
getNBinsHistogram(iTestName) <<
", threshold: " <<
TMath::Max(statsup,statslow) << endl;
542 for(;upBinStrip<=maxBinStrip;upBinStrip++,lowBinStrip--) {
543 double avg =
getAvrg(diffHist, iTestName, pAxis, nBinsX, upBinStrip, pAverageMode);
544 compareWithStrip(diffHist,iTestName, lowBinStrip,nBinsX,pAxis,avg,ps,deadChannels);
546 avg =
getAvrg(diffHist, iTestName, pAxis, nBinsX, lowBinStrip, pAverageMode);
547 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_