CMS 3D CMS Logo

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 
20 class AlignmentTask {
21 public:
22  // -------------------- config file parameters --------------------
23 
25  bool resolveShR;
26 
28  bool resolveShZ;
29 
31  bool resolveRotZ;
32 
34  bool oneRotZPerPot;
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 
64  qcRotZ,
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 
127  AlignmentTask() {}
128 
130  AlignmentTask(const edm::ParameterSet &ps);
131 };
132 
133 #endif
AlignmentTask::mapMeasurementIndeces
std::map< QuantityClass, std::map< DetIdDirIdxPair, unsigned int > > mapMeasurementIndeces
for each quantity class contains mapping (detector id, direction) --> measurement index
Definition: AlignmentTask.h:89
AlignmentTask::getQuantityIndex
signed int getQuantityIndex(QuantityClass cl, unsigned int detId) const
returns measurement index (if non-existent, returns -1)
Definition: AlignmentTask.cc:199
CTPPSGeometry
The manager class for TOTEM RP geometry.
Definition: CTPPSGeometry.h:29
AlignmentTask
Represents an alignment task.
Definition: AlignmentTask.h:19
AlignmentTask::qcShR1
detector shifts in first readout direction
Definition: AlignmentTask.h:60
AlignmentTask::DetIdDirIdxPair
Definition: AlignmentTask.h:72
AlignmentTask::buildEqualMeanUMeanVRotZConstraints
void buildEqualMeanUMeanVRotZConstraints(std::vector< AlignmentConstraint > &constraints) const
adds constraints such that only mean-U and mean-V RotZ are equal for each strip RP
Definition: AlignmentTask.cc:500
AlignmentTask::qcShZ
detector shifts in z
Definition: AlignmentTask.h:62
AlignmentTask::fixedDetectorsConstraints
edm::ParameterSet fixedDetectorsConstraints
fixed detectors constraints from config file
Definition: AlignmentTask.h:39
geometry
Definition: geometry.py:1
AlignmentTask::DetIdDirIdxPair::dirIdx
unsigned int dirIdx
Definition: AlignmentTask.h:74
AlignmentTask::quantityClassTag
std::string quantityClassTag(QuantityClass) const
returns a string tag for the given quantity class
Definition: AlignmentTask.cc:213
AlignmentTask::qcRotZ
detector rotations around z
Definition: AlignmentTask.h:63
AlignmentTask::buildIndexMaps
void buildIndexMaps()
builds "mapMatrixIndeces" from "geometry"
Definition: AlignmentTask.cc:93
AlignmentTask::buildFixedDetectorsConstraints
void buildFixedDetectorsConstraints(std::vector< AlignmentConstraint > &) const
builds a set of fixed-detector constraints
Definition: AlignmentTask.cc:250
AlignmentTask::QuantityClass
QuantityClass
quantity classes
Definition: AlignmentTask.h:59
AlignmentTask::DetIdDirIdxPair::detId
unsigned int detId
Definition: AlignmentTask.h:73
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
AlignmentTask::mapQuantityIndeces
std::map< QuantityClass, std::map< unsigned int, unsigned int > > mapQuantityIndeces
for each quantity class contains mapping detector id --> quantity index
Definition: AlignmentTask.h:92
trackingPlots.other
other
Definition: trackingPlots.py:1460
HLTMuonOfflineAnalyzer_cfi.z0
z0
Definition: HLTMuonOfflineAnalyzer_cfi.py:98
AlignmentGeometry.h
AlignmentTask::getMeasurementIndex
signed int getMeasurementIndex(QuantityClass cl, unsigned int detId, unsigned int dirIdx) const
returns measurement index (if non-existent, returns -1)
Definition: AlignmentTask.cc:185
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
AlignmentTask::DetIdDirIdxPair::operator<
bool operator<(const DetIdDirIdxPair &other) const
Definition: AlignmentTask.h:76
edm::ParameterSet
Definition: ParameterSet.h:47
AlignmentTask::resolveShR
bool resolveShR
whether to resolve detector shifts in readout direction(s)
Definition: AlignmentTask.h:24
AlignmentConstraint
An alignment constraint.
Definition: AlignmentConstraint.h:16
AlignmentTask::quantitiesOfClass
unsigned int quantitiesOfClass(QuantityClass) const
returns the number of quantities of the given class
Definition: AlignmentTask.cc:240
AlignmentTask::buildOneRotZPerPotConstraints
void buildOneRotZPerPotConstraints(std::vector< AlignmentConstraint > &) const
adds constraints such that only 1 rot_z per RP is left
Definition: AlignmentTask.cc:455
AlignmentTask::resolveShZ
bool resolveShZ
whether to resolve detector shifts in z
Definition: AlignmentTask.h:27
createBeamHaloJobs.constraints
string constraints
Definition: createBeamHaloJobs.py:229
AlignmentTask::resolveRotZ
bool resolveRotZ
whether to resolve detector rotations around z
Definition: AlignmentTask.h:30
AlignmentTask::buildStandardConstraints
void buildStandardConstraints(std::vector< AlignmentConstraint > &) const
builds the standard constraints
Definition: AlignmentTask.cc:307
AlignmentTask::buildGeometry
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
Definition: AlignmentTask.cc:49
AlignmentTask::oneRotZPerPot
bool oneRotZPerPot
whether to resolve only 1 rot_z per RP
Definition: AlignmentTask.h:33
AlignmentTask::quantityClasses
std::vector< QuantityClass > quantityClasses
list of quantity classes to be optimized
Definition: AlignmentTask.h:67
AlignmentGeometry
Definition: AlignmentGeometry.h:55
AlignmentTask::geometry
AlignmentGeometry geometry
the geometry for this task
Definition: AlignmentTask.h:47
AlignmentTask::AlignmentTask
AlignmentTask()
dummy constructor (not to be used)
Definition: AlignmentTask.h:126
AlignmentTask::measurementsOfClass
unsigned int measurementsOfClass(QuantityClass) const
returns the number of quantities of the given class
Definition: AlignmentTask.cc:230
ParameterSet.h
AlignmentTask::standardConstraints
edm::ParameterSet standardConstraints
settings of "standard" constraints from config file
Definition: AlignmentTask.h:42
AlignmentTask::useEqualMeanUMeanVRotZConstraints
bool useEqualMeanUMeanVRotZConstraints
whether to apply the constraint mean U = mean V RotZ for strips ("standard" set of constraints only)
Definition: AlignmentTask.h:36
AlignmentTask::qcShR2
detector shifts in second readout direction
Definition: AlignmentTask.h:61