CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes | Friends
RPAlignmentCorrectionsData Class Reference

Container for RP alignment corrections. The corrections are stored on two levels - RP and sensor. For every level, there is a map: symbolic ID –> alignment correction. Sensors inherit the alignment corrections for the corresponding RP, see getFullSensorCorrection method. More...

#include <RPAlignmentCorrectionsData.h>

Public Types

typedef std::map< unsigned int, RPAlignmentCorrectionDatamapType
 map: element id -> its alignment correction More...
 

Public Member Functions

void addCorrections (const RPAlignmentCorrectionsData &, bool sumErrors=true, bool addShR=true, bool addShZ=true, bool addRotZ=true)
 adds (merges) corrections on top of the current values More...
 
void addRPCorrection (unsigned int, const RPAlignmentCorrectionData &, bool sumErrors=true, bool addShR=true, bool addShZ=true, bool addRotZ=true)
 
void addSensorCorrection (unsigned int, const RPAlignmentCorrectionData &, bool sumErrors=true, bool addShR=true, bool addShZ=true, bool addRotZ=true)
 adds (merges) a RP correction on top of the current value More...
 
void clear ()
 clears all alignments More...
 
RPAlignmentCorrectionData getFullSensorCorrection (unsigned int id, bool useRPErrors=false) const
 
RPAlignmentCorrectionDatagetRPCorrection (unsigned int id)
 returns the correction value from the RP map More...
 
RPAlignmentCorrectionData getRPCorrection (unsigned int id) const
 
const mapTypegetRPMap () const
 returns the map of RP alignment corrections More...
 
RPAlignmentCorrectionDatagetSensorCorrection (unsigned int id)
 returns the correction value from the sensor map More...
 
RPAlignmentCorrectionData getSensorCorrection (unsigned int id) const
 
const mapTypegetSensorMap () const
 returns the map of sensor alignment corrections More...
 
 RPAlignmentCorrectionsData ()
 
void setRPCorrection (unsigned int id, const RPAlignmentCorrectionData &ac)
 sets the alignment correction for the given RP More...
 
void setSensorCorrection (unsigned int id, const RPAlignmentCorrectionData &ac)
 sets the alignment correction for the given sensor More...
 

Private Attributes

mapType rps_
 alignment correction maps More...
 
mapType sensors_
 

Friends

class StraightTrackAlignment
 

Detailed Description

Container for RP alignment corrections. The corrections are stored on two levels - RP and sensor. For every level, there is a map: symbolic ID –> alignment correction. Sensors inherit the alignment corrections for the corresponding RP, see getFullSensorCorrection method.

Definition at line 23 of file RPAlignmentCorrectionsData.h.

Member Typedef Documentation

map: element id -> its alignment correction

Definition at line 27 of file RPAlignmentCorrectionsData.h.

Constructor & Destructor Documentation

RPAlignmentCorrectionsData::RPAlignmentCorrectionsData ( )
inline

Definition at line 36 of file RPAlignmentCorrectionsData.h.

36 {}

Member Function Documentation

void RPAlignmentCorrectionsData::addCorrections ( const RPAlignmentCorrectionsData nac,
bool  sumErrors = true,
bool  addShR = true,
bool  addShZ = true,
bool  addRotZ = true 
)

adds (merges) corrections on top of the current values

Definition at line 123 of file RPAlignmentCorrectionsData.cc.

References addRPCorrection(), addSensorCorrection(), rps_, and sensors_.

Referenced by getSensorMap().

124 {
125  for ( const auto& it : nac.rps_ )
126  addRPCorrection( it.first, it.second, sumErrors, addShR, addShZ, addRotZ );
127 
128  for ( const auto& it : nac.sensors_ )
129  addSensorCorrection( it.first, it.second, sumErrors, addShR, addShZ, addRotZ );
130 }
void addRPCorrection(unsigned int, const RPAlignmentCorrectionData &, bool sumErrors=true, bool addShR=true, bool addShZ=true, bool addRotZ=true)
mapType rps_
alignment correction maps
void addSensorCorrection(unsigned int, const RPAlignmentCorrectionData &, bool sumErrors=true, bool addShR=true, bool addShZ=true, bool addRotZ=true)
adds (merges) a RP correction on top of the current value
void RPAlignmentCorrectionsData::addRPCorrection ( unsigned int  id,
const RPAlignmentCorrectionData a,
bool  sumErrors = true,
bool  addShR = true,
bool  addShZ = true,
bool  addRotZ = true 
)

adds (merges) a RP correction on top of the current value

Parameters
sumErrorsif it is true, old and new alignment uncertainties are summed (in quadrature) if it is false, the uncertainties of the parameter (i.e. not the object) will be used With the add... switches one can control which corrections are added.

Definition at line 99 of file RPAlignmentCorrectionsData.cc.

References rps_.

Referenced by addCorrections(), RPAlignmentCorrectionsMethods::getCorrectionsData(), and getSensorMap().

100 {
101  auto it = rps_.find( id );
102  if ( it == rps_.end() )
103  rps_.insert( mapType::value_type( id, a ) );
104  else
105  it->second.add( a, sumErrors, addShR, addShZ, addRotZ );
106 }
mapType rps_
alignment correction maps
void RPAlignmentCorrectionsData::addSensorCorrection ( unsigned int  id,
const RPAlignmentCorrectionData a,
bool  sumErrors = true,
bool  addShR = true,
bool  addShZ = true,
bool  addRotZ = true 
)

