CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AlignmentTask.h
Go to the documentation of this file.
1 /****************************************************************************
2 * Authors:
3 * Jan Kašpar (jan.kaspar@gmail.com)
4 ****************************************************************************/
5 
6 #ifndef CalibPPS_AlignmentRelative_AlignmentTask_h
7 #define CalibPPS_AlignmentRelative_AlignmentTask_h
8 
10 
13 class CTPPSGeometry;
14 
15 #include <vector>
16 
21 public:
22  // -------------------- config file parameters --------------------
23 
25  bool resolveShR;
26 
28  bool resolveShZ;
29 
32 
35 
38 
41 
44 
45  // -------------------- geometry-related members --------------------
46 
49 
51  static void buildGeometry(const std::vector<unsigned int> &rpDecIds,
52  const std::vector<unsigned int> &excludedSensors,
53  const CTPPSGeometry *,
54  double z0,
56 
57  // -------------------- quantity-class-related members --------------------
58 
65  };
66 
68  std::vector<QuantityClass> quantityClasses;
69 
72 
73  struct DetIdDirIdxPair {
74  unsigned int detId;
75  unsigned int dirIdx;
76 
77  bool operator<(const DetIdDirIdxPair &other) const {
78  if (detId < other.detId)
79  return true;
80  if (detId > other.detId)
81  return false;
82  if (dirIdx < other.dirIdx)
83  return true;
84 
85  return false;
86  }
87  };
88 
90  std::map<QuantityClass, std::map<DetIdDirIdxPair, unsigned int>> mapMeasurementIndeces;
91 
93  std::map<QuantityClass, std::map<unsigned int, unsigned int>> mapQuantityIndeces;
94 
96  void buildIndexMaps();
97 
99  unsigned int measurementsOfClass(QuantityClass) const;
100 
102  unsigned int quantitiesOfClass(QuantityClass) const;
103 
105  signed int getMeasurementIndex(QuantityClass cl, unsigned int detId, unsigned int dirIdx) const;
106 
108  signed int getQuantityIndex(QuantityClass cl, unsigned int detId) const;
109 
110  // -------------------- constraint-related members --------------------
111 
113  void buildFixedDetectorsConstraints(std::vector<AlignmentConstraint> &) const;
114 
116  void buildStandardConstraints(std::vector<AlignmentConstraint> &) const;
117 
119  void buildOneRotZPerPotConstraints(std::vector<AlignmentConstraint> &) const;
120 
122  void buildEqualMeanUMeanVRotZConstraints(std::vector<AlignmentConstraint> &constraints) const;
123 
124  // -------------------- constructors --------------------
125 
128 
130  AlignmentTask(const edm::ParameterSet &ps);
131 };
132 
133 #endif
void buildFixedDetectorsConstraints(std::vector< AlignmentConstraint > &) const
builds a set of fixed-detector constraints
void buildStandardConstraints(std::vector< AlignmentConstraint > &) const
builds the standard constraints
std::map< QuantityClass, std::map< DetIdDirIdxPair, unsigned int > > mapMeasurementIndeces
for each quantity class contains mapping (detector id, direction) –&gt; measurement index ...
Definition: AlignmentTask.h:90
bool resolveShZ
whether to resolve detector shifts in z
Definition: AlignmentTask.h:28
void buildOneRotZPerPotConstraints(std::vector< AlignmentConstraint > &) const
adds constraints such that only 1 rot_z per RP is left
AlignmentTask()
dummy constructor (not to be used)
std::vector< QuantityClass > quantityClasses
list of quantity classes to be optimized
Definition: AlignmentTask.h:68
void buildIndexMaps()
builds &quot;mapMatrixIndeces&quot; from &quot;geometry&quot;
signed int getMeasurementIndex(QuantityClass cl, unsigned int detId, unsigned int dirIdx) const
returns measurement index (if non-existent, returns -1)
tuple cl
Definition: haddnano.py:49
static void buildGeometry(const std::vector< unsigned int > &rpDecIds, const std::vector< unsigned int > &excludedSensors, const CTPPSGeometry *, double z0, AlignmentGeometry &geometry)
builds the alignment geometry
edm::ParameterSet fixedDetectorsConstraints
fixed detectors constraints from config file
Definition: AlignmentTask.h:40
bool resolveRotZ
whether to resolve detector rotations around z
Definition: AlignmentTask.h:31
Represents an alignment task.
Definition: AlignmentTask.h:20
void buildEqualMeanUMeanVRotZConstraints(std::vector< AlignmentConstraint > &constraints) const
adds constraints such that only mean-U and mean-V RotZ are equal for each strip RP ...
detector shifts in first readout direction
Definition: AlignmentTask.h:61
AlignmentGeometry geometry
the geometry for this task
Definition: AlignmentTask.h:48
An alignment constraint.
unsigned int quantitiesOfClass(QuantityClass) const
returns the number of quantities of the given class
unsigned int measurementsOfClass(QuantityClass) const
returns the number of quantities of the given class
std::string quantityClassTag(QuantityClass) const
returns a string tag for the given quantity class
bool oneRotZPerPot
whether to resolve only 1 rot_z per RP
Definition: AlignmentTask.h:34
bool operator<(const DetIdDirIdxPair &other) const
Definition: AlignmentTask.h:77
The manager class for TOTEM RP geometry.
Definition: CTPPSGeometry.h:30
detector shifts in second readout direction
Definition: AlignmentTask.h:62
QuantityClass
quantity classes
Definition: AlignmentTask.h:60
bool useEqualMeanUMeanVRotZConstraints
whether to apply the constraint mean U = mean V RotZ for strips (&quot;standard&quot; set of constraints only) ...
Definition: AlignmentTask.h:37
bool resolveShR
whether to resolve detector shifts in readout direction(s)
Definition: AlignmentTask.h:25
detector rotations around z
Definition: AlignmentTask.h:64
std::map< QuantityClass, std::map< unsigned int, unsigned int > > mapQuantityIndeces
for each quantity class contains mapping detector id –&gt; quantity index
Definition: AlignmentTask.h:93
signed int getQuantityIndex(QuantityClass cl, unsigned int detId) const
returns measurement index (if non-existent, returns -1)
detector shifts in z
Definition: AlignmentTask.h:63
edm::ParameterSet standardConstraints
settings of &quot;standard&quot; constraints from config file
Definition: AlignmentTask.h:43