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_ITSMFT_DIGIPARAMS_H
16#define ALICEO2_ITSMFT_DIGIPARAMS_H
17
18#include <Rtypes.h>
21
23// //
24// Simulation params for Alpide chip //
25// //
26// This is a provisionary implementation, until proper //
27// microscopic simulation and its configuration will //
28// be implemented //
29// //
31
32namespace o2
33{
34namespace itsmft
35{
36
37class AlpideSimResponse;
38
40{
41
43
44 public:
45 DigiParams();
46 ~DigiParams() = default;
47
48 void setNoisePerPixel(float v) { mNoisePerPixel = v; }
49 float getNoisePerPixel() const { return mNoisePerPixel; }
50
51 void setContinuous(bool v) { mIsContinuous = v; }
52 bool isContinuous() const { return mIsContinuous; }
53
54 int getROFrameLengthInBC() const { return mROFrameLengthInBC; }
55 void setROFrameLengthInBC(int n) { mROFrameLengthInBC = n; }
56
57 void setROFrameLength(float ns);
58 float getROFrameLength() const { return mROFrameLength; }
59 float getROFrameLengthInv() const { return mROFrameLengthInv; }
60
61 void setStrobeDelay(float ns) { mStrobeDelay = ns; }
62 float getStrobeDelay() const { return mStrobeDelay; }
63
64 void setStrobeLength(float ns) { mStrobeLength = ns; }
65 float getStrobeLength() const { return mStrobeLength; }
66
67 void setTimeOffset(double sec) { mTimeOffset = sec; }
68 double getTimeOffset() const { return mTimeOffset; }
69
70 void setROFrameBiasInBC(int n) { mROFrameBiasInBC = n; }
71 int getROFrameBiasInBC() const { return mROFrameBiasInBC; }
72
73 void setChargeThreshold(int v, float frac2Account = 0.1);
74 void setNSimSteps(int v);
75 void setEnergyToNElectrons(float v) { mEnergyToNElectrons = v; }
76
77 void setVbb(float v) { mVbb = v; }
78 void setIBVbb(float v) { mIBVbb = v; }
79 void setOBVbb(float v) { mOBVbb = v; }
80
81 int getChargeThreshold() const { return mChargeThreshold; }
82 int getMinChargeToAccount() const { return mMinChargeToAccount; }
83 int getNSimSteps() const { return mNSimSteps; }
84 float getNSimStepsInv() const { return mNSimStepsInv; }
85 float getEnergyToNElectrons() const { return mEnergyToNElectrons; }
86
87 float getVbb() const { return mVbb; }
88 float getIBVbb() const { return mIBVbb; }
89 float getOBVbb() const { return mOBVbb; }
90
91 bool isTimeOffsetSet() const { return mTimeOffset > -infTime; }
92
93 const o2::itsmft::AlpideSimResponse* getAlpSimResponse() const { return mAlpSimResponse; }
94 void setAlpSimResponse(const o2::itsmft::AlpideSimResponse* par) { mAlpSimResponse = par; }
95
96 const SignalShape& getSignalShape() const { return mSignalShape; }
97 SignalShape& getSignalShape() { return (SignalShape&)mSignalShape; }
98
99 void print() const;
100
101 private:
102 static constexpr double infTime = 1e99;
103 bool mIsContinuous = false;
104 float mNoisePerPixel = 1.e-8;
105 int mROFrameLengthInBC = 0;
106 float mROFrameLength = 0;
107 float mStrobeDelay = 0.;
108 float mStrobeLength = 0;
109 double mTimeOffset = -2 * infTime;
110 int mROFrameBiasInBC = 0;
111 int mChargeThreshold = 150;
112 int mMinChargeToAccount = 15;
113 int mNSimSteps = 7;
114 float mEnergyToNElectrons = 1. / 3.6e-9; // conversion of eloss to Nelectrons
115
116 float mVbb = 0.0;
117 float mIBVbb = 0.0;
118 float mOBVbb = 0.0;
119
121
122 const o2::itsmft::AlpideSimResponse* mAlpSimResponse = nullptr;
123
124 // auxiliary precalculated parameters
125 float mROFrameLengthInv = 0;
126 float mNSimStepsInv = 0;
127
128 ClassDefNV(DigiParams, 2);
129};
130} // namespace itsmft
131} // namespace o2
132
133#endif
Simple class describing ALPIDE signal time shape.
float getIBVbb() const
Definition DigiParams.h:88
int getMinChargeToAccount() const
Definition DigiParams.h:82
void setEnergyToNElectrons(float v)
Definition DigiParams.h:75
void setAlpSimResponse(const o2::itsmft::AlpideSimResponse *par)
Definition DigiParams.h:94
const o2::itsmft::AlpideSimResponse * getAlpSimResponse() const
Definition DigiParams.h:93
void setNoisePerPixel(float v)
Definition DigiParams.h:48
void setIBVbb(float v)
Definition DigiParams.h:78
float getROFrameLengthInv() const
Definition DigiParams.h:59
double getTimeOffset() const
Definition DigiParams.h:68
void setChargeThreshold(int v, float frac2Account=0.1)
const SignalShape & getSignalShape() const
Definition DigiParams.h:96
void setTimeOffset(double sec)
Definition DigiParams.h:67
float getVbb() const
Definition DigiParams.h:87
void setStrobeDelay(float ns)
Definition DigiParams.h:61
float getOBVbb() const
Definition DigiParams.h:89
void setOBVbb(float v)
Definition DigiParams.h:79
float getEnergyToNElectrons() const
Definition DigiParams.h:85
void setROFrameBiasInBC(int n)
Definition DigiParams.h:70
int getROFrameLengthInBC() const
Definition DigiParams.h:54
float getStrobeDelay() const
Definition DigiParams.h:62
bool isContinuous() const
Definition DigiParams.h:52
int getROFrameBiasInBC() const
Definition DigiParams.h:71
void setROFrameLength(float ns)
void setStrobeLength(float ns)
Definition DigiParams.h:64
int getChargeThreshold() const
Definition DigiParams.h:81
void setROFrameLengthInBC(int n)
Definition DigiParams.h:55
float getNoisePerPixel() const
Definition DigiParams.h:49
float getNSimStepsInv() const
Definition DigiParams.h:84
float getROFrameLength() const
Definition DigiParams.h:58
SignalShape & getSignalShape()
Definition DigiParams.h:97
int getNSimSteps() const
Definition DigiParams.h:83
void setContinuous(bool v)
Definition DigiParams.h:51
void setVbb(float v)
Definition DigiParams.h:77
bool isTimeOffsetSet() const
Definition DigiParams.h:91
float getStrobeLength() const
Definition DigiParams.h:65
GLdouble n
Definition glcorearb.h:1982
const GLdouble * v
Definition glcorearb.h:832
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...