PandaRoot
PndGemSensor Class Reference

#include <PndGemSensor.h>

Inheritance diagram for PndGemSensor:
PndGemSensorMonitor

Public Member Functions

 PndGemSensor ()
 
 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, Double_t stripAngle0, Double_t stripAngle1, Double_t pitch0, Double_t pitch1)
 
 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, Double_t d, Double_t stripAngle0, Double_t stripAngle1, Double_t pitch0, Double_t pitch1)
 
 PndGemSensor (const PndGemSensor &tempSensor)
 
virtual ~PndGemSensor ()
 
TString GetDetectorName () const
 
void SetDetectorId (Int_t stationNr, Int_t sensorNr)
 
Int_t GetDetectorId () const
 
Int_t GetSystemId () const
 
Int_t GetStationNr () const
 
Int_t GetSensorNr () const
 
Int_t GetType () const
 
Double_t GetX0 () const
 
Double_t GetY0 () const
 
Double_t GetZ0 () const
 
Double_t GetRotation () const
 
Double_t GetInnerRadius () const
 
Double_t GetOuterRadius () const
 
Double_t GetD () const
 
Double_t GetStripAngle (Int_t index) const
 
Double_t GetPitch (Int_t index) const
 
Double_t GetSigmaX () const
 
Double_t GetSigmaY () const
 
Double_t GetSigmaXY () const
 
Int_t GetNChannels () const
 
Int_t GetNChannelsFront () const
 
Int_t GetNChannelsBack () const
 
Int_t GetSideChannels (Int_t si) const
 
Int_t GetChannel (Double_t x, Double_t y, Int_t iSide)
 
Int_t GetChannel2 (Double_t x, Double_t y, Int_t iSide, Double_t &feeDist)
 
Bool_t Inside (Double_t x, Double_t y)
 
Bool_t Inside (Double_t radius)
 
Double_t GetStripOrientation (Double_t x, Double_t y, Int_t iSide)
 
Double_t GetDistance (Int_t iSide, Double_t chan1, Double_t chan2)
 
Int_t GetDistance (Int_t iSide, Int_t chanMin, Int_t chanMax, Int_t chanTest)
 
Double_t GetDistance2 (Int_t iSide, Double_t chan1, Double_t chan2)
 
Int_t GetSensorPart (Int_t iSide, Int_t chan)
 
Double_t GetMeanChannel (Int_t iSide, Double_t chan1, Double_t weight1, Double_t chan2, Double_t weight2)
 
Int_t GetNeighbours (Int_t iSide, Int_t iChan, Int_t &nChan1, Int_t &nChan2, Int_t &nChan3)
 
Int_t Intersect (Double_t iFStrip, Double_t iBStrip, Double_t &xCross, Double_t &yCross, Double_t &zCross)
 
Int_t Intersect (Double_t iFStrip, Double_t iBStrip, Double_t &xCross, Double_t &yCross, Double_t &zCross, Double_t &dr, Double_t &dp)
 
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)
 
void Reset ()
 
void Print ()
 

Detailed Description

PndGemSensor.h

Author
Radoslaw Karabowicz r.kar.nosp@m.abow.nosp@m.icz@g.nosp@m.si.d.nosp@m.e
Since
12/02/2009
Version
1.0

This class describes the digitisation scheme for a sensor of the GEM. The sensor shape is circulare with inner and outer radius. The sensor center is defined in 3-D space. The rotation angle is defined as angle around the beam axis. In the sensor two views of strip orientation are defined by specifing the angle of rotation and the smallest pitch. The strip rotation angle should be understood as follows:

  • rotation angle 0 - radial strips
  • rotation angle 90 - concentric strips
  • rotation angle 60 - tilted radial strips by angle of 60deg at inner radius, the strips are straight, which means that the angle between the tilted strips and radial strips reduces as the radius grows
  • rotation angle -60 - same as above, but the start angle is -60deg The strip pitch for concentric strips is the strip width. The strip pitch for radial and tilted strips is defined as the distance between strip borders at the inner radius.

Definition at line 40 of file PndGemSensor.h.

Constructor & Destructor Documentation

◆ PndGemSensor() [1/4]

PndGemSensor::PndGemSensor ( )

Default constructor

◆ PndGemSensor() [2/4]

PndGemSensor::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,
Double_t  stripAngle0,
Double_t  stripAngle1,
Double_t  pitch0,
Double_t  pitch1 
)

Standard constructor

Parameters
fNameUnique sensor name
detIdUnique detector identifier
iTypeSensor type (1,2,3)
pos[]sensor centre coordinate in global c.s [cm]
rotationrotation in global c.s. [rad]
innerRadiussensor inner radius in [cm]
outerRadiussensor outer radius in [cm]
dsensor thickness in [cm]
stripAngle[]strip angle, if 0 - radial strips, measuring theta, if 60 - modified radial strips, joining inner ring with outer rotated by 60 deg. if 90 - concentric strips, measuring radius
pitch[]readout radial/angle strip pitch or pixel width in x/y [cm]

