EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LqstGeoParData.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file LqstGeoParData.h
1 //
2 // RMP (rpetti@bnl.gov), 09-10-2014
3 //
4 // Low Q^2 tagging detector specific data definitions
5 //
6 
7 #ifndef _LQSTGEOPARDATA_
8 #define _LQSTGEOPARDATA_
9 
10 
11 #include <EicGeoParData.h>
12 //#include <EndcapGeoParData.h>
13 #include <../calorimetry/CalorimeterGeoParData.h>
14 #include "TGeoVolume.h"
15 #include "TNamed.h"
16 
17 #define _AIR_ ("air")
18 #define _DIAMOND_ ("diamond")
19 
21 /***/
22 
23 class LqstCell;
24 //class CalorimeterGeoParData;
25 
27 //class LqstGeoParData: public CalorimeterGeoParData
28 {
29 
30  friend class LqstCell;
31 
32  public:
33 
35  /***/
36  LqstGeoParData(const char *detName = 0, int version = -1, int subVersion = 0):
37  // CalorimeterGeoParData(detName, version, subVersion),
38  EicGeoParData(detName, version, subVersion),
39  nGroups(1),
40  nCellsX(1),
41  nCellsY(1) ,
42  cellFaceSize(0),
43  cellFaceLength(0),
44  ecalTowerLength(0.),
45  beamLineOffset(0.),
46  xOffset(0.),
47  totalAngle(0.),
48  totalLength(0.),
49  // tcounter(0),
50  mcell(0),
51  holder(0),
52  lqs(0) {};
53 
54 
56  /***/
57  virtual ~LqstGeoParData() {};
58 
59  void InitializeDetector(LqstGeoParData *det, int nlayers, int nX, int nY, double size, double width, double zoffset, double xoffset, double angle);
60  // LqstGeoParData *constructDetector();
62  void constructEcalLayers();
63  void constructDetector();
64 
65 
66  // some access functions
67  const double get_numCellsX() { return nCellsX; };
68  const double get_numCellsY() { return nCellsY; };
69  const double get_totalNumCells() { return nCellsX*nCellsY; };
70 
71  const double get_detectorLength() { return nCellsX*cellFaceSize; };
72  const double get_detectorHeight() { return nCellsY*cellFaceSize; };
73  const double get_detectorWidth() { return cellFaceLength; }; // I know its confusing, but cellFaceLength is depth ( width) of the detector
74 
75  const double get_cellFaceSize() { return cellFaceSize; };
76  const double get_cellFaceLength() { return cellFaceLength; };
77 
78  const double get_nGroups() { return nGroups; };
79  const double get_ecalTowerLength() {return ecalTowerLength;};
80 
81 
82  void set_numCellsX(int nX) { nCellsX = nX; };
83  void set_numCellsY(int nY) { nCellsY = nY; };
84 
85  void set_cellFaceSize(double size) { cellFaceSize = size; };
87 
89  void set_xOffset(double offset) { xOffset = offset; };
90  void set_angle(double angle) { totalAngle = angle; };
91 
92  void set_nGroups(double nlayers) { nGroups = nlayers; };
93 
95 
96  private:
97  int nCellsX;
98  int nCellsY;
99  int nGroups;
100 
101  double cellFaceSize;
103 
105 
106  double xOffset;
108  double totalAngle;
109 
110  double totalLength;
111 
112  // int tcounter;
113 
115 
116  TGeoBBox *holder;
118 
119  // CalorimeterGeoParData *calogeom;
120 
122 
123 };
124 
125 
126 // class defining a single sensor object
127 class LqstCell: public TNamed
128 {
129 
130  friend class LqstGeoParData;
131 
132  public:
133  LqstCell() {};
134 
135  LqstCell(const char *name):
136  TNamed(name, 0),
137  // cellFaceSize(cellSize),
138  //cellFaceLength(cellLength),
139  posX(0.),
140  posY(0.),
141  posZ(0.),
142  angle(0.),
143  mCell(0) {};
144 
145  virtual ~LqstCell() {};
146 
147  // some access functions
148  // const double get_cellFaceSize() { return cellFaceSize; };
149  //const double get_cellFaceLength() { return cellFaceLength; };
150  // const char* get_name() { return name; }
151 
152  void set_localX(double x) { posX = x; };
153  void set_localY(double y) { posY = y; };
154  void set_localZ(double z) { posZ = z; };
155  void set_localAngle(double a) { angle = a; };
156 
157  TGeoVolume *createCell(LqstGeoParData *detector, TString name);
158  TGeoVolume *createCell(LqstGeoParData *detector, TString name, double length);
159 
160 
161  private:
162  // const double cellFaceSize; // assume square sensor for now
163  //const double cellFaceLength;
164 
165  double posX, posY, posZ;
166  double angle; // in degrees
167 
168  TGeoVolume *mCell;
169 
170 
171  ClassDef(LqstCell,1);
172 
173 };
174 
175 
176 #endif