EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
SiliconChargeSharingConfig.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2024 Souvik Paul
3
4#pragma once
5
6namespace eicrecon {
7
9 // Parameters of Silicon signal generation
10 // determines the meaning of sigma_sharingx and y.
11 // rel means relative, so charge sharing range = sigma_sharingx * cell_width_x, etc for y
12 // abs means absolute, charge sharing range = sigma_shargeingx directly
13 enum class ESigmaMode { abs = 0, rel = 1 } sigma_mode = ESigmaMode::abs;
16 float min_edep;
17 std::string readout;
18};
19
20std::istream& operator>>(std::istream& in, SiliconChargeSharingConfig::ESigmaMode& sigmaMode) {
21 std::string s;
22 in >> s;
23 // stringifying the enums causes them to be converted to integers before conversion to strings
24 if (s == "abs" or s == "0") {
26 } else if (s == "rel" or s == "1") {
28 } else {
29 in.setstate(std::ios::failbit); // Set the fail bit if the input is not valid
30 }
31
32 return in;
33}
34std::ostream& operator<<(std::ostream& out,
36 switch (sigmaMode) {
38 out << "abs";
39 break;
41 out << "rel";
42 break;
43 default:
44 out.setstate(std::ios::failbit);
45 }
46 return out;
47}
48
49} // namespace eicrecon
-client
Definition CalorimeterClusterRecoCoG.cc:37
std::ostream & operator<<(std::ostream &out, const ImagingTopoClusterConfig::ELayerMode &layerMode)
Definition ImagingTopoClusterConfig.h:68
std::istream & operator>>(std::istream &in, ImagingTopoClusterConfig::ELayerMode &layerMode)
Definition ImagingTopoClusterConfig.h:52
Definition SiliconChargeSharingConfig.h:8
ESigmaMode
Definition SiliconChargeSharingConfig.h:13
float sigma_sharingx
Definition SiliconChargeSharingConfig.h:14
float sigma_sharingy
Definition SiliconChargeSharingConfig.h:15
std::string readout
Definition SiliconChargeSharingConfig.h:17
enum eicrecon::SiliconChargeSharingConfig::ESigmaMode sigma_mode
float min_edep
Definition SiliconChargeSharingConfig.h:16