BmnRoot 26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
CbmStsSector.h
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- CbmStsSector header file -----
3// ----- Created 28/08/06 by V. Friese -----
4// -------------------------------------------------------------------------
5
6/** CbmStsSector.h
7 *@author V.Friese <v.friese@gsi.de>
8 *@since 28.08.06
9 *@version 1.0
10 **
11 ** This class describes the digitisation scheme for a sector of the STS.
12 ** The sector is rectangular with extensions fLx and fLy. The following
13 ** types are implemented:
14 ** 1 = pixel detector without charge sharing
15 ** 2 = double sides strip detector, all channels read out
16 ** 3 = double sided strip detector with double metal layer,
17 ** readout at the bottom corner
18 ** In case of strip detectors, the internal coordinate system sees
19 ** x across and y along the front side strips.
20 ** The origin of the internal sector coordinate system is at the lower
21 ** left corner of the sector, i.e. x runs from 0 to fLx,
22 ** and y from 0 to fLy.
23 ** For strip detectors, the readout pitch is the same on the front and
24 ** the back side, i.e. the strip pitch on the back side is smaller.
25 ** The sector can be translated and rotated in the c.s. of the station.
26 **/
27
28#ifndef CBMSTSSECTOR_H
29#define CBMSTSSECTOR_H 1
30
31#include "TNamed.h"
32#include "TObjArray.h"
33#include "TString.h"
34
35#include <list>
36#include <map>
37#include <set>
38#include <vector>
39
40class CbmStsSensor;
42
43class CbmStsSector : public TNamed
44{
45 public:
46 /** Default constructor **/
48
49 /** Standard constructor
50 *@param tempName Sector name
51 *@param detId Unique detector identifier
52 **/
53 CbmStsSector(TString tempName, Int_t detId);
54
55 /** Destructor **/
56 virtual ~CbmStsSector();
57
58 /** Accessors **/
59 TString GetDetectorName() const { return fName.Data(); }
60 Int_t GetDetectorId() const { return fDetectorId; }
61 Int_t GetSystemId() const { return (fDetectorId & (15 << 24)) >> 24; }
62 Int_t GetStationNr() const { return (fDetectorId & (255 << 16)) >> 16; }
64 { // sector number within station
65 return (fDetectorId & (4095 << 4)) >> 4;
66 }
70
71 Int_t GetNSensors() const { return fSensors->GetEntriesFast(); }
73
74 CbmStsSensor* GetSensor(Int_t iSensor) { return (CbmStsSensor*)fSensors->At(iSensor); }
76
77 void AddSensor(CbmStsSensorDigiPar* sensorPar);
78 void AddSensor(CbmStsSensor* sensor);
79
80 // Retrieve from sensor
81 Int_t GetType() const { return fType; }
82 Double_t GetRotation() const { return fRotation; }
83 Double_t GetDx() const { return fDx; }
84 Double_t GetDy() const { return fDy; }
85 Double_t GetStereoF() const { return fStereoF; }
86 Double_t GetStereoB() const { return fStereoB; }
87 Double_t GetSigmaX() const { return fSigmaX; }
88 Double_t GetSigmaY() const { return fSigmaY; }
89 Double_t GetSigmaXY() const { return fSigmaXY; }
90
91 /** The index of the MCPoint that has caused a combination of
92 ** front and back strip to be fired. Returns -1 for combinations
93 ** of strips fired by different points (fake hits)
94 *@param iFStrip Front strip number
95 *@param iBStrip Back strip number
96 *@value Index of MCPoint
97 **/
98 Int_t PointIndex(Int_t iFStrip, Int_t iBStrip);
99
100 Int_t Intersect(Int_t iFStrip, Int_t iBStrip, Double_t& xCross, Double_t& yCross, Double_t& zCross);
101 Int_t IntersectClusters(Double_t fChan, Double_t bChan, Double_t& xCross, Double_t& yCross, Double_t& zCross);
102
103 /** Clear the maps of fired strips **/
104 void Reset();
105
106 /** Screen output **/
107 void Print();
108
109 private:
110 /** ------------- Data members --------------------------**/
111 Int_t fDetectorId; // Unique detector ID
112
113 TObjArray* fSensors; // Array of CbmStsSensors
114
115 Int_t fType; // Sensor type
116 Double_t fRotation; // Rotation angle in global c.m. [rad]
117 Double_t fDx; // Strip readout pitch or pixel size in x [cm]
118 Double_t fDy; // Pixel size in y [cm] for pixel sensor
119 Double_t fStereoF; // StereoB angle [rad] for strip sensor.
120 Double_t fStereoB; // StereoF angle [rad] for strip sensor.
121
122 /** Errors of hit coordinates. For pixel sensor: size/sqrt(12),
123 ** for strip sensors RMS of overlap of front and back side strip **/
124 // Logically, this belongs to the HitFinder, but it is here
125 // for performance reasons: to be executed once per sensor, not for
126 // each MCPoint
127 Double_t fSigmaX; // RMS in x, global c.s. [cm]
128 Double_t fSigmaY; // RMS in y, global c.s. [cm]
129 Double_t fSigmaXY; // Covariance in global c.s. [cm**2]
130
131 /** Number of channels in front and back plane **/
134
135 /** STL sets containing the active channels **/
136 std::set<Int_t> fFrontActive; //!
137 std::set<Int_t> fBackActive; //!
138
139 std::map<Int_t, Int_t> fSensorMap; //! Map from sensor number to index
140
141 /** STL map from the indizes of the fired strips to the
142 ** index of the MCPoint **/
143 std::map<std::pair<Int_t, Int_t>, Int_t> fTrueHits; //!
144
147
149};
150
151#endif
int Int_t
double Double_t
#define ClassDef(name, id)
Int_t GetType() const
void AddSensor(CbmStsSensorDigiPar *sensorPar)
Int_t fNChannelsFront
Number of channels in front and back plane.
void Reset()
Clear the maps of fired strips.
Int_t GetSectorNr() const
Double_t fStereoF
TObjArray * fSensors
TObjArray * GetSensors()
CbmStsSector operator=(const CbmStsSector &)
Int_t PointIndex(Int_t iFStrip, Int_t iBStrip)
The index of the MCPoint that has caused a combination of front and back strip to be fired.
Int_t fNChannelsBack
Int_t fDetectorId
----------— Data members -----------------------—
Int_t GetStationNr() const
CbmStsSensor * GetSensorByNr(Int_t sensorNr)
Double_t GetDx() const
Int_t GetSystemId() const
Double_t GetDy() const
virtual ~CbmStsSector()
Destructor.
CbmStsSector(const CbmStsSector &)
Double_t fStereoB
std::map< std::pair< Int_t, Int_t >, Int_t > fTrueHits
Map from sensor number to index.
Int_t IntersectClusters(Double_t fChan, Double_t bChan, Double_t &xCross, Double_t &yCross, Double_t &zCross)
Double_t GetStereoF() const
Int_t GetNChannels() const
std::set< Int_t > fBackActive
Int_t GetDetectorId() const
CbmStsSector()
Default constructor.
Double_t fRotation
Double_t fSigmaX
Errors of hit coordinates.
Int_t GetNChannelsFront() const
void Print()
Screen output.
Double_t GetSigmaY() const
Double_t GetRotation() const
std::set< Int_t > fFrontActive
STL sets containing the active channels.
std::map< Int_t, Int_t > fSensorMap
Int_t GetNChannelsBack() const
TString GetDetectorName() const
Accessors.
Double_t GetSigmaXY() const
Double_t GetSigmaX() const
Double_t fSigmaY
Int_t Intersect(Int_t iFStrip, Int_t iBStrip, Double_t &xCross, Double_t &yCross, Double_t &zCross)
Double_t fSigmaXY
CbmStsSensor * GetSensor(Int_t iSensor)
Double_t GetStereoB() const
Int_t GetNSensors() const
CbmStsSensorDigiPar.h.
TString fName