CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
CTPPSRPAlignmentCorrectionData
mapType
 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 28 of file CTPPSRPAlignmentCorrectionsData.h.

Constructor & Destructor Documentation

CTPPSRPAlignmentCorrectionsData::CTPPSRPAlignmentCorrectionsData ( )
inline

Definition at line 37 of file CTPPSRPAlignmentCorrectionsData.h.

37 {}

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 102 of file CTPPSRPAlignmentCorrectionsData.cc.

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

Referenced by PPSAlignmentHarvester::dqmEndRun(), StraightTrackAlignment::finish(), and CTPPSRPAlignmentCorrectionsDataESSourceXMLCommon::Merge().

105  {
106  for (const auto& it : nac.rps_)
107  addRPCorrection(it.first, it.second, sumErrors, addSh, addRot);
108 
109  for (const auto& it : nac.sensors_)
110  addSensorCorrection(it.first, it.second, sumErrors, addSh, addRot);
111 }
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 80 of file CTPPSRPAlignmentCorrectionsData.cc.

References rps_.

Referenced by addCorrections(), PPSAlignmentHarvester::dqmEndRun(), factorRPFromSensorCorrections(), and CTPPSRPAlignmentCorrectionsMethods::getCorrectionsData().

81  {
82  auto it = rps_.find(id);
83  if (it == rps_.end())
84  rps_.insert(mapType::value_type(id, a));
85  else
86  it->second.add(a, sumErrors, addSh, addRot);
87 }
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 91 of file CTPPSRPAlignmentCorrectionsData.cc.

References sensors_.

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

92  {
93  auto it = sensors_.find(id);
94  if (it == sensors_.end())
95  sensors_.insert(mapType::value_type(id, a));
96  else
97  it->second.add(a, sumErrors, addSh, addRot);
98 }
void CTPPSRPAlignmentCorrectionsData::clear ( void  )

clears all alignments

Definition at line 115 of file CTPPSRPAlignmentCorrectionsData.cc.

References rps_, and sensors_.

Referenced by factorRPFromSensorCorrections(), and BeautifulSoup.Tag::setString().

115  {
116  rps_.clear();
117  sensors_.clear();
118 }
mapType rps_
alignment correction maps
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 48 of file CTPPSRPAlignmentCorrectionsData.cc.

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

Referenced by CTPPSGeometryESCommon::applyAlignments(), and factorRPFromSensorCorrections().

49  {
50  // by default empty correction
52 
53  // if found, add sensor correction (with its uncertainty)
54  auto sIt = sensors_.find(id);
55  if (sIt != sensors_.end())
56  align_corr.add(sIt->second, true);
57 
58  // if found, add RP correction (depending on the flag, with or without its uncertainty)
59  auto rpIt = rps_.find(CTPPSDetId(id).rpId());
60  if (rpIt != rps_.end())
61  align_corr.add(rpIt->second, useRPErrors);
62 
63  return align_corr;
64 }
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 18 of file CTPPSRPAlignmentCorrectionsData.cc.

References gpuClustering::id, and rps_.

Referenced by CTPPSGeometryESCommon::applyAlignments(), and PPSAlignmentHarvester::dqmEndRun().

18 { return rps_[id]; }
uint16_t *__restrict__ id
mapType rps_
alignment correction maps
CTPPSRPAlignmentCorrectionData CTPPSRPAlignmentCorrectionsData::getRPCorrection ( unsigned int  id) const

Definition at line 22 of file CTPPSRPAlignmentCorrectionsData.cc.

References rps_.

22  {
24  auto it = rps_.find(id);
25  if (it != rps_.end())
26  align_corr = it->second;
27  return align_corr;
28 }
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 40 of file CTPPSRPAlignmentCorrectionsData.h.

References rps_.

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

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

returns the correction value from the sensor map

Definition at line 32 of file CTPPSRPAlignmentCorrectionsData.cc.

References gpuClustering::id, and sensors_.

32  {
33  return sensors_[id];
34 }
uint16_t *__restrict__ id
CTPPSRPAlignmentCorrectionData CTPPSRPAlignmentCorrectionsData::getSensorCorrection ( unsigned int  id) const

Definition at line 38 of file CTPPSRPAlignmentCorrectionsData.cc.

References sensors_.

38  {
40  auto it = sensors_.find(id);
41  if (it != sensors_.end())
42  align_corr = it->second;
43  return align_corr;
44 }
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 68 of file CTPPSRPAlignmentCorrectionsData.cc.

References gpuClustering::id, and rps_.

Referenced by PPSAlignmentHarvester::xAlignment(), PPSAlignmentHarvester::xAlignmentRelative(), and PPSAlignmentHarvester::yAlignment().

68  {
69  rps_[id] = ac;
70 }
uint16_t *__restrict__ id
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 74 of file CTPPSRPAlignmentCorrectionsData.cc.

References gpuClustering::id, and sensors_.

Referenced by PPSModifySingularModes::beginRun(), factorRPFromSensorCorrections(), and StraightTrackAlignment::finish().

74  {
75  sensors_[id] = ac;
76 }
uint16_t *__restrict__ id

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 90 of file CTPPSRPAlignmentCorrectionsData.h.

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

Definition at line 90 of file CTPPSRPAlignmentCorrectionsData.h.

friend class StraightTrackAlignment
friend

Definition at line 34 of file CTPPSRPAlignmentCorrectionsData.h.

Member Data Documentation

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