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 <Rtypes.h>
23
25// //
26// Simulation params for the TRK digitizer //
27// //
28// This is a provisionary implementation, until proper //
29// microscopic simulation and its configuration will //
30// be implemented //
31// //
33
34namespace o2
35{
36namespace trk
37{
38
39class ChipSimResponse;
40
42{
43
45
46 public:
47 DigiParams();
48 ~DigiParams() = default;
49
50 void setNoisePerPixel(float v) { mNoisePerPixel = v; }
51 float getNoisePerPixel() const { return mNoisePerPixel; }
52
53 void setContinuous(bool v) { mIsContinuous = v; }
54 bool isContinuous() const { return mIsContinuous; }
55
56 int getROFrameLengthInBC() const { return mROFrameLengthInBC; }
57 void setROFrameLengthInBC(int n) { mROFrameLengthInBC = n; }
58
59 void setROFrameLength(float ns);
60 float getROFrameLength() const { return mROFrameLength; }
61 float getROFrameLengthInv() const { return mROFrameLengthInv; }
62
63 void setStrobeDelay(float ns) { mStrobeDelay = ns; }
64 float getStrobeDelay() const { return mStrobeDelay; }
65
66 void setStrobeLength(float ns) { mStrobeLength = ns; }
67 float getStrobeLength() const { return mStrobeLength; }
68
69 void setTimeOffset(double sec) { mTimeOffset = sec; }
70 double getTimeOffset() const { return mTimeOffset; }
71
72 void setROFrameBiasInBC(int n) { mROFrameBiasInBC = n; }
73 int getROFrameBiasInBC() const { return mROFrameBiasInBC; }
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* getAlpSimResponse() const { return mAlpSimResponse.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 bool mIsContinuous = false;
106 float mNoisePerPixel = 1.e-8;
107 int mROFrameLengthInBC = 0;
108 float mROFrameLength = 0;
109 float mStrobeDelay = 0.;
110 float mStrobeLength = 0;
111 double mTimeOffset = -2 * infTime;
112 int mROFrameBiasInBC = 0;
113 int mChargeThreshold = 1;
114 int mMinChargeToAccount = 1;
115 int mNSimSteps = 475;
116 float mNSimStepsInv = 1. / mNSimSteps;
117
118 float mEnergyToNElectrons = 1. / 3.6e-9; // conversion of eloss to Nelectrons
119
120 float mVbb = 0.0;
121 float mIBVbb = 0.0;
122 float mOBVbb = 0.0;
123
125
126 std::unique_ptr<o2::trk::ChipSimResponse> mAlpSimResponse;
127
128 // auxiliary precalculated parameters
129 float mROFrameLengthInv = 0;
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 getNoisePerPixel() const
Definition DigiParams.h:51
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
float getStrobeDelay() const
Definition DigiParams.h:64
float getEnergyToNElectrons() const
Definition DigiParams.h:87
const SignalShape & getSignalShape() const
Definition DigiParams.h:98
void setStrobeLength(float ns)
Definition DigiParams.h:66
virtual void print() const
void setChargeThreshold(int v, float frac2Account=0.1)
float getROFrameLength() const
Definition DigiParams.h:60
void setROFrameBiasInBC(int n)
Definition DigiParams.h:72
void setROFrameLengthInBC(int n)
Definition DigiParams.h:57
float getOBVbb() const
Definition DigiParams.h:91
void setContinuous(bool v)
Definition DigiParams.h:53
float getNSimStepsInv() const
Definition DigiParams.h:86
bool isContinuous() const
Definition DigiParams.h:54
int getROFrameBiasInBC() const
Definition DigiParams.h:73
float getROFrameLengthInv() const
Definition DigiParams.h:61
float getIBVbb() const
Definition DigiParams.h:90
void setTimeOffset(double sec)
Definition DigiParams.h:69
void setStrobeDelay(float ns)
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 setROFrameLength(float ns)
void setOBVbb(float v)
Definition DigiParams.h:81
void setAlpSimResponse(const o2::itsmft::AlpideSimResponse *)
float getStrobeLength() const
Definition DigiParams.h:67
const o2::trk::ChipSimResponse * getAlpSimResponse() const
Definition DigiParams.h:95
void setEnergyToNElectrons(float v)
Definition DigiParams.h:77
int getROFrameLengthInBC() const
Definition DigiParams.h:56
void setNoisePerPixel(float v)
Definition DigiParams.h:50
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 ...