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 <TMath.h>
#include <math.h>
#include <vector>
#include <TF1.h>
#include <map>

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 431 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, dbtoconf::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().

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