CMS 3D CMS Logo

List of all members | 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

Public Types

typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef CaloSubdetectorGeometry::DimVec DimVec
 
typedef CaloSubdetectorGeometry::IVec IVec
 
typedef CaloCellGeometry::Pt3D Pt3D
 
typedef CaloCellGeometry::Pt3DVec Pt3DVec
 
using PtrType = std::unique_ptr< CaloSubdetectorGeometry >
 
typedef CaloCellGeometry::Tr3D Tr3D
 
typedef CaloSubdetectorGeometry::TrVec TrVec
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 

Public Member Functions

 CaloGeometryDBEP (const edm::ParameterSet &ps)
 
template<>
CaloGeometryDBEP< HGCalGeometry, CaloGeometryDBReader >::PtrType produceAligned (const typename HGCalGeometry::AlignedRecord &iRecord)
 
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)
 
template<>
CaloGeometryDBEP< CaloTowerGeometry, CaloGeometryDBReader >::PtrType produceAligned (const typename CaloTowerGeometry::AlignedRecord &iRecord)
 
template<>
CaloGeometryDBEP< CaloTowerGeometry, CaloGeometryDBWriter >::PtrType produceAligned (const typename CaloTowerGeometry::AlignedRecord &iRecord)
 
template<>
CaloGeometryDBEP< HGCalGeometry, CaloGeometryDBWriter >::PtrType produceAligned (const typename HGCalGeometry::AlignedRecord &iRecord)
 
 ~CaloGeometryDBEP () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Attributes

bool m_applyAlignment
 
const edm::ParameterSet m_pSet
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

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

Definition at line 35 of file CaloGeometryDBEP.h.

Member Typedef Documentation

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

Definition at line 39 of file CaloGeometryDBEP.h.

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

Definition at line 46 of file CaloGeometryDBEP.h.

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

Definition at line 47 of file CaloGeometryDBEP.h.

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

Definition at line 40 of file CaloGeometryDBEP.h.

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

Definition at line 41 of file CaloGeometryDBEP.h.

template<class T, class U>
using CaloGeometryDBEP< T, U >::PtrType = std::unique_ptr<CaloSubdetectorGeometry >

Definition at line 44 of file CaloGeometryDBEP.h.

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

Definition at line 42 of file CaloGeometryDBEP.h.

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

Definition at line 45 of file CaloGeometryDBEP.h.

Constructor & Destructor Documentation

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

Definition at line 49 of file CaloGeometryDBEP.h.

References edm::ESProducer::setWhatProduced().

49  :
50  m_applyAlignment ( ps.getParameter<bool>("applyAlignment") ),
51  m_pSet( ps )
52 
53  {
54  setWhatProduced( this,
56  edm::es::Label( T::producerTag() ) ) ;//+std::string("TEST") ) ) ;
57  }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
const edm::ParameterSet m_pSet
template<class T, class U>
CaloGeometryDBEP< T, U >::~CaloGeometryDBEP ( )
inlineoverride

Definition at line 59 of file CaloGeometryDBEP.h.

59 {}

Member Function Documentation

Definition at line 7 of file moduleDB.cc.

