13 if( m_applyAlignment )
20 alignPtr = alignments.
product() ;
50 tvec = pG->getTranslation() ;
51 dvec = pG->getDimension() ;
52 ivec = pG->getIndexes() ;
53 dins = pG->getDenseIndices();
71 const unsigned int nTrParm ( tvec.size()/hcalTopology->ncells() ) ;
73 ptr->fillDefaultNamedParameters() ;
75 ptr->allocateCorners( hcalTopology->ncells() );
77 ptr->allocatePar( dvec.size() ,
80 for(
unsigned int i ( 0 ) ;
i < dins.size() ; ++
i )
84 dims.reserve( nPerShape ) ;
86 const unsigned int indx ( ivec.size()==1 ? 0 :
i ) ;
88 DimVec::const_iterator dsrc ( dvec.begin() + ivec[indx]*nPerShape ) ;
90 for(
unsigned int j ( 0 ) ;
j != nPerShape ; ++
j )
92 dims.push_back( *dsrc ) ;
98 ptr->parVecVec() ) ) ;
101 const DetId id ( hcalTopology->denseId2detId(dins[
i]) );
103 const unsigned int iGlob ( 0 == globalPtr ? 0 :
106 assert( 0 == globalPtr || iGlob < globalPtr->m_align.size() ) ;
112 const unsigned int iLoc ( 0 == alignPtr ? 0 :
115 assert( 0 == alignPtr || iLoc < alignPtr->m_align.size() ) ;
124 hcg->localCorners( lc, &dims.front(), dins[
i], lRef ) ;
126 const Pt3D lBck ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] ) ) ;
127 const Pt3D lCor ( lc[0] ) ;
130 const unsigned int jj ( dins[i]*nTrParm ) ;
132 const ROOT::Math::Translation3D tl ( tvec[jj], tvec[jj+1], tvec[jj+2] ) ;
137 const ROOT::Math::Transform3D rt ( ea, tl ) ;
138 double xx,
xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz;
139 rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ;
140 tr =
Tr3D( CLHEP::HepRep3x3( xx, xy, xz,
143 CLHEP::Hep3Vector(dx,dy,dz) );
146 const Tr3D atr ( 0 == at ? tr :
147 ( 0 == gt ? at->transform()*tr :
148 at->transform()*gt->transform()*tr ) ) ;
151 const Pt3D gRef ( atr*lRef ) ;
152 const GlobalPoint fCtr ( gRef.x(), gRef.y(), gRef.z() ) ;
153 const Pt3D gBck ( atr*lBck ) ;
154 const GlobalPoint fBck ( gBck.x(), gBck.y(), gBck.z() ) ;
155 const Pt3D gCor ( atr*lCor ) ;
156 const GlobalPoint fCor ( gCor.x(), gCor.y(), gCor.z() ) ;
158 assert( hcalTopology->detId2denseId(
id) == dins[
i] );
160 ptr->newCell( fCtr, fBck, fCor, myParm,
id ) ;
163 ptr->initializeParms() ;
CaloCellGeometry::Pt3D Pt3D
static unsigned int alignmentTransformIndexLocal(const DetId &id)
static std::string producerTag()
CaloCellGeometry::Pt3DVec Pt3DVec
std::vector< AlignTransform > m_align
boost::shared_ptr< CaloSubdetectorGeometry > PtrType
virtual void getSummary(TrVec &trVector, IVec &iVector, DimVec &dimVector, IVec &dinsVector) const
const DepRecordT & getRecord() const
CaloSubdetectorGeometry::IVec IVec
static void writeIndexed(const TrVec &, const DimVec &, const IVec &, const std::vector< uint32_t > &, std::string)
CaloGeometryDBEP< CaloTowerGeometry, CaloGeometryDBReader > CaloTowerGeometryFromDBEP
void get(HolderT &iHolder) const
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
PtrType produceAligned(const typename T::AlignedRecord &iRecord)
CaloSubdetectorGeometry::TrVec TrVec
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
CaloCellGeometry::Pt3D Pt3D
AlgebraicVector EulerAngles
static std::string dbString()
T const * product() const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
CaloCellGeometry::Tr3D Tr3D
CaloCellGeometry::Tr3D Tr3D
CaloSubdetectorGeometry::DimVec DimVec
CaloGeometryDBEP< HcalGeometry, CaloGeometryDBReader > HcalGeometryFromDBEP
CaloCellGeometry::CCGFloat CCGFloat
static unsigned int numberOfAlignments()