BmnRoot
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
28#ifndef CBMSTSSECTOR_H
29#define CBMSTSSECTOR_H 1
30
31#include "TObjArray.h"
32#include "TNamed.h"
33#include "TString.h"
34
35#include <map>
36#include <list>
37#include <set>
38#include <vector>
39
40class CbmStsSensor;
42
43class CbmStsSector : public TNamed
44{
45 public:
48
62 CbmStsSector(TString tempName, Int_t detId);
63
65 virtual ~CbmStsSector();
66
67
69 TString GetDetectorName() const { return fName.Data(); }
70 Int_t GetDetectorId() const {
71 return fDetectorId; }
72 Int_t GetSystemId() const {
73 return ( fDetectorId & (15<<24) ) >> 24; }
74 Int_t GetStationNr() const {
75 return ( fDetectorId & (255<<16) ) >> 16; }
76 Int_t GetSectorNr() const { // sector number within station
77 return ( fDetectorId & (4095<<4) ) >> 4; }
78 Int_t GetNChannels() const { return fNChannelsFront + fNChannelsBack; }
79 Int_t GetNChannelsFront() const { return fNChannelsFront; }
80 Int_t GetNChannelsBack () const { return fNChannelsBack; }
81
82 Int_t GetNSensors() const { return fSensors->GetEntriesFast(); }
83 TObjArray* GetSensors() { return fSensors; }
84
85 CbmStsSensor* GetSensor(Int_t iSensor) {
86 return (CbmStsSensor*) fSensors->At(iSensor); }
87 CbmStsSensor* GetSensorByNr(Int_t sensorNr);
88
90 void AddSensor(CbmStsSensor* sensor);
91
92 // Retrieve from sensor
93 Int_t GetType() const { return fType; }
94 Double_t GetRotation() const { return fRotation; }
95 Double_t GetDx() const { return fDx; }
96 Double_t GetDy() const { return fDy; }
97 Double_t GetStereoF() const { return fStereoF; }
98 Double_t GetStereoB() const { return fStereoB; }
99 Double_t GetSigmaX() const { return fSigmaX; }
100 Double_t GetSigmaY() const { return fSigmaY; }
101 Double_t GetSigmaXY() const { return fSigmaXY; }
102
110 Int_t PointIndex(Int_t iFStrip, Int_t IBStrip);
111
112 Int_t Intersect(Int_t iFStrip, Int_t iBStrip, Double_t& xCross, Double_t& yCross, Double_t& zCross);
113 Int_t IntersectClusters(Double_t fChan, Double_t bChan, Double_t& xCross, Double_t& yCross, Double_t& zCross);
114
116 void Reset();
117
118
120 void Print();
121
122 private:
124 Int_t fDetectorId; // Unique detector ID
125
126 TObjArray* fSensors; // Array of CbmStsSensors
127
128 Int_t fType; // Sensor type
129 Double_t fRotation; // Rotation angle in global c.m. [rad]
130 Double_t fDx; // Strip readout pitch or pixel size in x [cm]
131 Double_t fDy; // Pixel size in y [cm] for pixel sensor
132 Double_t fStereoF; // StereoB angle [rad] for strip sensor.
133 Double_t fStereoB; // StereoF angle [rad] for strip sensor.
134
137 // Logically, this belongs to the HitFinder, but it is here
138 // for performance reasons: to be executed once per sensor, not for
139 // each MCPoint
140 Double_t fSigmaX; // RMS in x, global c.s. [cm]
141 Double_t fSigmaY; // RMS in y, global c.s. [cm]
142 Double_t fSigmaXY; // Covariance in global c.s. [cm**2]
143
145 Int_t fNChannelsFront;
146 Int_t fNChannelsBack;
147
149 std::set<Int_t> fFrontActive;
150 std::set<Int_t> fBackActive;
151
152 std::map<Int_t, Int_t> fSensorMap;
153
156 std::map<std::pair<Int_t,Int_t>, Int_t > fTrueHits;
157
159 CbmStsSector operator=(const CbmStsSector&);
160
161
162 ClassDef(CbmStsSector,1);
163
164};
165
166
167
168
169#endif
Int_t GetType() const
void AddSensor(CbmStsSensorDigiPar *sensorPar)
virtual ~CbmStsSector()
Int_t GetSectorNr() const
CbmStsSector(TString tempName, Int_t detId)
TObjArray * GetSensors()
Int_t GetStationNr() const
CbmStsSensor * GetSensorByNr(Int_t sensorNr)
Double_t GetDx() const
Int_t GetSystemId() const
Double_t GetDy() const
Int_t IntersectClusters(Double_t fChan, Double_t bChan, Double_t &xCross, Double_t &yCross, Double_t &zCross)
Int_t PointIndex(Int_t iFStrip, Int_t IBStrip)
Double_t GetStereoF() const
Int_t GetNChannels() const
Int_t GetDetectorId() const
Int_t GetNChannelsFront() const
Double_t GetSigmaY() const
Double_t GetRotation() const
Int_t GetNChannelsBack() const
TString GetDetectorName() const
Double_t GetSigmaXY() const
Double_t GetSigmaX() const
Int_t Intersect(Int_t iFStrip, Int_t iBStrip, Double_t &xCross, Double_t &yCross, Double_t &zCross)
CbmStsSensor * GetSensor(Int_t iSensor)
Double_t GetStereoB() const
void AddSensor(CbmStsSensor *sensor)
Int_t GetNSensors() const