CbmRoot
Loading...
Searching...
No Matches
CbmStsSimSensor.h
Go to the documentation of this file.
1/* Copyright (C) 2013-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
10#ifndef CBMSTSSIMSENSOR_H
11#define CBMSTSSIMSENSOR_H 1
12
13
14#include "CbmLink.h"
15
16#include <TObject.h>
17#include <TString.h>
18
19class CbmLink;
20class CbmStsElement;
22class CbmStsParSim;
23class CbmStsPoint;
25class CbmStsSimModule;
26
27
38class CbmStsSimSensor : public TObject {
39
40public:
44 CbmStsSimSensor(CbmStsElement* element = nullptr);
45
46
49
50
53
54
56 virtual ~CbmStsSimSensor() {};
57
58
63 static UInt_t GetAddressFromName(TString name);
64
65
70
71
75 const CbmLink& GetCurrentLink() const { return fCurrentLink; }
76
77
81 CbmStsElement* GetElement() const { return fElement; }
82
83
87 CbmStsSimModule* GetModule() const { return fModule; }
88
89
95 virtual Bool_t Init() { return kTRUE; }
96
97
101 Int_t GetSensorId() const;
102
103
112 Int_t ProcessPoint(const CbmStsPoint* point, Double_t eventTime, const CbmLink& link);
113
114
118 void SetConditions(const CbmStsParSensorCond* conditions) { fConditions = conditions; }
119
120
124 void SetElement(CbmStsElement* element) { fElement = element; }
125
126
136 void SetField(Double_t bX, Double_t bY, Double_t bZ)
137 {
138 fBx = bX;
139 fBy = bY;
140 fBz = bZ;
141 }
142
143
147 void SetModule(CbmStsSimModule* module) { fModule = module; }
148
149
153 void SetSimSettings(const CbmStsParSim* settings) { fSettings = settings; }
154
155
159 // void SetParameters(const CbmStsParSensor* par) {
160 // fParameters = par;
161 // }
162
163
165 virtual std::string ToString() const = 0;
166
167
168protected:
171 const CbmStsParSim* fSettings = nullptr;
172 //const CbmStsParSensor* fParameters = nullptr; //! Sensor parameters
174 Double_t fBx = 0.;
175 Double_t fBy = 0.;
176 Double_t fBz = 0.;
178
179
188 virtual Int_t CalculateResponse(CbmStsSensorPoint* point) = 0;
189
190
192};
193
194#endif
Class representing an element of the STS setup.
Parameters for operating conditions of a STS sensor.
Settings for STS simulation (digitizer)
Container class for a local point in a STS sensor.
Class for the simulation of a readout unit in the CBM-STS.
Class for the simulation of a sensor in the CBM-STS.
CbmStsSimSensor(CbmStsElement *element=nullptr)
Standard constructor.
void SetField(Double_t bX, Double_t bY, Double_t bZ)
Set the magnetic field in the sensor centre.
CbmStsSimModule * GetModule() const
Simulation module.
Int_t GetSensorId() const
Sensor ID.
virtual ~CbmStsSimSensor()
Destructor
virtual Bool_t Init()
Initialise the sensor, if needed.
ClassDef(CbmStsSimSensor, 1)
Int_t ProcessPoint(const CbmStsPoint *point, Double_t eventTime, const CbmLink &link)
Process one MC Point.
Double_t fBx
Operating conditions.
const CbmLink & GetCurrentLink() const
Current link object.
CbmStsElement * GetElement() const
Corresponding element in STS setup.
CbmStsSimSensor & operator=(const CbmStsSimSensor &)=delete
Assignment operator (disabled)
CbmStsElement * fElement
static UInt_t GetAddressFromName(TString name)
Get the address from the sensor name (static)
CbmStsSimSensor(const CbmStsSimSensor &)=delete
Copy constructor (disabled)
Double_t fBz
z component of magnetic field in sensor centre
const CbmStsParSensorCond * GetConditions() const
Sensor conditions.
Double_t fBy
y component of magnetic field in sensor centre
CbmStsSimModule * fModule
Setup element.
const CbmStsParSensorCond * fConditions
Simulation settings.
void SetElement(CbmStsElement *element)
Set the corresponding STS setup element.
void SetSimSettings(const CbmStsParSim *settings)
Set the simulation settings.
void SetConditions(const CbmStsParSensorCond *conditions)
void SetModule(CbmStsSimModule *module)
Set the corresponding simulation module.
virtual std::string ToString() const =0
Set the sensor parameters.
const CbmStsParSim * fSettings
Simulation module.
virtual Int_t CalculateResponse(CbmStsSensorPoint *point)=0
Link to currently processed MCPoint.