CbmRoot
CbmStsSimSensor.h
Go to the documentation of this file.
1 
6 #ifndef CBMSTSSIMSENSOR_H
7 #define CBMSTSSIMSENSOR_H 1
8 
9 
10 #include <TObject.h>
11 #include <TString.h>
12 
13 class CbmLink;
14 class CbmStsElement;
16 class CbmStsParSim;
17 class CbmStsPoint;
18 class CbmStsSensorPoint;
19 class CbmStsSimModule;
20 
21 
32 class CbmStsSimSensor : public TObject {
33 
34 public:
38  CbmStsSimSensor(CbmStsElement* element = nullptr);
39 
40 
42  CbmStsSimSensor(const CbmStsSimSensor&) = delete;
43 
44 
47 
48 
50  virtual ~CbmStsSimSensor() {};
51 
52 
57  static UInt_t GetAddressFromName(TString name);
58 
59 
63  const CbmStsParSensorCond* GetConditions() const { return fConditions; }
64 
65 
69  CbmLink* GetCurrentLink() const { return fCurrentLink; }
70 
71 
75  CbmStsElement* GetElement() const { return fElement; }
76 
77 
81  CbmStsSimModule* GetModule() const { return fModule; }
82 
83 
89  virtual Bool_t Init() { return kTRUE; }
90 
91 
95  Int_t GetSensorId() const;
96 
97 
106  Int_t ProcessPoint(const CbmStsPoint* point,
107  Double_t eventTime = 0.,
108  CbmLink* link = NULL);
109 
110 
114  void SetConditions(const CbmStsParSensorCond* conditions) {
115  fConditions = conditions;
116  }
117 
118 
122  void SetElement(CbmStsElement* element) { fElement = element; }
123 
124 
134  void SetField(Double_t bX, Double_t bY, Double_t bZ) {
135  fBx = bX;
136  fBy = bY;
137  fBz = bZ;
138  }
139 
140 
144  void SetModule(CbmStsSimModule* module) { fModule = module; }
145 
146 
150  void SetSimSettings(const CbmStsParSim* settings) { fSettings = settings; }
151 
152 
156  // void SetParameters(const CbmStsParSensor* par) {
157  // fParameters = par;
158  // }
159 
160 
162  virtual std::string ToString() const = 0;
163 
164 
165 protected:
166  CbmStsElement* fElement = nullptr;
168  const CbmStsParSim* fSettings = nullptr;
169  //const CbmStsParSensor* fParameters = nullptr; //! Sensor parameters
170  const CbmStsParSensorCond* fConditions = nullptr;
171  Double_t fBx = 0.;
172  Double_t fBy = 0.;
173  Double_t fBz = 0.;
174  CbmLink* fCurrentLink = nullptr;
175 
176 
185  virtual Int_t CalculateResponse(CbmStsSensorPoint* point) = 0;
186 
187 
189 };
190 
191 #endif
CbmStsSimSensor::fCurrentLink
CbmLink * fCurrentLink
Definition: CbmStsSimSensor.h:174
CbmStsSimSensor::SetElement
void SetElement(CbmStsElement *element)
Set the corresponding STS setup element.
Definition: CbmStsSimSensor.h:122
CbmStsSimSensor::SetSimSettings
void SetSimSettings(const CbmStsParSim *settings)
Set the simulation settings.
Definition: CbmStsSimSensor.h:150
CbmStsSimSensor::ProcessPoint
Int_t ProcessPoint(const CbmStsPoint *point, Double_t eventTime=0., CbmLink *link=NULL)
Process one MC Point.
Definition: CbmStsSimSensor.cxx:52
CbmStsParSensorCond
Parameters for operating conditions of a STS sensor.
Definition: CbmStsParSensorCond.h:28
CbmStsSimSensor::~CbmStsSimSensor
virtual ~CbmStsSimSensor()
Destructor
Definition: CbmStsSimSensor.h:50
CbmStsSimSensor::fSettings
const CbmStsParSim * fSettings
Simulation module.
Definition: CbmStsSimSensor.h:168
CbmStsSensorPoint
Container class for a local point in a STS sensor.
Definition: CbmStsSensorPoint.h:19
CbmStsSimSensor
Class for the simulation of a sensor in the CBM-STS.
Definition: CbmStsSimSensor.h:32
CbmStsSimSensor::GetConditions
const CbmStsParSensorCond * GetConditions() const
Sensor conditions.
Definition: CbmStsSimSensor.h:63
CbmStsSimSensor::GetAddressFromName
static UInt_t GetAddressFromName(TString name)
Get the address from the sensor name (static)
Definition: CbmStsSimSensor.cxx:30
CbmStsPoint
Definition: CbmStsPoint.h:27
CbmStsSimSensor::CbmStsSimSensor
CbmStsSimSensor(CbmStsElement *element=nullptr)
Standard constructor.
CbmStsSimSensor::GetCurrentLink
CbmLink * GetCurrentLink() const
Current link object.
Definition: CbmStsSimSensor.h:69
CbmStsSimSensor::CalculateResponse
virtual Int_t CalculateResponse(CbmStsSensorPoint *point)=0
Link to currently processed MCPoint.
CbmStsSimSensor::SetModule
void SetModule(CbmStsSimModule *module)
Set the corresponding simulation module.
Definition: CbmStsSimSensor.h:144
CbmStsSimSensor::GetModule
CbmStsSimModule * GetModule() const
Simulation module.
Definition: CbmStsSimSensor.h:81
CbmStsSimSensor::CbmStsSimSensor
CbmStsSimSensor(const CbmStsSimSensor &)=delete
Copy constructor (disabled)
CbmStsSimSensor::fBx
Double_t fBx
Operating conditions.
Definition: CbmStsSimSensor.h:171
CbmStsSimSensor::fBy
Double_t fBy
y component of magnetic field in sensor centre
Definition: CbmStsSimSensor.h:172
CbmStsSimSensor::SetConditions
void SetConditions(const CbmStsParSensorCond *conditions)
Definition: CbmStsSimSensor.h:114
CbmStsSimSensor::fBz
Double_t fBz
z component of magnetic field in sensor centre
Definition: CbmStsSimSensor.h:173
CbmStsSimSensor::fConditions
const CbmStsParSensorCond * fConditions
Simulation settings.
Definition: CbmStsSimSensor.h:170
CbmStsSimSensor::GetElement
CbmStsElement * GetElement() const
Corresponding element in STS setup.
Definition: CbmStsSimSensor.h:75
CbmStsSimSensor::SetField
void SetField(Double_t bX, Double_t bY, Double_t bZ)
Set the magnetic field in the sensor centre.
Definition: CbmStsSimSensor.h:134
CbmStsParSim
Settings for STS simulation (digitizer)
Definition: CbmStsParSim.h:25
CbmStsSimSensor::ToString
virtual std::string ToString() const =0
Set the sensor parameters.
CbmStsSimSensor::GetSensorId
Int_t GetSensorId() const
Sensor ID.
Definition: CbmStsSimSensor.cxx:44
CbmStsSimModule
Class for the simulation of a readout unit in the CBM-STS.
Definition: CbmStsSimModule.h:42
CbmStsSimSensor::fModule
CbmStsSimModule * fModule
Setup element.
Definition: CbmStsSimSensor.h:167
CbmStsSimSensor::Init
virtual Bool_t Init()
Initialise the sensor, if needed.
Definition: CbmStsSimSensor.h:89
CbmStsSimSensor::fElement
CbmStsElement * fElement
Definition: CbmStsSimSensor.h:166
CbmStsSimSensor::ClassDef
ClassDef(CbmStsSimSensor, 1)
CbmStsElement
Class representing an element of the STS setup.
Definition: CbmStsElement.h:32
CbmStsSimSensor::operator=
CbmStsSimSensor & operator=(const CbmStsSimSensor &)=delete
Assignment operator (disabled)