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, patCandidates_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 const std::map<std::string, PerformanceResult::ResultType> functType = {
522  {"PFfa_BARREL", PerformanceResult::PFfa_BARREL},
523  {"PFfa_ENDCAP", PerformanceResult::PFfa_ENDCAP},
524  {"PFfb_BARREL", PerformanceResult::PFfb_BARREL},
525  {"PFfb_ENDCAP", PerformanceResult::PFfb_ENDCAP},
526  {"PFfc_BARREL", PerformanceResult::PFfc_BARREL},
527  {"PFfc_ENDCAP", PerformanceResult::PFfc_ENDCAP},
528  {"PFfaEta_BARRELH", PerformanceResult::PFfaEta_BARRELH},
529  {"PFfaEta_ENDCAPH", PerformanceResult::PFfaEta_ENDCAPH},
530  {"PFfbEta_BARRELH", PerformanceResult::PFfbEta_BARRELH},
531  {"PFfbEta_ENDCAPH", PerformanceResult::PFfbEta_ENDCAPH},
532  {"PFfaEta_BARRELEH", PerformanceResult::PFfaEta_BARRELEH},
533  {"PFfaEta_ENDCAPEH", PerformanceResult::PFfaEta_ENDCAPEH},
534  {"PFfbEta_BARRELEH", PerformanceResult::PFfbEta_BARRELEH},
535  {"PFfbEta_ENDCAPEH", PerformanceResult::PFfbEta_ENDCAPEH}
536  };
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