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
 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 >
ESConsumesCollector 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

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 50 of file CTPPSGeometryESModule.cc.

Constructor & Destructor Documentation

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

Definition at line 76 of file CTPPSGeometryESModule.cc.

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

76  :
77  verbosity_( iConfig.getUntrackedParameter<unsigned int>( "verbosity", 1 ) ),
78  compactViewTag_( iConfig.getParameter<std::string>( "compactViewTag" ) )
79 {
81 
84 
87 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:116
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< CTPPSGeometry > produceRealTG(const VeryForwardRealGeometryRecord &)
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 92 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_SEGMENT_NAME, DDD_TOTEM_RP_RP_NAME, DDD_TOTEM_RP_SENSOR_NAME, DDD_TOTEM_TIMING_RP_NAME, DDD_TOTEM_TIMING_SENSOR_TMPL, DetGeomDesc::geographicalID(), RPAlignmentCorrectionsData::getFullSensorCorrection(), RPAlignmentCorrectionsData::getRPCorrection(), mps_fire::i, edm::ESHandleBase::isValid(), dataset::name, DetGeomDesc::name(), edm::ESHandle< T >::product(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

95 {
96  newGD = new DetGeomDesc( *(idealGD.product()) );
97  std::deque<const DetGeomDesc*> buffer;
98  std::deque<DetGeomDesc*> bufferNew;
99  buffer.emplace_back( idealGD.product() );
100  bufferNew.emplace_back( newGD );
101 
102  while ( !buffer.empty() ) {
103  const DetGeomDesc* sD = buffer.front();
104  DetGeomDesc* pD = bufferNew.front();
105  buffer.pop_front();
106  bufferNew.pop_front();
107 
108  const std::string name = pD->name();
109 
110  // Is it sensor? If yes, apply full sensor alignments
111  if ( name == DDD_TOTEM_RP_SENSOR_NAME
113  || name == DDD_CTPPS_UFSD_SEGMENT_NAME
115  || std::regex_match( name, std::regex( DDD_TOTEM_TIMING_SENSOR_TMPL ) )) {
116  unsigned int plId = pD->geographicalID();
117 
118  if ( alignments.isValid() ) {
119  const RPAlignmentCorrectionData& ac = alignments->getFullSensorCorrection( plId );
120  pD->applyAlignment( ac );
121  }
122  }
123 
124  // Is it RP box? If yes, apply RP alignments
125  if ( name == DDD_TOTEM_RP_RP_NAME
126  || name == DDD_CTPPS_DIAMONDS_RP_NAME
127  || name == DDD_CTPPS_PIXELS_RP_NAME
128  || name == DDD_TOTEM_TIMING_RP_NAME ) {
129  unsigned int rpId = pD->geographicalID();
130 
131  if ( alignments.isValid() ) {
132  const RPAlignmentCorrectionData& ac = alignments->getRPCorrection( rpId );
133  pD->applyAlignment( ac );
134  }
135  }
136 
137  // create and add children
138  for ( unsigned int i = 0; i < sD->components().size(); i++ ) {
139  const DetGeomDesc* sDC = sD->components()[i];
140  buffer.emplace_back( sDC );
141 
142  // create new node with the same information as in sDC and add it as a child of pD
143  DetGeomDesc* cD = new DetGeomDesc( *sDC );
144  pD->addComponent( cD );
145 
146  bufferNew.emplace_back( cD );
147  }
148  }
149 }
const std::string DDD_CTPPS_PIXELS_RP_NAME
Definition: CTPPSDDDNames.h:22
DetId geographicalID() const
Definition: DetGeomDesc.h:54
const std::string DDD_TOTEM_TIMING_RP_NAME
Definition: CTPPSDDDNames.h:24
const std::string DDD_CTPPS_DIAMONDS_SEGMENT_NAME
Definition: CTPPSDDDNames.h:16
RPAlignmentCorrectionData & getRPCorrection(unsigned int id)
returns the correction value from the RP map
RPAlignmentCorrectionData getFullSensorCorrection(unsigned int id, bool useRPErrors=false) const
Geometrical description of a sensor.
Definition: DetGeomDesc.h:35
Alignment correction for an element of the CT-PPS detector. Within the geometry description, every sensor (more generally every element) is given its translation and rotation. These two quantities shall be understood in local-to-global coordinate transform. That is, if r_l is a point in local coordinate system and x_g in global, then it holds.
Container components() const
access to the tree structure
Definition: DetGeomDesc.cc:61
const std::string DDD_TOTEM_TIMING_SENSOR_TMPL
Definition: CTPPSDDDNames.h:18
const std::string & name() const
Definition: DetGeomDesc.h:67
const std::string DDD_TOTEM_RP_RP_NAME
DDD names of RP volumes.
Definition: CTPPSDDDNames.h:21
const std::string DDD_CTPPS_DIAMONDS_RP_NAME
Definition: CTPPSDDDNames.h:23
const std::string DDD_TOTEM_RP_SENSOR_NAME
DDD names of sensors.
Definition: CTPPSDDDNames.h:14
bool isValid() const
Definition: ESHandle.h:45
const std::string DDD_CTPPS_PIXELS_SENSOR_NAME
Definition: CTPPSDDDNames.h:15
T const * product() const
Definition: ESHandle.h:84
void addComponent(DetGeomDesc *)
components (children) management
Definition: DetGeomDesc.cc:68
void applyAlignment(const RPAlignmentCorrectionData &)
alignment
Definition: DetGeomDesc.cc:93
const std::string DDD_CTPPS_UFSD_SEGMENT_NAME
Definition: CTPPSDDDNames.h:17
void CTPPSGeometryESModule::buildDetGeomDesc ( DDFilteredView fv,
DetGeomDesc gd 
)
staticprotected

Definition at line 154 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, DDD_TOTEM_TIMING_RP_NAME, DDD_TOTEM_TIMING_SENSOR_TMPL, 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().

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

Definition at line 282 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().

283 {
284  // get the DDCompactView from EventSetup
286  iRecord.get( compactViewTag_, cpv );
287 
288  // create DDFilteredView and apply the filter
290  DDFilteredView fv( *( cpv.product() ), filter );
291 
292  // conversion to DetGeomDesc structure
293  DetGeomDesc* root = new DetGeomDesc( &fv );
294  buildDetGeomDesc( &fv, root );
295 
296  // construct the tree of DetGeomDesc
297  return std::unique_ptr<DetGeomDesc>( const_cast<DetGeomDesc*>( root ) );
298 }
Geometrical description of a sensor.
Definition: DetGeomDesc.h:35
A DDFilter that always returns true.
Definition: DDFilter.h:27
static void buildDetGeomDesc(DDFilteredView *fv, DetGeomDesc *gd)
T const * product() const
Definition: ESHandle.h:84
bool get(HolderT &iHolder) const
std::unique_ptr< DetGeomDesc > CTPPSGeometryESModule::produceMisalignedGD ( const VeryForwardMisalignedGeometryRecord iRecord)

Definition at line 335 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().

336 {
337  // get the input GeometricalDet
339  iRecord.getRecord<IdealGeometryRecord>().get( idealGD );
340 
341  // load alignments
343  try { iRecord.getRecord<RPMisalignedAlignmentRecord>().get( alignments ); }
344  catch ( cms::Exception& ) {}
345 
346  if ( alignments.isValid() ) {
347  if ( verbosity_ )
348  edm::LogVerbatim("CTPPSGeometryESModule::produceMisalignedGD")
349  << ">> CTPPSGeometryESModule::produceMisalignedGD > Misaligned geometry: "
350  << alignments->getRPMap().size() << " RP and "
351  << alignments->getSensorMap().size() << " sensor alignments applied.";
352  } else {
353  if ( verbosity_ )
354  edm::LogVerbatim("CTPPSGeometryESModule::produceMisalignedGD")
355  << ">> CTPPSGeometryESModule::produceMisalignedGD > Misaligned geometry: No alignments applied.";
356  }
357 
358  DetGeomDesc* newGD = nullptr;
359  applyAlignments( idealGD, alignments, newGD );
360  return std::unique_ptr<DetGeomDesc>( newGD );
361 }
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:35
const mapType & getSensorMap() const
returns the map of sensor alignment corrections
bool isValid() const
Definition: ESHandle.h:45
std::unique_ptr< CTPPSGeometry > CTPPSGeometryESModule::produceMisalignedTG ( const VeryForwardMisalignedGeometryRecord iRecord)

Definition at line 377 of file CTPPSGeometryESModule.cc.

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

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

378 {
380  iRecord.get( gD );
381 
382  return std::make_unique<CTPPSGeometry>( gD.product() );
383 }
T const * product() const
Definition: ESHandle.h:84
bool get(HolderT &iHolder) const
std::unique_ptr< DetGeomDesc > CTPPSGeometryESModule::produceRealGD ( const VeryForwardRealGeometryRecord iRecord)

Definition at line 303 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().

304 {
305  // get the input GeometricalDet
307  iRecord.getRecord<IdealGeometryRecord>().get( idealGD );
308 
309  // load alignments
311  try { iRecord.getRecord<RPRealAlignmentRecord>().get( alignments ); }
312  catch ( cms::Exception& ) {}
313 
314  if ( alignments.isValid() ) {
315  if ( verbosity_ )
316  edm::LogVerbatim("CTPPSGeometryESModule::produceRealGD")
317  << ">> CTPPSGeometryESModule::produceRealGD > Real geometry: "
318  << alignments->getRPMap().size() << " RP and "
319  << alignments->getSensorMap().size() << " sensor alignments applied.";
320  }
321  else {
322  if ( verbosity_ )
323  edm::LogVerbatim("CTPPSGeometryESModule::produceRealGD")
324  << ">> CTPPSGeometryESModule::produceRealGD > Real geometry: No alignments applied.";
325  }
326 
327  DetGeomDesc* newGD = nullptr;
328  applyAlignments( idealGD, alignments, newGD );
329  return std::unique_ptr<DetGeomDesc>( newGD );
330 }
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:35
const mapType & getSensorMap() const
returns the map of sensor alignment corrections
bool isValid() const
Definition: ESHandle.h:45
std::unique_ptr< CTPPSGeometry > CTPPSGeometryESModule::produceRealTG ( const VeryForwardRealGeometryRecord iRecord)

Definition at line 366 of file CTPPSGeometryESModule.cc.

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

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

367 {
369  iRecord.get( gD );
370 
371  return std::make_unique<CTPPSGeometry>( gD.product() );
372 }
T const * product() const
Definition: ESHandle.h:84
bool get(HolderT &iHolder) const

Member Data Documentation

std::string CTPPSGeometryESModule::compactViewTag_
protected

Definition at line 69 of file CTPPSGeometryESModule.cc.

Referenced by produceIdealGD().

unsigned int CTPPSGeometryESModule::verbosity_
protected

Definition at line 68 of file CTPPSGeometryESModule.cc.

Referenced by produceMisalignedGD(), and produceRealGD().