test
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>

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 440 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, RecoJets_EventContent_cff::func, GenerateHcalLaserBadRunList::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().

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