CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

CaloGeometryDBEP< T, U > Class Template Reference

#include <CaloGeometryDBEP.h>

Inheritance diagram for CaloGeometryDBEP< T, U >:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Types

typedef CaloCellGeometry::CCGFloat CCGFloat
typedef
CaloSubdetectorGeometry::DimVec 
DimVec
typedef
CaloSubdetectorGeometry::IVec 
IVec
typedef CaloCellGeometry::Pt3D Pt3D
typedef CaloCellGeometry::Pt3DVec Pt3DVec
typedef boost::shared_ptr
< CaloSubdetectorGeometry
PtrType
typedef CaloCellGeometry::Tr3D Tr3D
typedef
CaloSubdetectorGeometry::TrVec 
TrVec

Public Member Functions

 CaloGeometryDBEP (const edm::ParameterSet &ps)
template<>
CaloGeometryDBEP< HcalGeometry,
CaloGeometryDBReader >
::PtrType 
produceAligned (const typename HcalGeometry::AlignedRecord &iRecord)
template<>
CaloGeometryDBEP< HcalGeometry,
CaloGeometryDBWriter >
::PtrType 
produceAligned (const typename HcalGeometry::AlignedRecord &iRecord)
PtrType produceAligned (const typename T::AlignedRecord &iRecord)
virtual ~CaloGeometryDBEP ()

Private Attributes

bool m_applyAlignment
const edm::ParameterSet m_pSet

Detailed Description

template<class T, class U>
class CaloGeometryDBEP< T, U >

Definition at line 37 of file CaloGeometryDBEP.h.


Member Typedef Documentation

template<class T, class U>
typedef CaloCellGeometry::CCGFloat CaloGeometryDBEP< T, U >::CCGFloat

Definition at line 41 of file CaloGeometryDBEP.h.

template<class T, class U>
typedef CaloSubdetectorGeometry::DimVec CaloGeometryDBEP< T, U >::DimVec

Definition at line 48 of file CaloGeometryDBEP.h.

template<class T, class U>
typedef CaloSubdetectorGeometry::IVec CaloGeometryDBEP< T, U >::IVec

Definition at line 49 of file CaloGeometryDBEP.h.

template<class T, class U>
typedef CaloCellGeometry::Pt3D CaloGeometryDBEP< T, U >::Pt3D

Definition at line 42 of file CaloGeometryDBEP.h.

template<class T, class U>
typedef CaloCellGeometry::Pt3DVec CaloGeometryDBEP< T, U >::Pt3DVec

Definition at line 43 of file CaloGeometryDBEP.h.

template<class T, class U>
typedef boost::shared_ptr< CaloSubdetectorGeometry > CaloGeometryDBEP< T, U >::PtrType

Definition at line 46 of file CaloGeometryDBEP.h.

template<class T, class U>
typedef CaloCellGeometry::Tr3D CaloGeometryDBEP< T, U >::Tr3D

Definition at line 44 of file CaloGeometryDBEP.h.

template<class T, class U>
typedef CaloSubdetectorGeometry::TrVec CaloGeometryDBEP< T, U >::TrVec

Definition at line 47 of file CaloGeometryDBEP.h.


Constructor & Destructor Documentation

template<class T, class U>
CaloGeometryDBEP< T, U >::CaloGeometryDBEP ( const edm::ParameterSet ps) [inline]

Definition at line 51 of file CaloGeometryDBEP.h.

References edm::ESProducer::setWhatProduced().

                                                         :
          m_applyAlignment ( ps.getParameter<bool>("applyAlignment") ),
          m_pSet( ps )

      {
         setWhatProduced( this,
                          &CaloGeometryDBEP<T,U>::produceAligned,
                          edm::es::Label( T::producerTag() ) ) ;//+std::string("TEST") ) ) ;
      }
template<class T, class U>
virtual CaloGeometryDBEP< T, U >::~CaloGeometryDBEP ( ) [inline, virtual]

Definition at line 61 of file CaloGeometryDBEP.h.

{}

Member Function Documentation

template<class T, class U>
PtrType CaloGeometryDBEP< T, U >::produceAligned ( const typename T::AlignedRecord &  iRecord) [inline]

Definition at line 63 of file CaloGeometryDBEP.h.