References gather_cfg::cout, FlatHexagon::createCorners(), HGCalGeometry::dbString(), PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, HGCalTopology::encode(), relativeConstraints::geom, HGCalTopology::geomDenseId2decId(), PCaloGeometry::getDenseIndices(), PCaloGeometry::getDimension(), PCaloGeometry::getIndexes(), CaloCellGeometry::getParmPtr(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HGCalGeometry::getSummary(), PCaloGeometry::getTranslation(), findQualityFiles::jj, HGCalGeometry::k_NumberOfParametersPerShape, HGCalGeometry::k_NumberOfShapes, PV3DBase< T, PVType, FrameType >::mag2(), dataset::name, CaloSubdetectorTopology::ncells(), FlatHexagon::ncorner_, FlatHexagon::ncornerBy2_, FlatHexagon::oneBySix_, edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, std::swap(), ecaldqm::topology(), HGCalTopology::totalGeomModules(), CaloGeometryDBReader::writeFlag(), CaloGeometryDBReader::writeIndexed(), genVertex_cff::x, geometryCSVtoXML::xx, geometryCSVtoXML::xy, geometryCSVtoXML::xz, detailsBasic3DVector::y, geometryCSVtoXML::yy, geometryCSVtoXML::yz, detailsBasic3DVector::z, and geometryCSVtoXML::zz.

8 {
9  TrVec tvec;
10  DimVec dvec;
11  IVec ivec;
12  IVec dins;
13 
15 
16  name = "HGCalEESensitive";
17  std::cout << "Reading HGCalGeometry " << name.c_str() << "\n";
19  {
21  iRecord.getRecord<IdealGeometryRecord>().get( name, geomHandle );
22 
23  const HGCalGeometry* geom = geomHandle.product();
24  geom->getSummary( tvec, ivec, dvec, dins ) ;
25 
26  CaloGeometryDBReader::writeIndexed( tvec, dvec, ivec, dins, HGCalGeometry::dbString() ) ;
27  }
28  else
29  {
31  iRecord.getRecord<typename HGCalGeometry::PGeometryRecord >().get( pG ) ;
32 
33  tvec = pG->getTranslation() ;
34  dvec = pG->getDimension() ;
35  ivec = pG->getIndexes() ;
36  dins = pG->getDenseIndices();
37  }
38  //*********************************************************************************************
40  iRecord.getRecord<IdealGeometryRecord>().get( name, topology );
41 
42  assert( dvec.size() <= topology->totalGeomModules() * HGCalGeometry::k_NumberOfParametersPerShape );
43  HGCalGeometry* hcg = new HGCalGeometry( *topology );
44  PtrType ptr ( hcg );
45 
46  ptr->allocateCorners( topology->ncells());
47  ptr->allocatePar( HGCalGeometry::k_NumberOfShapes,
49 
50  const unsigned int nTrParm( ptr->numberOfTransformParms());
51  const unsigned int nPerShape( HGCalGeometry::k_NumberOfParametersPerShape );
52 
53  for( auto it : dins )
54  {
55  DetId id = topology->encode( topology->geomDenseId2decId( it ));
56  // get layer
57  int layer = ivec[ it ];
58 
59  // get transformation
60  const unsigned int jj ( it * nTrParm );
61  Tr3D tr;
62  const ROOT::Math::Translation3D tl( tvec[jj], tvec[jj+1], tvec[jj+2]);
63  const ROOT::Math::EulerAngles ea( 6 == nTrParm ?
64  ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) :
66  const ROOT::Math::Transform3D rt( ea, tl );
67  double xx, xy, xz, dx, yx, yy, yz, dy, zx, zy, zz, dz;
68  rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ;
69  tr = Tr3D( CLHEP::HepRep3x3( xx, xy, xz,
70  yx, yy, yz,
71  zx, zy, zz ),
72  CLHEP::Hep3Vector( dx, dy, dz));
73 
74  // get parameters
75  DimVec dims;
76  dims.reserve( nPerShape );
77 
78  DimVec::const_iterator dsrc( dvec.begin() + layer * nPerShape );
79  for( unsigned int j ( 0 ) ; j != nPerShape ; ++j )
80  {
81  dims.emplace_back( *dsrc ) ;
82  ++dsrc ;
83  }
84 
85  std::vector<GlobalPoint> corners( FlatHexagon::ncorner_ );
86 
87  FlatHexagon::createCorners( dims, tr, corners );
88 
89  const CCGFloat* myParm( CaloCellGeometry::getParmPtr( dims,
90  ptr->parMgr(),
91  ptr->parVecVec()));
92  GlobalPoint front ( FlatHexagon::oneBySix_*( corners[0].x() +
93  corners[1].x() +
94  corners[2].x() +
95  corners[3].x() +
96  corners[4].x() +
97  corners[5].x()),
98  FlatHexagon::oneBySix_*( corners[0].y() +
99  corners[1].y() +
100  corners[2].y() +
101  corners[3].y() +
102  corners[4].y() +
103  corners[5].y()),
104  FlatHexagon::oneBySix_*( corners[0].z() +
105  corners[1].z() +
106  corners[2].z() +
107  corners[3].z() +
108  corners[4].z() +
109  corners[5].z()));
110 
111  GlobalPoint back ( FlatHexagon::oneBySix_*( corners[6].x() +
112  corners[7].x() +
113  corners[8].x() +
114  corners[9].x() +
115  corners[10].x()+
116  corners[11].x()),
117  FlatHexagon::oneBySix_*( corners[6].y() +
118  corners[7].y() +
119  corners[8].y() +
120  corners[9].y() +
121  corners[10].y()+
122  corners[11].y()),
123  FlatHexagon::oneBySix_*( corners[6].z() +
124  corners[7].z() +
125  corners[8].z() +
126  corners[9].z() +
127  corners[10].z()+
128  corners[11].z()));
129 
130  if (front.mag2() > back.mag2()) { // front should always point to the center, so swap front and back
131  std::swap (front, back);
132  std::swap_ranges (corners.begin(),
133  corners.begin()+FlatHexagon::ncornerBy2_,
134  corners.begin()+FlatHexagon::ncornerBy2_);
135  }
136 
137  ptr->newCell( front, back, corners[0], myParm, id );
138  }
139 
140  ptr->initializeParms(); // initializations; must happen after cells filled
141 
142  return ptr ;
143 }
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
Definition: FlatHexagon.cc:152
CaloTopology const * topology(0)
std::vector< float > const & getTranslation() const
Definition: PCaloGeometry.h:20
static constexpr unsigned int ncorner_
Definition: FlatHexagon.h:82
std::vector< float > const & getDimension() const
Definition: PCaloGeometry.h:21
CaloSubdetectorGeometry::IVec IVec
unsigned int totalGeomModules() const
static unsigned int k_NumberOfShapes
Definition: HGCalGeometry.h:49
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
DetId encode(const DecodedDetId &id_) const
static std::string dbString()
Definition: HGCalGeometry.h:52
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
std::unique_ptr< CaloSubdetectorGeometry > PtrType
CaloCellGeometry::CCGFloat CCGFloat
CaloSubdetectorGeometry::TrVec TrVec
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
DecodedDetId geomDenseId2decId(const uint32_t &hi) const
Definition: DetId.h:18
static constexpr unsigned int ncornerBy2_
Definition: FlatHexagon.h:83
AlgebraicVector EulerAngles
Definition: Definitions.h:36
void getSummary(CaloSubdetectorGeometry::TrVec &trVector, CaloSubdetectorGeometry::IVec &iVector, CaloSubdetectorGeometry::DimVec &dimVector, CaloSubdetectorGeometry::IVec &dinsVector) const override
static unsigned int k_NumberOfParametersPerShape
Definition: HGCalGeometry.h:48
CaloCellGeometry::Tr3D Tr3D
CaloCellGeometry::Tr3D Tr3D
CaloSubdetectorGeometry::DimVec DimVec
T const * product() const
Definition: ESHandle.h:86
std::vector< uint32_t > const & getIndexes() const
Definition: PCaloGeometry.h:22
static constexpr double oneBySix_
Definition: FlatHexagon.h:81
std::vector< uint32_t > const & getDenseIndices() const
Definition: PCaloGeometry.h:23
static void writeIndexed(const TrVec &, const DimVec &, const IVec &, const std::vector< uint32_t > &, const std::string &)

Definition at line 10 of file moduleDB.cc.

References HcalGeometry::alignmentTransformIndexGlobal(), HcalGeometry::alignmentTransformIndexLocal(), HcalGeometry::dbString(), HcalTopology::denseId2detId(), HcalTopology::detId2denseId(), PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), PCaloGeometry::getDenseIndices(), PCaloGeometry::getDimension(), HcalTopology::getHFSize(), PCaloGeometry::getIndexes(), HcalTopology::getNumberOfShapes(), CaloCellGeometry::getParmPtr(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), CaloSubdetectorGeometry::getSummary(), PCaloGeometry::getTranslation(), mps_fire::i, triggerObjects_cff::id, edm::ESHandleBase::isValid(), findQualityFiles::jj, HcalGeometry::k_NumberOfParametersPerShape, Alignments::m_align, HcalTopology::ncells(), HcalGeometry::numberOfAlignments(), HcalGeometry::producerTag(), edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, CaloGeometryDBReader::writeFlag(), CaloGeometryDBReader::writeIndexed(), geometryCSVtoXML::xx, geometryCSVtoXML::xy, geometryCSVtoXML::xz, geometryCSVtoXML::yy, geometryCSVtoXML::yz, and geometryCSVtoXML::zz.

10  {
11  const Alignments* alignPtr ( nullptr ) ;
12  const Alignments* globalPtr ( nullptr ) ;
13  if( m_applyAlignment ) {// get ptr if necessary
14  edm::ESHandle< Alignments > alignments ;
15  iRecord.getRecord< typename HcalGeometry::AlignmentRecord >().get( alignments ) ;
16 
17  assert( alignments.isValid() && // require valid alignments and expected size
18  ( alignments->m_align.size() == HcalGeometry::numberOfAlignments() ) ) ;
19  alignPtr = alignments.product() ;
20 
22  iRecord.getRecord<GlobalPositionRcd>().get( globals ) ;
23 
24  assert( globals.isValid() ) ;
25  globalPtr = globals.product() ;
26  }
27 
28  TrVec tvec ;
29  DimVec dvec ;
30  IVec ivec ;
31  IVec dins ;
32 
35  iRecord.get( HcalGeometry::producerTag() + std::string("_master"), pG ) ;
36 
37  const CaloSubdetectorGeometry* pGptr ( pG.product() ) ;
38 
39  pGptr->getSummary( tvec, ivec, dvec, dins ) ;
40 
41  CaloGeometryDBReader::writeIndexed( tvec, dvec, ivec, dins, HcalGeometry::dbString() ) ;
42  } else {
44  iRecord.getRecord<typename HcalGeometry::PGeometryRecord >().get( pG ) ;
45 
46  tvec = pG->getTranslation() ;
47  dvec = pG->getDimension() ;
48  ivec = pG->getIndexes() ;
49  dins = pG->getDenseIndices();
50  }
51  //*********************************************************************************************
52 
53  edm::ESHandle<HcalTopology> hcalTopology;
54  iRecord.getRecord<HcalRecNumberingRecord>().get( hcalTopology );
55 
56  // We know that the numer of shapes chanes with changing depth
57  // so, this check is temporary disabled. We need to implement
58  // a way either to store or calculate the number of shapes or be able
59  // to deal with only max numer of shapes.
60  // assert( dvec.size() == hcalTopology->getNumberOfShapes() * HcalGeometry::k_NumberOfParametersPerShape ) ;
61  assert( dvec.size() <= hcalTopology->getNumberOfShapes() * HcalGeometry::k_NumberOfParametersPerShape ) ;
62  HcalGeometry* hcg = new HcalGeometry( *hcalTopology );
63 
64  PtrType ptr ( hcg );
65 
66  const unsigned int nTrParm( hcg->numberOfTransformParms());
67 
68  ptr->fillDefaultNamedParameters();
69  ptr->allocateCorners( hcalTopology->ncells()+hcalTopology->getHFSize());
70  ptr->allocatePar( dvec.size() ,
72 
73  for( unsigned int i ( 0 ) ; i < dins.size() ; ++i ) {
74  const unsigned int nPerShape ( HcalGeometry::k_NumberOfParametersPerShape );
75  DimVec dims;
76  dims.reserve( nPerShape );
77 
78  const unsigned int indx( ivec.size() == 1 ? 0 : i );
79 
80  DimVec::const_iterator dsrc( dvec.begin() + ivec[indx]*nPerShape );
81 
82  for( unsigned int j ( 0 ) ; j != nPerShape ; ++j ) {
83  dims.emplace_back( *dsrc ) ;
84  ++dsrc ;
85  }
86 
87  const CCGFloat* myParm( CaloCellGeometry::getParmPtr( dims,
88  ptr->parMgr(),
89  ptr->parVecVec()));
90 
91  const DetId id( hcalTopology->denseId2detId( dins[i]));
92 
93  const unsigned int iGlob( nullptr == globalPtr ? 0 :
95 
96  assert( nullptr == globalPtr || iGlob < globalPtr->m_align.size());
97 
98  const AlignTransform* gt ( nullptr == globalPtr ? nullptr : &globalPtr->m_align[ iGlob ] );
99 
100  assert( nullptr == gt || iGlob == HcalGeometry::alignmentTransformIndexGlobal( DetId( gt->rawId())));
101 
102  const unsigned int iLoc( nullptr == alignPtr ? 0 :
104 
105  assert( nullptr == alignPtr || iLoc < alignPtr->m_align.size());
106 
107  const AlignTransform* at( nullptr == alignPtr ? nullptr :
108  &alignPtr->m_align[ iLoc ]);
109 
110  assert( nullptr == at || ( HcalGeometry::alignmentTransformIndexLocal( DetId( at->rawId())) == iLoc ));
111 
112  Pt3D lRef ;
113  Pt3DVec lc( 8, Pt3D( 0, 0, 0 ));
114  hcg->localCorners( lc, &dims.front(), dins[i], lRef );
115 
116  const Pt3D lBck( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] )); // ctr rear face in local
117  const Pt3D lCor( lc[0] );
118 
119  //----------------------------------- create transform from 6 numbers ---
120  const unsigned int jj( i * nTrParm ); // Note: Dence indices are not sorted and
121  // parameters stored according to order of a cell creation
122  Tr3D tr;
123  const ROOT::Math::Translation3D tl( tvec[jj], tvec[jj+1], tvec[jj+2] );
124  const ROOT::Math::EulerAngles ea( 6 == nTrParm ?
125  ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) :
127  const ROOT::Math::Transform3D rt( ea, tl );
128  double xx, xy, xz, dx;
129  double yx, yy, yz, dy;
130  double zx, zy, zz, dz;
131  rt.GetComponents( xx, xy, xz, dx,
132  yx, yy, yz, dy,
133  zx, zy, zz, dz );
134  tr = Tr3D( CLHEP::HepRep3x3( xx, xy, xz,
135  yx, yy, yz,
136  zx, zy, zz ),
137  CLHEP::Hep3Vector( dx, dy, dz));
138 
139  // now prepend alignment(s) for final transform
140  const Tr3D atr( nullptr == at ? tr :
141  ( nullptr == gt ? at->transform() * tr :
142  at->transform() * gt->transform() * tr ));
143  //--------------------------------- done making transform ---------------
144 
145  const Pt3D gRef( atr*lRef ) ;
146  const GlobalPoint fCtr( gRef.x(), gRef.y(), gRef.z() ) ;
147  const Pt3D gBck( atr*lBck ) ;
148  const GlobalPoint fBck( gBck.x(), gBck.y(), gBck.z() ) ;
149  const Pt3D gCor( atr*lCor ) ;
150  const GlobalPoint fCor( gCor.x(), gCor.y(), gCor.z() ) ;
151 
152  assert( hcalTopology->detId2denseId(id) == dins[i] );
153 
154  ptr->newCell( fCtr, fBck, fCor, myParm, id ) ;
155  }
156 
157  ptr->initializeParms(); // initializations; must happen after cells filled
158 
159  return ptr;
160 }
DetId denseId2detId(unsigned int) const override
return a linear packed id
unsigned int getHFSize() const
Definition: HcalTopology.h:141
CaloCellGeometry::Pt3D Pt3D
static unsigned int alignmentTransformIndexLocal(const DetId &id)
unsigned int detId2denseId(const DetId &id) const override
return a linear packed id
static std::string producerTag()
Definition: HcalGeometry.h:67
std::vector< float > const & getTranslation() const
Definition: PCaloGeometry.h:20
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
std::vector< float > const & getDimension() const
Definition: PCaloGeometry.h:21
virtual void getSummary(TrVec &trVector, IVec &iVector, DimVec &dimVector, IVec &dinsVector) const
CaloSubdetectorGeometry::IVec IVec
unsigned int getNumberOfShapes() const
Definition: HcalTopology.h:165
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
std::unique_ptr< CaloSubdetectorGeometry > PtrType
CaloCellGeometry::CCGFloat CCGFloat
CaloSubdetectorGeometry::TrVec TrVec
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
CaloCellGeometry::Pt3D Pt3D
Definition: DetId.h:18
AlgebraicVector EulerAngles
Definition: Definitions.h:36
static std::string dbString()
Definition: HcalGeometry.h:43
CaloCellGeometry::Pt3DVec Pt3DVec
CaloCellGeometry::Tr3D Tr3D
CaloCellGeometry::Tr3D Tr3D
unsigned int ncells() const override
return a count of valid cells (for dense indexing use)
CaloSubdetectorGeometry::DimVec DimVec
bool isValid() const
Definition: ESHandle.h:44
T const * product() const
Definition: ESHandle.h:86
std::vector< uint32_t > const & getIndexes() const
Definition: PCaloGeometry.h:22
static unsigned int numberOfAlignments()
Definition: HcalGeometry.h:79
std::vector< uint32_t > const & getDenseIndices() const
Definition: PCaloGeometry.h:23
static void writeIndexed(const TrVec &, const DimVec &, const IVec &, const std::vector< uint32_t > &, const std::string &)

Definition at line 15 of file calowriters.cc.

References HcalGeometry::alignmentTransformIndexGlobal(), HcalGeometry::alignmentTransformIndexLocal(), HcalGeometry::dbString(), HcalTopology::denseId2detId(), HcalTopology::detId2denseId(), PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), PCaloGeometry::getDenseIndices(), PCaloGeometry::getDimension(), HcalTopology::getHFSize(), PCaloGeometry::getIndexes(), HcalTopology::getNumberOfShapes(), CaloCellGeometry::getParmPtr(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), CaloSubdetectorGeometry::getSummary(), PCaloGeometry::getTranslation(), mps_fire::i, triggerObjects_cff::id, edm::ESHandleBase::isValid(), findQualityFiles::jj, HcalGeometry::k_NumberOfParametersPerShape, Alignments::m_align, HcalTopology::ncells(), HcalGeometry::numberOfAlignments(), HcalGeometry::producerTag(), edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, CaloGeometryDBWriter::writeFlag(), CaloGeometryDBWriter::writeIndexed(), geometryCSVtoXML::xx, geometryCSVtoXML::xy, geometryCSVtoXML::xz, geometryCSVtoXML::yy, geometryCSVtoXML::yz, and geometryCSVtoXML::zz.

