CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDHCalEndcapAlgo.h
Go to the documentation of this file.
1 #ifndef HcalAlgo_DDHCalEndcapAlgo_h
2 #define HcalAlgo_DDHCalEndcapAlgo_h
3 
4 #include <map>
5 #include <string>
6 #include <vector>
9 
10 class DDHCalEndcapAlgo : public DDAlgorithm {
11  public:
12  //Constructor and Destructor
13  DDHCalEndcapAlgo(); //const std::string & name);
14  virtual ~DDHCalEndcapAlgo();
15 
16  //Get Methods
17  std::string getGenMat() const {return genMaterial;}
18  std::string getRotation() const {return rotation;}
19  int getNsectors() const {return nsectors;}
20  int getNsectortot() const {return nsectortot;}
21  int getEndcaps() const {return nEndcap;}
22  int equipModule(unsigned int i) const {return eModule[i];}
23  double getZShift() const {return zShift;}
24 
25  double getZFront() const {return zFront;}
26  double getZEnd() const {return zEnd;}
27  double getZiNose() const {return ziNose;}
28  double getZiL0Nose() const {return ziL0Nose;}
29  double getZiBody() const {return ziBody;}
30  double getZiL0Body() const {return ziL0Body;}
31  double getZiKink() const {return ziKink;}
32  double getZ0Beam() const {return z0Beam;}
33  double getZ1Beam() const {return z1Beam;}
34  double getZiDip() const {return ziDip;}
35  double getDzStep() const {return dzStep;}
36  double getDzShift() const {return dzShift;}
37  double getZShiftHac2() const {return zShiftHac2;}
38 
39  double getRout() const {return rout;}
40  double getRinKink() const {return riKink;}
41  double getRinDip() const {return riDip;}
42  double getRoutDip() const {return roDip;}
43  double getHeboxDepth() const {return heboxDepth;}
44  double getDrEnd() const {return drEnd;}
45  double getAngTop() const {return angTop;}
46  double getAngBot() const {return angBot;}
47  double getAngGap() const {return angGap;}
48  double getSlope() const {return slope;}
49 
50  std::string getAbsMat() const {return absMat;}
51  int getModules() const {return modules;}
52  std::string getModName(unsigned int i) const {return modName[i];}
53  std::string getModMat(unsigned int i) const {return modMat[i];}
54  int getModType(unsigned int i) const {return modType[i];}
55  int getSectionModule(unsigned i) const {return sectionModule[i];}
56  int getLayerN(unsigned int i) const {return layerN[i];}
57  int getLayer(unsigned int i, unsigned int j) const;
58  double getThick(unsigned int i) const {return thick[i];}
59  double getTrim(unsigned int i, unsigned int j) const;
60  double getZminBlock(unsigned i) const {return zminBlock[i];}
61  double getZmaxBlock(unsigned i) const {return zmaxBlock[i];}
62  double getRinBlock1(unsigned i) const {return rinBlock1[i];}
63  double getRinBlock2(unsigned i) const {return rinBlock2[i];}
64  double getRoutBlock1(unsigned i) const {return routBlock1[i];}
65  double getRoutBlock2(unsigned i) const {return routBlock2[i];}
66 
67  int getPhi() const {return phiSections;}
68  std::string getPhiName(unsigned int i) const {return phiName[i];}
69  int getLayers() const {return layers;}
70  std::string getLayerName(unsigned int i) const {return layerName[i];}
71  int getLayerType(unsigned int i) const {return layerType[i];}
72  double getLayerT(unsigned int i) const {return layerT[i];}
73  double getScintT(unsigned int i) const {return scintT[i];}
74  std::string getPlastMat() const {return plastMat;}
75  std::string getScintMat() const {return scintMat;}
76  std::string getRotMat() const {return rotmat;}
77  double getTolPos() const {return tolPos;}
78  double getTolAbs() const {return tolAbs;}
79 
80  void initialize(const DDNumericArguments & nArgs,
81  const DDVectorArguments & vArgs,
82  const DDMapArguments & mArgs,
83  const DDStringArguments & sArgs,
84  const DDStringVectorArguments & vsArgs);
85 
86  void execute(DDCompactView& cpv);
87 
88 protected:
89 
92  void parameterLayer (int iphi, double rinF, double routF, double rinB,
93  double routB, double zi, double zo, double& yh1,
94  double& bl1, double& tl1, double& yh2, double& bl2,
95  double& tl2, double& alp, double& theta, double& phi,
96  double& xpos, double& ypos, double& zcpv);
97  void parameterLayer0(int mod, int layer, int iphi, double& yh, double& bl,
98  double& tl, double& alp, double& xpos, double& ypos,
99  double& zcpv);
102  void constructScintLayer (DDLogicalPart glog, double pDz, double yh,
103  double bl, double tl, double alp,
104  std::string name, int id, DDCompactView& cpv);
105 
106 private:
107 
108  std::string genMaterial; //General material
109  int nsectors; //Number of potenital straight edges
110  int nsectortot; //Number of straight edges (actual)
111  int nEndcap; //Number of endcaps
112  std::vector<int> eModule; //Modules to be present in part i (?)
113  std::string rotHalf; //Rotation matrix for half
114  std::string rotns; //Name space for rotation
115  std::string rotation; //Rotation matrix to place in mother
116  double zShift; //needed for TB setup (move HE)
117 
118  double zFront; //Z of the front section
119  double zEnd; //Outer Z of the HE
120  double ziNose; //Starting Z of the nose
121  double ziL0Nose; //Starting Z of layer 0 at nose
122  double ziBody; //Starting Z of the body
123  double ziL0Body; //Starting Z of layer 0 at body
124  double ziKink; //Position of the kink point
125  double z0Beam; //Position of gap front along z-axis
126  double z1Beam; //Position of gap end along z-axis
127  double ziDip; //Starting Z of dipped part of body
128  double dzStep; //Width in Z of a layer
129  double dzShift; //Shift in Z for HE
130  double zShiftHac2; //needed for TB (remove part Hac2)
131 
132  double rout; //Outer R of the HE
133  double riKink; //Inner radius at kink point
134  double riDip; //Inner radius at the dip point
135  double roDip; //Outer radius at the dip point
136  double heboxDepth; //Depth of the HE box
137  double drEnd; //Shift in R for the end absorber
138 
139  double angTop; //Angle of top end of HE
140  double angBot; //Angle of the bottom end of HE
141  double angGap; //Gap angle (in degrees)
142  double slope; //Slope of the gap on HE side
143 
144  std::string absMat; //Absorber material
145  int modules; //Number of modules
146  std::vector<std::string> modName; //Name
147  std::vector<std::string> modMat; //Material
148  std::vector<int> modType; //Type (0/1 for front/standard)
149  std::vector<int> sectionModule; //Number of sections in a module
150  std::vector<int> layerN; //Number of layers
151  std::vector<int> layerN0; //Layer numbers in section 0
152  std::vector<int> layerN1; //Layer numbers in section 1
153  std::vector<int> layerN2; //Layer numbers in section 2
154  std::vector<int> layerN3; //Layer numbers in section 3
155  std::vector<int> layerN4; //Layer numbers in section 4
156  std::vector<int> layerN5; //Layer numbers in section 5
157  std::vector<double> thick; //Thickness of absorber/air
158  std::vector<double> trimLeft; //Trimming of left layers in module
159  std::vector<double> trimRight; //Trimming of right layers in module
160  std::vector<double> zminBlock; //Minimum Z
161  std::vector<double> zmaxBlock; //Maximum Z
162  std::vector<double> rinBlock1; //Inner Radius
163  std::vector<double> routBlock1; //Outer Radius at zmin
164  std::vector<double> rinBlock2; //Inner Radius
165  std::vector<double> routBlock2; //Outer Radius at zmax
166 
167  int phiSections; //Number of phi sections
168  std::vector<std::string> phiName; //Name of Phi sections
169  int layers; //Number of layers
170  std::vector<std::string> layerName; //Layer Names
171  std::vector<int> layerType; //Detector type in each layer
172  std::vector<double> layerT; //Layer thickness (plastic + scint.)
173  std::vector<double> scintT; //Scintillator thickness
174  std::string plastMat; //Plastic material
175  std::string scintMat; //Scintillator material
176  std::string rotmat; //Rotation matrix for positioning
177 
178  std::string idName; //Name of the "parent" volume.
179  std::string idNameSpace; //Namespace of this and ALL sub-parts
180  int idOffset; // Geant4 ID's... = 4000;
181 
182  double tolPos, tolAbs; //Tolerances
183 };
184 
185 #endif
double getTrim(unsigned int i, unsigned int j) const
double getAngGap() const
void constructInsideModule0(DDLogicalPart module, int mod, DDCompactView &cpv)
std::string getModName(unsigned int i) const
int i
Definition: DBlmapReader.cc:9
double getZmaxBlock(unsigned i) const
double getDrEnd() const
double getZiL0Nose() const
std::vector< int > layerN2
double getZ0Beam() const
double getSlope() const
std::vector< int > modType
std::string idNameSpace
std::vector< double > zminBlock
double getRinBlock2(unsigned i) const
double getZiKink() const
double getZShift() const
int getNsectortot() const
std::vector< int > layerN0
std::vector< std::string > modMat
int getEndcaps() const
std::string getAbsMat() const
virtual ~DDHCalEndcapAlgo()
int getPhi() const
double getRoutBlock2(unsigned i) const
int getModType(unsigned int i) const
int getNsectors() const
Geom::Theta< T > theta() const
void execute(DDCompactView &cpv)
std::vector< double > routBlock1
double getThick(unsigned int i) const
double getRinKink() const
std::vector< double > zmaxBlock
int getLayers() const
double getTolAbs() const
double getZEnd() const
type of data representation of DDCompactView
Definition: DDCompactView.h:77
int getSectionModule(unsigned i) const
std::string getModMat(unsigned int i) const
std::string getRotMat() const
std::string getRotation() const
std::vector< double > routBlock2
double getZ1Beam() const
std::vector< std::string > layerName
double getScintT(unsigned int i) const
void parameterLayer0(int mod, int layer, int iphi, double &yh, double &bl, double &tl, double &alp, double &xpos, double &ypos, double &zcpv)
a std::map&lt;std::string,YourType&gt; that offers a const operator[key]; if key is not stored in the std::...
Definition: DDReadMapType.h:13
std::vector< int > layerN1
double getAngTop() const
double getRout() const
double getRinBlock1(unsigned i) const
double getAngBot() const
std::string plastMat
std::vector< int > layerN4
std::string scintMat
void constructInsideModule(DDLogicalPart module, int mod, DDCompactView &cpv)
int equipModule(unsigned int i) const
std::vector< int > sectionModule
double getDzStep() const
double getZiNose() const
double getZiL0Body() const
std::string getPlastMat() const
int j
Definition: DBlmapReader.cc:9
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
std::vector< double > rinBlock1
std::vector< std::string > modName
std::vector< int > layerN5
int getLayerN(unsigned int i) const
std::vector< int > eModule
std::vector< int > layerType
std::vector< int > layerN
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
void constructGeneralVolume(DDCompactView &cpv)
int getLayerType(unsigned int i) const
double getRinDip() const
std::vector< double > rinBlock2
double getLayerT(unsigned int i) const
double getRoutDip() const
std::vector< double > trimRight
double getHeboxDepth() const
double getTolPos() const
double getDzShift() const
int getLayer(unsigned int i, unsigned int j) const
double getZiDip() const
std::string getPhiName(unsigned int i) const
double getZFront() const
std::vector< int > layerN3
double getZiBody() const
std::string getGenMat() const
std::string getScintMat() const
std::vector< std::string > phiName
void parameterLayer(int iphi, double rinF, double routF, double rinB, double routB, double zi, double zo, double &yh1, double &bl1, double &tl1, double &yh2, double &bl2, double &tl2, double &alp, double &theta, double &phi, double &xpos, double &ypos, double &zcpv)
std::string genMaterial
double getZminBlock(unsigned i) const
std::vector< double > thick
std::string rotation
std::string getLayerName(unsigned int i) const
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
std::vector< double > scintT
std::vector< double > layerT
Definition: vlib.h:209
void constructInsideSector(DDLogicalPart sector, DDCompactView &cpv)
void constructScintLayer(DDLogicalPart glog, double pDz, double yh, double bl, double tl, double alp, std::string name, int id, DDCompactView &cpv)
double getZShiftHac2() const
double getRoutBlock1(unsigned i) const
int getModules() const
Definition: DDAxes.h:10
std::vector< double > trimLeft