References asciidump::at, CaloCellGeometry::getParmPtr(), CaloSubdetectorGeometry::getSummary(), gt, i, edm::ESHandleBase::isValid(), j, findQualityFiles::jj, Alignments::m_align, CaloGeometryDBEP< T, U >::m_applyAlignment, edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, TablePrint::write, and create_public_lumi_plots::xy.

      {
         const Alignments* alignPtr  ( 0 ) ;
         const Alignments* globalPtr ( 0 ) ;
         if( m_applyAlignment ) // get ptr if necessary
         {
            edm::ESHandle< Alignments >                                      alignments ;
            iRecord.template getRecord< typename T::AlignmentRecord >().get( alignments ) ;

            assert( alignments.isValid() && // require valid alignments and expected size
                    ( alignments->m_align.size() == T::numberOfAlignments() ) ) ;
            alignPtr = alignments.product() ;

            edm::ESHandle< Alignments >                          globals   ;
            iRecord.template getRecord<GlobalPositionRcd>().get( globals ) ;

            assert( globals.isValid() ) ;
            globalPtr = globals.product() ;
         }

         TrVec  tvec ;
         DimVec dvec ;
         IVec   ivec ;
         std::vector<uint32_t> dins;

         if( U::writeFlag() )
         {
            edm::ESHandle<CaloSubdetectorGeometry> pG ;
            iRecord.get( T::producerTag() + std::string("_master"), pG ) ; 

            const CaloSubdetectorGeometry* pGptr ( pG.product() ) ;

            pGptr->getSummary( tvec, ivec, dvec, dins ) ;

            U::write( tvec, dvec, ivec, T::dbString() ) ;
         }
         else
         {
            edm::ESHandle<PCaloGeometry> pG ;
            iRecord.template getRecord<typename T::PGeometryRecord >().get( pG ) ; 

            tvec = pG->getTranslation() ;
            dvec = pG->getDimension() ;
            ivec = pG->getIndexes() ;
         }       
//*********************************************************************************************

         const unsigned int nTrParm ( tvec.size()/T::k_NumberOfCellsForCorners ) ;

         assert( dvec.size() == T::k_NumberOfShapes * T::k_NumberOfParametersPerShape ) ;

         PtrType ptr ( new T ) ;

         ptr->fillDefaultNamedParameters() ;

         ptr->allocateCorners( T::k_NumberOfCellsForCorners ) ;

         ptr->allocatePar(    dvec.size() ,
                              T::k_NumberOfParametersPerShape ) ;

         for( unsigned int i ( 0 ) ; i != T::k_NumberOfCellsForCorners ; ++i )
         {
            const unsigned int nPerShape ( T::k_NumberOfParametersPerShape ) ;
            DimVec dims ;
            dims.reserve( nPerShape ) ;

            const unsigned int indx ( ivec.size()==1 ? 0 : i ) ;

            DimVec::const_iterator dsrc ( dvec.begin() + ivec[indx]*nPerShape ) ;

            for( unsigned int j ( 0 ) ; j != nPerShape ; ++j )
            {
               dims.push_back( *dsrc ) ;
               ++dsrc ;
            }

            const CCGFloat* myParm ( CaloCellGeometry::getParmPtr( dims, 
                                                                   ptr->parMgr(), 
                                                                   ptr->parVecVec() ) ) ;


            const DetId id ( T::DetIdType::detIdFromDenseIndex( i ) ) ;
    
            const unsigned int iGlob ( 0 == globalPtr ? 0 :
                                       T::alignmentTransformIndexGlobal( id ) ) ;

            assert( 0 == globalPtr || iGlob < globalPtr->m_align.size() ) ;

            const AlignTransform* gt ( 0 == globalPtr ? 0 : &globalPtr->m_align[ iGlob ] ) ;

            assert( 0 == gt || iGlob == T::alignmentTransformIndexGlobal( DetId( gt->rawId() ) ) ) ;

            const unsigned int iLoc ( 0 == alignPtr ? 0 :
                                      T::alignmentTransformIndexLocal( id ) ) ;

            assert( 0 == alignPtr || iLoc < alignPtr->m_align.size() ) ;

            const AlignTransform* at ( 0 == alignPtr ? 0 :
                                       &alignPtr->m_align[ iLoc ] ) ;

            assert( 0 == at || ( T::alignmentTransformIndexLocal( DetId( at->rawId() ) ) == iLoc ) ) ;

            const CaloGenericDetId gId ( id ) ;

            Pt3D  lRef ;
            Pt3DVec lc ( 8, Pt3D(0,0,0) ) ;
            T::localCorners( lc, &dims.front(), i, lRef ) ;

            const Pt3D lBck ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] ) ) ; // ctr rear  face in local
            const Pt3D lCor ( lc[0] ) ;

            //----------------------------------- create transform from 6 numbers ---
            const unsigned int jj ( i*nTrParm ) ;
            Tr3D tr ;
            const ROOT::Math::Translation3D tl ( tvec[jj], tvec[jj+1], tvec[jj+2] ) ;
            const ROOT::Math::EulerAngles ea (
               6==nTrParm ?
               ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) :
               ROOT::Math::EulerAngles() ) ;
            const ROOT::Math::Transform3D rt ( ea, tl ) ;
            double xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz;
            rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ;
            tr = Tr3D( CLHEP::HepRep3x3( xx, xy, xz,
                                         yx, yy, yz,
                                         zx, zy, zz ), 
                       CLHEP::Hep3Vector(dx,dy,dz)     );

            // now prepend alignment(s) for final transform
            const Tr3D atr ( 0 == at ? tr :
                             ( 0 == gt ? at->transform()*tr :
                               at->transform()*gt->transform()*tr ) ) ;
            //--------------------------------- done making transform  ---------------

            const Pt3D        gRef ( atr*lRef ) ;
            const GlobalPoint fCtr ( gRef.x(), gRef.y(), gRef.z() ) ;
            const Pt3D        gBck ( atr*lBck ) ;
            const GlobalPoint fBck ( gBck.x(), gBck.y(), gBck.z() ) ;
            const Pt3D        gCor ( atr*lCor ) ;
            const GlobalPoint fCor ( gCor.x(), gCor.y(), gCor.z() ) ;

            ptr->newCell(  fCtr, fBck, fCor, myParm, id ) ;
         }

         ptr->initializeParms() ; // initializations; must happen after cells filled

         return ptr ; 
      }