16 {
17  const Alignments* alignPtr( nullptr );
18  const Alignments* globalPtr( nullptr );
19  if( m_applyAlignment ) // get ptr if necessary
20  {
21  edm::ESHandle< Alignments > alignments;
22  iRecord.getRecord< typename HcalGeometry::AlignmentRecord >().get( alignments );
23 
24  assert( alignments.isValid() && // require valid alignments and expected size
25  ( alignments->m_align.size() == HcalGeometry::numberOfAlignments()));
26  alignPtr = alignments.product();
27 
29  iRecord.getRecord<GlobalPositionRcd>().get( globals );
30 
31  assert( globals.isValid());
32  globalPtr = globals.product();
33  }
34 
35  TrVec tvec;
36  DimVec dvec;
37  IVec ivec;
38  IVec dins;
39 
41  {
43  iRecord.get( HcalGeometry::producerTag() + std::string("_master"), pG );
44 
45  const CaloSubdetectorGeometry* pGptr(pG.product());
46 
47  pGptr->getSummary( tvec, ivec, dvec, dins );
48 
50  }
51  else
52  {
54  iRecord.getRecord<typename HcalGeometry::PGeometryRecord >().get( pG );
55 
56  tvec = pG->getTranslation();
57  dvec = pG->getDimension();
58  ivec = pG->getIndexes();
59  dins = pG->getDenseIndices();
60  }
61  //*********************************************************************************************
62 
63  edm::ESHandle<HcalTopology> hcalTopology;
64  iRecord.getRecord<HcalRecNumberingRecord>().get( hcalTopology );
65 
66  // We know that the numer of shapes chanes with changing depth
67  // so, this check is temporary disabled. We need to implement
68  // a way either to store or calculate the number of shapes or be able
69  // to deal with only max numer of shapes.
70  assert( dvec.size() <= hcalTopology->getNumberOfShapes() * HcalGeometry::k_NumberOfParametersPerShape );
71  HcalGeometry* hcalGeometry = new HcalGeometry( *hcalTopology );
72  PtrType ptr( hcalGeometry );
73 
74  const unsigned int nTrParm( hcalGeometry->numberOfTransformParms());
75 
76  ptr->fillDefaultNamedParameters();
77  ptr->allocateCorners( hcalTopology->ncells() + hcalTopology->getHFSize());
78  ptr->allocatePar( hcalGeometry->numberOfShapes(),
80 
81  for( unsigned int i ( 0 ) ; i < dins.size(); ++i )
82  {
83  const unsigned int nPerShape( HcalGeometry::k_NumberOfParametersPerShape );
84  DimVec dims;
85  dims.reserve( nPerShape );
86 
87  const unsigned int indx( ivec.size() == 1 ? 0 : i );
88 
89  DimVec::const_iterator dsrc( dvec.begin() + ivec[indx] * nPerShape );
90 
91  for( unsigned int j ( 0 ) ; j != nPerShape ; ++j )
92  {
93  dims.push_back( *dsrc );
94  ++dsrc ;
95  }
96 
97  const CCGFloat* myParm ( CaloCellGeometry::getParmPtr( dims,
98  ptr->parMgr(),
99  ptr->parVecVec()));
100 
101  const DetId id( hcalTopology->denseId2detId( dins[i]));
102 
103  const unsigned int iGlob( nullptr == globalPtr ? 0 :
105 
106  assert( nullptr == globalPtr || iGlob < globalPtr->m_align.size());
107 
108  const AlignTransform* gt( nullptr == globalPtr ? nullptr : &globalPtr->m_align[ iGlob ]);
109 
110  assert( nullptr == gt || iGlob == HcalGeometry::alignmentTransformIndexGlobal( DetId( gt->rawId())));
111 
112  const unsigned int iLoc( nullptr == alignPtr ? 0 :
114 
115  assert( nullptr == alignPtr || iLoc < alignPtr->m_align.size());
116 
117  const AlignTransform* at( nullptr == alignPtr ? nullptr :
118  &alignPtr->m_align[ iLoc ]);
119 
120  assert( nullptr == at || ( HcalGeometry::alignmentTransformIndexLocal( DetId( at->rawId())) == iLoc ));
121 
122  Pt3D lRef;
123  Pt3DVec lc( 8, Pt3D( 0, 0, 0 ));
124  hcalGeometry->localCorners( lc, &dims.front(), dins[i], lRef );
125 
126  const Pt3D lBck( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] )); // ctr rear face in local
127  const Pt3D lCor( lc[0] ) ;
128 
129  //----------------------------------- create transform from 6 numbers ---
130  const unsigned int jj( i * nTrParm );
131 
132  Tr3D tr;
133  const ROOT::Math::Translation3D tl( tvec[jj], tvec[jj+1], tvec[jj+2] );
134  const ROOT::Math::EulerAngles ea( 6 == nTrParm ?
135  ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) :
137  const ROOT::Math::Transform3D rt( ea, tl );
138  double xx, xy, xz, dx;
139  double yx, yy, yz, dy;
140  double 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,
143  yx, yy, yz,
144  zx, zy, zz ),
145  CLHEP::Hep3Vector( dx, dy, dz ));
146 
147  // now prepend alignment(s) for final transform
148  const Tr3D atr( nullptr == at ? tr :
149  ( nullptr == gt ? at->transform() * tr :
150  at->transform() * gt->transform() * tr ));
151  //--------------------------------- done making transform ---------------
152 
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());
159 
160  assert( hcalTopology->detId2denseId(id) == dins[i] );
161  ptr->newCell( fCtr, fBck, fCor, myParm, id );
162  }
163 
164  ptr->initializeParms(); // initializations; must happen after cells filled
165 
166  return ptr;
167 }
DetId denseId2detId(unsigned int) const override
return a linear packed id
unsigned int getHFSize() const
Definition: HcalTopology.h:141
CaloCellGeometry::Pt3D Pt3D
static unsigned int alignmentTransformIndexLocal(const DetId &id)
static void writeIndexed(const TrVec &tvec, const DimVec &dvec, const IVec &ivec, const IVec &dins, const std::string &tag)
unsigned int detId2denseId(const DetId &id) const override
return a linear packed id
static std::string producerTag()
Definition: HcalGeometry.h:67
std::vector< float > const & getTranslation() const
Definition: PCaloGeometry.h:20
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
std::vector< float > const & getDimension() const
Definition: PCaloGeometry.h:21
virtual void getSummary(TrVec &trVector, IVec &iVector, DimVec &dimVector, IVec &dinsVector) const
CaloSubdetectorGeometry::IVec IVec
unsigned int getNumberOfShapes() const
Definition: HcalTopology.h:165
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
std::unique_ptr< CaloSubdetectorGeometry > PtrType
CaloCellGeometry::CCGFloat CCGFloat
CaloSubdetectorGeometry::TrVec TrVec
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
CaloCellGeometry::Pt3D Pt3D
Definition: DetId.h:18
AlgebraicVector EulerAngles
Definition: Definitions.h:36
static std::string dbString()
Definition: HcalGeometry.h:43
CaloCellGeometry::Pt3DVec Pt3DVec
CaloCellGeometry::Tr3D Tr3D
CaloCellGeometry::Tr3D Tr3D
unsigned int ncells() const override
return a count of valid cells (for dense indexing use)
CaloSubdetectorGeometry::DimVec DimVec
bool isValid() const
Definition: ESHandle.h:44
T const * product() const
Definition: ESHandle.h:86
std::vector< uint32_t > const & getIndexes() const
Definition: PCaloGeometry.h:22
static unsigned int numberOfAlignments()
Definition: HcalGeometry.h:79
std::vector< uint32_t > const & getDenseIndices() const
Definition: PCaloGeometry.h:23
template<class T, class U>
PtrType CaloGeometryDBEP< T, U >::produceAligned ( const typename T::AlignedRecord &  iRecord)
inline

