EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VstGeoParData.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file VstGeoParData.h
1 //
2 // AYK (ayk@bnl.gov), 2014/08/07
3 //
4 // VST MAPS geometry description file;
5 //
6 
7 #include <MapsGeoParData.h>
8 #include <MapsMimosaAssembly.h>
9 
10 #ifndef _VST_GEO_PAR_DATA_
11 #define _VST_GEO_PAR_DATA_
12 
13 #define _VST_DETECTOR_NAME_ ("VST")
14 
15 class VstBarrelLayer: public TObject {
16  public:
18  VstBarrelLayer(MapsMimosaAssembly *chipAssembly, unsigned staveNum,
19  unsigned chipNum, double radius, double slope, double asimuthalOffset):
20  mChipAssembly(chipAssembly), mStaveNum(staveNum), mMimosaChipNum(chipNum), mRadius(radius),
21  mStaveSlope(slope), mAsimuthalOffset(asimuthalOffset) {};
23 
24  void ResetVars() {
25  mChipAssembly = 0;
28  };
29 
30  UInt_t mStaveNum; // number of staves in this barrel layer
31  Double_t mRadius; // layer ~radius
32  Double_t mAsimuthalOffset; // optional extra rotation around beam line
33  Double_t mStaveSlope; // small stave rotation around barrel axis to avoid overlaps
34  MapsMimosaAssembly *mChipAssembly; // all the details of the chip assembly
35  UInt_t mMimosaChipNum; // number of Mimosa chips per stave
36 
38 };
39 
41 {
42  private:
43 
44  public:
45  VstGeoParData(int version = -1, int subVersion = 0):
48 
49  void AddBarrelLayer(MapsMimosaAssembly *chipAssembly,
50  unsigned staveNum, unsigned chipNum, double radius,
51  double slope, double asimuthalOffset = 0.0) {
52  mBarrel.push_back(new VstBarrelLayer(chipAssembly, staveNum, chipNum, radius,
53  slope, asimuthalOffset));
54  };
55 
56  unsigned GetNumberOfLayers() const { return mBarrel.size(); };
57 
58  const VstBarrelLayer *GetBarrelLayer(unsigned layerID) const {
59  return layerID <= mBarrel.size() ? mBarrel[layerID] : 0;
60  };
61 
62  Double_t mMountingRingRadialOffset; // mounting ring radial offset wrt the layer TRD1 volume center
63 
64  //void Print(const char *option = 0) const;
65  int ConstructGeometry(bool root = true, bool gdml = false, bool check = false);
66 
67  private:
68  std::vector <VstBarrelLayer*> mBarrel; // VST barrel layers
69 
71 };
72 
73 #endif