Definition at line 9 of file moduleDB.cc.

References HcalGeometry::alignmentTransformIndexGlobal(), HcalGeometry::alignmentTransformIndexLocal(), asciidump::at, HcalGeometry::dbString(), edm::eventsetup::EventSetupRecord::get(), CaloCellGeometry::getParmPtr(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), CaloSubdetectorGeometry::getSummary(), gt, i, edm::ESHandleBase::isValid(), j, findQualityFiles::jj, HcalGeometry::k_NumberOfParametersPerShape, Alignments::m_align, HcalGeometry::numberOfAlignments(), HcalGeometry::producerTag(), edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, CaloGeometryDBReader::writeFlag(), CaloGeometryDBReader::writeIndexed(), and create_public_lumi_plots::xy.

{
    const Alignments* alignPtr  ( 0 ) ;
    const Alignments* globalPtr ( 0 ) ;
    if( m_applyAlignment ) // get ptr if necessary
    {
        edm::ESHandle< Alignments >                                      alignments ;
        iRecord.getRecord< typename HcalGeometry::AlignmentRecord >().get( alignments ) ;

        assert( alignments.isValid() && // require valid alignments and expected size
                ( alignments->m_align.size() == HcalGeometry::numberOfAlignments() ) ) ;
        alignPtr = alignments.product() ;

        edm::ESHandle< Alignments >                          globals   ;
        iRecord.getRecord<GlobalPositionRcd>().get( globals ) ;

        assert( globals.isValid() ) ;
        globalPtr = globals.product() ;
    }

    TrVec  tvec ;
    DimVec dvec ;
    IVec   ivec ;
    IVec   dins ;

    if( CaloGeometryDBReader::writeFlag() )
    {
        edm::ESHandle<CaloSubdetectorGeometry> pG ;
        iRecord.get( HcalGeometry::producerTag() + std::string("_master"), pG ) ; 

        const CaloSubdetectorGeometry* pGptr ( pG.product() ) ;

        pGptr->getSummary( tvec, ivec, dvec, dins ) ;

        CaloGeometryDBReader::writeIndexed( tvec, dvec, ivec, dins, HcalGeometry::dbString() ) ;
    }
    else
    {
        edm::ESHandle<PCaloGeometry> pG ;
        iRecord.getRecord<typename HcalGeometry::PGeometryRecord >().get( pG ) ; 

        tvec = pG->getTranslation() ;
        dvec = pG->getDimension() ;
        ivec = pG->getIndexes() ;
        dins = pG->getDenseIndices();
    }    
    //*********************************************************************************************

 
    edm::ESHandle<HcalTopology> hcalTopology;
    iRecord.getRecord<IdealGeometryRecord>().get( hcalTopology );

    // We know that the numer of shapes chanes with changing depth
    // so, this check is temporary disabled. We need to implement
    // a way either to store or calculate the number of shapes or be able
    // to deal with only max numer of shapes.
    // assert( dvec.size() == hcalTopology->getNumberOfShapes() * HcalGeometry::k_NumberOfParametersPerShape ) ;
    assert( dvec.size() <= hcalTopology->getNumberOfShapes() * HcalGeometry::k_NumberOfParametersPerShape ) ;
    HcalGeometry* hcg=new HcalGeometry( *hcalTopology );
    
    PtrType ptr ( hcg );
 
    const unsigned int nTrParm ( tvec.size()/hcalTopology->ncells() ) ;
   
    ptr->fillDefaultNamedParameters() ;

    ptr->allocateCorners( hcalTopology->ncells() );

    ptr->allocatePar(    dvec.size() ,
                         HcalGeometry::k_NumberOfParametersPerShape ) ;

    for( unsigned int i ( 0 ) ; i < dins.size() ; ++i )
    {
        const unsigned int nPerShape ( HcalGeometry::k_NumberOfParametersPerShape ) ;
        DimVec dims ;
        dims.reserve( nPerShape ) ;

        const unsigned int indx ( ivec.size()==1 ? 0 : i ) ;

        DimVec::const_iterator dsrc ( dvec.begin() + ivec[indx]*nPerShape ) ;

        for( unsigned int j ( 0 ) ; j != nPerShape ; ++j )
        {
            dims.push_back( *dsrc ) ;
            ++dsrc ;
        }

        const CCGFloat* myParm ( CaloCellGeometry::getParmPtr( dims, 
                                                               ptr->parMgr(), 
                                                               ptr->parVecVec() ) ) ;


        const DetId id ( hcalTopology->denseId2detId(dins[i]) );
    
        const unsigned int iGlob ( 0 == globalPtr ? 0 :
                                   HcalGeometry::alignmentTransformIndexGlobal( id ) ) ;

        assert( 0 == globalPtr || iGlob < globalPtr->m_align.size() ) ;

        const AlignTransform* gt ( 0 == globalPtr ? 0 : &globalPtr->m_align[ iGlob ] ) ;

        assert( 0 == gt || iGlob == HcalGeometry::alignmentTransformIndexGlobal( DetId( gt->rawId() ) ) ) ;

        const unsigned int iLoc ( 0 == alignPtr ? 0 :
                                  HcalGeometry::alignmentTransformIndexLocal( id ) ) ;

        assert( 0 == alignPtr || iLoc < alignPtr->m_align.size() ) ;

        const AlignTransform* at ( 0 == alignPtr ? 0 :
                                   &alignPtr->m_align[ iLoc ] ) ;

        assert( 0 == at || ( HcalGeometry::alignmentTransformIndexLocal( DetId( at->rawId() ) ) == iLoc ) ) ;

        Pt3D  lRef ;
        Pt3DVec lc ( 8, Pt3D(0,0,0) ) ;
        hcg->localCorners( lc, &dims.front(), dins[i], lRef ) ;

        const Pt3D lBck ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] ) ) ; // ctr rear  face in local
        const Pt3D lCor ( lc[0] ) ;

        //----------------------------------- create transform from 6 numbers ---
        const unsigned int jj ( dins[i]*nTrParm ) ;
        Tr3D tr ;
        const ROOT::Math::Translation3D tl ( tvec[jj], tvec[jj+1], tvec[jj+2] ) ;
        const ROOT::Math::EulerAngles ea (
            6==nTrParm ?
            ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) :
            ROOT::Math::EulerAngles() ) ;
        const ROOT::Math::Transform3D rt ( ea, tl ) ;
        double xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz;
        rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ;
        tr = Tr3D( CLHEP::HepRep3x3( xx, xy, xz,
                                     yx, yy, yz,
                                     zx, zy, zz ), 
                   CLHEP::Hep3Vector(dx,dy,dz)     );

        // now prepend alignment(s) for final transform
        const Tr3D atr ( 0 == at ? tr :
                         ( 0 == gt ? at->transform()*tr :
                           at->transform()*gt->transform()*tr ) ) ;
        //--------------------------------- done making transform  ---------------

        const Pt3D        gRef ( atr*lRef ) ;
        const GlobalPoint fCtr ( gRef.x(), gRef.y(), gRef.z() ) ;
        const Pt3D        gBck ( atr*lBck ) ;
        const GlobalPoint fBck ( gBck.x(), gBck.y(), gBck.z() ) ;
        const Pt3D        gCor ( atr*lCor ) ;
        const GlobalPoint fCor ( gCor.x(), gCor.y(), gCor.z() ) ;

        assert( hcalTopology->detId2denseId(id) == dins[i] );

        ptr->newCell(  fCtr, fBck, fCor, myParm, id ) ;
    }

    ptr->initializeParms() ; // initializations; must happen after cells filled

    return ptr ; 
}

