29 #ifndef PNDGEMSENSOR_H 30 #define PNDGEMSENSOR_H 1 60 PndGemSensor(TString tempName, Int_t detId, Int_t iType, Double_t x0, Double_t y0, Double_t z0, Double_t rotation, Double_t innerRad, Double_t outerRad, Double_t d,
61 Double_t stripAngle0, Double_t stripAngle1, Double_t pitch0, Double_t pitch1);
62 PndGemSensor(TString tempName, Int_t stationNr, Int_t sectorNr, Int_t iType, Double_t x0, Double_t y0, Double_t z0, Double_t rotation, Double_t innerRad, Double_t outerRad,
63 Double_t d, Double_t stripAngle0, Double_t stripAngle1, Double_t pitch0, Double_t pitch1);
71 void SetDetectorId(Int_t stationNr, Int_t sensorNr) { fDetectorId =
static_cast<int>(
DetectorId::kGEM) << 27 | 0 << 21 | stationNr << 8 | sensorNr << 6; }
73 Int_t
GetSystemId()
const {
return ((fDetectorId & (31 << 27)) >> 27); }
74 Int_t
GetStationNr()
const {
return ((fDetectorId & (8191 << 8)) >> 8); }
77 return ((fDetectorId & (3 << 6)) >> 6);
80 Double_t
GetX0()
const {
return fPosition[0]; }
81 Double_t
GetY0()
const {
return fPosition[1]; }
82 Double_t
GetZ0()
const {
return fPosition[2]; }
86 Double_t
GetD()
const {
return fD; }
87 Double_t
GetStripAngle(Int_t index)
const {
return fStripAngle[index]; }
88 Double_t
GetPitch(Int_t index)
const {
return fPitch[index]; }
92 Int_t
GetNChannels()
const {
return fNChannelsFront + fNChannelsBack; }
99 return fNChannelsFront;
100 return fNChannelsBack;
110 Int_t
GetChannel(Double_t x, Double_t y, Int_t iSide);
112 Int_t
GetChannel2(Double_t x, Double_t y, Int_t iSide, Double_t &feeDist);
117 Bool_t
Inside(Double_t x, Double_t y);
118 Bool_t
Inside(Double_t radius);
129 Double_t
GetDistance(Int_t iSide, Double_t chan1, Double_t chan2);
130 Int_t
GetDistance(Int_t iSide, Int_t chanMin, Int_t chanMax, Int_t chanTest);
131 Double_t
GetDistance2(Int_t iSide, Double_t chan1, Double_t chan2);
138 Double_t
GetMeanChannel(Int_t iSide, Double_t chan1, Double_t weight1, Double_t chan2, Double_t weight2);
140 Int_t
GetNeighbours(Int_t iSide, Int_t iChan, Int_t &nChan1, Int_t &nChan2, Int_t &nChan3);
152 Int_t
Intersect(Double_t iFStrip, Double_t iBStrip, Double_t &xCross, Double_t &yCross, Double_t &zCross);
154 Int_t
Intersect(Double_t iFStrip, Double_t iBStrip, Double_t &xCross, Double_t &yCross, Double_t &zCross, Double_t &dr, Double_t &dp);
156 Int_t
Intersect(Double_t iFStrip, Double_t iBStrip, Double_t &xCross, Double_t &yCross, Double_t &zCross, Double_t &dx, Double_t &dy, Double_t &dr, Double_t &dp);
180 Double_t fPosition[3];
182 Double_t fInnerRadius;
183 Double_t fOuterRadius;
185 Double_t fStripAngle[2];
189 Int_t fNChannelsFront;
190 Int_t fNChannelsBack;
209 Int_t FrontStripNumber(Double_t x, Double_t y)
const;
217 Int_t BackStripNumber(Double_t x, Double_t y)
const;
226 Bool_t IntCoord(Double_t x, Double_t y, Double_t z, Double_t &xint, Double_t &yint, Double_t &zint)
const;
233 Bool_t IsInside(Double_t xint, Double_t yint)
const;
Int_t GetDetectorId() const
TString GetDetectorName() const
Int_t Intersect(Double_t iFStrip, Double_t iBStrip, Double_t &xCross, Double_t &yCross, Double_t &zCross)
Int_t GetNChannelsBack() const
Int_t GetSystemId() const
Double_t GetOuterRadius() const
Double_t GetSigmaY() const
Int_t GetStationNr() const
Int_t GetNChannelsFront() const
Double_t GetInnerRadius() const
Double_t GetStripOrientation(Double_t x, Double_t y, Int_t iSide)
Double_t GetRotation() const
void SetDetectorId(Int_t stationNr, Int_t sensorNr)
Int_t GetChannel(Double_t x, Double_t y, Int_t iSide)
Double_t GetPitch(Int_t index) const
Double_t GetDistance(Int_t iSide, Double_t chan1, Double_t chan2)
Int_t GetChannel2(Double_t x, Double_t y, Int_t iSide, Double_t &feeDist)
Double_t GetSigmaX() const
Double_t GetSigmaXY() const
Int_t GetNChannels() const
Int_t GetSensorNr() const
Bool_t Inside(Double_t x, Double_t y)
Int_t GetSensorPart(Int_t iSide, Int_t chan)
Double_t GetDistance2(Int_t iSide, Double_t chan1, Double_t chan2)
Int_t GetNeighbours(Int_t iSide, Int_t iChan, Int_t &nChan1, Int_t &nChan2, Int_t &nChan3)
Int_t GetSideChannels(Int_t si) const
Double_t GetMeanChannel(Int_t iSide, Double_t chan1, Double_t weight1, Double_t chan2, Double_t weight2)
Double_t GetStripAngle(Int_t index) const