CMS 3D CMS Logo

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{
60  energysum() {etotal=0; for (int i=0; i<6; ++i) eTime[i] = 0.;}
61  double eTime[6], 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&) override;
82  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
83  void analyze(const edm::Event&, const edm::EventSetup&) override;
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 ---------------------------
98  std::vector<double> times_;
99  unsigned int nTimes_;
102  unsigned int layers_;
103  std::map<uint32_t, HepGeom::Transform3D> transMap_;
104 
105  std::vector<MonitorElement*> HitOccupancy_Plus_, HitOccupancy_Minus_;
106  std::vector<MonitorElement*> EtaPhi_Plus_, EtaPhi_Minus_;
108  std::vector<MonitorElement*> energy_[6];
109 };
110 #endif
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * MeanHitOccupancy_Plus_
std::vector< MonitorElement * > energy_[6]
void fillOccupancyMap(std::map< int, int > &OccupancyMap, int layer)
std::vector< MonitorElement * > HitOccupancy_Plus_
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
void analyzeHits(std::vector< PCaloHit > &hits)
std::vector< MonitorElement * > HitOccupancy_Minus_
MonitorElement * MeanHitOccupancy_Minus_
bool defineGeometry(edm::ESTransientHandle< DDCompactView > &ddViewH)
const HcalDDDRecConstants * hcons_
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
std::vector< MonitorElement * > EtaPhi_Plus_
HGCalSimHitValidation(const edm::ParameterSet &)
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::map< uint32_t, HepGeom::Transform3D > transMap_
const HGCalDDDConstants * hgcons_
std::vector< MonitorElement * > EtaPhi_Minus_
void fillHitsInfo(std::pair< hitsinfo, energysum > hit_, unsigned int itimeslice, double esum)
std::vector< double > times_
Definition: Run.h:43