Skip to content

Commit 89508a8

Browse files
committed
ITS3: DigiParams amendment
Signed-off-by: Felix Schlepper <[email protected]>
1 parent 7a9f67e commit 89508a8

File tree

3 files changed

+28
-30
lines changed

3 files changed

+28
-30
lines changed

Detectors/Upgrades/ITS3/simulation/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ o2_add_library(ITS3Simulation
1414
src/ITS3Services.cxx
1515
src/DescriptorInnerBarrelITS3.cxx
1616
src/Digitizer.cxx
17+
src/DigiParams.cxx
1718
PUBLIC_LINK_LIBRARIES O2::SimulationDataFormat
1819
O2::ITSBase O2::ITSMFTSimulation
1920
ROOT::Physics)
@@ -23,6 +24,7 @@ o2_target_root_dictionary(ITS3Simulation
2324
include/ITS3Simulation/ITS3Services.h
2425
include/ITS3Simulation/DescriptorInnerBarrelITS3.h
2526
include/ITS3Simulation/Digitizer.h
27+
include/ITS3Simulation/DigiParams.h
2628
)
2729

28-
o2_data_file(COPY data DESTINATION Detectors/ITS3/simulation)
30+
o2_data_file(COPY data DESTINATION Detectors/ITS3/simulation)

Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/DigiParams.h

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33

44
#include "ITSMFTSimulation/DigiParams.h"
55

6-
namespace o2 {
7-
8-
namespace its3
6+
namespace o2::its3
97
{
108

11-
class DigiParams : public o2::itsmft::DigiParams
9+
class DigiParams final : public o2::itsmft::DigiParams
1210
{
1311
public:
14-
DigiParams() = default;
15-
~DigiParams() = default;
16-
1712
const o2::itsmft::AlpideSimResponse* getAlpSimResponse() const = delete;
1813
void setAlpSimResponse(const o2::itsmft::AlpideSimResponse* par) = delete;
1914

@@ -23,17 +18,17 @@ class DigiParams : public o2::itsmft::DigiParams
2318
const o2::itsmft::AlpideSimResponse* getIBSimResponse() const { return mIBSimResponse; }
2419
void setIBSimResponse(const o2::itsmft::AlpideSimResponse* response) { mIBSimResponse = response; }
2520

26-
void print() const;
21+
bool hasResponseFunctions() const { return mIBSimResponse != nullptr && mOBSimResponse != nullptr;}
22+
23+
void print() const final;
2724

2825
private:
29-
const o2::itsmft::AlpideSimResponse* mOBSimResponse = nullptr; //!< pointer to external response
30-
const o2::itsmft::AlpideSimResponse* mIBSimResponse = nullptr; //!< pointer to external response
26+
const o2::itsmft::AlpideSimResponse* mOBSimResponse = nullptr; //!< pointer to external response
27+
const o2::itsmft::AlpideSimResponse* mIBSimResponse = nullptr; //!< pointer to external response
3128

3229
ClassDefNV(DigiParams, 1);
3330
};
3431

35-
} // namespace its3
36-
37-
} // namespace o2
32+
} // namespace o2::its3
3833

39-
#endif
34+
#endif

Detectors/Upgrades/ITS3/simulation/src/DigiParams.cxx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,29 @@
1212
/// \file DigiParams.cxx
1313
/// \brief Implementation of the ITS3 digitization steering params
1414

15-
#include <fairlogger/Logger.h> // for LOG
15+
#include "Framework/Logger.h"
1616
#include "ITS3Simulation/DigiParams.h"
17-
#include <cassert>
1817

1918
ClassImp(o2::its3::DigiParams);
2019

21-
using namespace o2::its3;
20+
namespace o2::its3
21+
{
2222

23-
//______________________________________________
2423
void DigiParams::print() const
2524
{
2625
// print settings
27-
printf("ITS3 DigiParams settings:\n");
28-
printf("Continuous readout : %s\n", isContinuous() ? "ON" : "OFF");
29-
printf("Readout Frame Length(ns) : %f\n", getROFrameLength());
30-
printf("Strobe delay (ns) : %f\n", getStrobeDelay());
31-
printf("Strobe length (ns) : %f\n", getStrobeLength());
32-
printf("Threshold (N electrons) : %d\n", getChargeThreshold());
33-
printf("Min N electrons to account : %d\n", getMinChargeToAccount());
34-
printf("Number of charge sharing steps : %d\n", getNSimSteps());
35-
printf("ELoss to N electrons factor : %e\n", getEnergyToNElectrons());
36-
printf("Noise level per pixel : %e\n", getNoisePerPixel());
37-
printf("Charge time-response:\n");
26+
LOGF(info, "ITS3 DigiParams settings:\n");
27+
LOGF(info, "Continuous readout : %s\n", isContinuous() ? "ON" : "OFF");
28+
LOGF(info, "Readout Frame Length(ns) : %f\n", getROFrameLength());
29+
LOGF(info, "Strobe delay (ns) : %f\n", getStrobeDelay());
30+
LOGF(info, "Strobe length (ns) : %f\n", getStrobeLength());
31+
LOGF(info, "Threshold (N electrons) : %d\n", getChargeThreshold());
32+
LOGF(info, "Min N electrons to account : %d\n", getMinChargeToAccount());
33+
LOGF(info, "Number of charge sharing steps : %d\n", getNSimSteps());
34+
LOGF(info, "ELoss to N electrons factor : %e\n", getEnergyToNElectrons());
35+
LOGF(info, "Noise level per pixel : %e\n", getNoisePerPixel());
36+
LOGF(info, "Charge time-response:\n");
3837
getSignalShape().print();
3938
}
39+
40+
} // namespace o2::its3

0 commit comments

Comments
 (0)