◆ PndGemSensor() [3/4]

PndGemSensor::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,
Double_t  d,
Double_t  stripAngle0,
Double_t  stripAngle1,
Double_t  pitch0,
Double_t  pitch1 
)

◆ PndGemSensor() [4/4]

PndGemSensor::PndGemSensor ( const PndGemSensor tempSensor)

◆ ~PndGemSensor()

virtual PndGemSensor::~PndGemSensor ( )
virtual

Destructor

Member Function Documentation

◆ GetChannel()

Int_t PndGemSensor::GetChannel ( Double_t  x,
Double_t  y,
Int_t  iSide 
)

Calculate channel number for a coordinate pair.

Parameters
xx coordinate in global c.s. [cm]
yy coordinate in global c.s. [cm]
iSide0 = front side, 1 = back side iChan channel number. -1 if point is outside sensor. Will return the same for both sides in case of pixel sensor.

Referenced by GetSideChannels().

◆ GetChannel2()

Int_t PndGemSensor::GetChannel2 ( Double_t  x,
Double_t  y,
Int_t  iSide,
Double_t &  feeDist 
)

Referenced by GetSideChannels().

◆ GetD()

Double_t PndGemSensor::GetD ( ) const
inline

Definition at line 86 of file PndGemSensor.h.

86 { return fD; }

◆ GetDetectorId()

Int_t PndGemSensor::GetDetectorId ( ) const
inline

Definition at line 72 of file PndGemSensor.h.

72 { return fDetectorId; }

◆ GetDetectorName()

TString PndGemSensor::GetDetectorName ( ) const
inline

Accessors

Definition at line 70 of file PndGemSensor.h.

70 { return fName.Data(); }

◆ GetDistance() [1/2]

Double_t PndGemSensor::GetDistance ( Int_t  iSide,
Double_t  chan1,
Double_t  chan2 
)

Referenced by GetSideChannels().

◆ GetDistance() [2/2]

Int_t PndGemSensor::GetDistance ( Int_t  iSide,
Int_t  chanMin,
Int_t  chanMax,
Int_t  chanTest 
)

◆ GetDistance2()

Double_t PndGemSensor::GetDistance2 ( Int_t  iSide,
Double_t  chan1,
Double_t  chan2 
)

Referenced by GetSideChannels().

◆ GetInnerRadius()

Double_t PndGemSensor::GetInnerRadius ( ) const
inline

Definition at line 84 of file PndGemSensor.h.

84 { return fInnerRadius; }

◆ GetMeanChannel()

Double_t PndGemSensor::GetMeanChannel ( Int_t  iSide,
Double_t  chan1,
Double_t  weight1,
Double_t  chan2,
Double_t  weight2 
)

Referenced by GetSideChannels().

◆ GetNChannels()

Int_t PndGemSensor::GetNChannels ( ) const
inline

Definition at line 92 of file PndGemSensor.h.

92 { return fNChannelsFront + fNChannelsBack; }

◆ GetNChannelsBack()

Int_t PndGemSensor::GetNChannelsBack ( ) const
inline

Definition at line 94 of file PndGemSensor.h.

94 { return fNChannelsBack; }

◆ GetNChannelsFront()

Int_t PndGemSensor::GetNChannelsFront ( ) const
inline

Definition at line 93 of file PndGemSensor.h.

93 { return fNChannelsFront; }

◆ GetNeighbours()

Int_t PndGemSensor::GetNeighbours ( Int_t  iSide,
Int_t  iChan,
Int_t &  nChan1,
Int_t &  nChan2,
Int_t &  nChan3 
)

Referenced by GetSideChannels().

◆ GetOuterRadius()

Double_t PndGemSensor::GetOuterRadius ( ) const
inline

Definition at line 85 of file PndGemSensor.h.

85 { return fOuterRadius; }

◆ GetPitch()

Double_t PndGemSensor::GetPitch ( Int_t  index) const
inline

Definition at line 88 of file PndGemSensor.h.

88 { return fPitch[index]; }

◆ GetRotation()

Double_t PndGemSensor::GetRotation ( ) const
inline

Definition at line 83 of file PndGemSensor.h.

83 { return fRotation; }

◆ GetSensorNr()

Int_t PndGemSensor::GetSensorNr ( ) const
inline

Definition at line 75 of file PndGemSensor.h.

76  { // sensor number within station
77  return ((fDetectorId & (3 << 6)) >> 6);
78  }

◆ GetSensorPart()

Int_t PndGemSensor::GetSensorPart ( Int_t  iSide,
Int_t  chan 
)

Referenced by GetSideChannels().

◆ GetSideChannels()

Int_t PndGemSensor::GetSideChannels ( Int_t  si) const
inline

