57 void process(std::vector<Hit>
const&);
62 const std::deque<std::array<SignalContainer, constants::MAXCHAMBER>>&
getPileupSignals()
const {
return mPileupSignals; }
66 void setSrcID(
int sourceID) { mSrcID = sourceID; }
70 if (det >= constants::MAXCHAMBER) {
73 mFedChamberStatus[det] =
value;
85 if (det >= constants::MAXCHAMBER) {
88 return mFedChamberStatus[det];
96 const CalVdriftExB* mCalVdriftExB =
nullptr;
97 const CalGain* mCalGain =
nullptr;
98 const PadStatus* mPadStatus =
nullptr;
100 std::array<int, constants::MAXCHAMBER> mFedChamberStatus{};
101 PileupTool pileupTool;
107 std::vector<math_utils::RandomRing<>> mGausRandomRings;
108 std::vector<math_utils::RandomRing<>> mFlatRandomRings;
109 std::vector<math_utils::RandomRing<>> mLogRandomRings;
110 std::vector<DiffusionAndTimeStructEstimator> mDriftEstimators;
113 double mCurrentTriggerTime = 0.;
118 static constexpr float AmWidth = Geometry::amThick();
119 static constexpr float DrWidth = Geometry::drThick();
120 static constexpr float DrMin = -0.5 * AmWidth;
121 static constexpr float DrMax = DrWidth + 0.5 * AmWidth;
122 float mSamplingRate = 0;
123 float mElAttachProp = 0;
125 int mTimeBinTRFend = 0;
126 int mMaxTimeBins = 30;
127 int mMaxTimeBinsTRAP = 30;
128 bool mCreateSharedDigits =
true;
131 std::vector<Hit> mHitContainer;
132 std::vector<MCLabel> mMergedLabels;
133 std::array<SignalContainer, constants::MAXCHAMBER> mSignalsMapCollection;
134 std::deque<std::array<SignalContainer, constants::MAXCHAMBER>> mPileupSignals;
135 std::array<bool, constants::MAXCHAMBER> mFlagVdriftOutOfRange{};
137 void getHitContainerPerDetector(
const std::vector<Hit>&, std::array<std::vector<Hit>, constants::MAXCHAMBER>&);
138 void setSimulationParameters();
143 void clearContainers();
144 bool convertHits(
const int,
const std::vector<Hit>&,
SignalContainer&,
int thread = 0);
146 void addLabel(
const int&, std::vector<MCLabel>&, std::unordered_set<int>&);
147 bool diffusion(
float,
float,
float,
float,
float,
float,
double&,
double&,
double&,
int thread = 0);
150 static constexpr int KEY_MIN = 0;
151 static constexpr int KEY_MAX = 2211727;
152 int calculateKey(
const int det,
const int row,
const int col)
154 int key = ((det << 12) | (
row << 8) |
col);
155 assert(!(key < KEY_MIN || key > KEY_MAX));
158 int getDetectorFromKey(
const int key) {
return (
key >> 12) & 0xFFF; }
159 int getRowFromKey(
const int key) {
return (
key >> 8) & 0xF; }
160 int getColFromKey(
const int key) {
return key & 0xFF; }