CMS 3D CMS Logo

Functions
PFEnergyCalibration.cc File Reference
#include "RecoParticleFlow/PFClusterTools/interface/PFEnergyCalibration.h"
#include "CondFormats/PhysicsToolsObjects/interface/PerformancePayloadFromTFormula.h"
#include "CondFormats/ESObjects/interface/ESEEIntercalibConstants.h"
#include <TMath.h>
#include <cmath>
#include <vector>
#include <map>
#include <algorithm>
#include <numeric>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &out, const PFEnergyCalibration &calib)
 

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  out,
const PFEnergyCalibration calib 
)

Definition at line 534 of file PFEnergyCalibration.cc.

References gather_cfg::cout, EcalMonitorTask_cff::func, functType, MillePedeFileConverter_cfg::out, PerformanceResult::PFfa_BARREL, PerformanceResult::PFfa_ENDCAP, PerformanceResult::PFfaEta_BARRELEH, PerformanceResult::PFfaEta_BARRELH, PerformanceResult::PFfaEta_ENDCAPEH, PerformanceResult::PFfaEta_ENDCAPH, PerformanceResult::PFfb_BARREL, PerformanceResult::PFfb_ENDCAP, PerformanceResult::PFfbEta_BARRELEH, PerformanceResult::PFfbEta_BARRELH, PerformanceResult::PFfbEta_ENDCAPEH, PerformanceResult::PFfbEta_ENDCAPH, PerformanceResult::PFfc_BARREL, PerformanceResult::PFfc_ENDCAP, PerformanceResult::PFfcEta_BARRELEH, PerformanceResult::PFfcEta_BARRELH, PerformanceResult::PFfcEta_ENDCAPEH, PerformanceResult::PFfcEta_ENDCAPH, PerformanceResult::PFfdEta_ENDCAPEH, and PerformanceResult::PFfdEta_ENDCAPH.

534  {
535  if (!out)
536  return out;
537 
538  out << "PFEnergyCalibration -- " << endl;
539 
540  if (calib.pfCalibrations) {
541  static const std::map<std::string, PerformanceResult::ResultType> functType = {
542  {"PFfa_BARREL", PerformanceResult::PFfa_BARREL},
543  {"PFfa_ENDCAP", PerformanceResult::PFfa_ENDCAP},
544  {"PFfb_BARREL", PerformanceResult::PFfb_BARREL},
545  {"PFfb_ENDCAP", PerformanceResult::PFfb_ENDCAP},
546  {"PFfc_BARREL", PerformanceResult::PFfc_BARREL},
547  {"PFfc_ENDCAP", PerformanceResult::PFfc_ENDCAP},
548  {"PFfaEta_BARRELH", PerformanceResult::PFfaEta_BARRELH},
549  {"PFfaEta_ENDCAPH", PerformanceResult::PFfaEta_ENDCAPH},
550  {"PFfbEta_BARRELH", PerformanceResult::PFfbEta_BARRELH},
551  {"PFfbEta_ENDCAPH", PerformanceResult::PFfbEta_ENDCAPH},
552  {"PFfaEta_BARRELEH", PerformanceResult::PFfaEta_BARRELEH},
553  {"PFfaEta_ENDCAPEH", PerformanceResult::PFfaEta_ENDCAPEH},
554  {"PFfbEta_BARRELEH", PerformanceResult::PFfbEta_BARRELEH},
555  {"PFfbEta_ENDCAPEH", PerformanceResult::PFfbEta_ENDCAPEH},
556  {"PFfcEta_BARRELH", PerformanceResult::PFfcEta_BARRELH},
557  {"PFfcEta_ENDCAPH", PerformanceResult::PFfcEta_ENDCAPH},
558  {"PFfdEta_ENDCAPH", PerformanceResult::PFfdEta_ENDCAPH},
559  {"PFfcEta_BARRELEH", PerformanceResult::PFfcEta_BARRELEH},
560  {"PFfcEta_ENDCAPEH", PerformanceResult::PFfcEta_ENDCAPEH},
561  {"PFfdEta_ENDCAPEH", PerformanceResult::PFfdEta_ENDCAPEH}
562 
563  };
564 
565  for (std::map<std::string, PerformanceResult::ResultType>::const_iterator func = functType.begin();
566  func != functType.end();
567  ++func) {
568  cout << "Function: " << func->first << endl;
569  PerformanceResult::ResultType fType = func->second;
570  calib.pfCalibrations->printFormula(fType);
571  }
572 
573  } else {
574  std::cout << "Default calibration functions : " << std::endl;
575 
576  calib.faBarrel->Print();
577  calib.fbBarrel->Print();
578  calib.fcBarrel->Print();
579  calib.faEtaBarrelEH->Print();
580  calib.fbEtaBarrelEH->Print();
581  calib.faEtaBarrelH->Print();
582  calib.fbEtaBarrelH->Print();
583  calib.faEndcap->Print();
584  calib.fbEndcap->Print();
585  calib.fcEndcap->Print();
586  calib.faEtaEndcapEH->Print();
587  calib.fbEtaEndcapEH->Print();
588  calib.faEtaEndcapH->Print();
589  calib.fbEtaEndcapH->Print();
590  //
591  }
592 
593  return out;
594 }
static std::map< PerformanceResult::ResultType, std::string > functType