Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:13

0001 // -*- C++ -*-
0002 //
0003 // Package:    FastSimulation/Calorimetry
0004 // Class:      KKCorrectionFactors
0005 //
0006 /**\class KKCorrectionFactorsr
0007  Description: Returns scale from an TH3F histogram in a root file
0008 */
0009 //
0010 // Original Author:  Maximilian Knut Kiesel
0011 //         Created:  Fri, 07 Aug 2015
0012 //
0013 //
0014 
0015 #ifndef CALORESPONSE_H
0016 #define CALORESPONSE_H
0017 
0018 #include "FWCore/Utilities/interface/Exception.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0020 
0021 #include <TH3F.h>
0022 #include <TFile.h>
0023 #include <TROOT.h>
0024 
0025 class KKCorrectionFactors {
0026 public:
0027   /* Constructor: pset must contain two strings: "fileName" is the name of the
0028    * file in which the TH3F named "histogramName" is saved.
0029    */
0030   KKCorrectionFactors(const edm::ParameterSet& pset);
0031   ~KKCorrectionFactors() { delete h3_; };
0032 
0033   float getScale(float genEnergy, float genEta, float simEnergy) const;
0034 
0035 private:
0036   // histogram which contains the scales
0037   TH3F* h3_;
0038   bool interpolate3D_;
0039 };
0040 
0041 #endif