00001 #ifndef HcalAlgo_DDHCalBarrelAlgo_h
00002 #define HcalAlgo_DDHCalBarrelAlgo_h
00003
00004 #include <map>
00005 #include <string>
00006 #include <vector>
00007 #include "DetectorDescription/Base/interface/DDTypes.h"
00008 #include "DetectorDescription/Algorithm/interface/DDAlgorithm.h"
00009
00010 class DDHCalBarrelAlgo : public DDAlgorithm {
00011 public:
00012
00013 DDHCalBarrelAlgo();
00014 virtual ~DDHCalBarrelAlgo();
00015
00016
00017 std::string getGenMaterial() const {return genMaterial;}
00018 int getNsectors() const {return nsectors;}
00019 int getNsectortot() const {return nsectortot;}
00020 int getNhalf() const {return nhalf;}
00021 double getRin() const {return rin;}
00022 double getRout() const {return rout;}
00023 int getRzones() const {return rzones;}
00024 double getTanTheta(unsigned int i) const {return ttheta[i];}
00025 double getTheta(unsigned int i) const {return theta[i];}
00026 double getRmax(unsigned int i) const {return rmax[i];}
00027 double getZoff(unsigned int i) const {return zoff[i];}
00028
00029 int getNLayers() const {return nLayers;}
00030 int getLayerId(unsigned i) const {return layerId[i];}
00031 std::string getLayerLabel(unsigned i) const {return layerLabel[i];}
00032 std::string getLayerMaterial(unsigned i) const {return layerMat[i];}
00033 double getLayerWidth(unsigned i) const {return layerWidth[i];}
00034 double getLayerD1(unsigned i) const {return layerD1[i];}
00035 double getLayerD2(unsigned i) const {return layerD2[i];}
00036 double getLayerAlpha(unsigned i) const {return layerAlpha[i];}
00037 double getLayerT1(unsigned i) const {return layerT1[i];}
00038 double getLayerT2(unsigned i) const {return layerT2[i];}
00039 int getLayerAbsorb(unsigned int i) const {return layerAbsorb[i];}
00040 double getLayerGap(unsigned int i) const {return layerGap[i];}
00041
00042 std::string getSideMat(unsigned int i) const {return sideMat[i];}
00043 double getSideD(unsigned int i) const {return sideD[i];}
00044 double getSideT(unsigned int i) const {return sideT[i];}
00045 int getSideAbsorber() const {return nSideAbs;}
00046 std::string getSideAbsName(unsigned int i) const {return sideAbsName[i];}
00047 std::string getSideAbsMat(unsigned int i) const {return sideAbsMat[i];}
00048 double getSideAbsW(unsigned int i) const {return sideAbsW[i];}
00049
00050 int getAbsorberN() const {return nAbsorber;}
00051 std::string getAbsorbName(unsigned int i) const {return absorbName[i];}
00052 std::string getAbsorbMat(unsigned int i) const {return absorbMat[i];}
00053 double getAbsorbD(unsigned int i) const {return absorbD[i];}
00054 double getAbsorbT(unsigned int i) const {return absorbT[i];}
00055 std::string getMiddleMat() const {return middleMat;}
00056 double getMiddleD() const {return middleD;}
00057 double getMiddleW() const {return middleW;}
00058 int getMidAbsorber() const {return nMidAbs;}
00059 std::string getMidAbsName(unsigned int i) const {return midName[i];}
00060 std::string getMidAbsMat(unsigned int i) const {return midMat[i];}
00061 double getMidAbsW(unsigned int i) const {return midW[i];}
00062 double getMidAbsT(unsigned int i) const {return midT[i];}
00063
00064 std::string getDetMat() const {return detMat;}
00065 std::string getDetMatPl() const {return detMatPl;}
00066 std::string getDetMatSc() const {return detMatSc;}
00067 int getDetType(unsigned int i) const {return detType[i];}
00068 double getDetdP1(unsigned int i) const {return detdP1[i];}
00069 double getDetdP2(unsigned int i) const {return detdP2[i];}
00070 double getDetT11(unsigned int i) const {return detT11[i];}
00071 double getDetT12(unsigned int i) const {return detT12[i];}
00072 double getDetTsc(unsigned int i) const {return detTsc[i];}
00073 double getDetT21(unsigned int i) const {return detT21[i];}
00074 double getDetT22(unsigned int i) const {return detT22[i];}
00075 double getDetWidth1(unsigned int i) const {return detWidth1[i];}
00076 double getDetWidth2(unsigned int i) const {return detWidth2[i];}
00077 int getDetPosY(unsigned int i) const {return detPosY[i];}
00078
00079 void initialize(const DDNumericArguments & nArgs,
00080 const DDVectorArguments & vArgs,
00081 const DDMapArguments & mArgs,
00082 const DDStringArguments & sArgs,
00083 const DDStringVectorArguments & vsArgs);
00084
00085 void execute();
00086
00087 protected:
00088
00089 void constructGeneralVolume();
00090 void constructInsideSector(DDLogicalPart sector);
00091 void constructInsideLayers(DDLogicalPart laylog, std::string name, int id,
00092 int nAbs, double rin, double d1, double alpha1,
00093 double d2, double alpha2, double t1, double t2);
00094 DDLogicalPart constructSideLayer(DDLogicalPart laylog, std::string nm,
00095 int nAbs, double rin, double alpha);
00096 DDLogicalPart constructMidLayer(DDLogicalPart laylog, std::string nm,
00097 double rin, double alpha);
00098 void constructInsideDetectors(DDLogicalPart detector,
00099 std::string name, int id, double dx,
00100 double dy, double dz, int type);
00101
00102 private:
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114 std::string genMaterial;
00115 int nsectors;
00116 int nsectortot;
00117 int nhalf;
00118 double rin, rout;
00119 int rzones;
00120 std::vector<double> theta;
00121 std::vector<double> rmax;
00122 std::vector<double> zoff;
00123 std::vector<double> ttheta;
00124 std::string rotHalf;
00125 std::string rotns;
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153 int nLayers;
00154 std::vector<int> layerId;
00155 std::vector<std::string> layerLabel;
00156 std::vector<std::string> layerMat;
00157 std::vector<double> layerWidth;
00158 std::vector<double> layerD1;
00159 std::vector<double> layerD2;
00160 std::vector<double> layerAlpha;
00161 std::vector<double> layerT1;
00162 std::vector<double> layerT2;
00163 std::vector<int> layerAbsorb;
00164 std::vector<double> layerGap;
00165
00166 int nAbsorber;
00167 std::vector<std::string> absorbName;
00168 std::vector<std::string> absorbMat;
00169 std::vector<double> absorbD;
00170 std::vector<double> absorbT;
00171 std::string middleMat;
00172 double middleD;
00173 double middleW;
00174 int nMidAbs;
00175 std::vector<std::string> midName;
00176 std::vector<std::string> midMat;
00177 std::vector<double> midW;
00178 std::vector<double> midT;
00179
00180 std::vector<std::string> sideMat;
00181 std::vector<double> sideD;
00182 std::vector<double> sideT;
00183 int nSideAbs;
00184 std::vector<std::string> sideAbsName;
00185 std::vector<std::string> sideAbsMat;
00186 std::vector<double> sideAbsW;
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200 std::string detMat;
00201 std::string detRot;
00202 std::string detMatPl;
00203 std::string detMatSc;
00204 std::vector<int> detType;
00205 std::vector<double> detdP1;
00206 std::vector<double> detdP2;
00207 std::vector<double> detT11;
00208 std::vector<double> detT12;
00209 std::vector<double> detTsc;
00210 std::vector<double> detT21;
00211 std::vector<double> detT22;
00212 std::vector<double> detWidth1;
00213 std::vector<double> detWidth2;
00214 std::vector<int> detPosY;
00215
00216 std::string idName;
00217 std::string idNameSpace;
00218 int idOffset;
00219 };
00220
00221 #endif