test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PhotonFixCMS.h
Go to the documentation of this file.
1 #ifndef PhotonFixCMS_Defined_hh
2 #define PhotonFixCMS_Defined_hh
3 
4 //-------------------------------------------------------//
5 // Project: PhotonFix
6 // Author: Paul Dauncey (p.dauncey@imperial.ac.uk)
7 // Modified: 11/07/2011
8 // Admins: Paul Dauncey (p.dauncey@imperial.ac.uk)
9 // Matt Kenzie (matthew.william.kenzie@cern.ch)
10 //-------------------------------------------------------//
11 
12 /*
13  Does post-reco fixes to ECAL photon energy and estimates resolution.
14  This can run outside of the usual CMS software framework but requires
15  access to a file 'PhotonFix.dat' which must be in the same directory as
16  that used to run.
17 
18  To run independently of CMSSW use PhotonFix.h directly - go to
19  "RecoEcal/EgammaCoreTools/plugins/PhotonFix.h" for details.
20 
21  Before instantiating any objects of PhotonFix, the constants must be
22  initialised in the first event using
23  PhotonFixCMS::initialise("3_8");
24 
25  The string gives the reco version used. Valid strings are
26  "3_8", "3_11", "4_2" and "Nominal", where the latter gives no correction
27  to the energy and a nominal resolution value. There is also "4_2e" which
28  provides corrections for electrons which are reconstructed as photons (to
29  aid with testing the performance of these corrections in data).
30 
31 
32  Make objects using
33  PhotonFixCMS a(p);
34  where p is a reco::Photon reference
35 
36  Get the corrected energy using
37  a.fixedEnergy();
38  and the resolution using
39  a.sigmaEnergy();
40 
41 */
42 
43 #include <iostream>
44 #include <string>
45 #include "../interface/PhotonFix.h"
47 
48 
49 class PhotonFixCMS {
50  public:
51  PhotonFixCMS(const reco::Photon &p);
52 
53  // Must be called before instantiating any PhotonFix objects
54  static bool initialise(const edm::EventSetup &iSetup, const std::string &s="Nominal");
55 
56  // Corrected energy and sigma
57  double fixedEnergy() const;
58  double sigmaEnergy() const;
59 
60  const PhotonFix &photonFix() const;
61 
62  private:
64 };
65 #endif
PhotonFixCMS(const reco::Photon &p)
Definition: PhotonFixCMS.cc:26
double fixedEnergy() const
static bool initialise(const edm::EventSetup &iSetup, const std::string &s="Nominal")
Definition: PhotonFixCMS.cc:30
double sigmaEnergy() const
const PhotonFix & photonFix() const
PhotonFix pf
Definition: PhotonFixCMS.h:63