CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HGCalSimHitValidation.h
Go to the documentation of this file.
1 #ifndef HGCalSimHitValidation_h
2 #define HGCalSimHitValidation_h
3 // -*- C++ -*-
4 //
5 // Package: HGCalSimHitValidation
6 // Class: HGCalSimHitValidation
7 //
15 //
16 // Original Author: Raman Khurana
17 // Created: Fri, 31 Jan 2014 18:35:18 GMT
18 // $Id$
19 //
20 //
21 
22 
23 // system include files
24 #include <memory>
25 
26 // user include files
34 
38 
41 
47 #include <CLHEP/Geometry/Transform3D.h>
48 
49 #include <iostream>
50 #include <fstream>
51 #include <vector>
52 #include <map>
53 #include <string>
54 
56 
57 public:
58 
59  struct energysum{
61  double e15, e25, e50, e100, e250, e1000, etotal;
62  };
63 
64  struct hitsinfo{
66  x=y=z=phi=eta=0.0;
67  cell=sector=layer=0;
68  }
69  double x, y, z, phi, eta;
70  int cell, sector, layer;
71  };
72 
73 
76 
77  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
78 
79 protected:
80 
81  void dqmBeginRun(const edm::Run&, const edm::EventSetup&);
82  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
83  void analyze(const edm::Event&, const edm::EventSetup&);
84 
85 private:
86 
87  void analyzeHits (std::vector<PCaloHit>& hits);
88  void fillOccupancyMap(std::map<int, int>& OccupancyMap, int layer);
89  void fillHitsInfo(std::pair<hitsinfo,energysum> hit_, unsigned int itimeslice, double esum);
91 
92  // ----------member data ---------------------------
93  static const int netaBins = 4;
101  unsigned int layers_;
102  std::map<uint32_t, HepGeom::Transform3D> transMap_;
103 
104  std::vector<MonitorElement*> HitOccupancy_Plus_[netaBins];
105  std::vector<MonitorElement*> HitOccupancy_Minus_[netaBins];
106  std::vector<MonitorElement*> EtaPhi_Plus_;
107  std::vector<MonitorElement*> EtaPhi_Minus_;
110  std::vector<MonitorElement*> energy_[6];
111 };
112 #endif
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< MonitorElement * > energy_[6]
void fillOccupancyMap(std::map< int, int > &OccupancyMap, int layer)
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
void analyzeHits(std::vector< PCaloHit > &hits)
std::vector< MonitorElement * > HitOccupancy_Minus_[netaBins]
bool defineGeometry(edm::ESTransientHandle< DDCompactView > &ddViewH)
MonitorElement * MeanHitOccupancy_Minus_[netaBins]
const HcalDDDRecConstants * hcons_
std::vector< MonitorElement * > EtaPhi_Plus_
HGCalSimHitValidation(const edm::ParameterSet &)
MonitorElement * MeanHitOccupancy_Plus_[netaBins]
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
std::vector< MonitorElement * > HitOccupancy_Plus_[netaBins]
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::map< uint32_t, HepGeom::Transform3D > transMap_
const HGCalDDDConstants * hgcons_
void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< MonitorElement * > EtaPhi_Minus_
void fillHitsInfo(std::pair< hitsinfo, energysum > hit_, unsigned int itimeslice, double esum)
Definition: Run.h:43
void dqmBeginRun(const edm::Run &, const edm::EventSetup &)