StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPxlDb.h
1 
6 /***************************************************************************
7  *
8  * $Id: StPxlDb.h,v 1.11 2018/03/15 21:33:07 dongx Exp $
9  *
10  * Author: Qiu Hao, Jan 2014
11  ***************************************************************************
12  *
13  * Description:
14  * DB information on pxl geometry and sensor/row/column status
15  * More information at
16  * https://www.star.bnl.gov/protected/heavy/qiuh/HFT/software/PXL_software.pdf
17  *
18  ***************************************************************************
19  *
20  * $Log: StPxlDb.h,v $
21  * Revision 1.11 2018/03/15 21:33:07 dongx
22  * *** empty log message ***
23  *
24  * Revision 1.10 2017/09/01 03:10:49 dongx
25  * Added access functions for pxlDigmapsSim table
26  *
27  * Revision 1.9 2014/10/07 19:25:28 smirnovd
28  * StPxlDbMaker/: Collected all debugging print statements into a single Print() which is called only when Debug2 option is specified
29  *
30  * Revision 1.8 2014/08/27 16:52:14 qiuh
31  * change pxlRowColumnStatus to pxlBadRowColumns to decrease DB szie
32  *
33  * Revision 1.7 2014/08/06 11:43:34 jeromel
34  * Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
35  *
36  * Revision 1.6 2014/07/15 23:28:48 smirnovd
37  * Minor style changes
38  *
39  * Revision 1.5 2014/07/15 23:28:34 smirnovd
40  * .msg
41  *
42  * Revision 1.4 2014/04/01 15:28:18 qiuh
43  * add single hot pixel masking
44  *
45  * Revision 1.3 2014/03/06 00:50:45 smirnovd
46  * Nothing changed, it is a test
47  *
48  * Revision 1.2 2014/01/28 19:29:37 qiuh
49  * *** empty log message ***
50  *
51  *
52  **************************************************************************/
53 
54 #ifndef StPxlDb_h
55 #define StPxlDb_h
56 
57 #include "StPxlUtil/StPxlConstants.h"
58 #include "StObject.h"
59 #include "TGeoMatrix.h"
60 #include <map>
61 
62 class pxlSensorStatus_st;
63 class pxlRowColumnStatus_st;
64 class pxlBadRowColumns_st;
65 class pxlHotPixels_st;
66 class Survey_st;
67 class pxlSensorTps_st;
68 class pxlControl_st;
69 class StThinPlateSpline;
70 class pxlDigmapsSim_st;
71 class pxlSimPar_st;
72 
73 
96 class StPxlDb : public StObject
97 {
98 public:
99  StPxlDb();
100 
102  const TGeoHMatrix *geoHMatrixTpcOnGlobal() const
103  {return mGeoHMatrixTpcOnGlobal;}
104  const TGeoHMatrix *geoHMatrixIdsOnTpc() const
105  {return &mGeoHMatrixIdsOnTpc;}
106  const TGeoHMatrix *geoHMatrixPstOnIds() const
107  {return &mGeoHMatrixPstOnIds;}
108  const TGeoHMatrix *geoHMatrixPxlOnPst() const
109  {return &mGeoHMatrixPxlOnPst;}
110  const TGeoHMatrix *geoHMatrixHalfOnPxl(Int_t half) const
111  {return &mGeoHMatrixHalfOnPxl[half - 1];}
112  const TGeoHMatrix *geoHMatrixSectorOnHalf(Int_t sector) const
113  {return &mGeoHMatrixSectorOnHalf[sector - 1];}
114  const TGeoHMatrix *geoHMatrixLadderOnSector(Int_t sector, Int_t ladder) const
115  {return &mGeoHMatrixLadderOnSector[sector - 1][ladder - 1];}
116  const TGeoHMatrix *geoHMatrixSensorOnLadder(Int_t sector, Int_t ladder, Int_t sensor) const
117  {return &mGeoHMatrixSensorOnLadder[sector - 1][ladder - 1][sensor - 1];}
118  const TGeoHMatrix *geoHMatrixSensorOnGlobal(Int_t sector, Int_t ladder, Int_t sensor) const
119  {return &mGeoHMatrixSensorOnGlobal[sector - 1][ladder - 1][sensor - 1];}
120 
122  Int_t sensorStatus(Int_t sector, Int_t ladder, Int_t sensor) const;
123  Int_t rowStatus(Int_t sector, Int_t ladder, Int_t sensor, Int_t row) const;
124  Int_t columnStatus(Int_t sector, Int_t ladder, Int_t sensor, Int_t column) const;
125  Int_t pixelHot(Int_t sector, Int_t ladder, Int_t sensor, Int_t row, Int_t column) const;
126  const StThinPlateSpline *thinPlateSpline(Int_t sector, Int_t ladder, Int_t sensor) const
127  {return mThinPlateSpline[sector - 1][ladder - 1][sensor - 1];}
128 
130  const pxlControl_st *pxlControl() {return mPxlControl;}
131 
133  const pxlDigmapsSim_st *pxlDigmapsSim() {return mPxlDigmapsSim;}
134 
136  const pxlSimPar_st *pxlSimPar() {return mPxlSimPar;}
137 
138  void setGeoHMatrices(Survey_st **tables);
139  void setSensorStatus(pxlSensorStatus_st *sensorStatus) {mSensorStatusTable = sensorStatus;}
140  void setRowColumnStatus(pxlRowColumnStatus_st *rowColumnStatus) {mRowColumnStatusTable = rowColumnStatus;}
141  void setBadRowColumns(pxlBadRowColumns_st *badRowColumns);
142  void setHotPixels(pxlHotPixels_st *hotPixelsTable);
143  void setThinPlateSpline(pxlSensorTps_st *pxlSensorTps);
144  void setPxlControl(pxlControl_st *pxlControl) {mPxlControl = pxlControl;}
145  void setPxlDigmapsSim(pxlDigmapsSim_st *pxlDigmapsSim) {mPxlDigmapsSim = pxlDigmapsSim;}
146  void setPxlSimPar(pxlSimPar_st *pxlSimPar) {mPxlSimPar = pxlSimPar;}
147 
148  virtual void Print(Option_t *opt = "") const;
149  virtual const char *GetCVS() const {
150  static const char cvs[] = "Tag $Name: $ $Id: StPxlDb.h,v 1.11 2018/03/15 21:33:07 dongx Exp $ built " __DATE__ " " __TIME__ ;
151  return cvs;
152  }
153 
154 private:
156  TGeoHMatrix *mGeoHMatrixTpcOnGlobal;
157  TGeoHMatrix mGeoHMatrixIdsOnTpc;
158  TGeoHMatrix mGeoHMatrixPstOnIds;
159  TGeoHMatrix mGeoHMatrixPxlOnPst;
160  TGeoHMatrix mGeoHMatrixHalfOnPxl[2];
161  TGeoHMatrix mGeoHMatrixSectorOnHalf[kNumberOfPxlSectors];
162  TGeoHMatrix mGeoHMatrixLadderOnSector[kNumberOfPxlSectors][kNumberOfPxlLaddersPerSector];
163  TGeoHMatrix mGeoHMatrixSensorOnLadder[kNumberOfPxlSectors][kNumberOfPxlLaddersPerSector][kNumberOfPxlSensorsPerLadder];
164  TGeoHMatrix mGeoHMatrixSensorOnGlobal[kNumberOfPxlSectors][kNumberOfPxlLaddersPerSector][kNumberOfPxlSensorsPerLadder];
165 
167  pxlSensorStatus_st *mSensorStatusTable;
168  pxlRowColumnStatus_st *mRowColumnStatusTable;
169  map<unsigned int,short> mMapHotPixels;
170  pxlControl_st *mPxlControl;
171  StThinPlateSpline *mThinPlateSpline[kNumberOfPxlSectors][kNumberOfPxlLaddersPerSector][kNumberOfPxlSensorsPerLadder];
172  pxlDigmapsSim_st *mPxlDigmapsSim;
173  pxlSimPar_st *mPxlSimPar;
174 
175  ClassDef(StPxlDb, 0)
176 };
177 #endif
void setThinPlateSpline(pxlSensorTps_st *pxlSensorTps)
create sensor thin plate spline functions and set their parameters
Definition: StPxlDb.cxx:193
const pxlSimPar_st * pxlSimPar()
Definition: StPxlDb.h:136
const pxlDigmapsSim_st * pxlDigmapsSim()
Definition: StPxlDb.h:133
const pxlControl_st * pxlControl()
Definition: StPxlDb.h:130
void setGeoHMatrices(Survey_st **tables)
set geoHMatrix parameters with parameters from Survey_st tables
Definition: StPxlDb.cxx:87
Int_t pixelHot(Int_t sector, Int_t ladder, Int_t sensor, Int_t row, Int_t column) const
1: hot; 0: good
Definition: StPxlDb.cxx:181
Int_t sensorStatus(Int_t sector, Int_t ladder, Int_t sensor) const
status for sensor/row/column
Definition: StPxlDb.cxx:163
const TGeoHMatrix * geoHMatrixTpcOnGlobal() const
geoHMatrices describing rotation + shift tranlations between different coordinate systems ...
Definition: StPxlDb.h:102
Int_t rowStatus(Int_t sector, Int_t ladder, Int_t sensor, Int_t row) const
1: good status
Definition: StPxlDb.cxx:169
const TGeoHMatrix * geoHMatrixHalfOnPxl(Int_t half) const
&lt; 1: north 2: south
Definition: StPxlDb.h:110
Int_t columnStatus(Int_t sector, Int_t ladder, Int_t sensor, Int_t column) const
1: good status
Definition: StPxlDb.cxx:175
const StThinPlateSpline * thinPlateSpline(Int_t sector, Int_t ladder, Int_t sensor) const
&lt; thin plate spline function to describe the sensor surface
Definition: StPxlDb.h:126