Definition at line 61 of file CaloGeometryDBEP.h.

References PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, PCaloGeometry::getDimension(), PCaloGeometry::getIndexes(), CaloCellGeometry::getParmPtr(), CaloSubdetectorGeometry::getSummary(), PCaloGeometry::getTranslation(), mps_fire::i, triggerObjects_cff::id, edm::ESHandleBase::isValid(), findQualityFiles::jj, Alignments::m_align, CaloGeometryDBEP< T, U >::m_applyAlignment, edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, TriggerAnalyzer::write(), geometryCSVtoXML::xx, geometryCSVtoXML::xy, geometryCSVtoXML::xz, geometryCSVtoXML::yy, geometryCSVtoXML::yz, and geometryCSVtoXML::zz.

62  {
63  const Alignments* alignPtr ( nullptr ) ;
64  const Alignments* globalPtr ( nullptr ) ;
65  if( m_applyAlignment ) // get ptr if necessary
66  {
67  edm::ESHandle< Alignments > alignments ;
68  iRecord.template getRecord< typename T::AlignmentRecord >().get( alignments ) ;
69 
70  assert( alignments.isValid() && // require valid alignments and expected size
71  ( alignments->m_align.size() == T::numberOfAlignments() ) ) ;
72  alignPtr = alignments.product() ;
73 
75  iRecord.template getRecord<GlobalPositionRcd>().get( globals ) ;
76 
77  assert( globals.isValid() ) ;
78  globalPtr = globals.product() ;
79  }
80 
81  TrVec tvec ;
82  DimVec dvec ;
83  IVec ivec ;
84  std::vector<uint32_t> dins;
85 
86  if( U::writeFlag() )
87  {
89  iRecord.get( T::producerTag() + std::string("_master"), pG ) ;
90 
91  const CaloSubdetectorGeometry* pGptr ( pG.product() ) ;
92 
93  pGptr->getSummary( tvec, ivec, dvec, dins ) ;
94 
95  U::write( tvec, dvec, ivec, T::dbString() ) ;
96  }
97  else
98  {
100  iRecord.template getRecord<typename T::PGeometryRecord >().get( pG ) ;
101 
102  tvec = pG->getTranslation() ;
103  dvec = pG->getDimension() ;
104  ivec = pG->getIndexes() ;
105  }
106 //*********************************************************************************************
107 
108  const unsigned int nTrParm ( tvec.size()/T::k_NumberOfCellsForCorners ) ;
109 
110  assert( dvec.size() == T::k_NumberOfShapes * T::k_NumberOfParametersPerShape ) ;
111 
112  PtrType ptr = std::make_unique<T>();
113 
114  ptr->fillDefaultNamedParameters() ;
115 
116  ptr->allocateCorners( T::k_NumberOfCellsForCorners ) ;
117 
118  ptr->allocatePar( dvec.size() ,
119  T::k_NumberOfParametersPerShape ) ;
120 
121  for( unsigned int i ( 0 ) ; i != T::k_NumberOfCellsForCorners ; ++i )
122  {
123  const unsigned int nPerShape ( T::k_NumberOfParametersPerShape ) ;
124  DimVec dims ;
125  dims.reserve( nPerShape ) ;
126 
127  const unsigned int indx ( ivec.size()==1 ? 0 : i ) ;
128 
129  DimVec::const_iterator dsrc ( dvec.begin() + ivec[indx]*nPerShape ) ;
130 
131  for( unsigned int j ( 0 ) ; j != nPerShape ; ++j )
132  {
133  dims.emplace_back( *dsrc ) ;
134  ++dsrc ;
135  }
136 
137  const CCGFloat* myParm ( CaloCellGeometry::getParmPtr( dims,
138  ptr->parMgr(),
139  ptr->parVecVec() ) ) ;
140 
141 
142  const DetId id ( T::DetIdType::detIdFromDenseIndex( i ) ) ;
143 
144  const unsigned int iGlob ( nullptr == globalPtr ? 0 :
145  T::alignmentTransformIndexGlobal( id ) ) ;
146 
147  assert( nullptr == globalPtr || iGlob < globalPtr->m_align.size() ) ;
148 
149  const AlignTransform* gt ( nullptr == globalPtr ? nullptr : &globalPtr->m_align[ iGlob ] ) ;
150 
151  assert( nullptr == gt || iGlob == T::alignmentTransformIndexGlobal( DetId( gt->rawId() ) ) ) ;
152 
153  const unsigned int iLoc ( nullptr == alignPtr ? 0 :
154  T::alignmentTransformIndexLocal( id ) ) ;
155 
156  assert( nullptr == alignPtr || iLoc < alignPtr->m_align.size() ) ;
157 
158  const AlignTransform* at ( nullptr == alignPtr ? nullptr :
159  &alignPtr->m_align[ iLoc ] ) ;
160 
161  assert( nullptr == at || ( T::alignmentTransformIndexLocal( DetId( at->rawId() ) ) == iLoc ) ) ;
162 
163  const CaloGenericDetId gId ( id ) ;
164 
165  Pt3D lRef ;
166  Pt3DVec lc ( 8, Pt3D(0,0,0) ) ;
167  T::localCorners( lc, &dims.front(), i, lRef ) ;
168 
169  const Pt3D lBck ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] ) ) ; // ctr rear face in local
170  const Pt3D lCor ( lc[0] ) ;
171 
172  //----------------------------------- create transform from 6 numbers ---
173  const unsigned int jj ( i*nTrParm ) ;
174  Tr3D tr ;
175  const ROOT::Math::Translation3D tl ( tvec[jj], tvec[jj+1], tvec[jj+2] ) ;
176  const ROOT::Math::EulerAngles ea (
177  6==nTrParm ?
178  ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) :
180  const ROOT::Math::Transform3D rt ( ea, tl ) ;
181  double xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz;
182  rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ;
183  tr = Tr3D( CLHEP::HepRep3x3( xx, xy, xz,
184  yx, yy, yz,
185  zx, zy, zz ),
186  CLHEP::Hep3Vector(dx,dy,dz) );
187 
188  // now prepend alignment(s) for final transform
189  const Tr3D atr ( nullptr == at ? tr :
190  ( nullptr == gt ? at->transform()*tr :
191  at->transform()*gt->transform()*tr ) ) ;
192  //--------------------------------- done making transform ---------------
193 
194  const Pt3D gRef ( atr*lRef ) ;
195  const GlobalPoint fCtr ( gRef.x(), gRef.y(), gRef.z() ) ;
196  const Pt3D gBck ( atr*lBck ) ;
197  const GlobalPoint fBck ( gBck.x(), gBck.y(), gBck.z() ) ;
198  const Pt3D gCor ( atr*lCor ) ;
199  const GlobalPoint fCor ( gCor.x(), gCor.y(), gCor.z() ) ;
200 
201  ptr->newCell( fCtr, fBck, fCor, myParm, id ) ;
202  }
203 
204  ptr->initializeParms() ; // initializations; must happen after cells filled
205 
206  return ptr ;
207  }
CaloCellGeometry::Pt3D Pt3D
std::vector< float > const & getTranslation() const
Definition: PCaloGeometry.h:20
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
std::vector< float > const & getDimension() const
Definition: PCaloGeometry.h:21
virtual void getSummary(TrVec &trVector, IVec &iVector, DimVec &dimVector, IVec &dinsVector) const
CaloSubdetectorGeometry::IVec IVec
std::unique_ptr< CaloSubdetectorGeometry > PtrType
CaloCellGeometry::CCGFloat CCGFloat
CaloSubdetectorGeometry::TrVec TrVec
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
CaloCellGeometry::Pt3D Pt3D
Definition: DetId.h:18
AlgebraicVector EulerAngles
Definition: Definitions.h:36
CaloCellGeometry::Pt3DVec Pt3DVec
CaloCellGeometry::Tr3D Tr3D
CaloCellGeometry::Tr3D Tr3D
CaloSubdetectorGeometry::DimVec DimVec
def write(self, setup)
bool isValid() const
Definition: ESHandle.h:44
T const * product() const
Definition: ESHandle.h:86
std::vector< uint32_t > const & getIndexes() const
Definition: PCaloGeometry.h:22

