00001 #include "Validity/VldContext.h"
00002 #include "Validity/VldRange.h"
00003
00004 #ifndef SHIELDGEOM_H
00005 #define SHIELDGEOM_H
00006
00007 class ShieldGeom{
00008
00009 public:
00010 ShieldGeom(const VldContext& vldc);
00011 ~ShieldGeom();
00012 Bool_t Reinitialize(const VldContext& vldc);
00013 Double_t GetPlank_X(Int_t pl, Int_t pk);
00014 Double_t GetPlank_Y(Int_t pl, Int_t pk);
00015 Double_t GetPlank_Z(Int_t pl, Int_t pk);
00016 Bool_t PlankExists(Int_t pl, Int_t pk);
00017 Double_t GetPlankStrip0_X(Int_t pl, Int_t pk);
00018 Double_t GetPlankStrip0_Y(Int_t pl, Int_t pk);
00019 Double_t GetPlankStrip0_Z(Int_t pl, Int_t pk);
00020 Int_t GetStripsInPlank(Int_t pl, Int_t pk);
00021 Int_t GetListStripsInPlank(Int_t pl, Int_t pk, Int_t entry, Int_t plorst);
00022 Int_t GetAssociatedPlank(Int_t pl, Int_t st, Int_t plorst);
00023 Int_t GetChipIndex(Int_t pl, Int_t pk, Int_t noorso);
00024 Int_t GetChipNumber(Int_t pl, Int_t pk, Int_t noorso);
00025 Bool_t IsVertical(Int_t pl);
00026 Bool_t IsLowerSide(Int_t pl);
00027 Double_t GetPlane_X(Int_t pl);
00028 Double_t GetPlane_Y(Int_t pl);
00029 Double_t GetPlane_Z(Int_t pl);
00030 Double_t GetPlaneClearFiber(Int_t pl, Int_t noorso);
00031 Bool_t PlaneExistsInVeto(Int_t pl);
00032 Int_t WhatSection(Int_t pl);
00033 Bool_t IsPlaneActive(Int_t vpa);
00034 Int_t ValidVetoPlanes();
00035 Double_t GetPlaneStrip19_X(Int_t pl);
00036 Double_t GetPlaneStrip19_Y(Int_t pl);
00037 Double_t GetPlaneStrip19_Z(Int_t pl);
00038 Double_t GetStrip_X(Int_t pl, Int_t pk);
00039 Double_t GetStrip_Y(Int_t pl, Int_t pk);
00040 Double_t GetStrip_Z(Int_t pl, Int_t pk);
00041 Double_t GetStripWls(Int_t pl, Int_t pk, Int_t noorso);
00042 Int_t WhatSectionAbove(Double_t zpos, Int_t cont);
00043 Int_t ClosestTwoSections(Double_t zpos, Int_t cont);
00044
00045 private:
00046 Double_t VetoGeom_x[168];
00047 Double_t VetoGeom_y[168];
00048 Double_t VetoGeom_z[168];
00049 Double_t VetoGeomPlank_x[168][20];
00050 Double_t VetoGeomPlank_y[168][20];
00051 Double_t VetoGeomPlank_z[168][20];
00052 Double_t VetoGeomPlank_exist[168][20];
00053 Int_t VetoGeomPlank_strips[168][20];
00054 Int_t AssociatedPlank[168][20][2];
00055 Double_t VetoGeomPlank_x_s0[168][20];
00056 Double_t VetoGeomPlank_y_s0[168][20];
00057 Double_t VetoGeomPlank_z_s0[168][20];
00058 Double_t VetoGeom_x_s19[168];
00059 Double_t VetoGeom_y_s19[168];
00060 Double_t VetoGeom_z_s19[168];
00061 Int_t VetoGeomSection[168];
00062 Double_t VetoStrip_x[168][20];
00063 Double_t VetoStrip_y[168][20];
00064 Double_t VetoStrip_z[168][20];
00065 Double_t VetoStripWls[168][20][2];
00066 Double_t VetoPlaneClearFiber[168][2];
00067 Int_t ListStripsInPlank[168][20][8][2];
00068 Int_t VetoChipIndex[168][20][2];
00069 Int_t VetoChipNumber[168][20][2];
00070 Bool_t AlreadyDidChipNumbers;
00071 Double_t VetoGeomAlreadyFilled[168][20];
00072 Int_t PlaneArray[168];
00073 Bool_t PlaneValidity[168];
00074 Int_t valid_planes;
00075 Int_t planeNumberFinder(Int_t pln);
00076 Bool_t specialPlank(Int_t pl, Int_t pk);
00077 void SetupShieldGeom(const VldContext& vldc);
00078 VldRange fughVldRange;
00079 VldRange fphVldRange;
00080
00081 };
00082 #endif