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 <TF1.h>
#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

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

Definition at line 512 of file PFEnergyCalibration.cc.

References gather_cfg::cout, PFEnergyCalibration::faBarrel, PFEnergyCalibration::faEndcap, PFEnergyCalibration::faEtaBarrelEH, PFEnergyCalibration::faEtaBarrelH, PFEnergyCalibration::faEtaEndcapEH, PFEnergyCalibration::faEtaEndcapH, PFEnergyCalibration::fbBarrel, PFEnergyCalibration::fbEndcap, PFEnergyCalibration::fbEtaBarrelEH, PFEnergyCalibration::fbEtaBarrelH, PFEnergyCalibration::fbEtaEndcapEH, PFEnergyCalibration::fbEtaEndcapH, PFEnergyCalibration::fcBarrel, PFEnergyCalibration::fcEndcap, RecoEcal_EventContent_cff::func, MillePedeFileConverter_cfg::out, PFEnergyCalibration::pfCalibrations, 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, and PerformancePayloadFromTFormula::printFormula().

513  {
514 
515  if(!out ) return out;
516 
517  out<<"PFEnergyCalibration -- "<<endl;
518 
519  if ( calib.pfCalibrations ) {
520 
521  static std::map<std::string, PerformanceResult::ResultType> functType;
522 
523  functType["PFfa_BARREL"] = PerformanceResult::PFfa_BARREL;
524  functType["PFfa_ENDCAP"] = PerformanceResult::PFfa_ENDCAP;
525  functType["PFfb_BARREL"] = PerformanceResult::PFfb_BARREL;
526  functType["PFfb_ENDCAP"] = PerformanceResult::PFfb_ENDCAP;
527  functType["PFfc_BARREL"] = PerformanceResult::PFfc_BARREL;
528  functType["PFfc_ENDCAP"] = PerformanceResult::PFfc_ENDCAP;
529  functType["PFfaEta_BARRELH"] = PerformanceResult::PFfaEta_BARRELH;
530  functType["PFfaEta_ENDCAPH"] = PerformanceResult::PFfaEta_ENDCAPH;
531  functType["PFfbEta_BARRELH"] = PerformanceResult::PFfbEta_BARRELH;
532  functType["PFfbEta_ENDCAPH"] = PerformanceResult::PFfbEta_ENDCAPH;
533  functType["PFfaEta_BARRELEH"] = PerformanceResult::PFfaEta_BARRELEH;
534  functType["PFfaEta_ENDCAPEH"] = PerformanceResult::PFfaEta_ENDCAPEH;
535  functType["PFfbEta_BARRELEH"] = PerformanceResult::PFfbEta_BARRELEH;
536  functType["PFfbEta_ENDCAPEH"] = PerformanceResult::PFfbEta_ENDCAPEH;
537 
538  for(std::map<std::string,PerformanceResult::ResultType>::const_iterator
539  func = functType.begin();
540  func != functType.end();
541  ++func) {
542 
543  cout << "Function: " << func->first << endl;
544  PerformanceResult::ResultType fType = func->second;
545  calib.pfCalibrations->printFormula(fType);
546  }
547 
548  } else {
549 
550  std::cout << "Default calibration functions : " << std::endl;
551 
552  calib.faBarrel->Print();
553  calib.fbBarrel->Print();
554  calib.fcBarrel->Print();
555  calib.faEtaBarrelEH->Print();
556  calib.fbEtaBarrelEH->Print();
557  calib.faEtaBarrelH->Print();
558  calib.fbEtaBarrelH->Print();
559  calib.faEndcap->Print();
560  calib.fbEndcap->Print();
561  calib.fcEndcap->Print();
562  calib.faEtaEndcapEH->Print();
563  calib.fbEtaEndcapEH->Print();
564  calib.faEtaEndcapH->Print();
565  calib.fbEtaEndcapH->Print();
566 
567  }
568 
569  return out;
570 }
std::unique_ptr< TF1 > faEtaBarrelH
const PerformancePayloadFromTFormula * pfCalibrations
std::unique_ptr< TF1 > faEtaBarrelEH
std::unique_ptr< TF1 > fbEtaBarrelEH
std::unique_ptr< TF1 > fbBarrel
std::unique_ptr< TF1 > faEtaEndcapEH
std::unique_ptr< TF1 > faBarrel
std::unique_ptr< TF1 > faEndcap
std::unique_ptr< TF1 > fbEtaBarrelH
std::unique_ptr< TF1 > faEtaEndcapH
std::unique_ptr< TF1 > fbEndcap
std::unique_ptr< TF1 > fcBarrel
void printFormula(PerformanceResult::ResultType res) const
std::unique_ptr< TF1 > fbEtaEndcapEH
std::unique_ptr< TF1 > fcEndcap
std::unique_ptr< TF1 > fbEtaEndcapH