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 //
12 
13 
14 // system include files
15 #include <memory>
16 
17 // user include files
20 
26 
36 
37 #include <string>
38 #include "TH1.h"
39 #include "TH2.h"
40 #include "TTree.h"
41 #include "TNtuple.h"
42 class TFile;
43 
44 //
45 // class declaration
46 //
47 
49  public:
50  explicit EnergyScaleAnalyzer( const edm::ParameterSet& );
52 
53 
54  virtual void analyze( const edm::Event&, const edm::EventSetup& );
55  virtual void beginJob();
56  virtual void endJob();
57 
58 
59  private:
60 
61  std::string outputFile_; // output file
62 
70 
71  // root file to store histograms
72  TFile* rootFile_;
73 
74  //Tree
75  TTree* mytree_;
76  struct tree_structure_ {
77  // MC information
78  int mc_npar;
79  int parID;
80  float mc_sep;
81  float mc_e;
82  float mc_et;
83  float mc_phi;
84  float mc_eta;
85  float mc_theta;
86 
87  // MC-EM matching info
88  float em_dR;
89 
90  // EM SC info (uncorrected)
92  int em_scType;
93  float em_e;
94  float em_et;
95  float em_phi;
96  float em_eta;
97  float em_theta;
98  int em_nCell;
99  int em_nBC;
100 
101  // physics variables
102  float em_pet;
103  float em_pe;
104  float em_peta;
105  float em_ptheta;
106 
107  // corrected collectin
108  float emCorr_e;
109  float emCorr_et;
110  float emCorr_eta;
111  float emCorr_phi;
113  float emCorr_pet;
114  float emCorr_peta;
116 
117  // EM widths, pw -- phiWidth, ew -- etaWidth
118  float em_pw;
119  float em_ew;
120  // ratios of widths pw/ew
121  float em_br;
122  };
124 
125  //
126  float xVtx_;
127  float yVtx_;
128  float zVtx_;
129  //
133  //
134  float xClust_vtx_;
135  float yClust_vtx_;
136  float zClust_vtx_;
137  //
138  float rClust_vtx_;
139  //
140  float energyMax_;
141  float eTMax_;
142  float eTMaxVtx_;
143  float etaMax_;
144  float etaMaxVtx_;
145  float phiMax_;
146  float phiMaxVtx_;
147  float thetaMax_;
149  //
150 
151  int evtN;
152 
153  //Function
154  void fillTree ( const reco::SuperClusterCollection* scColl, const reco::SuperClusterCollection* corrSCColl,
155  HepMC::GenParticle* mc, tree_structure_& tree_, float xV, float yV, float zV, int scType);
156 };
157 #endif
158 
edm::EDGetTokenT< reco::SuperClusterCollection > dynamicHybridSuperClusters_token
edm::EDGetTokenT< reco::SuperClusterCollection > fixedMatrixSuperClustersWithPreshower_token
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< edm::HepMCProduct > hepMCLabel_
edm::EDGetTokenT< reco::SuperClusterCollection > correctedFixedMatrixSuperClustersWithPreshower_token
edm::EDGetTokenT< reco::SuperClusterCollection > hybridSuperClusters_token
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
edm::EDGetTokenT< reco::SuperClusterCollection > correctedDynamicHybridSuperClusters_token
edm::EDGetTokenT< reco::SuperClusterCollection > correctedHybridSuperClusters_token
EnergyScaleAnalyzer(const edm::ParameterSet &)