Definition at line 164 of file moduleDB.cc.

References CaloTowerGeometry::alignmentTransformIndexGlobal(), CaloTowerGeometry::alignmentTransformIndexLocal(), CaloTowerGeometry::dbString(), CaloTowerTopology::denseIndex(), CaloTowerTopology::detIdFromDenseIndex(), PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), PCaloGeometry::getDenseIndices(), PCaloGeometry::getDimension(), PCaloGeometry::getIndexes(), CaloCellGeometry::getParmPtr(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), CaloSubdetectorGeometry::getSummary(), PCaloGeometry::getTranslation(), mps_fire::i, triggerObjects_cff::id, edm::ESHandleBase::isValid(), findQualityFiles::jj, CaloTowerGeometry::k_NumberOfParametersPerShape, CaloTowerGeometry::localCorners(), Alignments::m_align, CaloTowerGeometry::numberOfAlignments(), CaloTowerGeometry::numberOfCellsForCorners(), CaloTowerGeometry::numberOfParametersPerShape(), CaloTowerGeometry::numberOfShapes(), CaloTowerGeometry::producerTag(), edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, CaloGeometryDBReader::writeFlag(), CaloGeometryDBReader::writeIndexed(), geometryCSVtoXML::xx, geometryCSVtoXML::xy, geometryCSVtoXML::xz, geometryCSVtoXML::yy, geometryCSVtoXML::yz, and geometryCSVtoXML::zz.

