forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDigiParams.h
More file actions
135 lines (102 loc) · 5.34 KB
/
DigiParams.h
File metadata and controls
135 lines (102 loc) · 5.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
/// \file DigiParams.h
/// \brief Simulation parameters for the TRK digitizer. Based on the ITS2 and ITS3 digitizer parameters
#ifndef ALICEO2_TRK_DIGIPARAMS_H
#define ALICEO2_TRK_DIGIPARAMS_H
#include <Rtypes.h>
#include <ITSMFTSimulation/AlpideSignalTrapezoid.h>
#include "TRKBase/TRKBaseParam.h"
#include "TRKBase/GeometryTGeo.h"
////////////////////////////////////////////////////////////
// //
// Simulation params for the TRK digitizer //
// //
// This is a provisionary implementation, until proper //
// microscopic simulation and its configuration will //
// be implemented //
// //
////////////////////////////////////////////////////////////
namespace o2
{
namespace trk
{
class ChipSimResponse;
class DigiParams
{
using SignalShape = o2::itsmft::AlpideSignalTrapezoid;
public:
DigiParams();
~DigiParams() = default;
void setNoisePerPixel(float v) { mNoisePerPixel = v; }
float getNoisePerPixel() const { return mNoisePerPixel; }
void setContinuous(bool v) { mIsContinuous = v; }
bool isContinuous() const { return mIsContinuous; }
int getROFrameLengthInBC() const { return mROFrameLengthInBC; }
void setROFrameLengthInBC(int n) { mROFrameLengthInBC = n; }
void setROFrameLength(float ns);
float getROFrameLength() const { return mROFrameLength; }
float getROFrameLengthInv() const { return mROFrameLengthInv; }
void setStrobeDelay(float ns) { mStrobeDelay = ns; }
float getStrobeDelay() const { return mStrobeDelay; }
void setStrobeLength(float ns) { mStrobeLength = ns; }
float getStrobeLength() const { return mStrobeLength; }
void setTimeOffset(double sec) { mTimeOffset = sec; }
double getTimeOffset() const { return mTimeOffset; }
void setROFrameBiasInBC(int n) { mROFrameBiasInBC = n; }
int getROFrameBiasInBC() const { return mROFrameBiasInBC; }
void setChargeThreshold(int v, float frac2Account = 0.1);
void setNSimSteps(int v);
void setEnergyToNElectrons(float v) { mEnergyToNElectrons = v; }
void setVbb(float v) { mVbb = v; }
void setIBVbb(float v) { mIBVbb = v; }
void setOBVbb(float v) { mOBVbb = v; }
int getChargeThreshold() const { return mChargeThreshold; }
int getMinChargeToAccount() const { return mMinChargeToAccount; }
int getNSimSteps() const { return mNSimSteps; }
float getNSimStepsInv() const { return mNSimStepsInv; }
float getEnergyToNElectrons() const { return mEnergyToNElectrons; }
float getVbb() const { return mVbb; }
float getIBVbb() const { return mIBVbb; }
float getOBVbb() const { return mOBVbb; }
bool isTimeOffsetSet() const { return mTimeOffset > -infTime; }
const o2::trk::ChipSimResponse* getAlpSimResponse() const { return mAlpSimResponse; }
void setAlpSimResponse(const o2::trk::ChipSimResponse* par) { mAlpSimResponse = par; }
const SignalShape& getSignalShape() const { return mSignalShape; }
SignalShape& getSignalShape() { return (SignalShape&)mSignalShape; }
virtual void print() const;
private:
static constexpr double infTime = 1e99;
bool mIsContinuous = false; ///< flag for continuous simulation
float mNoisePerPixel = 1.e-8; ///< ALPIDE Noise per chip
int mROFrameLengthInBC = 0; ///< ROF length in BC for continuos mode
float mROFrameLength = 0; ///< length of RO frame in ns
float mStrobeDelay = 0.; ///< strobe start (in ns) wrt ROF start
float mStrobeLength = 0; ///< length of the strobe in ns (sig. over threshold checked in this window only)
double mTimeOffset = -2 * infTime; ///< time offset (in seconds!) to calculate ROFrame from hit time
int mROFrameBiasInBC = 0; ///< misalignment of the ROF start in BC
int mChargeThreshold = 1; ///< charge threshold in Nelectrons
int mMinChargeToAccount = 1; ///< minimum charge contribution to account
int mNSimSteps = 475; ///< number of steps in response simulation
float mNSimStepsInv = 1. / mNSimSteps; ///< its inverse
float mEnergyToNElectrons = 1. / 3.6e-9; // conversion of eloss to Nelectrons
float mVbb = 0.0; ///< back bias absolute value for MFT (in Volt)
float mIBVbb = 0.0; ///< back bias absolute value for ITS Inner Barrel (in Volt)
float mOBVbb = 0.0; ///< back bias absolute value for ITS Outter Barrel (in Volt)
o2::itsmft::AlpideSignalTrapezoid mSignalShape; ///< signal timeshape parameterization
const o2::trk::ChipSimResponse* mAlpSimResponse = nullptr; //!< pointer on external response
// auxiliary precalculated parameters
float mROFrameLengthInv = 0; ///< inverse length of RO frame in ns
// ClassDef(DigiParams, 2);
};
} // namespace trk
} // namespace o2
#endif