CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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,
RPAlignmentCorrectionData
mapType
 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 30 of file RPAlignmentCorrectionsData.h.

Member Typedef Documentation

map: element id -> its alignment correction

Definition at line 34 of file RPAlignmentCorrectionsData.h.

Constructor & Destructor Documentation

RPAlignmentCorrectionsData::RPAlignmentCorrectionsData ( )
inline

Definition at line 43 of file RPAlignmentCorrectionsData.h.

43 {}

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 114 of file RPAlignmentCorrectionsData.cc.

References rps, and sensors.

116 {
117  for (mapType::const_iterator it = nac.rps.begin(); it != nac.rps.end(); ++it)
118  AddRPCorrection(it->first, it->second, sumErrors, addShR, addShZ, addRotZ);
119 
120  for (mapType::const_iterator it = nac.sensors.begin(); it != nac.sensors.end(); ++it)
121  AddSensorCorrection(it->first, it->second, sumErrors, addShR, addShZ, addRotZ);
122 }
mapType rps
alignment correction maps
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
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 90 of file RPAlignmentCorrectionsData.cc.

Referenced by RPAlignmentCorrectionsMethods::GetCorrectionsData().

92 {
93  mapType::iterator it = rps.find(id);
94  if (it == rps.end())
95  rps.insert(mapType::value_type(id, a));
96  else
97  it->second.add(a, sumErrors, addShR, addShZ, addRotZ);
98 }
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 102 of file RPAlignmentCorrectionsData.cc.

Referenced by RPAlignmentCorrectionsMethods::GetCorrectionsData().

104 {
105  mapType::iterator it = sensors.find(id);
106  if (it == sensors.end())
107  sensors.insert(mapType::value_type(id, a));
108  else
109  it->second.add(a, sumErrors, addShR, addShZ, addRotZ);
110 }
void RPAlignmentCorrectionsData::Clear ( )

clears all alignments

Definition at line 126 of file RPAlignmentCorrectionsData.cc.

127 {
128  rps.clear();
129  sensors.clear();
130 }
mapType rps
alignment correction maps
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 57 of file RPAlignmentCorrectionsData.cc.

References RPAlignmentCorrectionData::add(), and EnergyCorrector::c.

59 {
61  mapType::const_iterator it = rps.find(id / 10);
62  if (it != rps.end())
63  c = it->second;
64  it = sensors.find(id);
65  if (it != sensors.end())
66  c.add(it->second, useRPErrors);
67 
68  //printf("> full correction %u | ", id);
69  //c.print();
70 
71  return c;
72 }
mapType rps
alignment correction maps
Alignment correction or result of alignment procedure for a single RP sensor. Within the geometry des...
void add(const RPAlignmentCorrectionData &, bool sumErrors=true, bool addShR=true, bool addShZ=true, bool addRotZ=true)
RPAlignmentCorrectionData & RPAlignmentCorrectionsData::GetRPCorrection ( unsigned int  id)

returns the correction value from the RP map

Definition at line 23 of file RPAlignmentCorrectionsData.cc.

24 {
25  return rps[id];
26 }
mapType rps
alignment correction maps
RPAlignmentCorrectionData RPAlignmentCorrectionsData::GetRPCorrection ( unsigned int  id) const

Definition at line 30 of file RPAlignmentCorrectionsData.cc.

References a.

31 {
33  mapType::const_iterator it = rps.find(id);
34  if (it != rps.end())
35  a = it->second;
36  return a;
37 }
mapType rps
alignment correction maps
Alignment correction or result of alignment procedure for a single RP sensor. Within the geometry des...
double a
Definition: hdecay.h:121
const mapType& RPAlignmentCorrectionsData::GetRPMap ( ) const
inline

returns the map of RP alignment corrections

Definition at line 46 of file RPAlignmentCorrectionsData.h.

References rps.

Referenced by RPAlignmentCorrectionsMethods::WriteXMLBlock().

47  { 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.

42 {
43  return sensors[id];
44 }
RPAlignmentCorrectionData RPAlignmentCorrectionsData::GetSensorCorrection ( unsigned int  id) const

Definition at line 46 of file RPAlignmentCorrectionsData.cc.

References a.

47 {
49  mapType::const_iterator it = sensors.find(id);
50  if (it != sensors.end())
51  a = it->second;
52  return a;
53 }
Alignment correction or result of alignment procedure for a single RP sensor. Within the geometry des...
double a
Definition: hdecay.h:121
const mapType& RPAlignmentCorrectionsData::GetSensorMap ( ) const
inline

returns the map of sensor alignment corrections

Definition at line 50 of file RPAlignmentCorrectionsData.h.

References sensors.

Referenced by RPAlignmentCorrectionsMethods::WriteXMLBlock().

void RPAlignmentCorrectionsData::SetRPCorrection ( unsigned int  id,
const RPAlignmentCorrectionData ac 
)

sets the alignment correction for the given RP

Definition at line 76 of file RPAlignmentCorrectionsData.cc.

77 {
78  rps[id] = ac;
79 }
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 83 of file RPAlignmentCorrectionsData.cc.

84 {
85  sensors[id] = ac;
86 }

Friends And Related Function Documentation

friend class StraightTrackAlignment
friend

Definition at line 40 of file RPAlignmentCorrectionsData.h.

Member Data Documentation

mapType RPAlignmentCorrectionsData::rps
private

alignment correction maps

Definition at line 38 of file RPAlignmentCorrectionsData.h.

Referenced by AddCorrections(), and GetRPMap().

mapType RPAlignmentCorrectionsData::sensors
private

Definition at line 38 of file RPAlignmentCorrectionsData.h.

Referenced by AddCorrections(), and GetSensorMap().