17 if( m_applyAlignment )
24 alignPtr = alignments.
product() ;
54 tvec = pG->getTranslation() ;
55 dvec = pG->getDimension() ;
56 ivec = pG->getIndexes() ;
57 dins = pG->getDenseIndices();
72 const unsigned int nTrParm ( tvec.size()/hcalTopology->ncells() ) ;
74 ptr->fillDefaultNamedParameters() ;
76 ptr->allocateCorners( hcalTopology->ncells() ) ;
78 ptr->allocatePar( dvec.size() ,
81 for(
unsigned int i ( 0 ) ;
i < dins.size(); ++
i )
85 dims.reserve( nPerShape ) ;
87 const unsigned int indx ( ivec.size()==1 ? 0 :
i ) ;
89 DimVec::const_iterator dsrc ( dvec.begin() + ivec[indx]*nPerShape ) ;
91 for(
unsigned int j ( 0 ) ;
j != nPerShape ; ++
j )
93 dims.push_back( *dsrc ) ;
99 ptr->parVecVec() ) ) ;
102 const DetId id ( hcalTopology->denseId2detId(dins[
i]) ) ;
104 const unsigned int iGlob ( 0 == globalPtr ? 0 :
107 assert( 0 == globalPtr || iGlob < globalPtr->m_align.size() ) ;
113 const unsigned int iLoc ( 0 == alignPtr ? 0 :
116 assert( 0 == alignPtr || iLoc < alignPtr->m_align.size() ) ;
125 hcg->localCorners( lc, &dims.front(), dins[
i], lRef ) ;
127 const Pt3D lBck ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] ) ) ;
128 const Pt3D lCor ( lc[0] ) ;
131 const unsigned int jj ( dins[i]*nTrParm ) ;
134 const ROOT::Math::Translation3D tl ( tvec[jj], tvec[jj+1], tvec[jj+2] ) ;
139 const ROOT::Math::Transform3D rt ( ea, tl ) ;
140 double xx,
xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz;
141 rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ;
142 tr =
Tr3D( CLHEP::HepRep3x3( xx, xy, xz,
145 CLHEP::Hep3Vector(dx,dy,dz) );
148 const Tr3D atr ( 0 == at ? tr :
149 ( 0 == gt ? at->transform()*tr :
150 at->transform()*gt->transform()*tr ) ) ;
153 const Pt3D gRef ( atr*lRef ) ;
154 const GlobalPoint fCtr ( gRef.x(), gRef.y(), gRef.z() ) ;
155 const Pt3D gBck ( atr*lBck ) ;
156 const GlobalPoint fBck ( gBck.x(), gBck.y(), gBck.z() ) ;
157 const Pt3D gCor ( atr*lCor ) ;
158 const GlobalPoint fCor ( gCor.x(), gCor.y(), gCor.z() ) ;
160 assert( hcalTopology->detId2denseId(
id) == dins[
i] );
161 ptr->newCell( fCtr, fBck, fCor, myParm,
id ) ;
164 ptr->initializeParms() ;
CaloGeometryDBEP< EcalBarrelGeometry, CaloGeometryDBWriter > EcalBarrelGeometryToDBEP
CaloCellGeometry::Pt3D Pt3D
static unsigned int alignmentTransformIndexLocal(const DetId &id)
CaloGeometryDBEP< CastorGeometry, CaloGeometryDBWriter > CastorGeometryToDBEP
static std::string producerTag()
CaloGeometryDBEP< ZdcGeometry, CaloGeometryDBWriter > ZdcGeometryToDBEP
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
CaloGeometryDBEP< HcalGeometry, CaloGeometryDBWriter > HcalGeometryToDBEP
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
CaloGeometryDBEP< EcalEndcapGeometry, CaloGeometryDBWriter > EcalEndcapGeometryToDBEP
CaloCellGeometry::Tr3D Tr3D
CaloGeometryDBEP< EcalPreshowerGeometry, CaloGeometryDBWriter > EcalPreshowerGeometryToDBEP
CaloSubdetectorGeometry::DimVec DimVec
CaloGeometryDBEP< CaloTowerGeometry, CaloGeometryDBWriter > CaloTowerGeometryToDBEP
CaloCellGeometry::CCGFloat CCGFloat
static void writeIndexed(const TrVec &tvec, const DimVec &dvec, const IVec &ivec, const IVec &dins, std::string tag)
static unsigned int numberOfAlignments()