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