164  {
165 
166  const Alignments* alignPtr ( nullptr ) ;
167  const Alignments* globalPtr ( nullptr ) ;
168  if( m_applyAlignment ) { // get ptr if necessary
169  edm::ESHandle< Alignments > alignments ;
170  iRecord.getRecord< typename CaloTowerGeometry::AlignmentRecord >().get( alignments ) ;
171 
172  assert( alignments.isValid() && // require valid alignments and expected sizet
173  ( alignments->m_align.size() == CaloTowerGeometry::numberOfAlignments() ) ) ;
174  alignPtr = alignments.product() ;
175 
177  iRecord.getRecord<GlobalPositionRcd>().get( globals ) ;
178 
179  assert( globals.isValid() ) ;
180  globalPtr = globals.product() ;
181  }
182 
183  TrVec tvec ;
184  DimVec dvec ;
185  IVec ivec ;
186  IVec dins ;
187 
190  iRecord.get( CaloTowerGeometry::producerTag() + std::string("_master"), pG ) ;
191 
192  const CaloSubdetectorGeometry* pGptr ( pG.product() ) ;
193 
194  pGptr->getSummary( tvec, ivec, dvec, dins ) ;
195 
197  } else {
199  iRecord.getRecord<typename CaloTowerGeometry::PGeometryRecord >().get( pG ) ;
200 
201  tvec = pG->getTranslation() ;
202  dvec = pG->getDimension() ;
203  ivec = pG->getIndexes() ;
204  dins = pG->getDenseIndices();
205  }
206 //*********************************************************************************************
207 
209  iRecord.getRecord<HcalRecNumberingRecord>().get( caloTopology );
210 
211 
212  CaloTowerGeometry* ctg=new CaloTowerGeometry( &*caloTopology );
213 
214  const unsigned int nTrParm ( tvec.size()/ctg->numberOfCellsForCorners() ) ;
215 
216  assert( dvec.size() == ctg->numberOfShapes() * CaloTowerGeometry::k_NumberOfParametersPerShape ) ;
217 
218 
219  PtrType ptr ( ctg ) ;
220 
221  ptr->fillDefaultNamedParameters() ;
222 
223  ptr->allocateCorners( ctg->numberOfCellsForCorners() ) ;
224 
225  ptr->allocatePar( dvec.size() ,
227 
228  for( unsigned int i ( 0 ) ; i < dins.size() ; ++i ) {
229  const unsigned int nPerShape ( ctg->numberOfParametersPerShape() ) ;
230  DimVec dims ;
231  dims.reserve( nPerShape ) ;
232 
233  const unsigned int indx ( ivec.size()==1 ? 0 : i ) ;
234 
235  DimVec::const_iterator dsrc ( dvec.begin() + ivec[indx]*nPerShape ) ;
236 
237  for( unsigned int j ( 0 ) ; j != nPerShape ; ++j ) {
238  dims.emplace_back( *dsrc ) ;
239  ++dsrc ;
240  }
241 
242  const CCGFloat* myParm ( CaloCellGeometry::getParmPtr( dims,
243  ptr->parMgr(),
244  ptr->parVecVec() ));
245 
246 
247  const DetId id ( caloTopology->detIdFromDenseIndex(dins[i]) ) ;
248 
249  const unsigned int iGlob ( nullptr == globalPtr ? 0 :
250  ctg->alignmentTransformIndexGlobal( id ) ) ;
251 
252  assert( nullptr == globalPtr || iGlob < globalPtr->m_align.size() ) ;
253 
254  const AlignTransform* gt ( nullptr == globalPtr ? nullptr : &globalPtr->m_align[ iGlob ] ) ;
255 
256  assert( nullptr == gt || iGlob == ctg->alignmentTransformIndexGlobal( DetId( gt->rawId() ) ) ) ;
257 
258  const unsigned int iLoc ( nullptr == alignPtr ? 0 :
259  ctg->alignmentTransformIndexLocal( id ) ) ;
260 
261  assert( nullptr == alignPtr || iLoc < alignPtr->m_align.size() ) ;
262 
263  const AlignTransform* at ( nullptr == alignPtr ? nullptr :
264  &alignPtr->m_align[ iLoc ] ) ;
265 
266  assert( nullptr == at || ( ctg->alignmentTransformIndexLocal( DetId( at->rawId() ) ) == iLoc ) ) ;
267 
268  const CaloGenericDetId gId ( id ) ;
269 
270  Pt3D lRef ;
271  Pt3DVec lc ( 8, Pt3D(0,0,0) ) ;
272  ctg->localCorners( lc, &dims.front(), dins[i], lRef ) ;
273 
274  const Pt3D lBck ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] ) ) ; // ctr rear face in local
275  const Pt3D lCor ( lc[0] ) ;
276 
277  //----------------------------------- create transform from 6 numbers ---
278  const unsigned int jj ( i*nTrParm ) ;
279  Tr3D tr ;
280  const ROOT::Math::Translation3D tl ( tvec[jj], tvec[jj+1], tvec[jj+2] ) ;
281  const ROOT::Math::EulerAngles ea (
282  6==nTrParm ?
283  ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) :
285  const ROOT::Math::Transform3D rt ( ea, tl ) ;
286  double xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz;
287  rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ;
288  tr = Tr3D( CLHEP::HepRep3x3( xx, xy, xz,
289  yx, yy, yz,
290  zx, zy, zz ),
291  CLHEP::Hep3Vector(dx,dy,dz) );
292 
293  // now prepend alignment(s) for final transform
294  const Tr3D atr ( nullptr == at ? tr :
295  ( nullptr == gt ? at->transform()*tr :
296  at->transform()*gt->transform()*tr ) ) ;
297  //--------------------------------- done making transform ---------------
298 
299  const Pt3D gRef ( atr*lRef ) ;
300  const GlobalPoint fCtr ( gRef.x(), gRef.y(), gRef.z() ) ;
301  const Pt3D gBck ( atr*lBck ) ;
302  const GlobalPoint fBck ( gBck.x(), gBck.y(), gBck.z() ) ;
303  const Pt3D gCor ( atr*lCor ) ;
304  const GlobalPoint fCor ( gCor.x(), gCor.y(), gCor.z() ) ;
305 
306  assert( caloTopology->denseIndex(id) == dins[i] );
307 
308  ptr->newCell( fCtr, fBck, fCor, myParm, id ) ;
309  }
310 
311  ptr->initializeParms() ; // initializations; must happen after cells filled
312 
313  return ptr ;
314 }
CaloCellGeometry::Pt3D Pt3D
virtual unsigned int numberOfCellsForCorners() const
unsigned int numberOfShapes() const override
unsigned int alignmentTransformIndexLocal(const DetId &id)
std::vector< float > const & getTranslation() const
Definition: PCaloGeometry.h:20
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
std::vector< float > const & getDimension() const
Definition: PCaloGeometry.h:21
virtual void getSummary(TrVec &trVector, IVec &iVector, DimVec &dimVector, IVec &dinsVector) const
static std::string producerTag()
CaloSubdetectorGeometry::IVec IVec
unsigned int numberOfParametersPerShape() const override
CaloTowerDetId detIdFromDenseIndex(uint32_t din) const
static std::string dbString()
std::unique_ptr< CaloSubdetectorGeometry > PtrType
CaloCellGeometry::CCGFloat CCGFloat
CaloSubdetectorGeometry::TrVec TrVec
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
unsigned int alignmentTransformIndexGlobal(const DetId &id)
CaloCellGeometry::Pt3D Pt3D
uint32_t denseIndex(const DetId &id) const
static void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
Definition: DetId.h:18
AlgebraicVector EulerAngles
Definition: Definitions.h:36
CaloCellGeometry::Pt3DVec Pt3DVec
CaloCellGeometry::Tr3D Tr3D
CaloCellGeometry::Tr3D Tr3D
CaloSubdetectorGeometry::DimVec DimVec
bool isValid() const
Definition: ESHandle.h:44
T const * product() const
Definition: ESHandle.h:86
std::vector< uint32_t > const & getIndexes() const
Definition: PCaloGeometry.h:22
std::vector< uint32_t > const & getDenseIndices() const
Definition: PCaloGeometry.h:23
static unsigned int numberOfAlignments()
static void writeIndexed(const TrVec &, const DimVec &, const IVec &, const std::vector< uint32_t > &, const std::string &)

Definition at line 171 of file calowriters.cc.

References CaloTowerGeometry::alignmentTransformIndexGlobal(), CaloTowerGeometry::alignmentTransformIndexLocal(), CaloTowerGeometry::dbString(), CaloTowerTopology::denseIndex(), CaloTowerTopology::detIdFromDenseIndex(), PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), PCaloGeometry::getDenseIndices(), PCaloGeometry::getDimension(), PCaloGeometry::getIndexes(), CaloCellGeometry::getParmPtr(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), CaloSubdetectorGeometry::getSummary(), PCaloGeometry::getTranslation(), mps_fire::i, triggerObjects_cff::id, edm::ESHandleBase::isValid(), findQualityFiles::jj, CaloTowerGeometry::k_NumberOfParametersPerShape, CaloTowerGeometry::localCorners(), Alignments::m_align, CaloTowerGeometry::numberOfAlignments(), CaloTowerGeometry::numberOfCellsForCorners(), CaloTowerGeometry::numberOfParametersPerShape(), CaloTowerGeometry::numberOfShapes(), CaloTowerGeometry::producerTag(), edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, CaloGeometryDBWriter::writeFlag(), CaloGeometryDBWriter::writeIndexed(), geometryCSVtoXML::xx, geometryCSVtoXML::xy, geometryCSVtoXML::xz, geometryCSVtoXML::yy, geometryCSVtoXML::yz, and geometryCSVtoXML::zz.

