EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MuMegasGeoParData.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MuMegasGeoParData.h
1 //
2 // AYK (ayk@bnl.gov), 2015/01/28
3 //
4 // MuMegas geometry description file;
5 //
6 
7 #include <TMath.h>
8 
9 #include <EicGeoParData.h>
10 
11 #ifndef _MUMEGAS_GEO_PAR_DATA_
12 #define _MUMEGAS_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 MuMegasLayer: public TObject {
20  public:
22  MuMegasLayer(const MuMegasLayer *sample) { *this = *sample; };
24 
25  //
26  // POD public access;
27  //
28 
29  // FIXME: need FR4 here; 200um thick;
30  TString mReadoutPcbMaterial; // readout PCB material; should be FR4?
31  Double_t mReadoutPcbThickness; // PCB thickness -> eventually should be FR4?
32 
33  // FIXMR: this is effective thickness I guess?;
34  Double_t mCopperStripThickness; // effective copper strips thickness -> copper
35 
36  // Let's say, Ar(70)/CO2(30), see Maxence' muMegas.C; 120um amplification region;
37  TString mGasMixture; // gas mixture
38  Double_t mAmplificationRegionLength; // short amplification region length -> gas mixture
39 
40  // FIXME: will need 'steel' in media.geo;
41  Double_t mSteelMeshThickness; // effective steel mesh thickness -> steel
42 
43  // 3mm conversion gap for now;
44  Double_t mConversionRegionLength; // conversion region length -> gas mixture
45 
46  // Basically a placeholder for now; assume 25um kapton as entrance window;
47  TString mExitWindowMaterial; // exit window material
48  Double_t mExitWindowThickness; // exit window thickness -> kapton
49 
50  // FIXME: these parameters need to be checked and made real;
51  Double_t mInnerFrameWidth; // inner frame width (wedge shape in fact)
52  Double_t mInnerFrameThickness; // inner frame thickness
53  Double_t mOuterFrameWidth; // outer frame width in beam direction
54  Double_t mOuterFrameThickness; // outer frame thickness
55 
56  private:
57  void ResetVars() {
59 
61 
63  };
64 
66 };
67 
68 class MuMegasBarrel: public TObject {
69  public:
71  MuMegasBarrel(MuMegasLayer *layer, double length, unsigned beamLineSectionNum,
72  double radius, unsigned sectorNum, TGeoMatrix *transformation):
73  mLayer(layer), mLength(length), mBeamLineSectionNum(beamLineSectionNum),
74  mRadius(radius), mAsimuthalSectorNum(sectorNum), mTransformation(transformation) {};
75 
76  MuMegasBarrel(MuMegasLayer *layer, double length, unsigned beamLineSectionNum,
77  double radius, unsigned sectorNum, double beamLineOffset,
78  double beamLineRotation):
79  mLayer(layer), mLength(length), mBeamLineSectionNum(beamLineSectionNum),
80  mRadius(radius), mAsimuthalSectorNum(sectorNum) {
81  // FIXME: unify with MAPS codes;
82  TGeoRotation *rw = beamLineRotation ? new TGeoRotation() : 0;
83  if (beamLineRotation) rw->RotateZ(beamLineRotation);
84 
85  mTransformation = new TGeoCombiTrans(0.0, 0.0, 0.1 * beamLineOffset, rw);
86  };
88 
89  void ResetVars() {
90  mLayer = 0;
91 
92  mLength = mRadius = 0.0;
94 
95  mTransformation = 0;
96  };
97 
98  MuMegasLayer *mLayer; // layer construction details;
99 
100  Double_t mLength; // overall length along the beam line
101  UInt_t mBeamLineSectionNum; // segmentation along the beam line (de-facto 1 or 2)
102 
103  Double_t mRadius; // inner radius (PCB starts here)
104  UInt_t mAsimuthalSectorNum; // segmentation in phi
105 
106  TGeoMatrix *mTransformation; // 3D transformation
107 
109 };
110 
112 {
113  public:
114  MuMegasGeoParData(const char *detName = 0, int version = -1, int subVersion = 0):
115  EicGeoParData(detName, version, subVersion) {};
117 
118  // - layer construction;
119  // - length;
120  // - segmentation in Z;
121  // - radius;
122  // - segmentation in phi;
123  // - Z offset from 0.0 (default);
124  // - asimuthat offset from 0.0 (default);
125  void AddBarrel(MuMegasLayer *layer, double length, unsigned beamLineSectionNum,
126  double radius, unsigned sectorNum,
127  double beamLineOffset = 0.0, double beamLineRotation = 0.0) {
128  mBarrels.push_back(new MuMegasBarrel(layer, length, beamLineSectionNum,
129  radius, sectorNum, beamLineOffset, beamLineRotation));
130  };
131  // The same, but a generic 3D transformation given as parameter;
132  void AddBarrel(MuMegasLayer *layer, double length, unsigned beamLineSectionNum,
133  double radius, unsigned sectorNum, TGeoMatrix *transformation) {
134  mBarrels.push_back(new MuMegasBarrel(layer, length, beamLineSectionNum,
135  radius, sectorNum, transformation));
136  };
137 
138  int ConstructGeometry(bool root = true, bool gdml = false, bool check = false);
139 
140  void PlaceMaterialLayer(const char *detName, const char *namePrefix, unsigned barrelID,
141  TGeoVolume *sectorContainer, const char *material,
142  double length, double angle,
143  double thickness, double *yOffset);
144 
145  std::vector <MuMegasBarrel*> mBarrels; // MuMegas barrel assemblies
146 
148 };
149 
150 #endif