Skip to content

Commit a632080

Browse files
committed
ITS3: Add DigiParams
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent f8194f2 commit a632080

File tree

4 files changed

+89
-1
lines changed

4 files changed

+89
-1
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: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
12+
#ifndef ITS3_DIGIPARAMS_H
13+
#define ITS3_DIGIPARAMS_H
14+
15+
#include "ITSMFTSimulation/DigiParams.h"
16+
17+
namespace o2::its3
18+
{
19+
20+
class DigiParams final : public o2::itsmft::DigiParams
21+
{
22+
public:
23+
const o2::itsmft::AlpideSimResponse* getAlpSimResponse() const = delete;
24+
void setAlpSimResponse(const o2::itsmft::AlpideSimResponse* par) = delete;
25+
26+
const o2::itsmft::AlpideSimResponse* getOBSimResponse() const { return mOBSimResponse; }
27+
void setOBSimResponse(const o2::itsmft::AlpideSimResponse* response) { mOBSimResponse = response; }
28+
29+
const o2::itsmft::AlpideSimResponse* getIBSimResponse() const { return mIBSimResponse; }
30+
void setIBSimResponse(const o2::itsmft::AlpideSimResponse* response) { mIBSimResponse = response; }
31+
32+
bool hasResponseFunctions() const { return mIBSimResponse != nullptr && mOBSimResponse != nullptr; }
33+
34+
void print() const final;
35+
36+
private:
37+
const o2::itsmft::AlpideSimResponse* mOBSimResponse = nullptr; //!< pointer to external response
38+
const o2::itsmft::AlpideSimResponse* mIBSimResponse = nullptr; //!< pointer to external response
39+
40+
ClassDef(DigiParams, 1);
41+
};
42+
43+
} // namespace o2::its3
44+
45+
#endif
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
12+
/// \file DigiParams.cxx
13+
/// \brief Implementation of the ITS3 digitization steering params
14+
15+
#include "Framework/Logger.h"
16+
#include "ITS3Simulation/DigiParams.h"
17+
18+
ClassImp(o2::its3::DigiParams);
19+
20+
namespace o2::its3
21+
{
22+
23+
void DigiParams::print() const
24+
{
25+
// print settings
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");
37+
getSignalShape().print();
38+
}
39+
40+
} // namespace o2::its3

Detectors/Upgrades/ITS3/simulation/src/ITS3SimulationLinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#pragma link C++ class o2::its3::ITS3Layer + ;
1919
#pragma link C++ class o2::its3::ITS3Services + ;
2020
#pragma link C++ class o2::its3::DescriptorInnerBarrelITS3 + ;
21+
#pragma link C++ class o2::its3::DigiParams + ;
2122
#pragma link C++ class o2::its3::Digitizer + ;
2223

2324
#endif

0 commit comments

Comments
 (0)