CMS 3D CMS Logo

HeterogeneousHGCalRecHitsValidator.h
Go to the documentation of this file.
1 #ifndef _HGCalMaskResolutionAna_h_
2 #define _HGCalMaskResolutionAna_h_
3 
18 
19 #include "TTree.h"
20 #include "TH1F.h"
21 
22 #include <iostream>
23 #include <string>
24 
25 struct ValidRecHits {
26  std::vector<float> energy;
27  std::vector<float> time;
28  std::vector<float> timeError;
29  std::vector<unsigned> detid;
30  std::vector<unsigned> flagBits;
31  std::vector<float> son;
32 };
33 
34 class HeterogeneousHGCalRecHitsValidator : public edm::one::EDAnalyzer<edm::one::SharedResources> {
35 public:
38  void analyze(const edm::Event&, const edm::EventSetup&) override;
39  void endJob() override;
40 
41 private:
42  static const unsigned nsubdetectors = 3; //ce-e, ce-h-fine, ce-h-coarse
43  static const unsigned ncomputingdevices = 2; //cpu, gpu
44  //cpu amd gpu tokens and handles for the 3 subdetectors, cpu and gpu
45  std::array<std::array<edm::EDGetTokenT<HGChefRecHitCollection>, ncomputingdevices>, nsubdetectors> tokens_;
46  std::array<edm::ESGetToken<HGCalGeometry, IdealGeometryRecord>, nsubdetectors> estokens_;
48 
49  std::array<std::string, nsubdetectors> handles_str_ = {
50  {"HGCalEESensitive", "HGCalHESiliconSensitive", "HGCalHEScintillatorSensitive"}};
52 
53  std::array<TTree*, nsubdetectors> trees_;
54  std::array<std::string, nsubdetectors> treenames_;
55  std::array<ValidHitCollection, nsubdetectors> cpuValidRecHits, gpuValidRecHits, diffsValidRecHits;
56  //std::vector< TH1F* > zhist;
57 
58  void set_geometry_(const edm::EventSetup&, const unsigned&);
59 };
60 
61 #endif
ValidRecHits::detid
std::vector< unsigned > detid
Definition: HeterogeneousHGCalRecHitsValidator.h:29
HeterogeneousHGCalRecHitsValidator::ncomputingdevices
static const unsigned ncomputingdevices
Definition: HeterogeneousHGCalRecHitsValidator.h:43
ValidRecHits
Definition: HeterogeneousHGCalRecHitsValidator.h:25
hgcal::RecHitTools
Definition: RecHitTools.h:23
EDAnalyzer.h
ValidRecHits::time
std::vector< float > time
Definition: HeterogeneousHGCalRecHitsValidator.h:27
ValidRecHits::energy
std::vector< float > energy
Definition: HeterogeneousHGCalRecHitsValidator.h:26
HeterogeneousHGCalRecHitsValidator::trees_
std::array< TTree *, nsubdetectors > trees_
Definition: HeterogeneousHGCalRecHitsValidator.h:53
ValidRecHits::timeError
std::vector< float > timeError
Definition: HeterogeneousHGCalRecHitsValidator.h:28
RecHitTools.h
HeterogeneousHGCalRecHitsValidator::tokens_
std::array< std::array< edm::EDGetTokenT< HGChefRecHitCollection >, ncomputingdevices >, nsubdetectors > tokens_
Definition: HeterogeneousHGCalRecHitsValidator.h:45
ValidRecHits::son
std::vector< float > son
Definition: HeterogeneousHGCalRecHitsValidator.h:31
HeterogeneousHGCalRecHitsValidator::recHitTools_
hgcal::RecHitTools recHitTools_
Definition: HeterogeneousHGCalRecHitsValidator.h:51
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
HeterogeneousHGCalRecHitsValidator::~HeterogeneousHGCalRecHitsValidator
~HeterogeneousHGCalRecHitsValidator() override
Definition: HeterogeneousHGCalRecHitsValidator.cc:23
HeterogeneousHGCalRecHitsValidator::diffsValidRecHits
std::array< ValidHitCollection, nsubdetectors > diffsValidRecHits
Definition: HeterogeneousHGCalRecHitsValidator.h:55
HeterogeneousHGCalRecHitsValidator::estokenGeom_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > estokenGeom_
Definition: HeterogeneousHGCalRecHitsValidator.h:47
HeterogeneousHGCalRecHitsValidator::gpuValidRecHits
std::array< ValidHitCollection, nsubdetectors > gpuValidRecHits
Definition: HeterogeneousHGCalRecHitsValidator.h:55
MakerMacros.h
HGCRecHit.h
HeterogeneousHGCalRecHitsValidator::treenames_
std::array< std::string, nsubdetectors > treenames_
Definition: HeterogeneousHGCalRecHitsValidator.h:54
Service.h
HeterogeneousHGCalRecHitsValidator::cpuValidRecHits
std::array< ValidHitCollection, nsubdetectors > cpuValidRecHits
Definition: HeterogeneousHGCalRecHitsValidator.h:55
CaloGeometryRecord.h
TFileService.h
ValidRecHits::flagBits
std::vector< unsigned > flagBits
Definition: HeterogeneousHGCalRecHitsValidator.h:30
HeterogeneousHGCalRecHitsValidator
Definition: HeterogeneousHGCalRecHitsValidator.h:34
HGCRecHitCollections.h
HGCalGeometry.h
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
HeterogeneousHGCalRecHitsValidator::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: HeterogeneousHGCalRecHitsValidator.cc:31
HeterogeneousHGCalRecHitsValidator::estokens_
std::array< edm::ESGetToken< HGCalGeometry, IdealGeometryRecord >, nsubdetectors > estokens_
Definition: HeterogeneousHGCalRecHitsValidator.h:46
IdealGeometryRecord.h
edm::EventSetup
Definition: EventSetup.h:58
edm::ESGetToken< CaloGeometry, CaloGeometryRecord >
ValidHit.h
HeterogeneousHGCalRecHitsValidator::HeterogeneousHGCalRecHitsValidator
HeterogeneousHGCalRecHitsValidator(const edm::ParameterSet &)
Definition: HeterogeneousHGCalRecHitsValidator.cc:3
CaloGeometry.h
HeterogeneousHGCalRecHitsValidator::nsubdetectors
static const unsigned nsubdetectors
Definition: HeterogeneousHGCalRecHitsValidator.h:42
EventSetup.h
HeterogeneousHGCalRecHitsValidator::set_geometry_
void set_geometry_(const edm::EventSetup &, const unsigned &)
Definition: HeterogeneousHGCalRecHitsValidator.cc:27
edm::Event
Definition: Event.h:73
HeterogeneousHGCalRecHitsValidator::handles_str_
std::array< std::string, nsubdetectors > handles_str_
Definition: HeterogeneousHGCalRecHitsValidator.h:49
HeterogeneousHGCalRecHitsValidator::endJob
void endJob() override
Definition: HeterogeneousHGCalRecHitsValidator.cc:25