CMS 3D CMS Logo

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