Definition at line 96 of file PndGemSensor.h.

References GetChannel(), GetChannel2(), GetDistance(), GetDistance2(), GetMeanChannel(), GetNeighbours(), GetSensorPart(), GetStripOrientation(), Inside(), Intersect(), Print(), and Reset().

97  {
98  if (si == 0)
99  return fNChannelsFront;
100  return fNChannelsBack;
101  } // will return NChFront for si==0, and NChBack for anything else

◆ GetSigmaX()

Double_t PndGemSensor::GetSigmaX ( ) const
inline

Definition at line 89 of file PndGemSensor.h.

89 { return fSigmaX; }

◆ GetSigmaXY()

Double_t PndGemSensor::GetSigmaXY ( ) const
inline

Definition at line 91 of file PndGemSensor.h.

91 { return fSigmaXY; }

◆ GetSigmaY()

Double_t PndGemSensor::GetSigmaY ( ) const
inline

Definition at line 90 of file PndGemSensor.h.

90 { return fSigmaY; }

◆ GetStationNr()

Int_t PndGemSensor::GetStationNr ( ) const
inline

Definition at line 74 of file PndGemSensor.h.

74 { return ((fDetectorId & (8191 << 8)) >> 8); }

◆ GetStripAngle()

Double_t PndGemSensor::GetStripAngle ( Int_t  index) const
inline

Definition at line 87 of file PndGemSensor.h.

87 { return fStripAngle[index]; }

◆ GetStripOrientation()

Double_t PndGemSensor::GetStripOrientation ( Double_t  x,
Double_t  y,
Int_t  iSide 
)

Activate the channels corresponding to a MCPoint.

Parameters
iptIndex of MCPoint
xx coordinate of point (global c.s.)
yy coordinate of point (global c.s.) kTRUE if the point is inside the sensor, else kFALSE

Referenced by GetSideChannels().

◆ GetSystemId()

Int_t PndGemSensor::GetSystemId ( ) const
inline

Definition at line 73 of file PndGemSensor.h.

73 { return ((fDetectorId & (31 << 27)) >> 27); }

◆ GetType()

Int_t PndGemSensor::GetType ( ) const
inline

Definition at line 79 of file PndGemSensor.h.

79 { return fType; }

◆ GetX0()

Double_t PndGemSensor::GetX0 ( ) const
inline

Definition at line 80 of file PndGemSensor.h.

80 { return fPosition[0]; }

◆ GetY0()

Double_t PndGemSensor::GetY0 ( ) const
inline

Definition at line 81 of file PndGemSensor.h.

81 { return fPosition[1]; }

◆ GetZ0()

Double_t PndGemSensor::GetZ0 ( ) const
inline

Definition at line 82 of file PndGemSensor.h.

82 { return fPosition[2]; }

◆ Inside() [1/2]

Bool_t PndGemSensor::Inside ( Double_t  x,
Double_t  y 
)

Test whether a coordinate pair (x,y) in global coordinates is inside the sensor

Referenced by GetSideChannels().

◆ Inside() [2/2]

Bool_t PndGemSensor::Inside ( Double_t  radius)

◆ Intersect() [1/3]

Int_t PndGemSensor::Intersect ( Double_t  iFStrip,
Double_t  iBStrip,
Double_t &  xCross,
Double_t &  yCross,
Double_t &  zCross 
)

Calculates the coordinates of the intersections of front strip i with back strip j in the global coordinate system

Parameters
iFStripFront strip number
iBStripBack strip number
xCrossVector of x coordinates of crossings [cm]
yCrossVector of y coordinates of crossings [cm] Number of intersections

Referenced by GetSideChannels().

◆ Intersect() [2/3]

Int_t PndGemSensor::Intersect ( Double_t  iFStrip,
Double_t  iBStrip,
Double_t &  xCross,
Double_t &  yCross,
Double_t &  zCross,
Double_t &  dr,
Double_t &  dp 
)

◆ Intersect() [3/3]

Int_t PndGemSensor::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 
)

◆ Print()

void PndGemSensor::Print ( )

Screen output

Referenced by GetSideChannels().

◆ Reset()

void PndGemSensor::Reset ( )

The index of the MCPoint that has caused a combination of front and back strip to be fired. Returns -1 for combinations of strips fired by different points (fake hits)

Parameters
iFStripFront strip number
iBStripBack strip number Index of MCPointClear the maps of fired strips

Referenced by GetSideChannels().

◆ SetDetectorId()

void PndGemSensor::SetDetectorId ( Int_t  stationNr,
Int_t  sensorNr 
)
inline

Definition at line 71 of file PndGemSensor.h.

References kGEM.

71 { fDetectorId = static_cast<int>(DetectorId::kGEM) << 27 | 0 << 21 | stationNr << 8 | sensorNr << 6; }

The documentation for this class was generated from the following file: