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_PHOS_DIGITIZER_H
13#define ALICEO2_PHOS_DIGITIZER_H
14
19#include "PHOSBase/Geometry.h"
20#include "PHOSBase/Hit.h"
22
23namespace o2
24{
25namespace phos
26{
27class Digitizer : public TObject
28{
29 public:
30 Digitizer() = default;
31 ~Digitizer() override = default;
32 Digitizer(const Digitizer&) = delete;
33 Digitizer& operator=(const Digitizer&) = delete;
34
35 void init();
36 void finish();
37
39 void processHits(const std::vector<Hit>* mHits, const std::vector<Digit>& digitsBg,
40 std::vector<Digit>& digitsOut, o2::dataformats::MCTruthContainer<MCLabel>& mLabels,
41 int source, int entry, double dt);
42 void processMC(bool mc) { mProcessMC = mc; }
43
44 void setRunStartTime(long t) { mRunStartTime = t; }
45 long runStartTime() const { return mRunStartTime; }
46
47 protected:
48 float nonLinearity(float e);
49 float uncalibrate(float e, int absId);
50 float uncalibrateT(float t, int absId);
51 float timeResolution(float time, float e);
52 float simulateNoiseEnergy(int absId);
53 float simulateNoiseTime();
54
55 private:
56 static constexpr short NCHANNELS = 12544;
57 static constexpr short OFFSET = 1793;
58 bool mProcessMC = true;
59 bool mTrig2x2 = true;
60 bool mTrig4x4 = false;
61 long mRunStartTime = 0;
62 std::unique_ptr<CalibParams> mCalibParams;
63 std::unique_ptr<TriggerMap> mTrigUtils;
64 std::array<Digit, NCHANNELS> mArrayD;
65
66 ClassDefOverride(Digitizer, 4);
67};
68} // namespace phos
69} // namespace o2
70
71#endif /* ALICEO2_PHOS_DIGITIZER_H */
int16_t time
Definition RawEventData.h:4
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
Definition of a container to keep Monte Carlo truth external to simulation objects.
A container to hold and manage MC truth information/labels.
void processMC(bool mc)
Definition Digitizer.h:42
float simulateNoiseEnergy(int absId)
long runStartTime() const
Definition Digitizer.h:45
~Digitizer() override=default
float timeResolution(float time, float e)
Digitizer & operator=(const Digitizer &)=delete
void setRunStartTime(long t)
Definition Digitizer.h:44
void processHits(const std::vector< Hit > *mHits, const std::vector< Digit > &digitsBg, std::vector< Digit > &digitsOut, o2::dataformats::MCTruthContainer< MCLabel > &mLabels, int source, int entry, double dt)
Steer conversion of hits to digits.
Definition Digitizer.cxx:36
Digitizer(const Digitizer &)=delete
float uncalibrate(float e, int absId)
float uncalibrateT(float t, int absId)
float nonLinearity(float e)
GLsizei GLsizei GLchar * source
Definition glcorearb.h:798
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...