source: Idarraga/allpix/include/AllPixGeoDsc.hh @ 193

Last change on this file since 193 was 193, checked in by idarraga, 13 years ago

lcio output

File size: 6.0 KB
Line 
1/**
2 * Allpix
3 * Author: John Idarraga <idarraga@cern.ch> , 2010
4 */
5
6#ifndef AllPixGeoDsc_h
7#define AllPixGeoDsc_h 1
8
9#include "globals.hh"
10
11#include <iostream>
12#include <fstream>
13#include <string>
14
15using namespace std;
16
17class AllPixGeoDsc {
18
19public:
20
21        AllPixGeoDsc();
22        ~AllPixGeoDsc();
23
24        //  Number of pixels
25        G4int GetNPixelsX(){return m_npix_x;};
26        G4int GetNPixelsY(){return m_npix_y;};
27        G4int GetNPixelsZ(){return m_npix_z;};
28        G4int GetNPixelsTotXY(){return GetNPixelsX()*GetNPixelsY();}; // Planar layout //
29
30        //G4int GetHalfNPixelsX(){return GetNPixelsX()/2;}; // half number of pixels //
31        //G4int GetHalfNPixelsY(){return GetNPixelsY()/2;};
32        //G4int GetHalfNPixelsZ(){return GetNPixelsZ()/2;};
33
34        //  Pixel dimensions
35        G4double GetPixelX(){return 2.*GetHalfPixelX();};
36        G4double GetPixelY(){return 2.*GetHalfPixelY();};
37        G4double GetPixelZ(){return 2.*GetHalfPixelZ();};
38
39        G4double GetHalfPixelX(){return m_pixsize_x;}; // half pixel size //
40        G4double GetHalfPixelY(){return m_pixsize_y;};
41        G4double GetHalfPixelZ(){return m_pixsize_z;};
42
43        // Sensor --> It will be positioned with respect to the wrapper !! //
44        G4double GetHalfSensorX(){return m_sensor_hx;};
45        G4double GetHalfSensorY(){return m_sensor_hy;};
46        G4double GetHalfSensorZ(){return m_sensor_hz;};
47
48        G4double GetSensorX(){return 2.*GetHalfSensorX();};
49        G4double GetSensorY(){return 2.*GetHalfSensorY();};
50        G4double GetSensorZ(){return 2.*GetHalfSensorZ();};
51
52        G4double GetSensorXOffset(){return m_sensor_posx;};
53        G4double GetSensorYOffset(){return m_sensor_posy;};
54        G4double GetSensorZOffset(){return GetHalfPCBZ();}; // See relation with GetHalfWrapperDZ()
55
56        G4double GetSensorExcessHTop(){return m_sensor_gr_excess_htop;};
57        G4double GetSensorExcessHBottom(){return m_sensor_gr_excess_hbottom;};
58        G4double GetSensorExcessHRight(){return m_sensor_gr_excess_hright;};
59        G4double GetSensorExcessHLeft(){return m_sensor_gr_excess_hleft;};
60
61        // PCB --> It will be positioned with respect to the wrapper !!
62        G4double GetHalfPCBX(){return m_pcb_hx;};
63        G4double GetHalfPCBY(){return m_pcb_hy;};
64        G4double GetHalfPCBZ(){return m_pcb_hz;};
65        G4double GetPCBX(){return 2.*GetPCBX();};
66        G4double GetPCBY(){return 2.*GetPCBX();};
67        G4double GetPCBZ(){return 2.*GetPCBX();};
68
69        // Wrapper
70        G4double GetHalfWrapperDX(){return GetHalfPCBX();};
71        G4double GetHalfWrapperDY(){return GetHalfPCBY();};
72        G4double GetHalfWrapperDZ(){return GetHalfPCBZ() + GetHalfSensorZ();};
73
74        // World
75        G4double GetHalfWorldDX(){return 1000.*mm;};//GetNPixelsX()*GetPixelX();};
76        G4double GetHalfWorldDY(){return 1000.*mm;};//GetNPixelsY()*GetPixelX();};
77        G4double GetHalfWorldDZ(){return 4000.*mm;};//GetPixelZ();};
78
79        G4double GetWorldDX(){return 2.*GetHalfWorldDX();};
80        G4double GetWorldDY(){return 2.*GetHalfWorldDY();};
81        G4double GetWorldDZ(){return 2.*GetHalfWorldDZ();};
82
83
84
85        ///////////////////////////////////////
86        // Set
87        void SetID(G4int val){
88                m_ID = val;
89        }
90        void SetNPixelsX(G4int val){
91                m_npix_x = val;
92        };
93        void SetNPixelsY(G4int val){
94                m_npix_y = val;
95        };
96        void SetNPixelsZ(G4int val){
97                m_npix_z = val;
98        };
99        void SetPixSizeX(G4double val){
100                m_pixsize_x = val;
101        }
102        void SetPixSizeY(G4double val){
103                m_pixsize_y = val;
104        }
105        void SetPixSizeZ(G4double val){
106                m_pixsize_z = val;
107        }
108
109        ///////////////////////////////////////////////////
110        // Chip
111        void SetChipHX(G4double val){
112                m_chip_hx = val;
113        };
114        void SetChipHY(G4double val){
115                m_chip_hy = val;
116        }
117        void SetChipHZ(G4double val){
118                m_chip_hz = val;
119        };
120        void SetChipPosX(G4double val){
121                m_chip_posx = val;
122        };
123        void SetChipPosY(G4double val){
124                m_chip_posy = val;
125        }
126        void SetChipPosZ(G4double val){
127                m_chip_posz = val;
128        };
129
130        ///////////////////////////////////////////////////
131        // Sensor
132        void SetSensorHX(G4double val){
133                m_sensor_hx = val;
134        }
135        void SetSensorHY(G4double val){
136                m_sensor_hy = val;
137        }
138        void SetSensorHZ(G4double val){
139                m_sensor_hz = val;
140        }
141        void SetSensorPosX(G4double val){
142                m_sensor_posx = val;
143        }
144        void SetSensorPosY(G4double val){
145                m_sensor_posy = val;
146        }
147        void SetSensorPosZ(G4double val){
148                m_sensor_posz = val;
149        }
150
151        void SetSensorExcessHTop(G4double val){
152                m_sensor_gr_excess_htop = val;
153        }
154        void SetSensorExcessHBottom(G4double val){
155                m_sensor_gr_excess_hbottom = val;
156        }
157        void SetSensorExcessHRight(G4double val){
158                m_sensor_gr_excess_hright = val;
159        }
160        void SetSensorExcessHLeft(G4double val){
161                m_sensor_gr_excess_hleft = val;
162        }
163
164        ///////////////////////////////////////////////////
165        // Digitizer
166        void SetSensorDigitizer(G4String valS){
167                m_digitizer = valS;
168        }
169
170        ///////////////////////////////////////////////////
171        // PCB
172        void SetPCBHX(G4double val){
173                m_pcb_hx = val;
174        }
175        void SetPCBHY(G4double val){
176                m_pcb_hy = val;
177        }
178        void SetPCBHZ(G4double val){
179                m_pcb_hz = val;
180        }
181
182        ///////////////////////////////////////////////////
183        // operators
184        //void operator=(AllPixGeoDsc &);
185
186        ///////////////////////////////////////////////////
187        // names
188        void SetHitsCollectionName(G4String si){ m_hitsCollectionName = si; };
189        void SetDigitCollectionName(G4String si){ m_digitCollectionName = si; };
190
191        G4String GetHitsCollectionName(){ return m_hitsCollectionName; };
192        G4String GetDigitCollectionName(){ return m_digitCollectionName; };
193
194        G4String GetSensorDigitizer(){return m_digitizer;};
195
196        ///////////////////////////////////////////////////
197        // extras
198        void Dump();
199
200
201private:
202
203        G4int m_ID;
204
205        G4int m_npix_x;
206        G4int m_npix_y;
207        G4int m_npix_z;
208
209        G4double m_pixsize_x;
210        G4double m_pixsize_y;
211        G4double m_pixsize_z;
212
213        G4double m_sensor_hx;
214        G4double m_sensor_hy;
215        G4double m_sensor_hz;
216
217        G4double m_sensor_posx;
218        G4double m_sensor_posy;
219        G4double m_sensor_posz;
220
221        G4double m_sensor_gr_excess_htop;
222        G4double m_sensor_gr_excess_hbottom;
223        G4double m_sensor_gr_excess_hright;
224        G4double m_sensor_gr_excess_hleft;
225
226        G4double m_chip_hx;
227        G4double m_chip_hy;
228        G4double m_chip_hz;
229
230        G4double m_chip_posx;
231        G4double m_chip_posy;
232        G4double m_chip_posz;
233
234        G4double m_pcb_hx;
235        G4double m_pcb_hy;
236        G4double m_pcb_hz;
237
238        // hits collection, digitizer collection and digitizer name
239        G4String m_digitizer;
240        G4String m_hitsCollectionName;
241        G4String m_digitCollectionName;
242
243        G4double m_WaferXpos;
244        G4double m_WaferYpos;
245
246};
247
248
249#endif
Note: See TracBrowser for help on using the repository browser.