171  {
172 
173  const Alignments* alignPtr ( nullptr ) ;
174  const Alignments* globalPtr ( nullptr ) ;
175  if( m_applyAlignment ) { // get ptr if necessary
176  edm::ESHandle< Alignments > alignments ;
177  iRecord.getRecord< typename CaloTowerGeometry::AlignmentRecord >().get( alignments ) ;
178 
179  assert( alignments.isValid() && // require valid alignments and expected sizet
180  ( alignments->m_align.size() == CaloTowerGeometry::numberOfAlignments() ) ) ;
181  alignPtr = alignments.product() ;
182 
184  iRecord.getRecord<GlobalPositionRcd>().get( globals ) ;
185 
186  assert( globals.isValid() ) ;
187  globalPtr = globals.product() ;
188  }
189 
190  TrVec tvec ;
191  DimVec dvec ;
192  IVec ivec ;
193  IVec dins ;
194 
197  iRecord.get( CaloTowerGeometry::producerTag() + std::string("_master"), pG ) ;
198 
199  const CaloSubdetectorGeometry* pGptr(pG.product());
200 
201  pGptr->getSummary( tvec, ivec, dvec, dins ) ;
202 
204  } else {
206  iRecord.getRecord<typename CaloTowerGeometry::PGeometryRecord >().get( pG ) ;
207 
208  tvec = pG->getTranslation() ;
209  dvec = pG->getDimension() ;
210  ivec = pG->getIndexes() ;
211  dins = pG->getDenseIndices();
212  }
213 //*********************************************************************************************
214 
216  iRecord.getRecord<HcalRecNumberingRecord>().get( caloTopology );
217 
218 
219  CaloTowerGeometry* ctg=new CaloTowerGeometry( &*caloTopology );
220 
221  const unsigned int nTrParm ( tvec.size()/ctg->numberOfCellsForCorners() ) ;
222 
223  assert( dvec.size() == ctg->numberOfShapes() * CaloTowerGeometry::k_NumberOfParametersPerShape ) ;
224 
225 
226  PtrType ptr ( ctg ) ;
227 
228  ptr->fillDefaultNamedParameters() ;
229 
230  ptr->allocateCorners( ctg->numberOfCellsForCorners() ) ;
231 
232  ptr->allocatePar( dvec.size() ,
234 
235  for( unsigned int i ( 0 ) ; i < dins.size() ; ++i ) {
236  const unsigned int nPerShape ( ctg->numberOfParametersPerShape() ) ;
237  DimVec dims ;
238  dims.reserve( nPerShape ) ;
239 
240  const unsigned int indx ( ivec.size()==1 ? 0 : i ) ;
241 
242  DimVec::const_iterator dsrc ( dvec.begin() + ivec[indx]*nPerShape ) ;
243 
244  for( unsigned int j ( 0 ) ; j != nPerShape ; ++j ) {
245  dims.push_back( *dsrc ) ;
246  ++dsrc ;
247  }
248 
249  const CCGFloat* myParm ( CaloCellGeometry::getParmPtr( dims,
250  ptr->parMgr(),
251  ptr->parVecVec() ));
252 
253 
254  const DetId id ( caloTopology->detIdFromDenseIndex(dins[i]) ) ;
255 
256  const unsigned int iGlob ( nullptr == globalPtr ? 0 :
257  ctg->alignmentTransformIndexGlobal( id ) ) ;
258 
259  assert( nullptr == globalPtr || iGlob < globalPtr->m_align.size() ) ;
260 
261  const AlignTransform* gt ( nullptr == globalPtr ? nullptr : &globalPtr->m_align[ iGlob ] ) ;
262 
263  assert( nullptr == gt || iGlob == ctg->alignmentTransformIndexGlobal( DetId( gt->rawId() ) ) ) ;
264 
265  const unsigned int iLoc ( nullptr == alignPtr ? 0 :
266  ctg->alignmentTransformIndexLocal( id ) ) ;
267 
268  assert( nullptr == alignPtr || iLoc < alignPtr->m_align.size() ) ;
269 
270  const AlignTransform* at ( nullptr == alignPtr ? nullptr :
271  &alignPtr->m_align[ iLoc ] ) ;
272 
273  assert( nullptr == at || ( ctg->alignmentTransformIndexLocal( DetId( at->rawId() ) ) == iLoc ) ) ;
274 
275  const CaloGenericDetId gId ( id ) ;
276 
277  Pt3D lRef ;
278  Pt3DVec lc ( 8, Pt3D(0,0,0) ) ;
279  ctg->localCorners( lc, &dims.front(), dins[i], lRef ) ;
280 
281  const Pt3D lBck ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] ) ) ; // ctr rear face in local
282  const Pt3D lCor ( lc[0] ) ;
283 
284  //----------------------------------- create transform from 6 numbers ---
285  const unsigned int jj ( i*nTrParm ) ;
286  Tr3D tr ;
287  const ROOT::Math::Translation3D tl ( tvec[jj], tvec[jj+1], tvec[jj+2] ) ;
288  const ROOT::Math::EulerAngles ea (
289  6==nTrParm ?
290  ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) :
292  const ROOT::Math::Transform3D rt ( ea, tl ) ;
293  double xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz;
294  rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ;
295  tr = Tr3D( CLHEP::HepRep3x3( xx, xy, xz,
296  yx, yy, yz,
297  zx, zy, zz ),
298  CLHEP::Hep3Vector(dx,dy,dz) );
299 
300  // now prepend alignment(s) for final transform
301  const Tr3D atr ( nullptr == at ? tr :
302  ( nullptr == gt ? at->transform()*tr :
303  at->transform()*gt->transform()*tr ) ) ;
304  //--------------------------------- done making transform ---------------
305 
306  const Pt3D gRef ( atr*lRef ) ;
307  const GlobalPoint fCtr ( gRef.x(), gRef.y(), gRef.z() ) ;
308  const Pt3D gBck ( atr*lBck ) ;
309  const GlobalPoint fBck ( gBck.x(), gBck.y(), gBck.z() ) ;
310  const Pt3D gCor ( atr*lCor ) ;
311  const GlobalPoint fCor ( gCor.x(), gCor.y(), gCor.z() ) ;
312 
313  assert( caloTopology->denseIndex(id) == dins[i] );
314 
315  ptr->newCell( fCtr, fBck, fCor, myParm, id ) ;
316  }
317 
318  ptr->initializeParms() ; // initializations; must happen after cells filled
319 
320  return ptr ;
321 }
CaloCellGeometry::Pt3D Pt3D
static void writeIndexed(const TrVec &tvec, const DimVec &dvec, const IVec &ivec, const IVec &dins, const std::string &tag)
virtual unsigned int numberOfCellsForCorners() const
unsigned int numberOfShapes() const override
unsigned int alignmentTransformIndexLocal(const DetId &id)
std::vector< float > const & getTranslation() const
Definition: PCaloGeometry.h:20
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
std::vector< float > const & getDimension() const
Definition: PCaloGeometry.h:21
virtual void getSummary(TrVec &trVector, IVec &iVector, DimVec &dimVector, IVec &dinsVector) const
static std::string producerTag()
CaloSubdetectorGeometry::IVec IVec
unsigned int numberOfParametersPerShape() const override
CaloTowerDetId detIdFromDenseIndex(uint32_t din) const
static std::string dbString()
std::unique_ptr< CaloSubdetectorGeometry > PtrType
CaloCellGeometry::CCGFloat CCGFloat
CaloSubdetectorGeometry::TrVec TrVec
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
unsigned int alignmentTransformIndexGlobal(const DetId &id)
CaloCellGeometry::Pt3D Pt3D
uint32_t denseIndex(const DetId &id) const
static void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
Definition: DetId.h:18
AlgebraicVector EulerAngles
Definition: Definitions.h:36
CaloCellGeometry::Pt3DVec Pt3DVec
CaloCellGeometry::Tr3D Tr3D
CaloCellGeometry::Tr3D Tr3D
CaloSubdetectorGeometry::DimVec DimVec
bool isValid() const
Definition: ESHandle.h:44
T const * product() const
Definition: ESHandle.h:86
std::vector< uint32_t > const & getIndexes() const
Definition: PCaloGeometry.h:22
std::vector< uint32_t > const & getDenseIndices() const
Definition: PCaloGeometry.h:23
static unsigned int numberOfAlignments()

Definition at line 325 of file calowriters.cc.

