Skip to content

Commit 111681b

Browse files
committed
ITS3: DigiParams amendment
Signed-off-by: Felix Schlepper <[email protected]>
1 parent a0f283f commit 111681b

File tree

3 files changed

+39
-30
lines changed

3 files changed

+39
-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)
Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
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+
112
#ifndef ITS3_DIGIPARAMS_H
213
#define ITS3_DIGIPARAMS_H
314

415
#include "ITSMFTSimulation/DigiParams.h"
516

6-
namespace o2 {
7-
8-
namespace its3
17+
namespace o2::its3
918
{
1019

11-
class DigiParams : public o2::itsmft::DigiParams
20+
class DigiParams final : public o2::itsmft::DigiParams
1221
{
1322
public:
14-
DigiParams() = default;
15-
~DigiParams() = default;
16-
1723
const o2::itsmft::AlpideSimResponse* getAlpSimResponse() const = delete;
1824
void setAlpSimResponse(const o2::itsmft::AlpideSimResponse* par) = delete;
1925

@@ -23,17 +29,17 @@ class DigiParams : public o2::itsmft::DigiParams
2329
const o2::itsmft::AlpideSimResponse* getIBSimResponse() const { return mIBSimResponse; }
2430
void setIBSimResponse(const o2::itsmft::AlpideSimResponse* response) { mIBSimResponse = response; }
2531

26-
void print() const;
32+
bool hasResponseFunctions() const { return mIBSimResponse != nullptr && mOBSimResponse != nullptr; }
33+
34+
void print() const final;
2735

2836
private:
29-
const o2::itsmft::AlpideSimResponse* mOBSimResponse = nullptr; //!< pointer to external response
30-
const o2::itsmft::AlpideSimResponse* mIBSimResponse = nullptr; //!< pointer to external response
37+
const o2::itsmft::AlpideSimResponse* mOBSimResponse = nullptr; //!< pointer to external response
38+
const o2::itsmft::AlpideSimResponse* mIBSimResponse = nullptr; //!< pointer to external response
3139

3240
ClassDefNV(DigiParams, 1);
3341
};
3442

35-
} // namespace its3
36-
37-
} // namespace o2
43+
} // namespace o2::its3
3844

39-
#endif
45+
#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)