310 if (
theData->getNumberOfSteps() != 0) {
389 float theTotalMB_TOT = 0.0;
390 float theTotalMB_SUP = 0.0;
391 float theTotalMB_SEN = 0.0;
392 float theTotalMB_CAB = 0.0;
393 float theTotalMB_COL = 0.0;
394 float theTotalMB_ELE = 0.0;
395 float theTotalMB_OTH = 0.0;
396 float theTotalMB_AIR = 0.0;
397 for (
int iStep = 0; iStep <
theData->getNumberOfSteps(); iStep++) {
398 theTotalMB_TOT +=
theData->getStepDmb(iStep);
399 theTotalMB_SUP +=
theData->getSupportDmb(iStep);
400 theTotalMB_SEN +=
theData->getSensitiveDmb(iStep);
401 theTotalMB_CAB +=
theData->getCablesDmb(iStep);
402 theTotalMB_COL +=
theData->getCoolingDmb(iStep);
403 theTotalMB_ELE +=
theData->getElectronicsDmb(iStep);
404 theTotalMB_OTH +=
theData->getOtherDmb(iStep);
405 theTotalMB_AIR +=
theData->getAirDmb(iStep);
414 if (
theData->getSupportDmb(iStep) > 0.) {
417 if (
theData->getSensitiveDmb(iStep) > 0.) {
420 if (
theData->getCablesDmb(iStep) > 0.) {
423 if (
theData->getCoolingDmb(iStep) > 0.) {
426 if (
theData->getElectronicsDmb(iStep) > 0.) {
429 if (
theData->getOtherDmb(iStep) > 0.) {
432 if (
theData->getAirDmb(iStep) > 0.) {
438 float deltaz =
theData->getStepFinalZ(iStep) -
theData->getStepInitialZ(iStep);
440 float x0 =
theData->getStepMaterialX0(iStep);
443 float boxWidth = 0.1;
444 if ((deltaRadius > boxWidth) || (fabs(deltaz) > boxWidth)) {
445 nSubStep =
static_cast<int>(
max(
ceil(deltaRadius / boxWidth / 2.) * 2,
ceil(fabs(deltaz) / boxWidth / 2.) * 2));
448 for (
int iSubStep = 1; iSubStep < nSubStep; iSubStep += 2) {
449 float subdeltaRadius = deltaRadius / nSubStep;
451 iSubStep * subdeltaRadius;
453 float subdeltaz = deltaz / nSubStep;
454 float z =
theData->getStepInitialZ(iStep) + iSubStep * subdeltaz;
456 float subdelta =
sqrt(
pow(subdeltaRadius, 2) +
pow(subdeltaz, 2));
458 float fillValue = subdelta /
x0;
462 hmgr->getHisto2(999)->Fill(
z, polarRadius, subdelta);
464 hmgr->getHisto1(41)->Fill(polarRadius);
465 hmgr->getHistoProf1(40)->Fill(polarRadius, theTotalMB_TOT);
466 hmgr->getHisto2(51)->Fill(
z, polarRadius);
467 hmgr->getHistoProf2(50)->Fill(
z, polarRadius, theTotalMB_TOT);
468 hmgr->getHisto2(61)->Fill(
z, polarRadius);
469 hmgr->getHisto2(60)->Fill(
z, polarRadius, fillValue);
471 hmgr->getHisto1(141)->Fill(polarRadius);
472 hmgr->getHistoProf1(140)->Fill(polarRadius, theTotalMB_SUP);
473 hmgr->getHisto2(151)->Fill(
z, polarRadius);
474 hmgr->getHistoProf2(150)->Fill(
z, polarRadius, theTotalMB_SUP);
475 hmgr->getHisto2(161)->Fill(
z, polarRadius);
476 hmgr->getHisto2(160)->Fill(
z, polarRadius, iSup * fillValue);
478 hmgr->getHisto1(241)->Fill(polarRadius);
479 hmgr->getHistoProf1(240)->Fill(polarRadius, theTotalMB_SEN);
480 hmgr->getHisto2(251)->Fill(
z, polarRadius);
481 hmgr->getHistoProf2(250)->Fill(
z, polarRadius, theTotalMB_SEN);
482 hmgr->getHisto2(261)->Fill(
z, polarRadius);
483 hmgr->getHisto2(260)->Fill(
z, polarRadius, iSen * fillValue);
485 hmgr->getHisto1(341)->Fill(polarRadius);
486 hmgr->getHistoProf1(340)->Fill(polarRadius, theTotalMB_CAB);
487 hmgr->getHisto2(351)->Fill(
z, polarRadius);
488 hmgr->getHistoProf2(350)->Fill(
z, polarRadius, theTotalMB_CAB);
489 hmgr->getHisto2(361)->Fill(
z, polarRadius);
490 hmgr->getHisto2(360)->Fill(
z, polarRadius, iCab * fillValue);
492 hmgr->getHisto1(441)->Fill(polarRadius);
493 hmgr->getHistoProf1(440)->Fill(polarRadius, theTotalMB_COL);
494 hmgr->getHisto2(451)->Fill(
z, polarRadius);
495 hmgr->getHistoProf2(450)->Fill(
z, polarRadius, theTotalMB_COL);
496 hmgr->getHisto2(461)->Fill(
z, polarRadius);
497 hmgr->getHisto2(460)->Fill(
z, polarRadius, iCol * fillValue);
499 hmgr->getHisto1(541)->Fill(polarRadius);
500 hmgr->getHistoProf1(540)->Fill(polarRadius, theTotalMB_ELE);
501 hmgr->getHisto2(551)->Fill(
z, polarRadius);
502 hmgr->getHistoProf2(550)->Fill(
z, polarRadius, theTotalMB_ELE);
503 hmgr->getHisto2(561)->Fill(
z, polarRadius);
504 hmgr->getHisto2(560)->Fill(
z, polarRadius, iEle * fillValue);
506 hmgr->getHisto1(641)->Fill(polarRadius);
507 hmgr->getHistoProf1(640)->Fill(polarRadius, theTotalMB_OTH);
508 hmgr->getHisto2(651)->Fill(
z, polarRadius);
509 hmgr->getHistoProf2(650)->Fill(
z, polarRadius, theTotalMB_OTH);
510 hmgr->getHisto2(661)->Fill(
z, polarRadius);
511 hmgr->getHisto2(660)->Fill(
z, polarRadius, iOth * fillValue);
513 hmgr->getHisto1(741)->Fill(polarRadius);
514 hmgr->getHistoProf1(740)->Fill(polarRadius, theTotalMB_AIR);
515 hmgr->getHisto2(751)->Fill(
z, polarRadius);
516 hmgr->getHistoProf2(750)->Fill(
z, polarRadius, theTotalMB_AIR);
517 hmgr->getHisto2(761)->Fill(
z, polarRadius);
518 hmgr->getHisto2(760)->Fill(
z, polarRadius, iAir * fillValue);
602 float theTotalIL_TOT = 0.0;
603 float theTotalIL_SUP = 0.0;
604 float theTotalIL_SEN = 0.0;
605 float theTotalIL_CAB = 0.0;
606 float theTotalIL_COL = 0.0;
607 float theTotalIL_ELE = 0.0;
608 float theTotalIL_OTH = 0.0;
609 float theTotalIL_AIR = 0.0;
610 for (
int iStep = 0; iStep <
theData->getNumberOfSteps(); iStep++) {
611 theTotalIL_TOT +=
theData->getStepDil(iStep);
612 theTotalIL_SUP +=
theData->getSupportDil(iStep);
613 theTotalIL_SEN +=
theData->getSensitiveDil(iStep);
614 theTotalIL_CAB +=
theData->getCablesDil(iStep);
615 theTotalIL_COL +=
theData->getCoolingDil(iStep);
616 theTotalIL_ELE +=
theData->getElectronicsDil(iStep);
617 theTotalIL_OTH +=
theData->getOtherDil(iStep);
618 theTotalIL_AIR +=
theData->getAirDil(iStep);
627 if (
theData->getSupportDil(iStep) > 0.) {
630 if (
theData->getSensitiveDil(iStep) > 0.) {
633 if (
theData->getCablesDil(iStep) > 0.) {
636 if (
theData->getCoolingDil(iStep) > 0.) {
639 if (
theData->getElectronicsDil(iStep) > 0.) {
642 if (
theData->getOtherDil(iStep) > 0.) {
645 if (
theData->getAirDil(iStep) > 0.) {
651 float deltaz =
theData->getStepFinalZ(iStep) -
theData->getStepInitialZ(iStep);
653 float il =
theData->getStepMaterialLambda0(iStep);
656 float boxWidth = 0.1;
657 if ((deltaRadius > boxWidth) || (fabs(deltaz) > boxWidth)) {
658 nSubStep =
static_cast<int>(
max(
ceil(deltaRadius / boxWidth / 2.) * 2,
ceil(fabs(deltaz) / boxWidth / 2.) * 2));
661 for (
int iSubStep = 1; iSubStep < nSubStep; iSubStep += 2) {
662 float subdeltaRadius = deltaRadius / nSubStep;
664 iSubStep * subdeltaRadius;
666 float subdeltaz = deltaz / nSubStep;
667 float z =
theData->getStepInitialZ(iStep) + iSubStep * subdeltaz;
669 float subdelta =
sqrt(
pow(subdeltaRadius, 2) +
pow(subdeltaz, 2));
671 float fillValue = subdelta / il;
675 hmgr->getHisto2(1999)->Fill(
z, polarRadius, subdelta);
677 hmgr->getHisto1(1041)->Fill(polarRadius);
678 hmgr->getHistoProf1(1040)->Fill(polarRadius, theTotalIL_TOT);
679 hmgr->getHisto2(1051)->Fill(
z, polarRadius);
680 hmgr->getHistoProf2(1050)->Fill(
z, polarRadius, theTotalIL_TOT);
681 hmgr->getHisto2(1061)->Fill(
z, polarRadius);
682 hmgr->getHisto2(1060)->Fill(
z, polarRadius, fillValue);
684 hmgr->getHisto1(1141)->Fill(polarRadius);
685 hmgr->getHistoProf1(1140)->Fill(polarRadius, theTotalIL_SUP);
686 hmgr->getHisto2(1151)->Fill(
z, polarRadius);
687 hmgr->getHistoProf2(1150)->Fill(
z, polarRadius, theTotalIL_SUP);
688 hmgr->getHisto2(1161)->Fill(
z, polarRadius);
689 hmgr->getHisto2(1160)->Fill(
z, polarRadius, iSup * fillValue);
691 hmgr->getHisto1(1241)->Fill(polarRadius);
692 hmgr->getHistoProf1(1240)->Fill(polarRadius, theTotalIL_SEN);
693 hmgr->getHisto2(1251)->Fill(
z, polarRadius);
694 hmgr->getHistoProf2(1250)->Fill(
z, polarRadius, theTotalIL_SEN);
695 hmgr->getHisto2(1261)->Fill(
z, polarRadius);
696 hmgr->getHisto2(1260)->Fill(
z, polarRadius, iSen * fillValue);
698 hmgr->getHisto1(1341)->Fill(polarRadius);
699 hmgr->getHistoProf1(1340)->Fill(polarRadius, theTotalIL_CAB);
700 hmgr->getHisto2(1351)->Fill(
z, polarRadius);
701 hmgr->getHistoProf2(1350)->Fill(
z, polarRadius, theTotalIL_CAB);
702 hmgr->getHisto2(1361)->Fill(
z, polarRadius);
703 hmgr->getHisto2(1360)->Fill(
z, polarRadius, iCab * fillValue);
705 hmgr->getHisto1(1441)->Fill(polarRadius);
706 hmgr->getHistoProf1(1440)->Fill(polarRadius, theTotalIL_COL);
707 hmgr->getHisto2(1451)->Fill(
z, polarRadius);
708 hmgr->getHistoProf2(1450)->Fill(
z, polarRadius, theTotalIL_COL);
709 hmgr->getHisto2(1461)->Fill(
z, polarRadius);
710 hmgr->getHisto2(1460)->Fill(
z, polarRadius, iCol * fillValue);
712 hmgr->getHisto1(1541)->Fill(polarRadius);
713 hmgr->getHistoProf1(1540)->Fill(polarRadius, theTotalIL_ELE);
714 hmgr->getHisto2(1551)->Fill(
z, polarRadius);
715 hmgr->getHistoProf2(1550)->Fill(
z, polarRadius, theTotalIL_ELE);
716 hmgr->getHisto2(1561)->Fill(
z, polarRadius);
717 hmgr->getHisto2(1560)->Fill(
z, polarRadius, iEle * fillValue);
719 hmgr->getHisto1(1641)->Fill(polarRadius);
720 hmgr->getHistoProf1(1640)->Fill(polarRadius, theTotalIL_OTH);
721 hmgr->getHisto2(1651)->Fill(
z, polarRadius);
722 hmgr->getHistoProf2(1650)->Fill(
z, polarRadius, theTotalIL_OTH);
723 hmgr->getHisto2(1661)->Fill(
z, polarRadius);
724 hmgr->getHisto2(1660)->Fill(
z, polarRadius, iOth * fillValue);
726 hmgr->getHisto1(1741)->Fill(polarRadius);
727 hmgr->getHistoProf1(1740)->Fill(polarRadius, theTotalIL_AIR);
728 hmgr->getHisto2(1751)->Fill(
z, polarRadius);
729 hmgr->getHistoProf2(1750)->Fill(
z, polarRadius, theTotalIL_AIR);
730 hmgr->getHisto2(1761)->Fill(
z, polarRadius);
731 hmgr->getHisto2(1760)->Fill(
z, polarRadius, iAir * fillValue);
738 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetTrackerHistos: This event is out of the acceptance:" 739 <<
"eta = " <<
theData->getEta() <<
"\t phi = " <<
theData->getPhi()
740 <<
"\t x/X0 = " <<
theData->getTotalMB() <<
"\t l/l0 = " <<
theData->getTotalIL()
741 <<
"\t steps = " <<
theData->getNumberOfSteps();
constexpr int32_t ceil(float num)
std::shared_ptr< TestHistoMgr > hmgr
const T & max(const T &a, const T &b)
Log< level::Warning, false > LogWarning
Power< A, B >::type pow(const A &a, const B &b)