CMS 3D CMS Logo

List of all members | Public Member Functions | Static Protected Member Functions | Protected Attributes
CTPPSGeometryESModule Class Reference

Builds ideal, real and misaligned geometries. More...

Inheritance diagram for CTPPSGeometryESModule:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 CTPPSGeometryESModule (const edm::ParameterSet &)
 
std::unique_ptr< DetGeomDescproduceIdealGD (const IdealGeometryRecord &)
 
std::unique_ptr< DetGeomDescproduceMisalignedGD (const VeryForwardMisalignedGeometryRecord &)
 
std::unique_ptr< CTPPSGeometryproduceMisalignedTG (const VeryForwardMisalignedGeometryRecord &)
 
std::unique_ptr< DetGeomDescproduceRealGD (const VeryForwardRealGeometryRecord &)
 
std::unique_ptr< CTPPSGeometryproduceRealTG (const VeryForwardRealGeometryRecord &)
 
 ~CTPPSGeometryESModule () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ~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)
 

Static Protected Member Functions

static void applyAlignments (const edm::ESHandle< DetGeomDesc > &, const edm::ESHandle< RPAlignmentCorrectionsData > &, DetGeomDesc *&)
 
static void buildDetGeomDesc (DDFilteredView *fv, DetGeomDesc *gd)
 

Protected Attributes

std::string compactViewTag_
 
unsigned int verbosity_
 

Additional Inherited Members

- 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
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- 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

Builds ideal, real and misaligned geometries.

First, it creates a tree of DetGeomDesc from DDCompView. For real and misaligned geometries, it applies alignment corrections (RPAlignmentCorrections) found in corresponding ...GeometryRecord.

Second, it creates CTPPSGeometry from DetGeoDesc tree.

Definition at line 47 of file CTPPSGeometryESModule.cc.

Constructor & Destructor Documentation

CTPPSGeometryESModule::CTPPSGeometryESModule ( const edm::ParameterSet iConfig)

Definition at line 73 of file CTPPSGeometryESModule.cc.

References produceIdealGD(), produceMisalignedGD(), produceMisalignedTG(), produceRealGD(), produceRealTG(), and edm::ESProducer::setWhatProduced().

