EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MapsGeoParData.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MapsGeoParData.h
1 //
2 // AYK (ayk@bnl.gov), 2014/08/07
3 //
4 // MAPS geometry description file;
5 //
6 
7 #include <EicGeoParData.h>
8 #include <MapsMimosaAssembly.h>
9 
10 #ifndef _MAPS_GEO_PAR_DATA_
11 #define _MAPS_GEO_PAR_DATA_
12 
13 // These materials are not really MAPS-specific; just take them from media.geo
14 // shared section and use as-is;
15 #define _AIR_ ("air")
16 #define _WATER_ ("water")
17 #define _ALUMINUM_ ("aluminum")
18 #define _SILICON_ ("silicon")
19 
20 class MapsStave: public TNamed
21 {
22  friend class MapsGeoParData;
23 
24  public:
25  MapsStave() { ResetVars(); };
26  MapsStave(const char *name): TNamed(name, 0) { ResetVars(); };
27  ~MapsStave() {};
28 
29  TGeoVolume *GetVolume() const { return mVolume; };
30  const double GetLength() const { return mLength; };
31 
32  private:
33  TGeoVolume *mVolume;
34  double mLength;
35 
36  void ResetVars() {
37  mVolume = 0;
38  mLength = 0.0;
39  };
40 
42 };
43 
45 {
46  private:
47 
48  public:
49  MapsGeoParData(const char *detName = 0, int version = -1, int subVersion = 0):
50  EicGeoParData(detName, version, subVersion), mMountingRingBeamLineThickness(0.0),
54  mCarbonFiberMaterial("MapsCarbonFiber"), mKaptonMaterial("MapsKapton") {
56 
57  // Transient variables;
60  };
62 
63  // Add sort of mounting rings on both sides of each barrel layer; assume they are
64  // the same construction for all layers;
65  Double_t mMountingRingBeamLineThickness; // mounting ring thickness in beam direction
66  Double_t mMountingRingRadialThickness; // mounting ring thickness in radial direction
67 
68  Double_t mWaterPipeExtensionLength; // length of water pipe external pieces
69  Double_t mEnforcementBracketThickness; // thickness of triangular bracket at both stave ends
70 
73 
75  bool WithMountingRings() const { return mWithMountingRings; };
76 
79 
81  bool WithExternalPipes() const { return mWithExternalPipes; };
82 
83  void SetCarbonFiberMaterial(const char *material) { mCarbonFiberMaterial = TString(material); };
84  void SetKaptonMaterial (const char *material) { mKaptonMaterial = TString(material); };
85 
86  private:
87  Bool_t mUseTriangularAssemblies; // either use simple triangular cell profile or composite shape
88 
89  Bool_t mWithMountingRings; // either create or not mounting rings
90  Bool_t mWithEnforcementBrackets; // either create or not enforcement brackets
91  Bool_t mWithExternalPipes; // either create or not external pieces op water pipes
92 
93  protected:
94  TString mCarbonFiberMaterial; // may want to specify a different carbon fiber in media.geo
95  TString mKaptonMaterial; // may want to specify a different kapton in media.geo
96 
97  // Transient (global) working variables; FIXME: do it better later; NB: have to be on different
98  // lines, otherwise '//!' has effect only on the last item;
99  char mMimosaCoreName [128];
100  char mMimosaShellName [128];
101  char mCellAssemblyName[128];
106  double mMimosaOffset;
107 
108  TGeoVolume *ConstructMimosaCell(MapsMimosaAssembly *mcell, unsigned id);
109 
110  double GetExpectedStaveLength(unsigned chipNum, MapsMimosaAssembly *mcell) {
111  return chipNum * mcell->GetAssemblyLength() + 2*mEnforcementBracketThickness +
113  };
114 
115  double GetAssemblyContainerWidth(const MapsMimosaAssembly *mcell) const {
116  return (UseTriangularAssemblies() ? mcell->mAssemblyBaseWidth :
118  };
119 
120  MapsStave *ConstructStave(unsigned chipNum, unsigned id, MapsMimosaAssembly *mcell);
121  MapsStave *ConstructStaveWithMapping(unsigned chipNum, unsigned id, MapsMimosaAssembly *mcell);
122 
124 };
125 
126 #endif