|
|
Go to the documentation of this file.
10 treenames_({{
"CEE",
"CHSi",
"CHSci"}}) {
12 estokenGeom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
14 for (
unsigned i(0);
i < nsubdetectors; ++
i) {
15 estokens_[
i] = esConsumes<HGCalGeometry, IdealGeometryRecord>(
edm::ESInputTag{
"", handles_str_[
i]});
16 trees_[
i] = fs->
make<TTree>(treenames_[
i].c_str(), treenames_[
i].c_str());
17 trees_[
i]->Branch(
"cpu",
"ValidHitCollection", &cpuValidRecHits[
i]);
18 trees_[
i]->Branch(
"gpu",
"ValidHitCollection", &gpuValidRecHits[
i]);
19 trees_[
i]->Branch(
"diffs",
"ValidHitCollection", &diffsValidRecHits[
i]);
39 const auto &cpuhits =
event.get(
tokens_[idet][0]);
42 const auto &gpuhits =
event.get(
tokens_[idet][1]);
44 size_t nhits = cpuhits.size();
48 for (
unsigned i(0);
i <
nhits;
i++) {
52 const float cpuEn = cpuHit.
energy();
53 const float gpuEn = gpuHit.
energy();
56 const float cpuTime = cpuHit.
time();
57 const float gpuTime = gpuHit.
time();
58 const float cpuTimeErr = cpuHit.
timeError();
59 const float gpuTimeErr = gpuHit.
timeError();
62 const float cpuFB = cpuHit.
flagBits();
63 const float gpuFB = gpuHit.
flagBits();
68 ValidHit vCPU(cpuEn, cpuTime, cpuTimeErr, cpuDetId, cpuFB, cpuSoN);
69 ValidHit vGPU(gpuEn, gpuTime, gpuTimeErr, gpuDetId, gpuFB, gpuSoN);
72 cpuTimeErr - gpuTimeErr,
constexpr float energy() const
std::array< TTree *, nsubdetectors > trees_
std::array< std::array< edm::EDGetTokenT< HGChefRecHitCollection >, ncomputingdevices >, nsubdetectors > tokens_
hgcal::RecHitTools recHitTools_
constexpr const DetId & detid() const
~HeterogeneousHGCalRecHitsValidator() override
std::array< ValidHitCollection, nsubdetectors > diffsValidRecHits
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > estokenGeom_
std::array< ValidHitCollection, nsubdetectors > gpuValidRecHits
#define DEFINE_FWK_MODULE(type)
std::vector< edm::EDGetTokenT< int > > tokens_
std::array< ValidHitCollection, nsubdetectors > cpuValidRecHits
constexpr float time() const
void analyze(const edm::Event &, const edm::EventSetup &) override
std::array< edm::ESGetToken< HGCalGeometry, IdealGeometryRecord >, nsubdetectors > estokens_
T * make(const Args &...args) const
make new ROOT object
HeterogeneousHGCalRecHitsValidator(const edm::ParameterSet &)
static const std::string kSharedResource
static const unsigned nsubdetectors
T getParameter(std::string const &) const
void set_geometry_(const edm::EventSetup &, const unsigned &)
float signalOverSigmaNoise() const
uint32_t flagBits() const