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 
44 class MapsGeoParData: public EicGeoParData
45 {
46  private:
47 
48  public:
49  MapsGeoParData(const char *detName = 0, int version = -1, int subVersion = 0);
51 
52  // Add sort of mounting rings on both sides of each barrel layer; assume they are
53  // the same construction for all layers;
54  Double_t mMountingRingBeamLineThickness; // mounting ring thickness in beam direction
55  Double_t mMountingRingRadialThickness; // mounting ring thickness in radial direction
56 
57  Double_t mWaterPipeExtensionLength; // length of water pipe external pieces
58  Double_t mEnforcementBracketThickness; // thickness of triangular bracket at both stave ends
59 
61  //bool UseTriangularAssemblies() const { return mUseTriangularAssemblies; };
62 
63  void WithMountingRings(bool yesNo = true) { mWithMountingRings = yesNo; };
64  //bool WithMountingRings() const { return mWithMountingRings; };
65 
67  //bool WithEnforcementBrackets() const { return mWithEnforcementBrackets; };
68 
69  void WithExternalPipes(bool yesNo = true) { mWithExternalPipes = yesNo; };
70  //bool WithExternalPipes() const { return mWithExternalPipes; };
71 
72  void SetCarbonFiberMaterial(const char *material) { mCarbonFiberMaterial = TString(material); };
73  void SetKaptonMaterial (const char *material) { mKaptonMaterial = TString(material); };
74 
75  private:
76  Bool_t mUseTriangularAssemblies; // either use simple triangular cell profile or composite shape
77 
78  protected:
79  Bool_t mWithMountingRings; // either create or not mounting rings
80  Bool_t mWithEnforcementBrackets; // either create or not enforcement brackets
81  Bool_t mWithExternalPipes; // either create or not external pieces op water pipes
82 
83  TString mCarbonFiberMaterial; // may want to specify a different carbon fiber in media.geo
84  TString mKaptonMaterial; // may want to specify a different kapton in media.geo
85 
86  // Transient (global) working variables; FIXME: do it better later; NB: have to be on different
87  // lines, otherwise '//!' has effect only on the last item;
88  char mMimosaCoreName [128];
89  char mMimosaShellName [128];
90  char mCellAssemblyName[128];
91  double mAssemblyHeight;
92  double mAssemblyLength;
93  double mWaterPipeXoffset;
94  double mWaterPipeZoffset;
95  double mMimosaOffset;
96 
97  TGeoVolume *ConstructMimosaCell(MapsMimosaAssembly *mcell, unsigned id);
98 
99  double GetExpectedStaveLength(unsigned chipNum, MapsMimosaAssembly *mcell) {
100  return chipNum * mcell->GetAssemblyLength() +
103  };
104 
105  double GetAssemblyContainerWidth(const MapsMimosaAssembly *mcell) const {
106  return (/*UseTriangularAssemblies()*/ mUseTriangularAssemblies ? mcell->mAssemblyBaseWidth :
108  };
109 
110  MapsStave *ConstructStave(unsigned chipNum, unsigned id, MapsMimosaAssembly *mcell);
111  MapsStave *ConstructStaveWithMapping(unsigned chipNum, unsigned id, MapsMimosaAssembly *mcell);
112 
114 };
115 
116 #endif