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
19using namespace o2::trk;
20
22{
23 // make sure the defaults are consistent
24 setNSimSteps(mNSimSteps);
25}
26
28{
29 // set ROFrame length in nanosecongs
30 mROFrameLength = lNS;
31 assert(mROFrameLength > 1.);
32 mROFrameLengthInv = 1. / mROFrameLength;
33}
34
36{
37 // set number of sampling steps in silicon
38 mNSimSteps = v > 0 ? v : 1;
39 mNSimStepsInv = 1.f / mNSimSteps;
40}
41
42void DigiParams::setChargeThreshold(int v, float frac2Account)
43{
44 // set charge threshold for digits creation and its fraction to account
45 // contribution from single hit
46 mChargeThreshold = v;
47 mMinChargeToAccount = v * frac2Account;
48 if (mMinChargeToAccount < 0 || mMinChargeToAccount > mChargeThreshold) {
49 mMinChargeToAccount = mChargeThreshold;
50 }
51 LOG(info) << "Set charge threshold to " << mChargeThreshold
52 << ", single hit will be accounted from " << mMinChargeToAccount
53 << " electrons";
54}
55
56//______________________________________________
58{
59 // print settings
60 printf("TRK digitization params:\n");
61 printf("Continuous readout : %s\n", mIsContinuous ? "ON" : "OFF");
62 printf("Readout Frame Length(ns) : %f\n", mROFrameLength);
63 printf("Strobe delay (ns) : %f\n", mStrobeDelay);
64 printf("Strobe length (ns) : %f\n", mStrobeLength);
65 printf("Threshold (N electrons) : %d\n", mChargeThreshold);
66 printf("Min N electrons to account : %d\n", mMinChargeToAccount);
67 printf("Number of charge sharing steps : %d\n", mNSimSteps);
68 printf("ELoss to N electrons factor : %e\n", mEnergyToNElectrons);
69 printf("Noise level per pixel : %e\n", mNoisePerPixel);
70 printf("Charge time-response:\n");
71 mSignalShape.print();
72}
Simulation parameters for the TRK digitizer. Based on the ITS2 and ITS3 digitizer parameters.
virtual void print() const
void setChargeThreshold(int v, float frac2Account=0.1)
void setNSimSteps(int v)
void setROFrameLength(float ns)
const GLdouble * v
Definition glcorearb.h:832
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"