|
|
Go to the documentation of this file.
10 treenames_({{
"CEE",
"CHSi",
"CHSci"}}) {
13 for (
unsigned i(0);
i < nsubdetectors; ++
i) {
14 trees_[
i] = fs->
make<TTree>(treenames_[
i].c_str(), treenames_[
i].c_str());
15 trees_[
i]->Branch(
"cpu",
"ValidHitCollection", &cpuValidRecHits[
i]);
16 trees_[
i]->Branch(
"gpu",
"ValidHitCollection", &gpuValidRecHits[
i]);
17 trees_[
i]->Branch(
"diffs",
"ValidHitCollection", &diffsValidRecHits[
i]);
40 const auto &cpuhits =
event.get(
tokens_[idet][0]);
43 const auto &gpuhits =
event.get(
tokens_[idet][1]);
45 size_t nhits = cpuhits.size();
49 for (
unsigned i(0);
i <
nhits;
i++) {
53 const float cpuEn = cpuHit.
energy();
54 const float gpuEn = gpuHit.
energy();
57 const float cpuTime = cpuHit.
time();
58 const float gpuTime = gpuHit.
time();
59 const float cpuTimeErr = cpuHit.
timeError();
60 const float gpuTimeErr = gpuHit.
timeError();
63 const float cpuFB = cpuHit.
flagBits();
64 const float gpuFB = gpuHit.
flagBits();
69 ValidHit vCPU(cpuEn, cpuTime, cpuTimeErr, cpuDetId, cpuFB, cpuSoN);
70 ValidHit vGPU(gpuEn, gpuTime, gpuTimeErr, gpuDetId, gpuFB, gpuSoN);
73 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
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
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
std::array< std::string, nsubdetectors > handles_str_
T * make(const Args &... args) const
make new ROOT object