EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GemGeoParData.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GemGeoParData.h
1 //
2 // AYK (ayk@bnl.gov), 2014/08/06
3 //
4 // GEM geometry description file;
5 //
6 
7 #include <TMath.h>
8 
9 #include <EicGeoParData.h>
10 
11 #ifndef _GEM_GEO_PAR_DATA_
12 #define _GEM_GEO_PAR_DATA_
13 
14 // FIXME: unify with the other codes later;
15 #define _AIR_ ("air")
16 #define _ALUMINUM_ ("aluminum")
17 #define _COPPER_ ("copper")
18 
19 class GemModule: public TObject {
20  public:
21  GemModule() { ResetVars(); };
22  GemModule(const GemModule *sample) { *this = *sample; };
23  ~GemModule() {};
24 
25  //
26  // POD public access;
27  //
28 
29  Double_t mActiveWindowBottomWidth; // bottom side width of the active window
30  Double_t mActiveWindowTopWidth; // top side width of the active window
31  Double_t mActiveWindowHeight; // height of the active window
32 
33  Double_t mFrameThickness; // frame thickness along the beam line --> G10
34  Double_t mFrameBottomEdgeWidth; // frame bottom edge width
35  Double_t mFrameTopEdgeWidth; // frame top edge width
36  Double_t mFrameSideEdgeWidth; // frame side edge width
37 
38  // FIXME: assume mylar, hmm; may want to add aluminum (copper) layer later;
39  TString mEntranceWindowMaterial; // entrance window material
40  Double_t mEntranceWindowThickness; // entrance window thickness --> parameter
41 
42  Double_t mDriftFoilKaptonThickness; // drift foil main material thickness --> kapton
43  Double_t mDriftFoilCopperThickness; // drift foil metallization thickness --> copper
44 
45  Double_t mGemFoilAreaFraction; // well, there are holes in this foil
46  Double_t mGemFoilKaptonThickness; // GEM foil main material thickness --> kapton
47  Double_t mGemFoilCopperThickness; // GEM foil metallization thickness --> copper
48 
49  Double_t mReadoutG10Thickness; // overall thickness of readout G10 --> G10
50  Double_t mReadoutCopperThickness; // thickness of readout copper --> copper
51  Double_t mReadoutKaptonThickness; // thickness of readout kapton --> kapton
52  TString mReadoutSupportMaterial; // readout support material
53  Double_t mReadoutSupportThickness; // thickness of readout support --> parameter
54 
55  TString mGasMixture; // gas mixture
56 
57  // NB: the difference between mFrameThickness and these region lengths will
58  // be filled by air; NB: these numbers DO NOT include respective foil thickness;
59  Double_t mEntranceRegionLength; // length between entrance window and drift foil
60  Double_t mDriftRegionLength; // length of drift region
61  // Assume triple GEM layout;
62  Double_t mFirstTransferRegionLength; // length of the first transfer region
63  Double_t mSecondTransferRegionLength;// length of the second transfer region
64  Double_t mInductionRegionLength; // length of induction region
65 
66  private:
67  void ResetVars() {
69 
71 
73 
75 
77 
79 
82  };
83 
85 };
86 
87 class GemWheel: public TObject {
88  public:
89  GemWheel() { ResetVars(); };
90  GemWheel(GemModule *module, unsigned moduleNum, double radius,
91  TGeoMatrix *transformation):
92  mModule(module), mModuleNum(moduleNum), mRadius(radius),
93  mTransformation(transformation) {};
94  GemWheel(GemModule *module, unsigned moduleNum, double radius, double beamLineOffset,
95  double beamLineRotation):
96  mModule(module), mModuleNum(moduleNum), mRadius(radius) {
97  // FIXME: unify with MAPS codes;
98  TGeoRotation *rw = beamLineRotation ? new TGeoRotation() : 0;
99  if (beamLineRotation) rw->RotateZ(beamLineRotation);
100 
101  mTransformation = new TGeoCombiTrans(0.0, 0.0, 0.1 * beamLineOffset, rw);
102  };
103  ~GemWheel() {};
104 
105  void ResetVars() {
106  mModule = 0;
107  mModuleNum = 0;
108  mRadius = 0.0;
109 
110  mTransformation = 0;
111  };
112 
113  UInt_t mModuleNum; // number of moduless
114  GemModule *mModule; // internals of single module design
115 
116  // This is basically the distance between active window center and the
117  // geometrical center of the wheel (so beam line axis in EIC full configuration);
118  Double_t mRadius; // active window *center* installation radius
119  TGeoMatrix *mTransformation; // 3D transformation
120 
121  ClassDef(GemWheel,9);
122 };
123 
125 {
126  public:
127  GemGeoParData(const char *detName = 0, int version = -1, int subVersion = 0):
128  EicGeoParData(detName, version, subVersion),
130  mWithMountingRings(false), mKaptonMaterial("GemKapton"),
131  //mMylarMaterial("GemMylar"),
132  //mRohacellMaterial("GemRohacell"), mNomexMaterial("GemNomex"),
133  mG10Material("GemG10")/*, mGasMaterial("GemArCO2")*/ {};
135 
136  void AddWheel(GemModule *module, unsigned moduleNum, double radius,
137  double beamLineOffset, double beamLineRotation = 0.0) {
138  mWheels.push_back(new GemWheel(module, moduleNum, radius,
139  beamLineOffset, beamLineRotation));
140  };
141  void AddWheel(GemModule *module, unsigned moduleNum, double radius,
142  TGeoMatrix *transformation) {
143  mWheels.push_back(new GemWheel(module, moduleNum, radius, transformation));
144  };
145 
146  // This should be sufficient for FLYSUB;
147  void AddSingleModule(GemModule *module, double beamLineOffset,
148  double beamLineRotation = 0.0) {
149  AddWheel(module, 1, 0.0, beamLineOffset, beamLineRotation);
150  };
151  void AddSingleModule(GemModule *module, TGeoMatrix *transformation) {
152  AddWheel(module, 1, 0.0, transformation);
153  };
154 
156  bool WithMountingRings() const { return mWithMountingRings; };
157 
158  void SetKaptonMaterial (const char *material) { mKaptonMaterial = TString(material); };
159  //void SetRohacellMaterial(const char *material) { mRohacellMaterial = TString(material); };
160  //void SetNomexMaterial (const char *material) { mNomexMaterial = TString(material); };
161  //void SetMylarMaterial (const char *material) { mMylarMaterial = TString(material); };
162  void SetG10Material (const char *material) { mG10Material = TString(material); };
163  //void SetGasMixture (const char *material) { mGasMixture = TString(material); };
164 
165  //const GemWheel *GetWheel(unsigned wheelID) const {
166  //return wheelID <= mWheels.size() ? mWheels[wheelID] : 0;
167  //};
168 
169  int ConstructGeometry(bool root = true, bool gdml = false, bool check = false);
170 
171  // Add sort of mounting rings on both sides of each barrel layer; assume they are
172  // the same construction for all discs;
173  Double_t mMountingRingBeamLineThickness; // mounting ring thickness in beam direction
174  Double_t mMountingRingRadialThickness; // mounting ring thickness in radial direction
175 
176  Bool_t mWithMountingRings; // either create or not mounting rings
177 
178  private:
179  // Default values are hardcoded in comnstructor; everything should be tuned once in terms
180  // of radiation length thickness and not touched any longer;
181  TString mKaptonMaterial; // may want to specify a different kapton in media.geo
182  //TString mRohacellMaterial; // ... as well as Rohacell ...
183  //TString mNomexMaterial; // ... as well as honeycomb Nomex ...
184  TString mG10Material; // ... as well as G10 ...
185  //TString mMylarMaterial; // ... as well as mylar ...
186  //TString mGasMaterial; // ... as well as Ar/CO2 gas mixture
187 
188  std::vector <GemWheel*> mWheels; // GEM wheel assemblies
189 
190  void PlaceMaterialLayer(const char *detName, const char *namePrefix, unsigned wheelID,
191  TGeoVolume *moduleContainer, const char *material,
192  double *vert, double thickness, double *yOffset);
193 
195 };
196 
197 #endif