73  :
74  verbosity_( iConfig.getUntrackedParameter<unsigned int>( "verbosity", 1 ) ),
75  compactViewTag_( iConfig.getParameter<std::string>( "compactViewTag" ) )
76 {
78 
81 
84 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< CTPPSGeometry > produceRealTG(const VeryForwardRealGeometryRecord &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::unique_ptr< CTPPSGeometry > produceMisalignedTG(const VeryForwardMisalignedGeometryRecord &)
std::unique_ptr< DetGeomDesc > produceRealGD(const VeryForwardRealGeometryRecord &)
std::unique_ptr< DetGeomDesc > produceMisalignedGD(const VeryForwardMisalignedGeometryRecord &)
std::unique_ptr< DetGeomDesc > produceIdealGD(const IdealGeometryRecord &)
CTPPSGeometryESModule::~CTPPSGeometryESModule ( )
inlineoverride

Member Function Documentation

void CTPPSGeometryESModule::applyAlignments ( const edm::ESHandle< DetGeomDesc > &  idealGD,
const edm::ESHandle< RPAlignmentCorrectionsData > &  alignments,
DetGeomDesc *&  newGD 
)
staticprotected

Definition at line 89 of file CTPPSGeometryESModule.cc.

References DetGeomDesc::addComponent(), DetGeomDesc::ApplyAlignment(), edmScanValgrind::buffer, DetGeomDesc::components(), DDD_CTPPS_DIAMONDS_RP_NAME, DDD_CTPPS_DIAMONDS_SEGMENT_NAME, DDD_CTPPS_PIXELS_RP_NAME, DDD_CTPPS_PIXELS_SENSOR_NAME, DDD_CTPPS_UFSD_PLANE_NAME, DDD_CTPPS_UFSD_SEGMENT_NAME, DDD_TOTEM_RP_RP_NAME, DDD_TOTEM_RP_SENSOR_NAME, DetGeomDesc::geographicalID(), RPAlignmentCorrectionsData::getFullSensorCorrection(), RPAlignmentCorrectionsData::getRPCorrection(), mps_fire::i, edm::ESHandleBase::isValid(), DDName::name(), dataset::name, DetGeomDesc::name(), edm::ESHandle< T >::product(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by produceMisalignedGD(), produceRealGD(), and ~CTPPSGeometryESModule().

92 {
93  newGD = new DetGeomDesc( *(idealGD.product()) );
94  std::deque<const DetGeomDesc*> buffer;
95  std::deque<DetGeomDesc*> bufferNew;
96  buffer.emplace_back( idealGD.product() );
97  bufferNew.emplace_back( newGD );
98 
99  while ( !buffer.empty() ) {
100  const DetGeomDesc* sD = buffer.front();
101  DetGeomDesc* pD = bufferNew.front();
102  buffer.pop_front();
103  bufferNew.pop_front();
104 
105  const std::string name = pD->name().name();
106 
107  // Is it sensor? If yes, apply full sensor alignments
108  if ( name == DDD_TOTEM_RP_SENSOR_NAME
110  || name == DDD_CTPPS_UFSD_SEGMENT_NAME
111  || name == DDD_CTPPS_PIXELS_SENSOR_NAME ) {
112  unsigned int plId = pD->geographicalID();
113 
114  if ( alignments.isValid() ) {
115  const RPAlignmentCorrectionData& ac = alignments->getFullSensorCorrection( plId );
116  pD->ApplyAlignment( ac );
117  }
118  }
119 
120  // Is it RP box? If yes, apply RP alignments
121  if ( name == DDD_TOTEM_RP_RP_NAME
122  || name == DDD_CTPPS_DIAMONDS_RP_NAME
123  || name == DDD_CTPPS_UFSD_PLANE_NAME
124  || name == DDD_CTPPS_PIXELS_RP_NAME ) {
125  unsigned int rpId = pD->geographicalID();
126 
127  if ( alignments.isValid() ) {
128  const RPAlignmentCorrectionData& ac = alignments->getRPCorrection( rpId );
129  pD->ApplyAlignment( ac );
130  }
131  }
132 
133  // create and add children
134  for ( unsigned int i = 0; i < sD->components().size(); i++ ) {
135  const DetGeomDesc* sDC = sD->components()[i];
136  buffer.emplace_back( sDC );
137 
138  // create new node with the same information as in sDC and add it as a child of pD
139  DetGeomDesc* cD = new DetGeomDesc( *sDC );
140  pD->addComponent( cD );
141 
142  bufferNew.emplace_back( cD );
143  }
144  }
145 }
const std::string DDD_CTPPS_PIXELS_RP_NAME
Definition: CTPPSDDDNames.h:23
const std::string DDD_CTPPS_DIAMONDS_SEGMENT_NAME
Definition: CTPPSDDDNames.h:17
RPAlignmentCorrectionData & getRPCorrection(unsigned int id)
returns the correction value from the RP map
void ApplyAlignment(const RPAlignmentCorrectionData &)
alignment
Definition: DetGeomDesc.cc:185
virtual ConstContainer components() const
access to the tree structure
Definition: DetGeomDesc.cc:123
RPAlignmentCorrectionData getFullSensorCorrection(unsigned int id, bool useRPErrors=false) const
Geometrical description of a sensor.
Definition: DetGeomDesc.h:37
Alignment correction or result of alignment procedure for a single RP sensor. Within the geometry des...
DDName name() const
Definition: DetGeomDesc.h:87
const std::string DDD_CTPPS_UFSD_PLANE_NAME
Definition: CTPPSDDDNames.h:25
const std::string DDD_TOTEM_RP_RP_NAME
DDD names of RP volumes.
Definition: CTPPSDDDNames.h:22
virtual DetId geographicalID() const
Definition: DetGeomDesc.h:61
const std::string DDD_CTPPS_DIAMONDS_RP_NAME
Definition: CTPPSDDDNames.h:24
const std::string DDD_TOTEM_RP_SENSOR_NAME
DDD names of sensors.
Definition: CTPPSDDDNames.h:14
bool isValid() const
Definition: ESHandle.h:47
const std::string DDD_CTPPS_PIXELS_SENSOR_NAME
Definition: CTPPSDDDNames.h:15
T const * product() const
Definition: ESHandle.h:86
void addComponent(DetGeomDesc *)
Definition: DetGeomDesc.cc:160
const std::string & name() const
Returns the name.
Definition: DDName.cc:90
const std::string DDD_CTPPS_UFSD_SEGMENT_NAME
Definition: CTPPSDDDNames.h:18
void CTPPSGeometryESModule::buildDetGeomDesc ( DDFilteredView fv,
DetGeomDesc gd 
)
staticprotected

Definition at line 150 of file CTPPSGeometryESModule.cc.

References DetGeomDesc::addComponent(), DDFilteredView::copyno(), DDFilteredView::copyNumbers(), DDD_CTPPS_DIAMONDS_RP_NAME, DDD_CTPPS_DIAMONDS_SEGMENT_NAME, DDD_CTPPS_PIXELS_RP_NAME, DDD_CTPPS_PIXELS_SENSOR_NAME, DDD_CTPPS_UFSD_SEGMENT_NAME, DDD_TOTEM_RP_RP_NAME, DDD_TOTEM_RP_SENSOR_NAME, gamEcalExtractorBlocks_cff::detector, DDFilteredView::firstChild(), DDFilteredView::logicalPart(), DDName::name(), dataset::name, DDBase< N, C >::name(), DDFilteredView::nextSibling(), DDFilteredView::parent(), DetGeomDesc::setGeographicalID(), relativeConstraints::station, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by produceIdealGD(), and ~CTPPSGeometryESModule().

151 {
152  // try to dive into next level
153  if ( !fv->firstChild() ) return;
154 
155  // loop over siblings in the level
156  do {
157  // create new DetGeomDesc node and add it to the parent's (gd) list
158  DetGeomDesc* newGD = new DetGeomDesc( fv );
159 
160  const std::string name = fv->logicalPart().name().name();
161 
162  // strip sensors
163  if ( name == DDD_TOTEM_RP_SENSOR_NAME ) {
164  const std::vector<int>& copy_num = fv->copyNumbers();
165  // check size of copy numubers array
166  if ( copy_num.size() < 3 )
167  throw cms::Exception("DDDTotemRPContruction") << "size of copyNumbers for strip sensor is "
168  << copy_num.size() << ". It must be >= 3.";
169 
170  // extract information
171  const unsigned int decRPId = copy_num[copy_num.size() - 3];
172  const unsigned int arm = decRPId / 100;
173  const unsigned int station = ( decRPId % 100 ) / 10;
174  const unsigned int rp = decRPId % 10;
175  const unsigned int detector = copy_num[copy_num.size() - 1];
176  newGD->setGeographicalID( TotemRPDetId( arm, station, rp, detector ) );
177  }
178 
179  // strip and pixels RPs
180  else if ( name == DDD_TOTEM_RP_RP_NAME || name == DDD_CTPPS_PIXELS_RP_NAME) {
181  uint32_t decRPId = uint32_t(fv->copyno());
182 
183  // check if it is a pixel RP
184  if ( decRPId >= 10000 ){
185  decRPId = decRPId % 10000;
186  const unsigned int armIdx = ( decRPId / 100 ) % 10;
187  const unsigned int stIdx = ( decRPId / 10 ) % 10;
188  const unsigned int rpIdx = decRPId % 10;
189  newGD->setGeographicalID( CTPPSPixelDetId( armIdx, stIdx, rpIdx ) );
190  }else{
191  const unsigned int armIdx = ( decRPId / 100 ) % 10;
192  const unsigned int stIdx = ( decRPId / 10 ) % 10;
193  const unsigned int rpIdx = decRPId % 10;
194  newGD->setGeographicalID( TotemRPDetId( armIdx, stIdx, rpIdx ) );
195  }
196  }
197 
198  // pixel sensors
199  else if ( name == DDD_CTPPS_PIXELS_SENSOR_NAME ) {
200  const std::vector<int>& copy_num = fv->copyNumbers();
201  // check size of copy numubers array
202  if ( copy_num.size() < 4 )
203  throw cms::Exception("DDDTotemRPContruction") << "size of copyNumbers for pixel sensor is "
204  << copy_num.size() << ". It must be >= 4.";
205 
206  // extract information
207  const unsigned int decRPId = copy_num[copy_num.size() - 4] % 10000;
208  const unsigned int arm = decRPId / 100;
209  const unsigned int station = ( decRPId % 100 ) / 10;
210  const unsigned int rp = decRPId % 10;
211  const unsigned int detector = copy_num[copy_num.size() - 2] - 1;
212  newGD->setGeographicalID( CTPPSPixelDetId( arm, station, rp, detector ) );
213  }
214 
215 
216  // diamond/UFSD sensors
217  else if ( name == DDD_CTPPS_DIAMONDS_SEGMENT_NAME || name == DDD_CTPPS_UFSD_SEGMENT_NAME ) {
218  const std::vector<int>& copy_num = fv->copyNumbers();
219 
220  const unsigned int id = copy_num[copy_num.size()-1];
221  const unsigned int arm = copy_num[1]-1;
222  const unsigned int station = 1;
223  const unsigned int rp = 6;
224  const unsigned int plane = ( id / 100 );
225  const unsigned int channel = id % 100;
226  newGD->setGeographicalID( CTPPSDiamondDetId( arm, station, rp, plane, channel ) );
227  }
228 
229  // diamond RPs
230  else if ( name == DDD_CTPPS_DIAMONDS_RP_NAME ) {
231  const std::vector<int>& copy_num = fv->copyNumbers();
232 
233  // check size of copy numubers array
234  if ( copy_num.size() < 2 )
235  throw cms::Exception("DDDTotemRPContruction") << "size of copyNumbers for diamond RP is "
236  << copy_num.size() << ". It must be >= 2.";
237 
238  const unsigned int arm = copy_num[1] - 1;
239  const unsigned int station = 1;
240  const unsigned int rp = 6;
241 
242  newGD->setGeographicalID( CTPPSDiamondDetId( arm, station, rp ) );
243  }
244 
245  // add component
246  gd->addComponent( newGD );
247 
248  // recursion
249  buildDetGeomDesc( fv, newGD );
250  } while ( fv->nextSibling() );
251 
252  // go a level up
253  fv->parent();
254 }
Detector ID class for TOTEM Si strip detectors.
Definition: TotemRPDetId.h:30
bool parent()
set the current node to the parent node ...
const std::string DDD_CTPPS_PIXELS_RP_NAME
Definition: CTPPSDDDNames.h:23
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const N & name() const
Definition: DDBase.h:78
nav_type copyNumbers() const
return the stack of copy numbers
bool nextSibling()
set the current node to the next sibling ...
const std::string DDD_CTPPS_DIAMONDS_SEGMENT_NAME
Definition: CTPPSDDDNames.h:17
int copyno() const
Copy number associated with the current node.
void setGeographicalID(DetId id)
ID stuff.
Definition: DetGeomDesc.h:60
Geometrical description of a sensor.
Definition: DetGeomDesc.h:37
const std::string DDD_TOTEM_RP_RP_NAME
DDD names of RP volumes.
Definition: CTPPSDDDNames.h:22
const std::string DDD_CTPPS_DIAMONDS_RP_NAME
Definition: CTPPSDDDNames.h:24
static void buildDetGeomDesc(DDFilteredView *fv, DetGeomDesc *gd)
bool firstChild()
set the current node to the first child ...
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
const std::string DDD_TOTEM_RP_SENSOR_NAME
DDD names of sensors.
Definition: CTPPSDDDNames.h:14
const std::string DDD_CTPPS_PIXELS_SENSOR_NAME
Definition: CTPPSDDDNames.h:15
void addComponent(DetGeomDesc *)
Definition: DetGeomDesc.cc:160
const std::string & name() const
Returns the name.
Definition: DDName.cc:90
const std::string DDD_CTPPS_UFSD_SEGMENT_NAME
Definition: CTPPSDDDNames.h:18
std::unique_ptr< DetGeomDesc > CTPPSGeometryESModule::produceIdealGD ( const IdealGeometryRecord iRecord)

Definition at line 259 of file CTPPSGeometryESModule.cc.

References buildDetGeomDesc(), compactViewTag_, ALCARECOTkAlBeamHalo_cff::filter, edm::eventsetup::EventSetupRecord::get(), edm::ESHandle< T >::product(), and pyrootRender::root.

Referenced by CTPPSGeometryESModule(), and ~CTPPSGeometryESModule().

260 {
261  // get the DDCompactView from EventSetup
263  iRecord.get( compactViewTag_, cpv );
264 
265  // create DDFilteredView and apply the filter
267  DDFilteredView fv( *( cpv.product() ), filter );
268 
269  // conversion to DetGeomDesc structure
270  DetGeomDesc* root = new DetGeomDesc( &fv );
271  buildDetGeomDesc( &fv, root );
272 
273  // construct the tree of DetGeomDesc
274  return std::unique_ptr<DetGeomDesc>( const_cast<DetGeomDesc*>( root ) );
275 }
void get(HolderT &iHolder) const
Geometrical description of a sensor.
Definition: DetGeomDesc.h:37
A DDFilter that always returns true.
Definition: DDFilter.h:27
static void buildDetGeomDesc(DDFilteredView *fv, DetGeomDesc *gd)
T const * product() const
Definition: ESHandle.h:86
std::unique_ptr< DetGeomDesc > CTPPSGeometryESModule::produceMisalignedGD ( const VeryForwardMisalignedGeometryRecord iRecord)

Definition at line 312 of file CTPPSGeometryESModule.cc.

References applyAlignments(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), RPAlignmentCorrectionsData::getRPMap(), RPAlignmentCorrectionsData::getSensorMap(), edm::ESHandleBase::isValid(), and verbosity_.

Referenced by CTPPSGeometryESModule(), and ~CTPPSGeometryESModule().

313 {
314  // get the input GeometricalDet
316  iRecord.getRecord<IdealGeometryRecord>().get( idealGD );
317 
318  // load alignments
320  try { iRecord.getRecord<RPMisalignedAlignmentRecord>().get( alignments ); }
321  catch ( cms::Exception& ) {}
322 
323  if ( alignments.isValid() ) {
324  if ( verbosity_ )
325  edm::LogVerbatim("CTPPSGeometryESModule::produceMisalignedGD")
326  << ">> CTPPSGeometryESModule::produceMisalignedGD > Misaligned geometry: "
327  << alignments->getRPMap().size() << " RP and "
328  << alignments->getSensorMap().size() << " sensor alignments applied.";
329  } else {
330  if ( verbosity_ )
331  edm::LogVerbatim("CTPPSGeometryESModule::produceMisalignedGD")
332  << ">> CTPPSGeometryESModule::produceMisalignedGD > Misaligned geometry: No alignments applied.";
333  }
334 
335  DetGeomDesc* newGD = nullptr;
336  applyAlignments( idealGD, alignments, newGD );
337  return std::unique_ptr<DetGeomDesc>( newGD );
338 }
static void applyAlignments(const edm::ESHandle< DetGeomDesc > &, const edm::ESHandle< RPAlignmentCorrectionsData > &, DetGeomDesc *&)
const mapType & getRPMap() const
returns the map of RP alignment corrections
Geometrical description of a sensor.
Definition: DetGeomDesc.h:37
const mapType & getSensorMap() const
returns the map of sensor alignment corrections
bool isValid() const
Definition: ESHandle.h:47
std::unique_ptr< CTPPSGeometry > CTPPSGeometryESModule::produceMisalignedTG ( const VeryForwardMisalignedGeometryRecord iRecord)

Definition at line 354 of file CTPPSGeometryESModule.cc.

References DEFINE_FWK_EVENTSETUP_MODULE, edm::eventsetup::EventSetupRecord::get(), and edm::ESHandle< T >::product().

Referenced by CTPPSGeometryESModule(), and ~CTPPSGeometryESModule().

355 {
357  iRecord.get( gD );
358 
359  return std::make_unique<CTPPSGeometry>( gD.product() );
360 }
void get(HolderT &iHolder) const
T const * product() const
Definition: ESHandle.h:86
std::unique_ptr< DetGeomDesc > CTPPSGeometryESModule::produceRealGD ( const VeryForwardRealGeometryRecord iRecord)

Definition at line 280 of file CTPPSGeometryESModule.cc.

References applyAlignments(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), RPAlignmentCorrectionsData::getRPMap(), RPAlignmentCorrectionsData::getSensorMap(), edm::ESHandleBase::isValid(), and verbosity_.

Referenced by CTPPSGeometryESModule(), and ~CTPPSGeometryESModule().

281 {
282  // get the input GeometricalDet
284  iRecord.getRecord<IdealGeometryRecord>().get( idealGD );
285 
286  // load alignments
288  try { iRecord.getRecord<RPRealAlignmentRecord>().get( alignments ); }
289  catch ( cms::Exception& ) {}
290 
291  if ( alignments.isValid() ) {
292  if ( verbosity_ )
293  edm::LogVerbatim("CTPPSGeometryESModule::produceRealGD")
294  << ">> CTPPSGeometryESModule::produceRealGD > Real geometry: "
295  << alignments->getRPMap().size() << " RP and "
296  << alignments->getSensorMap().size() << " sensor alignments applied.";
297  }
298  else {
299  if ( verbosity_ )
300  edm::LogVerbatim("CTPPSGeometryESModule::produceRealGD")
301  << ">> CTPPSGeometryESModule::produceRealGD > Real geometry: No alignments applied.";
302  }
303 
304  DetGeomDesc* newGD = nullptr;
305  applyAlignments( idealGD, alignments, newGD );
306  return std::unique_ptr<DetGeomDesc>( newGD );
307 }
static void applyAlignments(const edm::ESHandle< DetGeomDesc > &, const edm::ESHandle< RPAlignmentCorrectionsData > &, DetGeomDesc *&)
const mapType & getRPMap() const
returns the map of RP alignment corrections
Geometrical description of a sensor.
Definition: DetGeomDesc.h:37
const mapType & getSensorMap() const
returns the map of sensor alignment corrections
bool isValid() const
Definition: ESHandle.h:47
std::unique_ptr< CTPPSGeometry > CTPPSGeometryESModule::produceRealTG ( const VeryForwardRealGeometryRecord iRecord)

Definition at line 343 of file CTPPSGeometryESModule.cc.

References edm::eventsetup::EventSetupRecord::get(), and edm::ESHandle< T >::product().

Referenced by CTPPSGeometryESModule(), and ~CTPPSGeometryESModule().

344 {
346  iRecord.get( gD );
347 
348  return std::make_unique<CTPPSGeometry>( gD.product() );
349 }
void get(HolderT &iHolder) const
T const * product() const
Definition: ESHandle.h:86

Member Data Documentation

std::string CTPPSGeometryESModule::compactViewTag_
protected

Definition at line 66 of file CTPPSGeometryESModule.cc.

Referenced by produceIdealGD().

unsigned int CTPPSGeometryESModule::verbosity_
protected

Definition at line 65 of file CTPPSGeometryESModule.cc.

Referenced by produceMisalignedGD(), and produceRealGD().