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 double* maxAvgs =
new double[maxBinStrip-upBinStrip+1];
416 for(
int i=0,
j=upBinStrip,
k=lowBinStrip;
j<=maxBinStrip;
i++,
j++,
k--) {
417 double avg1 =
getAvrg(diffHist,iTestName,pAxis,nBinsY,j,pAverageMode);
418 double avg2 =
getAvrg(diffHist,iTestName,pAxis,nBinsY,
k,pAverageMode);
427 vector<double> defaultMu0up;
428 defaultMu0up.push_back(13.7655);
429 defaultMu0up.push_back(184.742);
430 defaultMu0up.push_back(50735.3);
431 defaultMu0up.push_back(-97.6793);
433 TF1* tf =
new TF1(
"myFunc",
"[0]*(TMath::Log(x*[1]+[2]))+[3]",10.,11000.);
435 for(
unsigned int i=0;
i<params.size();
i++) {tf->SetParameter(
i,params[
i]);}
438 vector<double> defaultMu0low;
439 defaultMu0low.push_back(2.19664);
440 defaultMu0low.push_back(1.94546);
441 defaultMu0low.push_back(-99.3263);
442 defaultMu0low.push_back(19.388);
445 for(
unsigned int i=0;
i<params.size();
i++) {tf->SetParameter(
i,params[
i]);}
450 cout <<
"statsup= " << statsup <<
", statslow= " << statslow << endl;
453 enoughStats = TMath::MinElement(nActualStrips,maxAvgs)>
TMath::Max(statsup,statslow);
455 cout <<
"stats: " << TMath::MinElement(nActualStrips,maxAvgs) <<
", statsAvg: " << diffHist->GetEntries()/
hservice_->
getNBinsHistogram(iTestName) <<
", threshold: " <<
TMath::Max(statsup,statslow) << endl;
461 for(;upBinStrip<=maxBinStrip;upBinStrip++,lowBinStrip--) {
462 double avg =
getAvrg(diffHist, iTestName, pAxis, nBinsY, upBinStrip, pAverageMode);
463 compareWithStrip(diffHist,iTestName,lowBinStrip,nBinsY,pAxis,avg,ps,deadChannels);
465 avg =
getAvrg(diffHist, iTestName, pAxis, nBinsY, lowBinStrip, pAverageMode);
466 compareWithStrip(diffHist,iTestName,upBinStrip,nBinsY,pAxis,avg,ps,deadChannels);
473 int maxBinStrip, centralBinStrip;
475 maxBinStrip = nBinsY;
480 double pAxisSymmetryValue = ps.
getParameter<
double>(
"axisSymmetryValue");
486 int lowBinStrip = centralBinStrip, upBinStrip = centralBinStrip;
495 double* maxAvgs =
new double[maxBinStrip-upBinStrip+1];
496 int nActualStrips = 0;
497 for(
int i=0, j=upBinStrip,
k=lowBinStrip;j<=maxBinStrip;
i++,j++,
k--) {
498 double avg1 =
getAvrg(diffHist, iTestName, pAxis, nBinsX, j, pAverageMode);
499 double avg2 =
getAvrg(diffHist, iTestName, pAxis, nBinsX,
k, pAverageMode);
506 vector<double> defaultMu0up;
507 defaultMu0up.push_back(13.7655);
508 defaultMu0up.push_back(184.742);
509 defaultMu0up.push_back(50735.3);
510 defaultMu0up.push_back(-97.6793);
512 vector<double> params = ps.
getUntrackedParameter<std::vector<double> >(
"params_mu0_up",defaultMu0up);
513 TF1* tf =
new TF1(
"myFunc",
"[0]*(TMath::Log(x*[1]+[2]))+[3]",10.,11000.);
514 for(
unsigned int i=0;
i<params.size();
i++) {
515 tf->SetParameter(
i,params[
i]);
519 vector<double> defaultMu0low;
520 defaultMu0low.push_back(2.19664);
521 defaultMu0low.push_back(1.94546);
522 defaultMu0low.push_back(-99.3263);
523 defaultMu0low.push_back(19.388);
526 for(
unsigned int i=0;
i<params.size();
i++) {
527 tf->SetParameter(
i,params[
i]);
531 cout <<
"statsup= " << statsup <<
", statslow= " << statslow << endl;
533 enoughStats = TMath::MinElement(nActualStrips,maxAvgs)>
TMath::Max(statsup,statslow);
535 cout <<
"stats: " << TMath::MinElement(nActualStrips,maxAvgs) <<
", statsAvg: " << diffHist->GetEntries()/
hservice_->
getNBinsHistogram(iTestName) <<
", threshold: " <<
TMath::Max(statsup,statslow) << endl;
541 for(;upBinStrip<=maxBinStrip;upBinStrip++,lowBinStrip--) {
542 double avg =
getAvrg(diffHist, iTestName, pAxis, nBinsX, upBinStrip, pAverageMode);
543 compareWithStrip(diffHist,iTestName, lowBinStrip,nBinsX,pAxis,avg,ps,deadChannels);
545 avg =
getAvrg(diffHist, iTestName, pAxis, nBinsX, lowBinStrip, pAverageMode);
546 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_