CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EnergyScaleAnalyzer.h
Go to the documentation of this file.
1 #ifndef RecoEcal_EgammaClusterProducers_EnergyScaleAnalyzer_h
2 #define RecoEcal_EgammaClusterProducers_EnergyScaleAnalyzer_h
3 
10 //
11 // $Id: EnergyScaleAnalyzer.h,v 1.5 2009/12/14 22:24:33 wmtan Exp $
12 //
13 
14 
15 // system include files
16 #include <memory>
17 
18 // user include files
21 
27 
37 
38 #include <string>
39 #include "TH1.h"
40 #include "TH2.h"
41 #include "TTree.h"
42 #include "TNtuple.h"
43 class TFile;
44 
45 //
46 // class declaration
47 //
48 
50  public:
51  explicit EnergyScaleAnalyzer( const edm::ParameterSet& );
53 
54 
55  virtual void analyze( const edm::Event&, const edm::EventSetup& );
56  virtual void beginJob();
57  virtual void endJob();
58 
59 
60  private:
61 
62  std::string outputFile_; // output file
63 
64  std::string hepMCLabel_;
65 
66  // root file to store histograms
67  TFile* rootFile_;
68 
69  //Tree
70  TTree* mytree_;
71  struct tree_structure_ {
72  // MC information
73  int mc_npar;
74  int parID;
75  float mc_sep;
76  float mc_e;
77  float mc_et;
78  float mc_phi;
79  float mc_eta;
80  float mc_theta;
81 
82  // MC-EM matching info
83  float em_dR;
84 
85  // EM SC info (uncorrected)
87  int em_scType;
88  float em_e;
89  float em_et;
90  float em_phi;
91  float em_eta;
92  float em_theta;
93  int em_nCell;
94  int em_nBC;
95 
96  // physics variables
97  float em_pet;
98  float em_pe;
99  float em_peta;
100  float em_ptheta;
101 
102  // corrected collectin
103  float emCorr_e;
104  float emCorr_et;
105  float emCorr_eta;
106  float emCorr_phi;
108  float emCorr_pet;
109  float emCorr_peta;
111 
112  // EM widths, pw -- phiWidth, ew -- etaWidth
113  float em_pw;
114  float em_ew;
115  // ratios of widths pw/ew
116  float em_br;
117  };
119 
120  //
121  float xVtx_;
122  float yVtx_;
123  float zVtx_;
124  //
128  //
129  float xClust_vtx_;
130  float yClust_vtx_;
131  float zClust_vtx_;
132  //
133  float rClust_vtx_;
134  //
135  float energyMax_;
136  float eTMax_;
137  float eTMaxVtx_;
138  float etaMax_;
139  float etaMaxVtx_;
140  float phiMax_;
141  float phiMaxVtx_;
142  float thetaMax_;
144  //
145 
146  int evtN;
147 
148  //Function
149  void fillTree ( const reco::SuperClusterCollection* scColl, const reco::SuperClusterCollection* corrSCColl,
150  HepMC::GenParticle* mc, tree_structure_& tree_, float xV, float yV, float zV, int scType);
151 };
152 #endif
153 
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void fillTree(const reco::SuperClusterCollection *scColl, const reco::SuperClusterCollection *corrSCColl, HepMC::GenParticle *mc, tree_structure_ &tree_, float xV, float yV, float zV, int scType)
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
EnergyScaleAnalyzer(const edm::ParameterSet &)