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 <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 505 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().

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