References FlatHexagon::createCorners(), HGCalGeometry::dbString(), PVValHelper::dx, PVValHelper::dy, PVValHelper::dz, HGCalTopology::encode(), relativeConstraints::geom, HGCalTopology::geomDenseId2decId(), PCaloGeometry::getDenseIndices(), PCaloGeometry::getDimension(), PCaloGeometry::getIndexes(), CaloCellGeometry::getParmPtr(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), HGCalGeometry::getSummary(), PCaloGeometry::getTranslation(), findQualityFiles::jj, HGCalGeometry::k_NumberOfParametersPerShape, HGCalGeometry::k_NumberOfShapes, PV3DBase< T, PVType, FrameType >::mag2(), dataset::name, CaloSubdetectorTopology::ncells(), FlatHexagon::ncorner_, FlatHexagon::ncornerBy2_, FlatHexagon::oneBySix_, edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, std::swap(), ecaldqm::topology(), HGCalTopology::totalGeomModules(), CaloGeometryDBWriter::writeFlag(), CaloGeometryDBWriter::writeIndexed(), genVertex_cff::x, geometryCSVtoXML::xx, geometryCSVtoXML::xy, geometryCSVtoXML::xz, detailsBasic3DVector::y, geometryCSVtoXML::yy, geometryCSVtoXML::yz, detailsBasic3DVector::z, and geometryCSVtoXML::zz.

326 {
327  TrVec tvec; // transformation
328  DimVec dvec; // parameters
329  IVec ivec; // layers
330  IVec dins; // valid geom ids
331 
333 
334  name = "HGCalEESensitive";
335 
337  {
339  iRecord.getRecord<IdealGeometryRecord>().get( name, geomH );
340  const HGCalGeometry* geom = geomH.product();
341 
342  geom->getSummary( tvec, ivec, dvec, dins ) ;
343 
344  CaloGeometryDBWriter::writeIndexed( tvec, dvec, ivec, dins, HGCalGeometry::dbString() ) ;
345  }
346  else
347  {
349  iRecord.getRecord<typename HGCalGeometry::PGeometryRecord >().get( pG ) ;
350 
351  tvec = pG->getTranslation() ;
352  dvec = pG->getDimension() ;
353  ivec = pG->getIndexes() ;
354  dins = pG->getDenseIndices();
355  }
356  //*********************************************************************************************
357 
359  iRecord.getRecord<IdealGeometryRecord>().get( name, topology );
360 
361  assert( dvec.size() <= topology->totalGeomModules() * HGCalGeometry::k_NumberOfParametersPerShape );
362  HGCalGeometry* hcg = new HGCalGeometry( *topology );
363  PtrType ptr ( hcg );
364 
365  ptr->allocateCorners( topology->ncells());
366  ptr->allocatePar( HGCalGeometry::k_NumberOfShapes,
368 
369  const unsigned int nTrParm( ptr->numberOfTransformParms());
370  const unsigned int nPerShape( HGCalGeometry::k_NumberOfParametersPerShape );
371 
372  for( auto it : dins )
373  {
374  DetId id = topology->encode( topology->geomDenseId2decId( it ));
375  // get layer
376  int layer = ivec[ it ];
377 
378  // get transformation
379  const unsigned int jj ( it * nTrParm );
380  Tr3D tr;
381  const ROOT::Math::Translation3D tl( tvec[jj], tvec[jj+1], tvec[jj+2]);
382  const ROOT::Math::EulerAngles ea( 6 == nTrParm ?
383  ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) :
385  const ROOT::Math::Transform3D rt( ea, tl );
386  double xx, xy, xz, dx, yx, yy, yz, dy, zx, zy, zz, dz;
387  rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ;
388  tr = Tr3D( CLHEP::HepRep3x3( xx, xy, xz,
389  yx, yy, yz,
390  zx, zy, zz ),
391  CLHEP::Hep3Vector( dx, dy, dz));
392 
393  // get parameters
394  DimVec dims;
395  dims.reserve( nPerShape );
396 
397  DimVec::const_iterator dsrc( dvec.begin() + layer * nPerShape );
398  for( unsigned int j ( 0 ) ; j != nPerShape ; ++j )
399  {
400  dims.push_back( *dsrc ) ;
401  ++dsrc ;
402  }
403 
404  std::vector<GlobalPoint> corners( FlatHexagon::ncorner_ );
405 
406  FlatHexagon::createCorners( dims, tr, corners );
407 
408  const CCGFloat* myParm( CaloCellGeometry::getParmPtr( dims,
409  ptr->parMgr(),
410  ptr->parVecVec()));
411  GlobalPoint front ( FlatHexagon::oneBySix_*( corners[0].x() +
412  corners[1].x() +
413  corners[2].x() +
414  corners[3].x() +
415  corners[4].x() +
416  corners[5].x()),
417  FlatHexagon::oneBySix_*( corners[0].y() +
418  corners[1].y() +
419  corners[2].y() +
420  corners[3].y() +
421  corners[4].y() +
422  corners[5].y()),
423  FlatHexagon::oneBySix_*( corners[0].z() +
424  corners[1].z() +
425  corners[2].z() +
426  corners[3].z() +
427  corners[4].z() +
428  corners[5].z()));
429 
430  GlobalPoint back ( FlatHexagon::oneBySix_*( corners[6].x() +
431  corners[7].x() +
432  corners[8].x() +
433  corners[9].x() +
434  corners[10].x()+
435  corners[11].x()),
436  FlatHexagon::oneBySix_*( corners[6].y() +
437  corners[7].y() +
438  corners[8].y() +
439  corners[9].y() +
440  corners[10].y()+
441  corners[11].y()),
442  FlatHexagon::oneBySix_*( corners[6].z() +
443  corners[7].z() +
444  corners[8].z() +
445  corners[9].z() +
446  corners[10].z() +
447  corners[11].z()));
448 
449  if (front.mag2() > back.mag2()) { // front should always point to the center, so swap front and back
450  std::swap (front, back);
451  std::swap_ranges (corners.begin(),
452  corners.begin()+FlatHexagon::ncornerBy2_,
453  corners.begin()+FlatHexagon::ncornerBy2_);
454  }
455 
456  ptr->newCell( front, back, corners[0], myParm, id );
457  }
458 
459  ptr->initializeParms(); // initializations; must happen after cells filled
460 
461  return ptr;
462 }
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
Definition: FlatHexagon.cc:152
static void writeIndexed(const TrVec &tvec, const DimVec &dvec, const IVec &ivec, const IVec &dins, const std::string &tag)
CaloTopology const * topology(0)
std::vector< float > const & getTranslation() const
Definition: PCaloGeometry.h:20
static constexpr unsigned int ncorner_
Definition: FlatHexagon.h:82
std::vector< float > const & getDimension() const
Definition: PCaloGeometry.h:21
CaloSubdetectorGeometry::IVec IVec
unsigned int totalGeomModules() const
static unsigned int k_NumberOfShapes
Definition: HGCalGeometry.h:49
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
DetId encode(const DecodedDetId &id_) const
static std::string dbString()
Definition: HGCalGeometry.h:52
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
std::unique_ptr< CaloSubdetectorGeometry > PtrType
CaloCellGeometry::CCGFloat CCGFloat
CaloSubdetectorGeometry::TrVec TrVec
static const CCGFloat * getParmPtr(const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
DecodedDetId geomDenseId2decId(const uint32_t &hi) const
Definition: DetId.h:18
static constexpr unsigned int ncornerBy2_
Definition: FlatHexagon.h:83
AlgebraicVector EulerAngles
Definition: Definitions.h:36
void getSummary(CaloSubdetectorGeometry::TrVec &trVector, CaloSubdetectorGeometry::IVec &iVector, CaloSubdetectorGeometry::DimVec &dimVector, CaloSubdetectorGeometry::IVec &dinsVector) const override
static unsigned int k_NumberOfParametersPerShape
Definition: HGCalGeometry.h:48
CaloCellGeometry::Tr3D Tr3D
CaloCellGeometry::Tr3D Tr3D
CaloSubdetectorGeometry::DimVec DimVec
T const * product() const
Definition: ESHandle.h:86
std::vector< uint32_t > const & getIndexes() const
Definition: PCaloGeometry.h:22
static constexpr double oneBySix_
Definition: FlatHexagon.h:81
std::vector< uint32_t > const & getDenseIndices() const
Definition: PCaloGeometry.h:23

Member Data Documentation

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

Definition at line 211 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 212 of file CaloGeometryDBEP.h.