54 void process(std::vector<Hit>
const&);
59 const std::deque<std::array<SignalContainer, constants::MAXCHAMBER>>&
getPileupSignals()
const {
return mPileupSignals; }
63 void setSrcID(
int sourceID) { mSrcID = sourceID; }
76 Calibrations* mCalib =
nullptr;
77 PileupTool pileupTool;
83 std::vector<math_utils::RandomRing<>> mGausRandomRings;
84 std::vector<math_utils::RandomRing<>> mFlatRandomRings;
85 std::vector<math_utils::RandomRing<>> mLogRandomRings;
86 std::vector<DiffusionAndTimeStructEstimator> mDriftEstimators;
89 double mCurrentTriggerTime = 0.;
94 static constexpr float AmWidth = Geometry::amThick();
95 static constexpr float DrWidth = Geometry::drThick();
96 static constexpr float DrMin = -0.5 * AmWidth;
97 static constexpr float DrMax = DrWidth + 0.5 * AmWidth;
98 float mSamplingRate = 0;
99 float mElAttachProp = 0;
101 int mTimeBinTRFend = 0;
102 int mMaxTimeBins = 30;
103 int mMaxTimeBinsTRAP = 30;
104 bool mCreateSharedDigits =
true;
107 std::vector<Hit> mHitContainer;
108 std::vector<MCLabel> mMergedLabels;
109 std::array<SignalContainer, constants::MAXCHAMBER> mSignalsMapCollection;
110 std::deque<std::array<SignalContainer, constants::MAXCHAMBER>> mPileupSignals;
111 std::array<bool, constants::MAXCHAMBER> mFlagVdriftOutOfRange{};
113 void getHitContainerPerDetector(
const std::vector<Hit>&, std::array<std::vector<Hit>,
constants::MAXCHAMBER>&);
114 void setSimulationParameters();
119 void clearContainers();
120 bool convertHits(
const int,
const std::vector<Hit>&,
SignalContainer&,
int thread = 0);
122 void addLabel(
const int&, std::vector<MCLabel>&, std::unordered_set<int>&);
123 bool diffusion(
float,
float,
float,
float,
float,
float,
double&,
double&,
double&,
int thread = 0);
126 static constexpr int KEY_MIN = 0;
127 static constexpr int KEY_MAX = 2211727;
128 int calculateKey(
const int det,
const int row,
const int col)
130 int key = ((det << 12) | (
row << 8) |
col);
131 assert(!(key < KEY_MIN || key > KEY_MAX));
134 int getDetectorFromKey(
const int key) {
return (
key >> 12) & 0xFFF; }
135 int getRowFromKey(
const int key) {
return (
key >> 8) & 0xF; }
136 int getColFromKey(
const int key) {
return key & 0xFF; }