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>
#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 437 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().

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