Definition at line 13 of file calowriters.cc.

References HcalGeometry::alignmentTransformIndexGlobal(), HcalGeometry::alignmentTransformIndexLocal(), asciidump::at, HcalGeometry::dbString(), edm::eventsetup::EventSetupRecord::get(), CaloCellGeometry::getParmPtr(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), CaloSubdetectorGeometry::getSummary(), gt, i, edm::ESHandleBase::isValid(), j, findQualityFiles::jj, HcalGeometry::k_NumberOfParametersPerShape, Alignments::m_align, HcalGeometry::numberOfAlignments(), HcalGeometry::producerTag(), edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, CaloGeometryDBWriter::writeFlag(), CaloGeometryDBWriter::writeIndexed(), and create_public_lumi_plots::xy.

{
    const Alignments* alignPtr  ( 0 ) ;
    const Alignments* globalPtr ( 0 ) ;
    if( m_applyAlignment ) // get ptr if necessary
    {
        edm::ESHandle< Alignments >                                      alignments ;
        iRecord.getRecord< typename HcalGeometry::AlignmentRecord >().get( alignments ) ;

        assert( alignments.isValid() && // require valid alignments and expected size
                ( alignments->m_align.size() == HcalGeometry::numberOfAlignments() ) ) ;
        alignPtr = alignments.product() ;

        edm::ESHandle< Alignments >                          globals   ;
        iRecord.getRecord<GlobalPositionRcd>().get( globals ) ;

        assert( globals.isValid() ) ;
        globalPtr = globals.product() ;
    }

    TrVec  tvec ;
    DimVec dvec ;
    IVec   ivec ;
    IVec   dins ;

    if( CaloGeometryDBWriter::writeFlag() )
    {
        edm::ESHandle<CaloSubdetectorGeometry> pG ;
        iRecord.get( HcalGeometry::producerTag() + std::string("_master"), pG ) ; 

        const CaloSubdetectorGeometry* pGptr ( pG.product() ) ;

        pGptr->getSummary( tvec, ivec, dvec, dins ) ;
        
        CaloGeometryDBWriter::writeIndexed( tvec, dvec, ivec, dins, HcalGeometry::dbString() ) ;
    }
    else
    {
        edm::ESHandle<PCaloGeometry> pG ;
        iRecord.getRecord<typename HcalGeometry::PGeometryRecord >().get( pG ) ; 

        tvec = pG->getTranslation() ;
        dvec = pG->getDimension() ;
        ivec = pG->getIndexes() ;
        dins = pG->getDenseIndices();
    }    
    //*********************************************************************************************

    edm::ESHandle<HcalTopology> hcalTopology;
    iRecord.getRecord<IdealGeometryRecord>().get( hcalTopology );

    // We know that the numer of shapes chanes with changing depth
    // so, this check is temporary disabled. We need to implement
    // a way either to store or calculate the number of shapes or be able
    // to deal with only max numer of shapes.
    assert( dvec.size() <= hcalTopology->getNumberOfShapes() * HcalGeometry::k_NumberOfParametersPerShape ) ;
    HcalGeometry* hcg=new HcalGeometry( *hcalTopology );
    PtrType ptr ( hcg );

    const unsigned int nTrParm ( tvec.size()/hcalTopology->ncells() ) ;
    
    ptr->fillDefaultNamedParameters() ;

    ptr->allocateCorners( hcalTopology->ncells() ) ;

    ptr->allocatePar(    dvec.size() ,
                         HcalGeometry::k_NumberOfParametersPerShape ) ;

    for( unsigned int i ( 0 ) ; i < hcalTopology->ncells() ; ++i )
    {
        const unsigned int nPerShape ( HcalGeometry::k_NumberOfParametersPerShape ) ;
        DimVec dims ;
        dims.reserve( nPerShape ) ;

        const unsigned int indx ( ivec.size()==1 ? 0 : i ) ;

        DimVec::const_iterator dsrc ( dvec.begin() + ivec[indx]*nPerShape ) ;

        for( unsigned int j ( 0 ) ; j != nPerShape ; ++j )
        {
            dims.push_back( *dsrc ) ;
            ++dsrc ;
        }

        const CCGFloat* myParm ( CaloCellGeometry::getParmPtr( dims, 
                                                               ptr->parMgr(), 
                                                               ptr->parVecVec() ) ) ;


        const DetId id ( hcalTopology->denseId2detId(dins[i]) ) ;
    
        const unsigned int iGlob ( 0 == globalPtr ? 0 :
                                   HcalGeometry::alignmentTransformIndexGlobal( id ) ) ;

        assert( 0 == globalPtr || iGlob < globalPtr->m_align.size() ) ;

        const AlignTransform* gt ( 0 == globalPtr ? 0 : &globalPtr->m_align[ iGlob ] ) ;

        assert( 0 == gt || iGlob == HcalGeometry::alignmentTransformIndexGlobal( DetId( gt->rawId() ) ) ) ;

        const unsigned int iLoc ( 0 == alignPtr ? 0 :
                                  HcalGeometry::alignmentTransformIndexLocal( id ) ) ;

        assert( 0 == alignPtr || iLoc < alignPtr->m_align.size() ) ;

        const AlignTransform* at ( 0 == alignPtr ? 0 :
                                   &alignPtr->m_align[ iLoc ] ) ;

        assert( 0 == at || ( HcalGeometry::alignmentTransformIndexLocal( DetId( at->rawId() ) ) == iLoc ) ) ;

        Pt3D  lRef ;
        Pt3DVec lc ( 8, Pt3D(0,0,0) ) ;
        hcg->localCorners( lc, &dims.front(), dins[i], lRef ) ;

        const Pt3D lBck ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] ) ) ; // ctr rear  face in local
        const Pt3D lCor ( lc[0] ) ;

        //----------------------------------- create transform from 6 numbers ---
        const unsigned int jj ( dins[i]*nTrParm ) ;
        
        Tr3D tr ;
        const ROOT::Math::Translation3D tl ( tvec[jj], tvec[jj+1], tvec[jj+2] ) ;
        const ROOT::Math::EulerAngles ea (
            6==nTrParm ?
            ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) :
            ROOT::Math::EulerAngles() ) ;
        const ROOT::Math::Transform3D rt ( ea, tl ) ;
        double xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz;
        rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ;
        tr = Tr3D( CLHEP::HepRep3x3( xx, xy, xz,
                                     yx, yy, yz,
                                     zx, zy, zz ), 
                   CLHEP::Hep3Vector(dx,dy,dz)     );

        // now prepend alignment(s) for final transform
        const Tr3D atr ( 0 == at ? tr :
                         ( 0 == gt ? at->transform()*tr :
                           at->transform()*gt->transform()*tr ) ) ;
        //--------------------------------- done making transform  ---------------

        const Pt3D        gRef ( atr*lRef ) ;
        const GlobalPoint fCtr ( gRef.x(), gRef.y(), gRef.z() ) ;
        const Pt3D        gBck ( atr*lBck ) ;
        const GlobalPoint fBck ( gBck.x(), gBck.y(), gBck.z() ) ;
        const Pt3D        gCor ( atr*lCor ) ;
        const GlobalPoint fCor ( gCor.x(), gCor.y(), gCor.z() ) ;

        assert( hcalTopology->detId2denseId(id) == dins[i] );
        
        ptr->newCell(  fCtr, fBck, fCor, myParm, id ) ;
    }

    ptr->initializeParms() ; // initializations; must happen after cells filled

    return ptr ; 
}

Member Data Documentation

template<class T, class U>
bool CaloGeometryDBEP< T, U >::m_applyAlignment [private]

Definition at line 213 of file CaloGeometryDBEP.h.

Referenced by CaloGeometryDBEP< T, U >::produceAligned().

template<class T, class U>
const edm::ParameterSet CaloGeometryDBEP< T, U >::m_pSet [private]

Definition at line 214 of file CaloGeometryDBEP.h.