EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
IrtCherenkovParticleID.h
Go to the documentation of this file.
1// Copyright 2023, Christopher Dilks
2// Subject to the terms in the LICENSE file found in the top-level directory.
3
4#pragma once
5
6#include <IRT/CherenkovDetector.h>
7#include <IRT/CherenkovDetectorCollection.h>
8#include <IRT/CherenkovRadiator.h>
9#include <algorithms/algorithm.h>
10#include <edm4eic/CherenkovParticleIDCollection.h>
11#include <edm4eic/MCRecoTrackerHitAssociationCollection.h>
12#include <edm4eic/RawTrackerHitCollection.h>
13#include <edm4eic/TrackSegmentCollection.h>
14#include <stdint.h>
15#include <map>
16#include <mutex>
17#include <string>
18#include <string_view>
19#include <unordered_map>
20
21// EICrecon
25
26namespace eicrecon {
27
28// - `in_raw_hits` is a collection of digitized (raw) sensor hits, possibly including noise hits
29// - `in_hit_assocs` is a collection of digitized (raw) sensor hits, associated with MC (simulated) hits;
30// noise hits are not included since there is no associated simulated photon
31// - `in_charged_particles` is a map of a radiator name to a collection of TrackSegments
32// - each TrackSegment has a list of TrackPoints: the propagation of reconstructed track (trajectory) points
33// - the output is a map: radiator name -> collection of particle ID objects
34using IrtCherenkovParticleIDAlgorithm = algorithms::Algorithm<
35 algorithms::Input<const edm4eic::TrackSegmentCollection, const edm4eic::TrackSegmentCollection,
36 const edm4eic::TrackSegmentCollection, const edm4eic::RawTrackerHitCollection,
37 const edm4eic::MCRecoTrackerHitAssociationCollection>,
38 algorithms::Output<edm4eic::CherenkovParticleIDCollection,
39 edm4eic::CherenkovParticleIDCollection>>;
40
42 public WithPodConfig<IrtCherenkovParticleIDConfig> {
43
44public:
45 IrtCherenkovParticleID(std::string_view name)
47 {"inputAerogelTrackSegments", "inputGasTrackSegments",
48 "inputMergedTrackSegments", "inputRawHits",
49 "inputRawHitAssociations"},
50 {"outputAerogelParticleIDs", "outputGasParticleIDs"},
51 "Effectively 'zip' the input particle IDs"} {}
52
53 // FIXME: init() must not take arguments
54#pragma GCC diagnostic push
55#pragma GCC diagnostic ignored "-Woverloaded-virtual"
56 void init(CherenkovDetectorCollection* irt_det_coll);
57#pragma GCC diagnostic pop
58
59 void process(const Input&, const Output&) const;
60
61private:
62 // any access (R or W) to m_irt_det_coll, m_irt_det, m_pid_radiators must be locked
63 inline static std::mutex m_irt_det_mutex;
64 CherenkovDetectorCollection* m_irt_det_coll;
65 CherenkovDetector* m_irt_det;
66 std::map<std::string, CherenkovRadiator*> m_pid_radiators;
67
68 const algorithms::ParticleSvc& m_particleSvc = algorithms::ParticleSvc::instance();
69
70 uint64_t m_cell_mask;
71 std::string m_det_name;
72 std::unordered_map<int, double> m_pdg_mass;
73};
74
75} // namespace eicrecon
Definition ParticleSvc.h:13
Definition IrtCherenkovParticleID.h:42
IrtCherenkovParticleID(std::string_view name)
Definition IrtCherenkovParticleID.h:45
Definition WithPodConfig.h:22
-client
Definition CalorimeterClusterRecoCoG.cc:37
algorithms::Algorithm< algorithms::Input< const edm4eic::TrackSegmentCollection, const edm4eic::TrackSegmentCollection, const edm4eic::TrackSegmentCollection, const edm4eic::RawTrackerHitCollection, const edm4eic::MCRecoTrackerHitAssociationCollection >, algorithms::Output< edm4eic::CherenkovParticleIDCollection, edm4eic::CherenkovParticleIDCollection > > IrtCherenkovParticleIDAlgorithm
Definition IrtCherenkovParticleID.h:39