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 504 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, RecoEcal_EventContent_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().

505  {
506 
507  if(!out ) return out;
508 
509  out<<"PFEnergyCalibration -- "<<endl;
510 
511  if ( calib.pfCalibrations ) {
512 
513  static std::map<std::string, PerformanceResult::ResultType> functType;
514 
515  functType["PFfa_BARREL"] = PerformanceResult::PFfa_BARREL;
516  functType["PFfa_ENDCAP"] = PerformanceResult::PFfa_ENDCAP;
517  functType["PFfb_BARREL"] = PerformanceResult::PFfb_BARREL;
518  functType["PFfb_ENDCAP"] = PerformanceResult::PFfb_ENDCAP;
519  functType["PFfc_BARREL"] = PerformanceResult::PFfc_BARREL;
520  functType["PFfc_ENDCAP"] = PerformanceResult::PFfc_ENDCAP;
521  functType["PFfaEta_BARRELH"] = PerformanceResult::PFfaEta_BARRELH;
522  functType["PFfaEta_ENDCAPH"] = PerformanceResult::PFfaEta_ENDCAPH;
523  functType["PFfbEta_BARRELH"] = PerformanceResult::PFfbEta_BARRELH;
524  functType["PFfbEta_ENDCAPH"] = PerformanceResult::PFfbEta_ENDCAPH;
525  functType["PFfaEta_BARRELEH"] = PerformanceResult::PFfaEta_BARRELEH;
526  functType["PFfaEta_ENDCAPEH"] = PerformanceResult::PFfaEta_ENDCAPEH;
527  functType["PFfbEta_BARRELEH"] = PerformanceResult::PFfbEta_BARRELEH;
528  functType["PFfbEta_ENDCAPEH"] = PerformanceResult::PFfbEta_ENDCAPEH;
529 
530  for(std::map<std::string,PerformanceResult::ResultType>::const_iterator
531  func = functType.begin();
532  func != functType.end();
533  ++func) {
534 
535  cout << "Function: " << func->first << endl;
536  PerformanceResult::ResultType fType = func->second;
537  calib.pfCalibrations->printFormula(fType);
538  }
539 
540  } else {
541 
542  std::cout << "Default calibration functions : " << std::endl;
543 
544  calib.faBarrel->Print();
545  calib.fbBarrel->Print();
546  calib.fcBarrel->Print();
547  calib.faEtaBarrelEH->Print();
548  calib.fbEtaBarrelEH->Print();
549  calib.faEtaBarrelH->Print();
550  calib.fbEtaBarrelH->Print();
551  calib.faEndcap->Print();
552  calib.fbEndcap->Print();
553  calib.fcEndcap->Print();
554  calib.faEtaEndcapEH->Print();
555  calib.fbEtaEndcapEH->Print();
556  calib.faEtaEndcapH->Print();
557  calib.fbEtaEndcapH->Print();
558 
559  }
560 
561  return out;
562 }
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