1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// -*- C++ -*-
//
// Package: FastSimulation/Calorimetry
// Class: KKCorrectionFactors
//
/**\class KKCorrectionFactorsr
Description: Returns scale from an TH3F histogram in a root file
*/
//
// Original Author: Maximilian Knut Kiesel
// Created: Fri, 07 Aug 2015
//
//
#ifndef CALORESPONSE_H
#define CALORESPONSE_H
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include <TH3F.h>
#include <TFile.h>
#include <TROOT.h>
class KKCorrectionFactors {
public:
/* Constructor: pset must contain two strings: "fileName" is the name of the
* file in which the TH3F named "histogramName" is saved.
*/
KKCorrectionFactors(const edm::ParameterSet& pset);
~KKCorrectionFactors() { delete h3_; };
float getScale(float genEnergy, float genEta, float simEnergy) const;
private:
// histogram which contains the scales
TH3F* h3_;
bool interpolate3D_;
};
#endif
|