CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDEcalEndcapAlgo.h
Go to the documentation of this file.
1 #ifndef DD_EcalEndcapAlgo_h
2 #define DD_EcalEndcapAlgo_h
3 
4 #include <map>
5 #include <string>
6 #include <vector>
15 #include "CLHEP/Geometry/Transform3D.h"
16 
17 
18 class DDEcalEndcapAlgo : public DDAlgorithm {
19  public:
20 
22  typedef HepGeom::Point3D<double> Pt3D ;
23  typedef HepGeom::Transform3D Tf3D ;
24  typedef HepGeom::ReflectZ3D RfZ3D ;
25  typedef HepGeom::Translate3D Tl3D ;
26  typedef HepGeom::Rotate3D Ro3D ;
27  typedef HepGeom::RotateZ3D RoZ3D ;
28  typedef HepGeom::RotateY3D RoY3D ;
29  typedef HepGeom::RotateX3D RoX3D ;
30 
31  typedef CLHEP::Hep3Vector Vec3 ;
32  typedef CLHEP::HepRotation Rota ;
33 
34  //Constructor and Destructor
36  virtual ~DDEcalEndcapAlgo();
37 
38  void initialize(const DDNumericArguments & nArgs,
39  const DDVectorArguments & vArgs,
40  const DDMapArguments & mArgs,
41  const DDStringArguments & sArgs,
42  const DDStringVectorArguments & vsArgs);
43  void execute(DDCompactView& cpv);
44 
45  // New methods for SC geometry
46  void EEPositionCRs( const DDName pName,
47  const DDTranslation offset,
48  const int iSCType,
49  DDCompactView& cpv );
50 
51  void EECreateSC( const unsigned int iSCType, DDCompactView& cpv );
52 
53  void EECreateCR();
54 
55  void EEPosSC( const int iCol ,
56  const int iRow ,
57  DDName EEDeeName );
58 
59  unsigned int EEGetSCType( const unsigned int iCol ,
60  const unsigned int iRow ) ;
61 
62  DDName EEGetSCName( const int iCol ,
63  const int iRow ) ;
64 
65  std::vector<double> EEGetSCCtrs( const int iCol ,
66  const int iRow );
67 
68  DDMaterial ddmat( const std::string& s ) const ;
69  DDName ddname( const std::string& s ) const ;
70  DDRotation myrot( const std::string& s,
71  const DDRotationMatrix& r ) const ;
72 
73  const std::string& idNameSpace() const { return m_idNameSpace ; }
74 
75  // endcap parent volume
76  DDMaterial eeMat() const { return ddmat( m_EEMat ) ; }
77  double eezOff() const { return m_EEzOff ; }
78 
79  DDName eeQuaName() const { return ddname( m_EEQuaName ) ; }
80  DDMaterial eeQuaMat() const { return ddmat( m_EEQuaMat ) ; }
81 
82  DDMaterial eeCrysMat() const { return ddmat( m_EECrysMat ) ; }
83  DDMaterial eeWallMat() const { return ddmat( m_EEWallMat ) ; }
84 
85  double eeCrysLength() const { return m_EECrysLength ; }
86  double eeCrysRear() const { return m_EECrysRear ; }
87  double eeCrysFront() const { return m_EECrysFront ; }
88  double eeSCELength() const { return m_EESCELength ; }
89  double eeSCERear() const { return m_EESCERear ; }
90  double eeSCEFront() const { return m_EESCEFront ; }
91  double eeSCALength() const { return m_EESCALength ; }
92  double eeSCARear() const { return m_EESCARear ; }
93  double eeSCAFront() const { return m_EESCAFront ; }
94  double eeSCAWall() const { return m_EESCAWall ; }
95  double eeSCHLength() const { return m_EESCHLength ; }
96  double eeSCHSide() const { return m_EESCHSide ; }
97 
98  double eenSCTypes() const { return m_EEnSCTypes ; }
99  double eenColumns() const { return m_EEnColumns ; }
100  double eenSCCutaway() const { return m_EEnSCCutaway ; }
101  double eenSCquad() const { return m_EEnSCquad ; }
102  double eenCRSC() const { return m_EEnCRSC ; }
103  const std::vector<double>& eevecEESCProf() const { return m_vecEESCProf ; }
104  const std::vector<double>& eevecEEShape() const { return m_vecEEShape ; }
105  const std::vector<double>& eevecEESCCutaway() const { return m_vecEESCCutaway ; }
106  const std::vector<double>& eevecEESCCtrs() const { return m_vecEESCCtrs ; }
107  const std::vector<double>& eevecEECRCtrs() const { return m_vecEECRCtrs ; }
108 
109  DDName cutBoxName() const { return ddname( m_cutBoxName ) ; }
110  double eePFHalf() const { return m_PFhalf ; }
111  double eePFFifth() const { return m_PFfifth ; }
112  double eePF45() const { return m_PF45 ; }
113 
114  DDName envName( unsigned int i ) const { return ddname( m_envName + int_to_string(i) ) ; }
115  DDName alvName( unsigned int i ) const { return ddname( m_alvName + int_to_string(i) ) ; }
116  DDName intName( unsigned int i ) const { return ddname( m_intName + int_to_string(i) ) ; }
117  DDName cryName() const { return ddname( m_cryName ) ; }
118 
119  DDName addTmp( DDName aName ) const { return ddname( aName.name() + "Tmp" ) ; }
120 
121  const DDTranslation& cryFCtr( unsigned int iRow,
122  unsigned int iCol ) const { return m_cryFCtr[iRow-1][iCol-1] ; }
123 
124  const DDTranslation& cryRCtr( unsigned int iRow,
125  unsigned int iCol ) const { return m_cryRCtr[iRow-1][iCol-1] ; }
126 
127  const DDTranslation& scrFCtr( unsigned int iRow,
128  unsigned int iCol ) const { return m_scrFCtr[iRow-1][iCol-1] ; }
129 
130  const DDTranslation& scrRCtr( unsigned int iRow,
131  unsigned int iCol ) const { return m_scrRCtr[iRow-1][iCol-1] ; }
132 
133  const std::vector<double>& vecEESCLims() const { return m_vecEESCLims ; }
134 
135  double iLength() const { return m_iLength ; }
136  double iXYOff() const { return m_iXYOff ; }
137 
138 protected:
139 
140 private:
141 
142  std::string m_idNameSpace; //Namespace of this and ALL sub-parts
143 
144  // Barrel volume
145  std::string m_EEMat ;
146  double m_EEzOff ;
147 
148  std::string m_EEQuaName ;
149  std::string m_EEQuaMat ;
150 
151  std::string m_EECrysMat;
152  std::string m_EEWallMat;
153 
155  double m_EECrysRear;
158  double m_EESCERear;
159  double m_EESCEFront;
161  double m_EESCARear;
162  double m_EESCAFront;
163  double m_EESCAWall;
165  double m_EESCHSide;
166 
167  double m_EEnSCTypes;
168  std::vector<double> m_vecEESCProf;
169  double m_EEnColumns;
170  std::vector<double> m_vecEEShape;
172  std::vector<double> m_vecEESCCutaway;
173  double m_EEnSCquad;
174  std::vector<double> m_vecEESCCtrs;
175  double m_EEnCRSC;
176  std::vector<double> m_vecEECRCtrs;
177 
178  const std::vector<double>* m_cutParms ;
179  std::string m_cutBoxName ;
180 
181  std::string m_envName ;
182  std::string m_alvName ;
183  std::string m_intName ;
184  std::string m_cryName ;
185 
188 
191 
192  double m_PFhalf ;
193  double m_PFfifth ;
194  double m_PF45 ;
195 
196  std::vector<double> m_vecEESCLims;
197 
198  double m_iLength ;
199 
200  double m_iXYOff ;
201 
202  double m_cryZOff ;
203 
204  double m_zFront ;
205 };
206 
207 #endif
double eeSCHLength() const
void EEPositionCRs(const DDName pName, const DDTranslation offset, const int iSCType, DDCompactView &cpv)
int i
Definition: DBlmapReader.cc:9
DDName cutBoxName() const
HepGeom::RotateX3D RoX3D
DDTranslation m_cryFCtr[5][5]
HepGeom::Point3D< double > Pt3D
const DDTranslation & scrRCtr(unsigned int iRow, unsigned int iCol) const
DDMaterial ddmat(const std::string &s) const
const std::vector< double > & eevecEESCCtrs() const
std::string m_cutBoxName
DDName addTmp(DDName aName) const
double eenCRSC() const
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
double eeSCEFront() const
DDTranslation m_scrRCtr[10][10]
DDName envName(unsigned int i) const
CLHEP::Hep3Vector Vec3
unsigned int EEGetSCType(const unsigned int iCol, const unsigned int iRow)
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:18
HepGeom::Translate3D Tl3D
std::string m_intName
DDName eeQuaName() const
double iLength() const
void execute(DDCompactView &cpv)
type of data representation of DDCompactView
Definition: DDCompactView.h:77
double eeSCELength() const
double eeSCALength() const
HepGeom::ReflectZ3D RfZ3D
std::string m_EEQuaMat
DDRotation myrot(const std::string &s, const DDRotationMatrix &r) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
double eenSCCutaway() const
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:66
double eeSCHSide() const
std::string m_idNameSpace
EcalTrapezoidParameters Trap
std::vector< double > m_vecEESCLims
DDName cryName() const
const std::vector< double > & vecEESCLims() const
void EEPosSC(const int iCol, const int iRow, DDName EEDeeName)
std::string m_EECrysMat
std::string m_envName
CLHEP::HepRotation Rota
double eeCrysLength() const
const std::vector< double > & eevecEESCProf() const
DDMaterial eeWallMat() const
std::string int_to_string(const int &in)
Definition: DDutils.cc:16
double eeCrysRear() const
double eePF45() const
std::string m_EEQuaName
std::string m_cryName
std::vector< double > EEGetSCCtrs(const int iCol, const int iRow)
HepGeom::Transform3D Tf3D
DDTranslation m_scrFCtr[10][10]
DDName ddname(const std::string &s) const
double eeCrysFront() const
const DDTranslation & cryRCtr(unsigned int iRow, unsigned int iCol) const
unsigned int offset(bool)
double eenSCquad() const
const DDTranslation & cryFCtr(unsigned int iRow, unsigned int iCol) const
DDMaterial eeCrysMat() const
const std::vector< double > & eevecEECRCtrs() const
DDMaterial eeMat() const
const std::string & idNameSpace() const
double eezOff() const
std::vector< double > m_vecEEShape
HepGeom::RotateZ3D RoZ3D
DDTranslation m_cryRCtr[5][5]
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
DDMaterial eeQuaMat() const
double eePFHalf() const
std::vector< double > m_vecEESCCtrs
double eePFFifth() const
double eenColumns() const
double eeSCAFront() const
std::vector< double > m_vecEECRCtrs
double eeSCARear() const
HepGeom::RotateY3D RoY3D
DDName intName(unsigned int i) const
const DDTranslation & scrFCtr(unsigned int iRow, unsigned int iCol) const
double eenSCTypes() const
virtual ~DDEcalEndcapAlgo()
const std::vector< double > & eevecEESCCutaway() const
void EECreateSC(const unsigned int iSCType, DDCompactView &cpv)
std::string m_EEWallMat
std::string m_alvName
const std::vector< double > & eevecEEShape() const
const std::vector< double > * m_cutParms
DDName alvName(unsigned int i) const
std::vector< double > m_vecEESCCutaway
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
const std::string & name() const
Returns the name.
Definition: DDName.cc:87
double eeSCAWall() const
double eeSCERear() const
double iXYOff() const
DDName EEGetSCName(const int iCol, const int iRow)
HepGeom::Rotate3D Ro3D
std::vector< double > m_vecEESCProf