19#include <fairlogger/Logger.h>
31 if (!mPedestals || !mBadMap || !mGains) {
32 LOG(fatal) <<
"Digitizer::init() : ccdb objects were not setted yet!";
37 for (
int i = 0;
i < NCHANNELS;
i++) {
49 int collId,
int source,
double dt)
56 for (
int i = NCHANNELS;
i--;) {
61 if (digitsBg.size() == 0) {
62 for (
int i = NCHANNELS;
i--;) {
64 if (amplitude > mDigitThresholds[
i]) {
66 mArrayD[
i].setAbsId(
i);
71 for (
auto& dBg : digitsBg) {
72 mArrayD[dBg.getAbsId()] = dBg;
77 for (
auto&
h : *hits) {
78 int i =
h.GetDetectorID();
79 if (mArrayD[
i].getAmplitude() > 0) {
80 mArrayD[
i].setAmplitude(mArrayD[
i].getAmplitude() +
h.GetEnergyLoss());
82 mArrayD[
i].setAbsId(
i);
85 if (mArrayD[
i].getAmplitude() > mDigitThresholds[
i]) {
86 int labelIndex = mArrayD[
i].getLabel();
87 if (labelIndex == -1) {
91 mArrayD[
i].setLabel(labelIndex);
93 gsl::span<MCCompLabel> sp = labels.
getLabels(labelIndex);
96 if (te.getTrackID() ==
h.GetTrackID() && te.getEventID() == collId && te.getSourceID() ==
source) {
111 for (
int i = 0;
i < NCHANNELS;
i++) {
115 if (mArrayD[
i].getAmplitude() > mDigitThresholds[
i]) {
116 digitsOut.push_back(mArrayD[
i]);
124 if (absId < 0 || absId >= NCHANNELS) {
ClassImp(o2::cpv::Digitizer)
Class for time synchronization of RawReader instances.
static const CPVSimParams & Instance()
bool isChannelGood(unsigned short channelID) const
Get the status of a certain cell.
float getGain(unsigned short cellID) const
Get High Gain energy calibration coefficients.
float simulatePedestalNoise(int absId)
void processHits(const std::vector< Hit > *mHits, const std::vector< Digit > &digitsBg, std::vector< Digit > &digitsOut, o2::dataformats::MCTruthContainer< o2::MCCompLabel > &mLabels, int source, int entry, double dt)
Steer conversion of hits to digits.
CPV simulation hit information.
float getPedSigma(short cellID) const
GLsizei GLsizei GLchar * source
GLuint GLsizei const GLchar * label
float mZSnSigmas
Zero Suppression threshold.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"