Skip to content

Commit 7a9f67e

Browse files
ChunzhengLabf3sch
authored andcommitted
add DigiParams class for ITS3
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 15764fe commit 7a9f67e

File tree

4 files changed

+80
-1
lines changed

4 files changed

+80
-1
lines changed

Detectors/ITSMFT/common/simulation/include/ITSMFTSimulation/DigiParams.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class DigiParams
9696
const SignalShape& getSignalShape() const { return mSignalShape; }
9797
SignalShape& getSignalShape() { return (SignalShape&)mSignalShape; }
9898

99-
void print() const;
99+
virtual void print() const;
100100

101101
private:
102102
static constexpr double infTime = 1e99;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#ifndef ITS3_DIGIPARAMS_H
2+
#define ITS3_DIGIPARAMS_H
3+
4+
#include "ITSMFTSimulation/DigiParams.h"
5+
6+
namespace o2 {
7+
8+
namespace its3
9+
{
10+
11+
class DigiParams : public o2::itsmft::DigiParams
12+
{
13+
public:
14+
DigiParams() = default;
15+
~DigiParams() = default;
16+
17+
const o2::itsmft::AlpideSimResponse* getAlpSimResponse() const = delete;
18+
void setAlpSimResponse(const o2::itsmft::AlpideSimResponse* par) = delete;
19+
20+
const o2::itsmft::AlpideSimResponse* getOBSimResponse() const { return mOBSimResponse; }
21+
void setOBSimResponse(const o2::itsmft::AlpideSimResponse* response) { mOBSimResponse = response; }
22+
23+
const o2::itsmft::AlpideSimResponse* getIBSimResponse() const { return mIBSimResponse; }
24+
void setIBSimResponse(const o2::itsmft::AlpideSimResponse* response) { mIBSimResponse = response; }
25+
26+
void print() const;
27+
28+
private:
29+
const o2::itsmft::AlpideSimResponse* mOBSimResponse = nullptr; //!< pointer to external response
30+
const o2::itsmft::AlpideSimResponse* mIBSimResponse = nullptr; //!< pointer to external response
31+
32+
ClassDefNV(DigiParams, 1);
33+
};
34+
35+
} // namespace its3
36+
37+
} // namespace o2
38+
39+
#endif
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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 <fairlogger/Logger.h> // for LOG
16+
#include "ITS3Simulation/DigiParams.h"
17+
#include <cassert>
18+
19+
ClassImp(o2::its3::DigiParams);
20+
21+
using namespace o2::its3;
22+
23+
//______________________________________________
24+
void DigiParams::print() const
25+
{
26+
// 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");
38+
getSignalShape().print();
39+
}

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)