Skip to content

Commit

Permalink
Enable hard cut off for triggered mode (AliceO2Group#1417)
Browse files Browse the repository at this point in the history
o at average drift speed with additional margin
o cut off value stored as a parameter in ParameterDetector
  • Loading branch information
a-mathis committed Nov 14, 2018
1 parent 8665dc8 commit c7872cb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
10 changes: 10 additions & 0 deletions Detectors/TPC/base/include/TPCBase/ParameterDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define ALICEO2_TPC_ParameterDetector_H_

#include <array>
#include "DataFormatsTPC/Defs.h"

namespace o2
{
Expand Down Expand Up @@ -47,6 +48,10 @@ class ParameterDetector
/// \param cpad Pad capacitance [pF]
void setPadCapacitance(float cpad) { mPadCapacitance = cpad; }

/// Set maximum time bin in case of triggered readout mode
/// \param Maximum time bin in case of triggered readout mode
void setMaxTimeBinTriggered(TimeBin binMax) { mTmaxTriggered = binMax; }

/// Get the TPC length
/// \return TPC length [cm]
float getTPClength() const { return mTPClength; }
Expand All @@ -55,9 +60,14 @@ class ParameterDetector
/// \return Pad capacitance [pF]
float getPadCapacitance() const { return mPadCapacitance; }

/// Get maximum time bin in case of triggered readout mode
/// \return Maximum time bin in case of triggered readout mode
int getMaxTimeBinTriggered() const { return mTmaxTriggered; }

private:
float mTPClength; ///< Length of the TPC [cm]
float mPadCapacitance; ///< Capacitance of a single pad [pF]
TimeBin mTmaxTriggered; ///< Maximum time bin in case of triggered readout mode
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion Detectors/TPC/base/src/ParameterDetector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

using namespace o2::TPC;

ParameterDetector::ParameterDetector() : mTPClength(250.f), mPadCapacitance(0.1f) {}
ParameterDetector::ParameterDetector() : mTPClength(250.f), mPadCapacitance(0.1f), mTmaxTriggered(550) {}
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ class DigitContainer
Sector mSector; ///< ID of the currently processed sector
TimeBin mFirstTimeBin; ///< First time bin to consider
TimeBin mEffectiveTimeBin; ///< Effective time bin of that digit
TimeBin mTmaxTriggered; ///< Maximum time bin in case of triggered mode (TPClength / width of time bin)
TimeBin mTmaxTriggered; ///< Maximum time bin in case of triggered mode (hard cut at average drift speed with additional margin)
std::deque<DigitTime> mTimeBins; ///< Time bin Container for the ADC value
};

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

inline void DigitContainer::setup(const Sector& sector)
Expand Down

0 comments on commit c7872cb

Please sign in to comment.