CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 <math.h>
#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 441 of file PFEnergyCalibration.cc.

References gather_cfg::cout, PFEnergyCalibration::faBarrel, PFEnergyCalibration::faEndcap, PFEnergyCalibration::faEtaBarrel, PFEnergyCalibration::faEtaEndcap, PFEnergyCalibration::fbBarrel, PFEnergyCalibration::fbEndcap, PFEnergyCalibration::fbEtaBarrel, PFEnergyCalibration::fbEtaEndcap, PFEnergyCalibration::fcBarrel, PFEnergyCalibration::fcEndcap, RecoEcal_EventContent_cff::func, MillePedeFileConverter_cfg::out, PFEnergyCalibration::pfCalibrations, PerformanceResult::PFfa_BARREL, PerformanceResult::PFfa_ENDCAP, PerformanceResult::PFfaEta_BARREL, PerformanceResult::PFfaEta_ENDCAP, PerformanceResult::PFfb_BARREL, PerformanceResult::PFfb_ENDCAP, PerformanceResult::PFfbEta_BARREL, PerformanceResult::PFfbEta_ENDCAP, PerformanceResult::PFfc_BARREL, PerformanceResult::PFfc_ENDCAP, and PerformancePayloadFromTFormula::printFormula().

442  {
443 
444  if(!out ) return out;
445 
446  out<<"PFEnergyCalibration -- "<<endl;
447 
448  if ( calib.pfCalibrations ) {
449 
450  std::cout << "Functions taken from the global tags : " << std::endl;
451 
452  static std::map<std::string, PerformanceResult::ResultType> functType;
453 
454  functType["PFfa_BARREL"] = PerformanceResult::PFfa_BARREL;
455  functType["PFfa_ENDCAP"] = PerformanceResult::PFfa_ENDCAP;
456  functType["PFfb_BARREL"] = PerformanceResult::PFfb_BARREL;
457  functType["PFfb_ENDCAP"] = PerformanceResult::PFfb_ENDCAP;
458  functType["PFfc_BARREL"] = PerformanceResult::PFfc_BARREL;
459  functType["PFfc_ENDCAP"] = PerformanceResult::PFfc_ENDCAP;
460  functType["PFfaEta_BARREL"] = PerformanceResult::PFfaEta_BARREL;
461  functType["PFfaEta_ENDCAP"] = PerformanceResult::PFfaEta_ENDCAP;
462  functType["PFfbEta_BARREL"] = PerformanceResult::PFfbEta_BARREL;
463  functType["PFfbEta_ENDCAP"] = PerformanceResult::PFfbEta_ENDCAP;
464 
465  for(std::map<std::string,PerformanceResult::ResultType>::const_iterator
466  func = functType.begin();
467  func != functType.end();
468  ++func) {
469 
470  cout << "Function: " << func->first << endl;
471  PerformanceResult::ResultType fType = func->second;
472  calib.pfCalibrations->printFormula(fType);
473  }
474 
475  } else {
476 
477  std::cout << "Default calibration functions : " << std::endl;
478 
479  calib.faBarrel->Print();
480  calib.fbBarrel->Print();
481  calib.fcBarrel->Print();
482  calib.faEtaBarrel->Print();
483  calib.fbEtaBarrel->Print();
484  calib.faEndcap->Print();
485  calib.fbEndcap->Print();
486  calib.fcEndcap->Print();
487  calib.faEtaEndcap->Print();
488  calib.fbEtaEndcap->Print();
489  }
490 
491  return out;
492 }
const PerformancePayloadFromTFormula * pfCalibrations
void printFormula(PerformanceResult::ResultType res) const