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 "Framework/Logger.h"
17#include <cstdio>
18
20
21namespace o2::its3
22{
23
25{
26 // make sure the defaults are consistent
27 setIBNSimSteps(mIBNSimSteps);
28}
29
31{
32 // set number of sampling steps in silicon
33 mIBNSimSteps = v > 0 ? v : 1;
34 mIBNSimStepsInv = 1.f / mIBNSimSteps;
35}
36
37void DigiParams::setIBChargeThreshold(int v, float frac2Account)
38{
39 // set charge threshold for digits creation and its fraction to account
40 // contribution from single hit
41 mIBChargeThreshold = v;
42 mIBMinChargeToAccount = v * frac2Account;
43 if (mIBMinChargeToAccount < 0 || mIBMinChargeToAccount > mIBChargeThreshold) {
44 mIBMinChargeToAccount = mIBChargeThreshold;
45 }
46 LOG(info) << "Set Mosaix charge threshold to " << mIBChargeThreshold
47 << ", single hit will be accounted from " << mIBMinChargeToAccount
48 << " electrons";
49}
50
52{
53 // print settings
54 printf("ITS3 DigiParams settings:\n");
55 printf("Continuous readout : %s\n", isContinuous() ? "ON" : "OFF");
56 printf("Readout Frame Length(ns) : %f\n", getROFrameLength());
57 printf("Strobe delay (ns) : %f\n", getStrobeDelay());
58 printf("Strobe length (ns) : %f\n", getStrobeLength());
59 printf("IB Threshold (N electrons) : %d\n", getIBChargeThreshold());
60 printf("OB Threshold (N electrons) : %d\n", getChargeThreshold());
61 printf("Min N electrons to account for IB : %d\n", getIBMinChargeToAccount());
62 printf("Min N electrons to account for OB : %d\n", getMinChargeToAccount());
63 printf("Number of charge sharing steps of IB : %d\n", getIBNSimSteps());
64 printf("Number of charge sharing steps of OB : %d\n", getNSimSteps());
65 printf("ELoss to N electrons factor : %e\n", getEnergyToNElectrons());
66 printf("Noise level per pixel of IB : %e\n", getIBNoisePerPixel());
67 printf("Noise level per pixel of OB : %e\n", getNoisePerPixel());
68 printf("Charge time-response:\n");
70}
71
73{
74 mIBSimResponse = response;
75 if (mIBSimResponse) {
76 mIBSimResponse->computeCentreFromData();
77 }
78}
79
80} // namespace o2::its3
ClassImp(o2::its3::DigiParams)
int getIBMinChargeToAccount() const
Definition DigiParams.h:43
void setIBNSimSteps(int v)
void setIBChargeThreshold(int v, float frac2Account=0.1)
float getIBNoisePerPixel() const
Definition DigiParams.h:34
int getIBChargeThreshold() const
Definition DigiParams.h:37
int getIBNSimSteps() const
Definition DigiParams.h:40
void setIBSimResponse(o2::its3::ChipSimResponse *response)
void print() const final
int getMinChargeToAccount() const
Definition DigiParams.h:82
const SignalShape & getSignalShape() const
Definition DigiParams.h:96
float getEnergyToNElectrons() const
Definition DigiParams.h:85
float getStrobeDelay() const
Definition DigiParams.h:62
bool isContinuous() const
Definition DigiParams.h:52
int getChargeThreshold() const
Definition DigiParams.h:81
float getNoisePerPixel() const
Definition DigiParams.h:49
float getROFrameLength() const
Definition DigiParams.h:58
int getNSimSteps() const
Definition DigiParams.h:83
float getStrobeLength() const
Definition DigiParams.h:65
const GLdouble * v
Definition glcorearb.h:832
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"