CMS 3D CMS Logo

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

Generated on Tue Jun 9 17:37:24 2009 for CMSSW by  doxygen 1.5.4