adds (merges) a RP correction on top of the current value

Definition at line 111 of file RPAlignmentCorrectionsData.cc.

References sensors_.

Referenced by addCorrections(), RPAlignmentCorrectionsMethods::getCorrectionsData(), and getSensorMap().

112 {
113  auto it = sensors_.find( id );
114  if ( it == sensors_.end() )
115  sensors_.insert( mapType::value_type( id, a ) );
116  else
117  it->second.add( a, sumErrors, addShR, addShZ, addRotZ );
118 }
void RPAlignmentCorrectionsData::clear ( void  )
RPAlignmentCorrectionData RPAlignmentCorrectionsData::getFullSensorCorrection ( unsigned int  id,
bool  useRPErrors = false 
) const

returns the correction for the given sensor, combining the data from RP and sensor map regarding transverse shifts, uses the x and y representation, sh_r will not be corrected! by default, RP errors shall not be summed up (see the note at FactorRPFromSensorCorrections).

Definition at line 61 of file RPAlignmentCorrectionsData.cc.

References RPAlignmentCorrectionData::add(), rps_, and sensors_.

Referenced by CTPPSGeometryESModule::applyAlignments(), and getSensorMap().

62 {
63  RPAlignmentCorrectionData align_corr;
64 
65  // try to get alignment correction of the full RP
66  auto rpIt = rps_.find( CTPPSDetId( id ).getRPId() );
67  if ( rpIt != rps_.end() )
68  align_corr = rpIt->second;
69 
70  // try to get sensor alignment correction
71  auto sIt = sensors_.find( id );
72 
73  // merge the corrections
74  if ( sIt != sensors_.end() )
75  align_corr.add( sIt->second, useRPErrors );
76 
77  return align_corr;
78 }
Alignment correction or result of alignment procedure for a single RP sensor. Within the geometry des...
mapType rps_
alignment correction maps
void add(const RPAlignmentCorrectionData &, bool sumErrors=true, bool addShR=true, bool addShZ=true, bool addRotZ=true)
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:32
RPAlignmentCorrectionData & RPAlignmentCorrectionsData::getRPCorrection ( unsigned int  id)

returns the correction value from the RP map

Definition at line 21 of file RPAlignmentCorrectionsData.cc.

References hcalTTPDigis_cfi::id, and rps_.

Referenced by CTPPSGeometryESModule::applyAlignments(), and getSensorMap().

22 {
23  return rps_[id];
24 }
mapType rps_
alignment correction maps
RPAlignmentCorrectionData RPAlignmentCorrectionsData::getRPCorrection ( unsigned int  id) const

Definition at line 29 of file RPAlignmentCorrectionsData.cc.

References rps_.

30 {
31  RPAlignmentCorrectionData align_corr;
32  auto it = rps_.find( id );
33  if ( it != rps_.end() )
34  align_corr = it->second;
35  return align_corr;
36 }
Alignment correction or result of alignment procedure for a single RP sensor. Within the geometry des...
mapType rps_
alignment correction maps
const mapType& RPAlignmentCorrectionsData::getRPMap ( ) const
inline

returns the map of RP alignment corrections

Definition at line 39 of file RPAlignmentCorrectionsData.h.

References rps_.

Referenced by CTPPSGeometryESModule::produceMisalignedGD(), CTPPSGeometryESModule::produceRealGD(), and RPAlignmentCorrectionsMethods::writeXMLBlock().

39 { return rps_; }
mapType rps_
alignment correction maps
RPAlignmentCorrectionData & RPAlignmentCorrectionsData::getSensorCorrection ( unsigned int  id)

returns the correction value from the sensor map

Definition at line 41 of file RPAlignmentCorrectionsData.cc.

References hcalTTPDigis_cfi::id, and sensors_.

Referenced by getSensorMap().

RPAlignmentCorrectionData RPAlignmentCorrectionsData::getSensorCorrection ( unsigned int  id) const

Definition at line 49 of file RPAlignmentCorrectionsData.cc.

References sensors_.

50 {
51  RPAlignmentCorrectionData align_corr;
52  auto it = sensors_.find( id );
53  if ( it != sensors_.end() )
54  align_corr = it->second;
55  return align_corr;
56 }
Alignment correction or result of alignment procedure for a single RP sensor. Within the geometry des...
const mapType& RPAlignmentCorrectionsData::getSensorMap ( ) const
inline
void RPAlignmentCorrectionsData::setRPCorrection ( unsigned int  id,
const RPAlignmentCorrectionData ac 
)

sets the alignment correction for the given RP

Definition at line 83 of file RPAlignmentCorrectionsData.cc.

References hcalTTPDigis_cfi::id, and rps_.

Referenced by getSensorMap().

84 {
85  rps_[id] = ac;
86 }
mapType rps_
alignment correction maps
void RPAlignmentCorrectionsData::setSensorCorrection ( unsigned int  id,
const RPAlignmentCorrectionData ac 
)

sets the alignment correction for the given sensor

Definition at line 91 of file RPAlignmentCorrectionsData.cc.

References hcalTTPDigis_cfi::id, and sensors_.

Referenced by getSensorMap().

Friends And Related Function Documentation

friend class StraightTrackAlignment
friend

Definition at line 33 of file RPAlignmentCorrectionsData.h.

Member Data Documentation

mapType RPAlignmentCorrectionsData::rps_
private
mapType RPAlignmentCorrectionsData::sensors_
private