16#ifndef ALICEO2_TPC_DigitContainer_H_
17#define ALICEO2_TPC_DigitContainer_H_
51 for (
auto time : mTimeBins) {
89 size_t size()
const {
return mTimeBins.size(); }
103 std::deque<DigitTime*> mTimeBins;
104 std::unique_ptr<DigitTime::PrevDigitInfoArray> mPrevDigArr;
106 const CalPad* mPadParams[3] = {
nullptr,
nullptr,
nullptr};
107 const CalDet<bool>* mDeadMap =
nullptr;
108 std::unique_ptr<CalDet<bool>> mDeadMapCopy;
109 bool mCMCEnabled =
false;
110 bool mCalibrationsUpdated =
false;
111 SAMPAProcessing* mSAMPAProcessing =
nullptr;
112 std::vector<std::pair<MCCompLabel, int>> mLabelCollector;
114 void reportSettings();
122 mTmaxTriggered = detParam.TmaxTriggered;
125 mOffset =
static_cast<TimeBin>(detParam.TPCRecoWindowSim * detParam.TPClength / gasParam.DriftV / eleParam.ZbinWidth);
126 mTimeBins.resize(mOffset,
nullptr);
132 mEffectiveTimeBin = 0;
134 for (
auto time : mTimeBins) {
137 mTimeBins.assign(mOffset,
nullptr);
139 std::fill(mPrevDigArr->begin(), mPrevDigArr->end(),
PrevDigitInfo{});
145 const auto space = mOffset + eventTimeBin - mFirstTimeBin;
146 if (mTimeBins.size() < space) {
147 mTimeBins.resize(space);
154 mEffectiveTimeBin = timeBin - mFirstTimeBin;
155 if (mEffectiveTimeBin >= mTimeBins.size()) {
160 if (mTimeBins[mEffectiveTimeBin] ==
nullptr) {
161 mTimeBins[mEffectiveTimeBin] =
new DigitTime();
164 mTimeBins[mEffectiveTimeBin]->addDigit(
label, cru, globalPad, signal);
Definition of class for writing debug informations.
Definition of the Time Bin container.
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual sector
Definition of the parameter class for the detector.
Definition of the parameter class for the detector electronics.
Definition of the parameter class for the detector gas.
Definition of the SAMPA response.
static const ParameterDetector & Instance()
void updateCalibrations()
void setStartTime(TimeBin time)
void setSAMPAProcessing(SAMPAProcessing *sampaProcessing)
Use this SAMPAProcessing instead of the singleton when filling the output.
size_t size() const
Get the size of the container for one event.
DigitContainer()
Default constructor.
DigitContainer & operator=(const DigitContainer &)=delete
void fillOutputContainer(std::vector< Digit > &output, dataformats::MCTruthContainer< MCCompLabel > &mcTruth, std::vector< CommonMode > &commonModeOutput, const Sector §or, TimeBin eventTimeBin=0, bool isContinuous=true, bool finalFlush=false)
void reset()
Reset the container.
~DigitContainer()
Destructor.
DigitContainer(const DigitContainer &)=delete
void addDigit(const MCCompLabel &label, const CRU &cru, TimeBin timeBin, GlobalPadNumber globalPad, float signal)
void reserve(TimeBin eventTimeBin)
Reserve space in the container for a given event.
class to enable streaming debug information to root files
GLuint GLsizei const GLchar * label
Global TPC definitions and constants.
unsigned short GlobalPadNumber
global pad number