CMS 3D CMS Logo

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