EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
CalorimeterHitReco.h
Go to the documentation of this file.
1
2// SPDX-License-Identifier: LGPL-3.0-or-later
3// Copyright (C) 2022 Chao Peng, Sylvester Joosten, Wouter Deconinck, Chao, Whitney Armstrong
4
5// Reconstruct digitized outputs, paired with Jug::Digi::CalorimeterHitDigi
6// Author: Chao Peng
7// Date: 06/14/2021
8
9#pragma once
10
11#include <DD4hep/DetElement.h>
12#include <DD4hep/Detector.h>
13#include <DD4hep/IDDescriptor.h>
14#include <DDRec/CellIDPositionConverter.h>
15#include <Parsers/Primitives.h>
16#include <algorithms/algorithm.h>
17#include <algorithms/geo.h>
18#include <edm4eic/CalorimeterHitCollection.h>
19#include <edm4hep/RawCalorimeterHitCollection.h>
20#include <stdint.h>
21#include <cstddef>
22#include <functional>
23#include <gsl/pointers>
24#include <string>
25#include <string_view>
26
29
30namespace eicrecon {
31
33 algorithms::Algorithm<algorithms::Input<edm4hep::RawCalorimeterHitCollection>,
34 algorithms::Output<edm4eic::CalorimeterHitCollection>>;
35
37 public WithPodConfig<CalorimeterHitRecoConfig> {
38
39public:
40 CalorimeterHitReco(std::string_view name)
42 {"inputRawHitCollection"},
43 {"outputRecHitCollection"},
44 "Reconstruct hit from digitized input."} {}
45
46 void init() final;
47 void process(const Input&, const Output&) const final;
48
49private:
50 // unitless counterparts of the input parameters
51 double thresholdADC{0};
52 double stepTDC{0};
53
54 std::function<double(const edm4hep::RawCalorimeterHit& h)> sampFrac;
55
56 dd4hep::IDDescriptor id_spec;
57 dd4hep::BitFieldCoder* id_dec = nullptr;
58
59 mutable uint32_t NcellIDerrors = 0;
60 uint32_t MaxCellIDerrors = 100;
61
62 std::size_t sector_idx{0}, layer_idx{0};
63
64 mutable bool warned_unsupported_segmentation = false;
65
66 dd4hep::DetElement m_local;
67 std::size_t local_mask = ~static_cast<std::size_t>(0), gpos_mask = static_cast<std::size_t>(0);
68
69private:
70 const dd4hep::Detector* m_detector{algorithms::GeoSvc::instance().detector()};
71 const dd4hep::rec::CellIDPositionConverter* m_converter{
72 algorithms::GeoSvc::instance().cellIDPositionConverter()};
73};
74
75} // namespace eicrecon
Definition CalorimeterHitReco.h:37
CalorimeterHitReco(std::string_view name)
Definition CalorimeterHitReco.h:40
Definition WithPodConfig.h:22
-client
Definition CalorimeterClusterRecoCoG.cc:37
algorithms::Algorithm< algorithms::Input< edm4hep::RawCalorimeterHitCollection >, algorithms::Output< edm4eic::CalorimeterHitCollection > > CalorimeterHitRecoAlgorithm
Definition CalorimeterHitReco.h:34