Project
Loading...
Searching...
No Matches
DigiParams.cxx
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#include <fairlogger/Logger.h> // for LOG
17#include <cassert>
18
20
21using namespace o2::itsmft;
22
24{
25 // make sure the defaults are consistent
26 setNSimSteps(mNSimSteps);
27}
28
30{
31 // set ROFrame length in nanosecongs
32 assert(lNS > 1.f);
33 if (layer < 0) {
34 mROFrameLength = lNS;
35 mROFrameLengthInv = 1.f / mROFrameLength;
36 } else {
37 mROFrameLayerLength.push_back(lNS);
38 mROFrameLayerLengthInv.push_back(1.f / lNS);
39 }
40}
41
43{
44 // set number of sampling steps in silicon
45 mNSimSteps = v > 0 ? v : 1;
46 mNSimStepsInv = 1.f / mNSimSteps;
47}
48
49void DigiParams::setChargeThreshold(int v, float frac2Account)
50{
51 // set charge threshold for digits creation and its fraction to account
52 // contribution from single hit
53 mChargeThreshold = v;
54 mMinChargeToAccount = v * frac2Account;
55 if (mMinChargeToAccount < 0 || mMinChargeToAccount > mChargeThreshold) {
56 mMinChargeToAccount = mChargeThreshold;
57 }
58 LOG(info) << "Set Alpide charge threshold to " << mChargeThreshold
59 << ", single hit will be accounted from " << mMinChargeToAccount
60 << " electrons";
61}
62
63//______________________________________________
65{
66 LOGF(info, "Alpide digitization params:");
67 LOGF(info, "Continuous readout : %s", mIsContinuous ? "ON" : "OFF");
68 if (withStaggering()) {
69 for (int i{0}; i < (int)mROFrameLayerLengthInBC.size(); ++i) {
70 LOGF(info, " Readout Frame Layer:%d Length(ns)[BC] : %f [%d]", i, mROFrameLayerLength[i], mROFrameLayerLengthInBC[i]);
71 LOGF(info, "Strobe delay Layer %d (ns) : %f", i, mStrobeDelay);
72 LOGF(info, "Strobe length Layer %d (ns) : %f", i, mStrobeLength);
73 }
74 } else {
75 LOGF(info, "Readout Frame Length(ns) : %f", mROFrameLength);
76 LOGF(info, "Strobe delay (ns) : %f", mStrobeDelay);
77 LOGF(info, "Strobe length (ns) : %f", mStrobeLength);
78 }
79 LOGF(info, "Threshold (N electrons) : %d", mChargeThreshold);
80 LOGF(info, "Min N electrons to account : %d", mMinChargeToAccount);
81 LOGF(info, "Number of charge sharing steps : %d", mNSimSteps);
82 LOGF(info, "ELoss to N electrons factor : %e", mEnergyToNElectrons);
83 LOGF(info, "Noise level per pixel : %e", mNoisePerPixel);
84 LOGF(info, "Charge time-response:");
85 mSignalShape.print();
86}
Simulation parameters for the ALIPIDE chip.
ClassImp(o2::itsmft::DigiParams)
int32_t i
void setROFrameLength(float ns, int layer=-1)
virtual void print() const
void setChargeThreshold(int v, float frac2Account=0.1)
bool withStaggering() const noexcept
Definition DigiParams.h:101
const GLdouble * v
Definition glcorearb.h:832
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"