CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/Geometry/EcalCommonData/interface/DDEcalEndcapAlgo.h

Go to the documentation of this file.
00001 #ifndef DD_EcalEndcapAlgo_h
00002 #define DD_EcalEndcapAlgo_h
00003 
00004 #include <map>
00005 #include <string>
00006 #include <vector>
00007 #include "DetectorDescription/Base/interface/DDTypes.h"
00008 #include "DetectorDescription/Base/interface/DDutils.h"
00009 #include "DetectorDescription/Core/interface/DDName.h"
00010 #include "DetectorDescription/Algorithm/interface/DDAlgorithm.h"
00011 #include "DetectorDescription/Core/interface/DDMaterial.h"
00012 #include "DetectorDescription/Core/interface/DDSplit.h"
00013 #include "DetectorDescription/Core/interface/DDTransform.h"
00014 #include "Geometry/CaloGeometry/interface/EcalTrapezoidParameters.h"
00015 #include "CLHEP/Geometry/Transform3D.h" 
00016 
00017 
00018 class DDEcalEndcapAlgo : public DDAlgorithm {
00019  public:
00020 
00021       typedef EcalTrapezoidParameters Trap ;
00022       typedef HepGeom::Point3D<double>               Pt3D ;
00023       typedef HepGeom::Transform3D          Tf3D ;
00024       typedef HepGeom::ReflectZ3D           RfZ3D ;
00025       typedef HepGeom::Translate3D          Tl3D ;
00026       typedef HepGeom::Rotate3D             Ro3D ;
00027       typedef HepGeom::RotateZ3D            RoZ3D ;
00028       typedef HepGeom::RotateY3D            RoY3D ;
00029       typedef HepGeom::RotateX3D            RoX3D ;
00030 
00031       typedef CLHEP::Hep3Vector              Vec3 ;
00032       typedef CLHEP::HepRotation             Rota ;
00033 
00034       //Constructor and Destructor
00035       DDEcalEndcapAlgo();
00036       virtual ~DDEcalEndcapAlgo();
00037 
00038       void initialize(const DDNumericArguments      & nArgs,
00039                       const DDVectorArguments       & vArgs,
00040                       const DDMapArguments          & mArgs,
00041                       const DDStringArguments       & sArgs,
00042                       const DDStringVectorArguments & vsArgs);
00043       void execute(DDCompactView& cpv);
00044 
00045       //  New methods for SC geometry
00046       void EEPositionCRs( const DDName        pName,
00047                           const DDTranslation offset,
00048                           const int iSCType,
00049                           DDCompactView& cpv );
00050 
00051       void EECreateSC( const unsigned int iSCType, DDCompactView& cpv );
00052 
00053       void EECreateCR();
00054 
00055       void EEPosSC( const int iCol , 
00056                     const int iRow , 
00057                     DDName    EEDeeName );
00058 
00059       unsigned int EEGetSCType( const unsigned int iCol , 
00060                                 const unsigned int iRow  ) ;
00061 
00062       DDName EEGetSCName( const int iCol , 
00063                           const int iRow  ) ;
00064 
00065       std::vector<double> EEGetSCCtrs( const int iCol , 
00066                                        const int iRow  );
00067 
00068       DDMaterial ddmat(  const std::string& s ) const ;
00069       DDName     ddname( const std::string& s ) const ;
00070       DDRotation myrot(  const std::string& s,
00071                          const DDRotationMatrix& r ) const ;
00072 
00073       const std::string&         idNameSpace() const { return m_idNameSpace   ; }
00074 
00075       // endcap parent volume
00076       DDMaterial                 eeMat()      const { return ddmat(  m_EEMat  ) ; }
00077       double                     eezOff()     const { return m_EEzOff  ; }
00078 
00079       DDName                     eeQuaName()     const { return ddname( m_EEQuaName ) ; }
00080       DDMaterial                 eeQuaMat()      const { return ddmat(  m_EEQuaMat  ) ; }
00081 
00082       DDMaterial                 eeCrysMat()  const { return ddmat( m_EECrysMat ) ; }
00083       DDMaterial                 eeWallMat()  const { return ddmat( m_EEWallMat ) ; }
00084 
00085       double                     eeCrysLength() const { return m_EECrysLength ; }
00086       double                     eeCrysRear()   const { return m_EECrysRear ; }
00087       double                     eeCrysFront()  const { return m_EECrysFront ; }
00088       double                     eeSCELength()  const { return m_EESCELength ; }
00089       double                     eeSCERear()    const { return m_EESCERear ; }
00090       double                     eeSCEFront()   const { return m_EESCEFront ; }
00091       double                     eeSCALength()  const { return m_EESCALength ; }
00092       double                     eeSCARear()    const { return m_EESCARear ; }
00093       double                     eeSCAFront()   const { return m_EESCAFront ; }
00094       double                     eeSCAWall()    const { return m_EESCAWall ; }
00095       double                     eeSCHLength()  const { return m_EESCHLength ; }
00096       double                     eeSCHSide()    const { return m_EESCHSide ; }
00097 
00098       double                     eenSCTypes()   const { return m_EEnSCTypes ; }
00099       double                     eenColumns()   const { return m_EEnColumns ; }
00100       double                     eenSCCutaway() const { return m_EEnSCCutaway ; }
00101       double                     eenSCquad()    const { return m_EEnSCquad ; }
00102       double                     eenCRSC()      const { return m_EEnCRSC ; }
00103       const std::vector<double>& eevecEESCProf() const { return m_vecEESCProf ; }
00104       const std::vector<double>& eevecEEShape() const { return m_vecEEShape ; }
00105       const std::vector<double>& eevecEESCCutaway() const { return m_vecEESCCutaway ; }
00106       const std::vector<double>& eevecEESCCtrs() const { return m_vecEESCCtrs ; }
00107       const std::vector<double>& eevecEECRCtrs() const { return m_vecEECRCtrs ; }
00108 
00109       DDName                     cutBoxName()    const { return ddname( m_cutBoxName ) ; }
00110       double                     eePFHalf()      const { return m_PFhalf ; }
00111       double                     eePFFifth()     const { return m_PFfifth ; }
00112       double                     eePF45()        const { return m_PF45 ; }
00113 
00114       DDName  envName( unsigned int i )    const { return ddname( m_envName + int_to_string(i)  ) ; }
00115       DDName  alvName( unsigned int i )    const { return ddname( m_alvName + int_to_string(i)  ) ; }
00116       DDName  intName( unsigned int i )    const { return ddname( m_intName + int_to_string(i)  ) ; }
00117       DDName                     cryName()    const { return ddname( m_cryName ) ; }
00118 
00119       DDName                     addTmp( DDName aName ) const { return ddname( aName.name() + "Tmp" ) ; }
00120 
00121       const DDTranslation& cryFCtr( unsigned int iRow,
00122                                     unsigned int iCol  ) const { return m_cryFCtr[iRow-1][iCol-1] ; }
00123 
00124       const DDTranslation& cryRCtr( unsigned int iRow,
00125                                     unsigned int iCol  ) const { return m_cryRCtr[iRow-1][iCol-1] ; }
00126 
00127       const DDTranslation& scrFCtr( unsigned int iRow,
00128                                     unsigned int iCol  ) const { return m_scrFCtr[iRow-1][iCol-1] ; }
00129 
00130       const DDTranslation& scrRCtr( unsigned int iRow,
00131                                     unsigned int iCol  ) const { return m_scrRCtr[iRow-1][iCol-1] ; }
00132 
00133       const std::vector<double>& vecEESCLims() const { return m_vecEESCLims ; }
00134 
00135       double                     iLength()      const { return m_iLength ; }
00136       double                     iXYOff()       const { return m_iXYOff ; }
00137 
00138 protected:
00139 
00140 private:
00141 
00142       std::string         m_idNameSpace;            //Namespace of this and ALL sub-parts
00143 
00144       // Barrel volume
00145       std::string         m_EEMat     ;
00146       double              m_EEzOff    ;
00147 
00148       std::string         m_EEQuaName    ; 
00149       std::string         m_EEQuaMat     ;
00150 
00151       std::string         m_EECrysMat;
00152       std::string         m_EEWallMat;
00153 
00154       double              m_EECrysLength;
00155       double              m_EECrysRear;
00156       double              m_EECrysFront;
00157       double              m_EESCELength;
00158       double              m_EESCERear;
00159       double              m_EESCEFront;
00160       double              m_EESCALength;
00161       double              m_EESCARear;
00162       double              m_EESCAFront;
00163       double              m_EESCAWall;
00164       double              m_EESCHLength;
00165       double              m_EESCHSide;
00166 
00167       double m_EEnSCTypes;
00168       std::vector<double> m_vecEESCProf;
00169       double m_EEnColumns;
00170       std::vector<double> m_vecEEShape;
00171       double m_EEnSCCutaway;
00172       std::vector<double> m_vecEESCCutaway;
00173       double m_EEnSCquad;     
00174       std::vector<double> m_vecEESCCtrs;
00175       double m_EEnCRSC;
00176       std::vector<double> m_vecEECRCtrs;
00177 
00178       const std::vector<double>* m_cutParms ;
00179       std::string         m_cutBoxName ;
00180 
00181       std::string         m_envName ;
00182       std::string         m_alvName ;
00183       std::string         m_intName ;
00184       std::string         m_cryName ;
00185 
00186       DDTranslation m_cryFCtr[5][5] ;
00187       DDTranslation m_cryRCtr[5][5] ;
00188 
00189       DDTranslation m_scrFCtr[10][10] ;
00190       DDTranslation m_scrRCtr[10][10] ;
00191 
00192       double m_PFhalf ;
00193       double m_PFfifth ;
00194       double m_PF45 ;
00195 
00196       std::vector<double> m_vecEESCLims;
00197 
00198       double m_iLength ;
00199 
00200       double m_iXYOff ;
00201 
00202 }; 
00203 
00204 #endif