Skip to content

Commit 144ea6b

Browse files
Andreas Mathismatthiasrichter
authored andcommitted
Enable hard cut off for triggered mode (#1417)
o at average drift speed with additional margin o cut off value stored as a parameter in ParameterDetector
1 parent aef5d05 commit 144ea6b

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

Detectors/TPC/base/include/TPCBase/ParameterDetector.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define ALICEO2_TPC_ParameterDetector_H_
1717

1818
#include <array>
19+
#include "DataFormatsTPC/Defs.h"
1920

2021
namespace o2
2122
{
@@ -47,6 +48,10 @@ class ParameterDetector
4748
/// \param cpad Pad capacitance [pF]
4849
void setPadCapacitance(float cpad) { mPadCapacitance = cpad; }
4950

51+
/// Set maximum time bin in case of triggered readout mode
52+
/// \param Maximum time bin in case of triggered readout mode
53+
void setMaxTimeBinTriggered(TimeBin binMax) { mTmaxTriggered = binMax; }
54+
5055
/// Get the TPC length
5156
/// \return TPC length [cm]
5257
float getTPClength() const { return mTPClength; }
@@ -55,9 +60,14 @@ class ParameterDetector
5560
/// \return Pad capacitance [pF]
5661
float getPadCapacitance() const { return mPadCapacitance; }
5762

63+
/// Get maximum time bin in case of triggered readout mode
64+
/// \return Maximum time bin in case of triggered readout mode
65+
int getMaxTimeBinTriggered() const { return mTmaxTriggered; }
66+
5867
private:
5968
float mTPClength; ///< Length of the TPC [cm]
6069
float mPadCapacitance; ///< Capacitance of a single pad [pF]
70+
TimeBin mTmaxTriggered; ///< Maximum time bin in case of triggered readout mode
6171
};
6272
}
6373
}

Detectors/TPC/base/src/ParameterDetector.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616

1717
using namespace o2::TPC;
1818

19-
ParameterDetector::ParameterDetector() : mTPClength(250.f), mPadCapacitance(0.1f) {}
19+
ParameterDetector::ParameterDetector() : mTPClength(250.f), mPadCapacitance(0.1f), mTmaxTriggered(550) {}

Detectors/TPC/simulation/include/TPCSimulation/DigitContainer.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,14 @@ class DigitContainer
7979
Sector mSector; ///< ID of the currently processed sector
8080
TimeBin mFirstTimeBin; ///< First time bin to consider
8181
TimeBin mEffectiveTimeBin; ///< Effective time bin of that digit
82-
TimeBin mTmaxTriggered; ///< Maximum time bin in case of triggered mode (TPClength / width of time bin)
82+
TimeBin mTmaxTriggered; ///< Maximum time bin in case of triggered mode (hard cut at average drift speed with additional margin)
8383
std::deque<DigitTime> mTimeBins; ///< Time bin Container for the ADC value
8484
};
8585

8686
inline DigitContainer::DigitContainer() : mSector(-1), mFirstTimeBin(0), mEffectiveTimeBin(0), mTmaxTriggered(0), mTimeBins(500)
8787
{
8888
const static ParameterDetector& detParam = ParameterDetector::defaultInstance();
89-
const static ParameterElectronics& eleParam = ParameterElectronics::defaultInstance();
90-
const static ParameterGas& gasParam = ParameterGas::defaultInstance();
91-
mTmaxTriggered = detParam.getTPClength() / (eleParam.getZBinWidth() * gasParam.getVdrift());
89+
mTmaxTriggered = detParam.getMaxTimeBinTriggered();
9290
}
9391

9492
inline void DigitContainer::setup(const Sector& sector)

0 commit comments

Comments
 (0)