Project
Loading...
Searching...
No Matches
Digitizer.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef ALICEO2_CPV_DIGITIZER_H
13#define ALICEO2_CPV_DIGITIZER_H
14
15#include "CPVBase/Geometry.h"
16#include "DataFormatsCPV/Hit.h"
23
24namespace o2
25{
26namespace cpv
27{
28class Digitizer : public TObject
29{
30 public:
31 Digitizer() = default;
32 ~Digitizer() override = default;
33 Digitizer(const Digitizer&) = delete;
34 Digitizer& operator=(const Digitizer&) = delete;
35
36 void init();
37 void finish();
38 void setPedestals(const Pedestals* peds) { mPedestals = peds; }
39 void setBadChannelMap(const BadChannelMap* bcm) { mBadMap = bcm; }
40 void setGains(const CalibParams* gains) { mGains = gains; }
41
43 void processHits(const std::vector<Hit>* mHits, const std::vector<Digit>& digitsBg,
44 std::vector<Digit>& digitsOut, o2::dataformats::MCTruthContainer<o2::MCCompLabel>& mLabels,
45 int source, int entry, double dt);
46
47 protected:
48 float simulatePedestalNoise(int absId);
49
50 private:
51 static constexpr short NCHANNELS = 23040; // 128*60*3: toatl number of CPV channels
52 const CalibParams* mGains = nullptr;
53 const Pedestals* mPedestals = nullptr;
54 const BadChannelMap* mBadMap = nullptr;
55 std::array<Digit, NCHANNELS> mArrayD;
56 std::array<float, NCHANNELS> mDigitThresholds;
57 ClassDefOverride(Digitizer, 3);
58};
59} // namespace cpv
60} // namespace o2
61
62#endif /* ALICEO2_CPV_DIGITIZER_H */
Definition of a container to keep Monte Carlo truth external to simulation objects.
CCDB container for bad (masked) channels in CPV.
~Digitizer() override=default
Digitizer & operator=(const Digitizer &)=delete
void setGains(const CalibParams *gains)
Definition Digitizer.h:40
float simulatePedestalNoise(int absId)
void setBadChannelMap(const BadChannelMap *bcm)
Definition Digitizer.h:39
void setPedestals(const Pedestals *peds)
Definition Digitizer.h:38
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.
Definition Digitizer.cxx:47
Digitizer(const Digitizer &)=delete
A container to hold and manage MC truth information/labels.
GLuint entry
Definition glcorearb.h:5735
GLsizei GLsizei GLchar * source
Definition glcorearb.h:798
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...