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
18
19#ifndef ALICEO2_IOTOF_DIGITIZER_H
20#define ALICEO2_IOTOF_DIGITIZER_H
21
31
32namespace o2::iotof
33{
34
44{
45 public:
46 void setDigits(std::vector<o2::iotof::Digit>* dig) { mDigits = dig; }
48 void setROFRecords(std::vector<o2::itsmft::ROFRecord>* rec) { mROFRecords = rec; }
49
51 void init();
52
54 void process(const std::vector<o2::itsmft::Hit>* hits, int evID, int srcID);
55
57 void setEventTime(const o2::InteractionTimeRecord& irt) { mEventTime = irt; }
58
60 void setContinuous(bool v) { mContinuous = v; }
61 bool isContinuous() const { return mContinuous; }
62
65
66 // Provide the common iotof::GeometryTGeo to access matrices and segmentation
67 void setGeometry(const o2::iotof::GeometryTGeo* gm) { mGeometry = gm; }
68
69 // Setters for digitization parameters
70 void setChargeThreshold(float thr) { mChargeThreshold = thr; }
71 void setTimeResolution(float res) { mTimeResolution = res; }
72 void setEfficiency(float eff) { mEfficiency = eff; }
73 void setEnergyToCharge(float e2c) { mEnergyToCharge = e2c; }
74
75 // Getters
76 float getChargeThreshold() const { return mChargeThreshold; }
77 float getTimeResolution() const { return mTimeResolution; }
78 float getEfficiency() const { return mEfficiency; }
79
80 private:
82 void processHit(const o2::itsmft::Hit& hit, int evID, int srcID);
83
85 double smearTime(double time) const;
86
88 int energyToCharge(float energyLoss) const;
89
91 bool isEfficient() const;
92
93 static constexpr float sec2ns = 1e9f;
94
95 const o2::iotof::GeometryTGeo* mGeometry = nullptr;
96
97 std::vector<o2::iotof::Digit>* mDigits = nullptr;
98 std::vector<o2::itsmft::ROFRecord>* mROFRecords = nullptr;
100
101 o2::InteractionTimeRecord mEventTime;
102 bool mContinuous = true;
103
104 // Digitization parameters
105 float mChargeThreshold = 100.f;
106 float mTimeResolution = 0.020f;
107 float mEfficiency = 0.98f;
108 float mEnergyToCharge = 3.6e-9f;
109
110 static o2::iotof::Segmentation* sSegmentation;
111};
112} // namespace o2::iotof
113
114#endif
Definition of the ITSMFT digit.
Definition of the ITSMFT Hit class.
Definition of IOTOF digit class.
int16_t time
Definition RawEventData.h:4
Definition of the ITSMFT ROFrame (trigger) record.
Definition of a container to keep Monte Carlo truth external to simulation objects.
uint32_t res
Definition RawData.h:0
Definition of the Segmentation class.
A container to hold and manage MC truth information/labels.
Digitizer for the ALICE3 Inner/Outer TOF detector.
Definition Digitizer.h:44
void setROFRecords(std::vector< o2::itsmft::ROFRecord > *rec)
Definition Digitizer.h:48
float getChargeThreshold() const
Definition Digitizer.h:76
void init()
Initialize the digitizer.
Definition Digitizer.cxx:35
void setEnergyToCharge(float e2c)
Definition Digitizer.h:73
void setTimeResolution(float res)
Definition Digitizer.h:71
void fillOutputContainer()
Flush the output container.
void setDigits(std::vector< o2::iotof::Digit > *dig)
Definition Digitizer.h:46
void setEfficiency(float eff)
Definition Digitizer.h:72
void process(const std::vector< o2::itsmft::Hit > *hits, int evID, int srcID)
Steer conversion of hits to digits.
Definition Digitizer.cxx:46
bool isContinuous() const
Definition Digitizer.h:61
void setEventTime(const o2::InteractionTimeRecord &irt)
Set the event time.
Definition Digitizer.h:57
void setContinuous(bool v)
Set continuous readout mode.
Definition Digitizer.h:60
void setChargeThreshold(float thr)
Definition Digitizer.h:70
void setMCLabels(o2::dataformats::MCTruthContainer< o2::MCCompLabel > *mclb)
Definition Digitizer.h:47
float getTimeResolution() const
Definition Digitizer.h:77
void setGeometry(const o2::iotof::GeometryTGeo *gm)
Definition Digitizer.h:67
float getEfficiency() const
Definition Digitizer.h:78
const GLdouble * v
Definition glcorearb.h:832
GPUReconstruction * rec