CMS 3D CMS Logo

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

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

#include <CTPPSRPAlignmentCorrectionsData.h>

Public Types

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

Public Member Functions

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

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

mapType rps_
 alignment correction maps More...
 
mapType sensors_
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 
class StraightTrackAlignment
 

Detailed Description

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

Definition at line 25 of file CTPPSRPAlignmentCorrectionsData.h.

Member Typedef Documentation

map: element id -> its alignment correction

Definition at line 29 of file CTPPSRPAlignmentCorrectionsData.h.

Constructor & Destructor Documentation

CTPPSRPAlignmentCorrectionsData::CTPPSRPAlignmentCorrectionsData ( )
inline

Definition at line 38 of file CTPPSRPAlignmentCorrectionsData.h.

38 {}

Member Function Documentation

void CTPPSRPAlignmentCorrectionsData::addCorrections ( const CTPPSRPAlignmentCorrectionsData nac,
bool  sumErrors = true,
bool  addSh = true,
bool  addRot = true 
)

adds (merges) corrections on top of the current values

Definition at line 121 of file CTPPSRPAlignmentCorrectionsData.cc.

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

Referenced by getSensorMap(), and CTPPSRPAlignmentCorrectionsDataESSourceXML::Merge().

122 {
123  for ( const auto& it : nac.rps_ )
124  addRPCorrection( it.first, it.second, sumErrors, addSh, addRot );
125 
126  for ( const auto& it : nac.sensors_ )
127  addSensorCorrection( it.first, it.second, sumErrors, addSh, addRot );
128 }
void addSensorCorrection(unsigned int, const CTPPSRPAlignmentCorrectionData &, bool sumErrors=true, bool addSh=true, bool addRot=true)
adds (merges) a RP correction on top of the current value
void addRPCorrection(unsigned int, const CTPPSRPAlignmentCorrectionData &, bool sumErrors=true, bool addSh=true, bool addRot=true)
mapType rps_
alignment correction maps
void CTPPSRPAlignmentCorrectionsData::addRPCorrection ( unsigned int  id,
const CTPPSRPAlignmentCorrectionData a,
bool  sumErrors = true,
bool  addSh = true,
bool  addRot = 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 97 of file CTPPSRPAlignmentCorrectionsData.cc.

References rps_.

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

98 {
99  auto it = rps_.find( id );
100  if ( it == rps_.end() )
101  rps_.insert( mapType::value_type( id, a ) );
102  else
103  it->second.add( a, sumErrors, addSh, addRot );
104 }
mapType rps_
alignment correction maps
void CTPPSRPAlignmentCorrectionsData::addSensorCorrection ( unsigned int  id,
const CTPPSRPAlignmentCorrectionData a,
bool  sumErrors = true,
bool  addSh = true,
bool  addRot = true 
)

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

Definition at line 109 of file CTPPSRPAlignmentCorrectionsData.cc.

References sensors_.

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

110 {
111  auto it = sensors_.find( id );
112  if ( it == sensors_.end() )
113  sensors_.insert( mapType::value_type( id, a ) );
114  else
115  it->second.add( a, sumErrors, addSh, addRot );
116 }
void CTPPSRPAlignmentCorrectionsData::clear ( void  )
CTPPSRPAlignmentCorrectionData CTPPSRPAlignmentCorrectionsData::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 (strong correlation).

Definition at line 59 of file CTPPSRPAlignmentCorrectionsData.cc.

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

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

60 {
62 
63  // try to get alignment correction of the full RP
64  auto rpIt = rps_.find( CTPPSDetId( id ).getRPId() );
65  if ( rpIt != rps_.end() )
66  align_corr = rpIt->second;
67 
68  // try to get sensor alignment correction
69  auto sIt = sensors_.find( id );
70 
71  // merge the corrections
72  if ( sIt != sensors_.end() )
73  align_corr.add( sIt->second, useRPErrors );
74 
75  return align_corr;
76 }
mapType rps_
alignment correction maps
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:32
void add(const CTPPSRPAlignmentCorrectionData &, bool sumErrors=true, bool addSh=true, bool addRot=true)
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.
CTPPSRPAlignmentCorrectionData & CTPPSRPAlignmentCorrectionsData::getRPCorrection ( unsigned int  id)

returns the correction value from the RP map

Definition at line 19 of file CTPPSRPAlignmentCorrectionsData.cc.

References triggerObjects_cff::id, and rps_.

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

20 {
21  return rps_[id];
22 }
mapType rps_
alignment correction maps
CTPPSRPAlignmentCorrectionData CTPPSRPAlignmentCorrectionsData::getRPCorrection ( unsigned int  id) const

Definition at line 27 of file CTPPSRPAlignmentCorrectionsData.cc.

References rps_.

28 {
30  auto it = rps_.find( id );
31  if ( it != rps_.end() )
32  align_corr = it->second;
33  return align_corr;
34 }
mapType rps_
alignment correction maps
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.
const mapType& CTPPSRPAlignmentCorrectionsData::getRPMap ( ) const
inline

returns the map of RP alignment corrections

Definition at line 41 of file CTPPSRPAlignmentCorrectionsData.h.

References rps_.

Referenced by operator<<(), CTPPSGeometryESModule::produceGD(), and CTPPSRPAlignmentCorrectionsMethods::writeXMLBlock().

41 { return rps_; }
mapType rps_
alignment correction maps
CTPPSRPAlignmentCorrectionData & CTPPSRPAlignmentCorrectionsData::getSensorCorrection ( unsigned int  id)

returns the correction value from the sensor map

Definition at line 39 of file CTPPSRPAlignmentCorrectionsData.cc.

References triggerObjects_cff::id, and sensors_.

Referenced by getSensorMap().

CTPPSRPAlignmentCorrectionData CTPPSRPAlignmentCorrectionsData::getSensorCorrection ( unsigned int  id) const

Definition at line 47 of file CTPPSRPAlignmentCorrectionsData.cc.

References sensors_.

48 {
50  auto it = sensors_.find( id );
51  if ( it != sensors_.end() )
52  align_corr = it->second;
53  return align_corr;
54 }
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.
const mapType& CTPPSRPAlignmentCorrectionsData::getSensorMap ( ) const
inline
template<class Archive >
void CTPPSRPAlignmentCorrectionsData::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void CTPPSRPAlignmentCorrectionsData::setRPCorrection ( unsigned int  id,
const CTPPSRPAlignmentCorrectionData ac 
)

sets the alignment correction for the given RP

Definition at line 81 of file CTPPSRPAlignmentCorrectionsData.cc.

References triggerObjects_cff::id, and rps_.

Referenced by getSensorMap().

82 {
83  rps_[id] = ac;
84 }
mapType rps_
alignment correction maps
void CTPPSRPAlignmentCorrectionsData::setSensorCorrection ( unsigned int  id,
const CTPPSRPAlignmentCorrectionData ac 
)

sets the alignment correction for the given sensor

Definition at line 89 of file CTPPSRPAlignmentCorrectionsData.cc.

References triggerObjects_cff::id, and sensors_.

Referenced by getSensorMap().

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 80 of file CTPPSRPAlignmentCorrectionsData.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 80 of file CTPPSRPAlignmentCorrectionsData.h.

friend class StraightTrackAlignment
friend

Definition at line 35 of file CTPPSRPAlignmentCorrectionsData.h.

Member Data Documentation

mapType CTPPSRPAlignmentCorrectionsData::rps_
private
mapType CTPPSRPAlignmentCorrectionsData::sensors_
private