Project
Loading...
Searching...
No Matches
DigiParams.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
14
15#ifndef ALICEO2_TRK_DIGIPARAMS_H
16#define ALICEO2_TRK_DIGIPARAMS_H
17
18#include <array>
19
20#include <Rtypes.h>
23#include "TRKBase/AlmiraParam.h"
26
28// //
29// Simulation params for the TRK digitizer //
30// //
31// This is a provisionary implementation, until proper //
32// microscopic simulation and its configuration will //
33// be implemented //
34// //
36
37namespace o2
38{
39namespace trk
40{
41
42class ChipSimResponse;
43
45{
46
48
49 public:
50 DigiParams();
51 ~DigiParams() = default;
52
53 void setNoisePerPixel(float v) { mNoisePerPixel = v; }
54 float getNoisePerPixel() const { return mNoisePerPixel; }
55
56 int getROFrameLengthInBC(int layer) const { return mROFrameLayerLengthInBC[layer]; }
57 void setROFrameLengthInBC(int n, int layer) { mROFrameLayerLengthInBC[layer] = n; }
58
59 void setROFrameLength(float ns, int layer);
60 float getROFrameLength(int layer) const { return mROFrameLayerLength[layer]; }
61 float getROFrameLengthInv(int layer) const { return mROFrameLayerLengthInv[layer]; }
62
63 void setStrobeDelay(float ns, int layer) { mStrobeLayerDelay[layer] = ns; }
64 float getStrobeDelay(int layer) const { return mStrobeLayerDelay[layer]; }
65
66 void setStrobeLength(float ns, int layer) { mStrobeLayerLength[layer] = ns; }
67 float getStrobeLength(int layer) const { return mStrobeLayerLength[layer]; }
68
69 void setTimeOffset(double sec) { mTimeOffset = sec; }
70 double getTimeOffset() const { return mTimeOffset; }
71
72 void setROFrameBiasInBC(int n, int layer) { mROFrameLayerBiasInBC[layer] = n; }
73 int getROFrameBiasInBC(int layer) const { return mROFrameLayerBiasInBC[layer]; }
74
75 void setChargeThreshold(int v, float frac2Account = 0.1);
76 void setNSimSteps(int v);
77 void setEnergyToNElectrons(float v) { mEnergyToNElectrons = v; }
78
79 void setVbb(float v) { mVbb = v; }
80 void setIBVbb(float v) { mIBVbb = v; }
81 void setOBVbb(float v) { mOBVbb = v; }
82
83 int getChargeThreshold() const { return mChargeThreshold; }
84 int getMinChargeToAccount() const { return mMinChargeToAccount; }
85 int getNSimSteps() const { return mNSimSteps; }
86 float getNSimStepsInv() const { return mNSimStepsInv; }
87 float getEnergyToNElectrons() const { return mEnergyToNElectrons; }
88
89 float getVbb() const { return mVbb; }
90 float getIBVbb() const { return mIBVbb; }
91 float getOBVbb() const { return mOBVbb; }
92
93 bool isTimeOffsetSet() const { return mTimeOffset > -infTime; }
94
95 const o2::trk::ChipSimResponse* getResponse() const { return mResponse.get(); }
97
98 const SignalShape& getSignalShape() const { return mSignalShape; }
99 SignalShape& getSignalShape() { return (SignalShape&)mSignalShape; }
100
101 virtual void print() const;
102
103 private:
104 static constexpr double infTime = 1e99;
105 float mNoisePerPixel = 1.e-7;
106 double mTimeOffset = -2 * infTime;
107 int mChargeThreshold = 75;
108 int mMinChargeToAccount = 7;
109 int mNSimSteps = 475;
110 float mNSimStepsInv = 1. / mNSimSteps;
111
112 float mEnergyToNElectrons = 1. / 3.6e-9; // conversion of eloss to Nelectrons
113
114 float mVbb = 0.0;
115 float mIBVbb = 0.0;
116 float mOBVbb = 0.0;
117
118 std::array<int, o2::trk::AlmiraParam::getNLayers()> mROFrameLayerLengthInBC;
119 std::array<int, o2::trk::AlmiraParam::getNLayers()> mROFrameLayerBiasInBC;
120 std::array<float, o2::trk::AlmiraParam::getNLayers()> mROFrameLayerLength;
121 std::array<float, o2::trk::AlmiraParam::getNLayers()> mStrobeLayerLength;
122 std::array<float, o2::trk::AlmiraParam::getNLayers()> mStrobeLayerDelay;
123
125
126 std::unique_ptr<o2::trk::ChipSimResponse> mResponse;
127
128 // auxiliary precalculated parameters
129 std::array<float, o2::trk::AlmiraParam::getNLayers()> mROFrameLayerLengthInv;
130
131 // ClassDef(DigiParams, 2);
132};
133} // namespace trk
134} // namespace o2
135
136#endif
Simple class describing ALPIDE signal time shape.
Definition of the ITSMFT Alpide simulated response parametrization.
float getROFrameLength(int layer) const
Definition DigiParams.h:60
float getNoisePerPixel() const
Definition DigiParams.h:54
int getMinChargeToAccount() const
Definition DigiParams.h:84
int getChargeThreshold() const
Definition DigiParams.h:83
bool isTimeOffsetSet() const
Definition DigiParams.h:93
void setVbb(float v)
Definition DigiParams.h:79
int getROFrameBiasInBC(int layer) const
Definition DigiParams.h:73
float getEnergyToNElectrons() const
Definition DigiParams.h:87
const SignalShape & getSignalShape() const
Definition DigiParams.h:98
virtual void print() const
void setChargeThreshold(int v, float frac2Account=0.1)
void setResponse(const o2::itsmft::AlpideSimResponse *)
int getROFrameLengthInBC(int layer) const
Definition DigiParams.h:56
void setStrobeLength(float ns, int layer)
Definition DigiParams.h:66
float getOBVbb() const
Definition DigiParams.h:91
float getStrobeDelay(int layer) const
Definition DigiParams.h:64
float getNSimStepsInv() const
Definition DigiParams.h:86
const o2::trk::ChipSimResponse * getResponse() const
Definition DigiParams.h:95
float getIBVbb() const
Definition DigiParams.h:90
void setTimeOffset(double sec)
Definition DigiParams.h:69
void setROFrameBiasInBC(int n, int layer)
Definition DigiParams.h:72
void setROFrameLength(float ns, int layer)
void setStrobeDelay(float ns, int layer)
Definition DigiParams.h:63
void setIBVbb(float v)
Definition DigiParams.h:80
void setNSimSteps(int v)
double getTimeOffset() const
Definition DigiParams.h:70
float getVbb() const
Definition DigiParams.h:89
int getNSimSteps() const
Definition DigiParams.h:85
SignalShape & getSignalShape()
Definition DigiParams.h:99
void setOBVbb(float v)
Definition DigiParams.h:81
float getStrobeLength(int layer) const
Definition DigiParams.h:67
float getROFrameLengthInv(int layer) const
Definition DigiParams.h:61
void setEnergyToNElectrons(float v)
Definition DigiParams.h:77
void setROFrameLengthInBC(int n, int layer)
Definition DigiParams.h:57
void setNoisePerPixel(float v)
Definition DigiParams.h:53
GLdouble n
Definition glcorearb.h:1982
const GLdouble * v
Definition glcorearb.h:832
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static constexpr size_t getNLayers()
Definition AlmiraParam.h:29