CMS 3D CMS Logo

AlignmentParameterSelector.h
Go to the documentation of this file.
1 #ifndef ALIGNMENTPARAMETERSELECTOR_H
2 #define ALIGNMENTPARAMETERSELECTOR_H
3 
17 
18 class AlignableExtras;
19 class AlignableTracker;
20 class AlignableMuon;
21 
22 namespace edm {
23  class ParameterSet;
24 }
25 
27 public:
29  explicit AlignmentParameterSelector(AlignableTracker *aliTracker,
30  AlignableMuon *aliMuon = nullptr,
31  AlignableExtras *aliExtras = nullptr);
32 
35 
39  const std::vector<std::vector<char> > &selectedParameters() const { return theSelectedParameters; }
41  void clear();
43  void clearGeometryCuts();
44 
53  unsigned int addSelections(const edm::ParameterSet &pSet);
57  void setGeometryCuts(const edm::ParameterSet &pSet);
60  unsigned int addSelection(const std::string &name, const std::vector<char> &paramSel);
62  unsigned int addSelection(const std::string &name, const std::vector<char> &paramSel, const edm::ParameterSet &pSet);
64  bool layerDeselected(const Alignable *alignable) const;
66  bool detUnitDeselected(const Alignable *alignable) const;
68  bool outsideGeometricalRanges(const Alignable *alignable) const;
70  bool outsideDetIdRanges(const Alignable *alignable) const;
75  template <typename T>
76  bool insideRanges(T value, const std::vector<T> &ranges, bool isPhi = false) const;
78  bool isMemberOfVector(int value, const std::vector<int> &values) const;
80  std::vector<std::string> decompose(const std::string &s, std::string::value_type delimiter) const;
82  std::vector<char> convertParamSel(const std::string &selString) const;
83 
84 protected:
86  unsigned int add(const align::Alignables &alignables, const std::vector<char> &paramSel);
88  unsigned int addAllDets(const std::vector<char> &paramSel);
89  unsigned int addAllRods(const std::vector<char> &paramSel);
90  unsigned int addAllLayers(const std::vector<char> &paramSel);
91  unsigned int addAllAlignables(const std::vector<char> &paramSel);
92 
93  void setPXBDetIdCuts(const edm::ParameterSet &pSet);
94  void setPXFDetIdCuts(const edm::ParameterSet &pSet);
95  void setTIBDetIdCuts(const edm::ParameterSet &pSet);
96  void setTIDDetIdCuts(const edm::ParameterSet &pSet);
97  void setTOBDetIdCuts(const edm::ParameterSet &pSet);
98  void setTECDetIdCuts(const edm::ParameterSet &pSet);
99 
100  const AlignableTracker *alignableTracker() const;
101 
102 private:
107  std::vector<std::vector<char> > theSelectedParameters;
108 
110  std::vector<double> theRangesEta;
111  std::vector<double> theRangesPhi;
112  std::vector<double> theRangesR;
113  std::vector<double> theRangesX;
114  std::vector<double> theRangesY;
115  std::vector<double> theRangesZ;
116 
118  std::vector<int> theDetIds;
119  std::vector<int> theDetIdRanges;
120  std::vector<int> theExcludedDetIds;
121  std::vector<int> theExcludedDetIdRanges;
122  struct PXBDetIdRanges {
123  std::vector<int> theLadderRanges;
124  std::vector<int> theLayerRanges;
125  std::vector<int> theModuleRanges;
126  void clear() {
127  theLadderRanges.clear();
128  theLayerRanges.clear();
129  theModuleRanges.clear();
130  }
132  struct PXFDetIdRanges {
133  std::vector<int> theBladeRanges;
134  std::vector<int> theDiskRanges;
135  std::vector<int> theModuleRanges;
136  std::vector<int> thePanelRanges;
137  std::vector<int> theSideRanges;
138  void clear() {
139  theBladeRanges.clear();
140  theDiskRanges.clear();
141  theModuleRanges.clear();
142  thePanelRanges.clear();
143  theSideRanges.clear();
144  }
146  struct TIBDetIdRanges {
147  std::vector<int> theLayerRanges;
148  std::vector<int> theModuleRanges;
149  std::vector<int> theStringRanges;
150  std::vector<int> theSideRanges;
151  void clear() {
152  theLayerRanges.clear();
153  theModuleRanges.clear();
154  theSideRanges.clear();
155  theStringRanges.clear();
156  }
158  struct TIDDetIdRanges {
159  std::vector<int> theDiskRanges;
160  std::vector<int> theModuleRanges;
161  std::vector<int> theRingRanges;
162  std::vector<int> theSideRanges;
163  void clear() {
164  theDiskRanges.clear();
165  theModuleRanges.clear();
166  theRingRanges.clear();
167  theSideRanges.clear();
168  }
170  struct TOBDetIdRanges {
171  std::vector<int> theLayerRanges;
172  std::vector<int> theModuleRanges;
173  std::vector<int> theRodRanges;
174  std::vector<int> theSideRanges;
175  void clear() {
176  theLayerRanges.clear();
177  theModuleRanges.clear();
178  theRodRanges.clear();
179  theSideRanges.clear();
180  }
182  struct TECDetIdRanges {
183  std::vector<int> theWheelRanges;
184  std::vector<int> thePetalRanges;
185  std::vector<int> theModuleRanges;
186  std::vector<int> theRingRanges;
187  std::vector<int> theSideRanges;
188  void clear() {
189  theWheelRanges.clear();
190  thePetalRanges.clear();
191  theModuleRanges.clear();
192  theRingRanges.clear();
193  theSideRanges.clear();
194  }
196 
197  // further switches used in add(...)
198  bool theOnlyDS;
199  bool theOnlySS;
213 };
214 
215 template <>
216 bool AlignmentParameterSelector::insideRanges<int>(int value, const std::vector<int> &ranges, bool isPhi) const;
217 
218 #endif
diffTwoXMLs.ranges
string ranges
Definition: diffTwoXMLs.py:79
AlignmentParameterSelector::PXBDetIdRanges
Definition: AlignmentParameterSelector.h:122
AlignmentParameterSelector::add
unsigned int add(const align::Alignables &alignables, const std::vector< char > &paramSel)
adding alignables which fulfil geometrical restrictions and special switches
Definition: AlignmentParameterSelector.cc:522
AlignmentParameterSelector::TOBDetIdRanges::theRodRanges
std::vector< int > theRodRanges
Definition: AlignmentParameterSelector.h:173
AlignmentParameterSelector::decompose
std::vector< std::string > decompose(const std::string &s, std::string::value_type delimiter) const
Decomposing input string 's' into parts separated by 'delimiter'.
Definition: AlignmentParameterSelector.cc:776
AlignmentParameterSelector::addAllAlignables
unsigned int addAllAlignables(const std::vector< char > &paramSel)
Definition: AlignmentParameterSelector.cc:910
AlignmentParameterSelector::TIBDetIdRanges
Definition: AlignmentParameterSelector.h:146
AlignmentParameterSelector::PXFDetIdRanges::clear
void clear()
Definition: AlignmentParameterSelector.h:138
AlignmentParameterSelector::Rphi
Definition: AlignmentParameterSelector.h:203
AlignmentParameterSelector::theExcludedDetIdRanges
std::vector< int > theExcludedDetIdRanges
Definition: AlignmentParameterSelector.h:121
makeHLTPrescaleTable.delimiter
delimiter
Definition: makeHLTPrescaleTable.py:181
AlignmentParameterSelector::Stereo
Definition: AlignmentParameterSelector.h:203
AlignmentParameterSelector::theSelLayers
bool theSelLayers
Definition: AlignmentParameterSelector.h:200
edm
HLT enums.
Definition: AlignableModifier.h:19
AlignmentParameterSelector::theOnlyDS
bool theOnlyDS
Definition: AlignmentParameterSelector.h:198
AlignmentParameterSelector::addAllRods
unsigned int addAllRods(const std::vector< char > &paramSel)
Definition: AlignmentParameterSelector.cc:884
Alignable
Definition: Alignable.h:27
AlignmentParameterSelector::theOnlySS
bool theOnlySS
Definition: AlignmentParameterSelector.h:199
AlignmentParameterSelector::PXFDetIdRanges::theBladeRanges
std::vector< int > theBladeRanges
Definition: AlignmentParameterSelector.h:133
AlignmentParameterSelector::TECDetIdRanges::theModuleRanges
std::vector< int > theModuleRanges
Definition: AlignmentParameterSelector.h:185
AlignmentParameterSelector::PXBDetIdRanges::theLadderRanges
std::vector< int > theLadderRanges
Definition: AlignmentParameterSelector.h:123
AlignmentParameterSelector::TIBDetIdRanges::theLayerRanges
std::vector< int > theLayerRanges
Definition: AlignmentParameterSelector.h:147
AlignmentParameterSelector::theExtras
AlignableExtras * theExtras
Definition: AlignmentParameterSelector.h:105
AlignmentParameterSelector::TIBDetIdRanges::clear
void clear()
Definition: AlignmentParameterSelector.h:151
AlignmentParameterSelector::PXBDetIdRanges::clear
void clear()
Definition: AlignmentParameterSelector.h:126
AlignmentParameterSelector::TOBDetIdRanges::theModuleRanges
std::vector< int > theModuleRanges
Definition: AlignmentParameterSelector.h:172
AlignmentParameterSelector::theExcludedDetIds
std::vector< int > theExcludedDetIds
Definition: AlignmentParameterSelector.h:120
AlignmentParameterSelector::TIDDetIdRanges::theDiskRanges
std::vector< int > theDiskRanges
Definition: AlignmentParameterSelector.h:159
AlignmentParameterSelector::theDetIdRanges
std::vector< int > theDetIdRanges
Definition: AlignmentParameterSelector.h:119
AlignmentParameterSelector::theMuon
AlignableMuon * theMuon
Definition: AlignmentParameterSelector.h:104
AlignmentParameterSelector::thePXFDetIdRanges
struct AlignmentParameterSelector::PXFDetIdRanges thePXFDetIdRanges
AlignmentParameterSelector::Both
Definition: AlignmentParameterSelector.h:203
AlignmentParameterSelector::selectedAlignables
const align::Alignables & selectedAlignables() const
vector of alignables selected so far
Definition: AlignmentParameterSelector.h:37
AlignmentParameterSelector::~AlignmentParameterSelector
virtual ~AlignmentParameterSelector()
Destructor.
Definition: AlignmentParameterSelector.h:34
AlignmentParameterSelector::PXFDetIdRanges::theSideRanges
std::vector< int > theSideRanges
Definition: AlignmentParameterSelector.h:137
AlignmentParameterSelector::setTECDetIdCuts
void setTECDetIdCuts(const edm::ParameterSet &pSet)
Definition: AlignmentParameterSelector.cc:277
AlignmentParameterSelector::selectedParameters
const std::vector< std::vector< char > > & selectedParameters() const
vector of selection 'strings' for alignables, parallel to selectedAlignables()
Definition: AlignmentParameterSelector.h:39
AlignmentParameterSelector::TECDetIdRanges::theRingRanges
std::vector< int > theRingRanges
Definition: AlignmentParameterSelector.h:186
AlignmentParameterSelector::theMaxLayer
int theMaxLayer
Definition: AlignmentParameterSelector.h:202
AlignmentParameterSelector::outsideGeometricalRanges
bool outsideGeometricalRanges(const Alignable *alignable) const
true if geometrical restrictions in eta, phi, r, x, y, z not satisfied
Definition: AlignmentParameterSelector.cc:586
AlignmentParameterSelector::setPXFDetIdCuts
void setPXFDetIdCuts(const edm::ParameterSet &pSet)
Definition: AlignmentParameterSelector.cc:175
alignCSCRings.s
s
Definition: alignCSCRings.py:92
AlignmentParameterSelector::convertParamSel
std::vector< char > convertParamSel(const std::string &selString) const
Converting std::string into std::vector<char>
Definition: AlignmentParameterSelector.cc:795
AlignmentParameterSelector::isMemberOfVector
bool isMemberOfVector(int value, const std::vector< int > &values) const
true if value is member of vector of values
Definition: AlignmentParameterSelector.cc:769
AlignmentParameterSelector::TOBDetIdRanges::theLayerRanges
std::vector< int > theLayerRanges
Definition: AlignmentParameterSelector.h:171
AlignmentParameterSelector::setSpecials
std::string setSpecials(const std::string &name)
Definition: AlignmentParameterSelector.cc:811
AlignmentParameterSelector::TOBDetIdRanges::clear
void clear()
Definition: AlignmentParameterSelector.h:175
AlignmentParameterSelector::TECDetIdRanges::theSideRanges
std::vector< int > theSideRanges
Definition: AlignmentParameterSelector.h:187
AlignmentParameterSelector::PXBDetIdRanges::theLayerRanges
std::vector< int > theLayerRanges
Definition: AlignmentParameterSelector.h:124
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
AlignmentParameterSelector::TIBDetIdRanges::theModuleRanges
std::vector< int > theModuleRanges
Definition: AlignmentParameterSelector.h:148
AlignmentParameterSelector::thePXBDetIdRanges
struct AlignmentParameterSelector::PXBDetIdRanges thePXBDetIdRanges
AlignmentParameterSelector::TIBDetIdRanges::theSideRanges
std::vector< int > theSideRanges
Definition: AlignmentParameterSelector.h:150
AlignableTracker
Definition: AlignableTracker.h:17
AlignmentParameterSelector::clear
void clear()
remove all selected Alignables and geometrical restrictions
Definition: AlignmentParameterSelector.cc:41
AlignableExtras
Definition: AlignableExtras.h:19
AlignmentParameterSelector::TIDDetIdRanges::clear
void clear()
Definition: AlignmentParameterSelector.h:163
AlignmentParameterSelector::PXFDetIdRanges::theModuleRanges
std::vector< int > theModuleRanges
Definition: AlignmentParameterSelector.h:135
AlignmentParameterSelector::TECDetIdRanges
Definition: AlignmentParameterSelector.h:182
AlignmentParameterSelector::PXBDetIdRanges::theModuleRanges
std::vector< int > theModuleRanges
Definition: AlignmentParameterSelector.h:125
AlignmentParameterSelector::TECDetIdRanges::thePetalRanges
std::vector< int > thePetalRanges
Definition: AlignmentParameterSelector.h:184
AlignmentParameterSelector::theSelectedAlignables
align::Alignables theSelectedAlignables
Definition: AlignmentParameterSelector.h:106
AlignmentParameterSelector::theTECDetIdRanges
struct AlignmentParameterSelector::TECDetIdRanges theTECDetIdRanges
AlignmentParameterSelector::theTOBDetIdRanges
struct AlignmentParameterSelector::TOBDetIdRanges theTOBDetIdRanges
AlignmentParameterSelector::theRphiOrStereoDetUnit
RphiOrStereoDetUnit theRphiOrStereoDetUnit
Definition: AlignmentParameterSelector.h:204
edm::ParameterSet
Definition: ParameterSet.h:47
AlignmentParameterSelector::theTIDDetIdRanges
struct AlignmentParameterSelector::TIDDetIdRanges theTIDDetIdRanges
AlignmentParameterSelector::layerDeselected
bool layerDeselected(const Alignable *alignable) const
true if layer is deselected via "Layers<N><M>" or "DS/SS"
Definition: AlignmentParameterSelector.cc:542
AlignmentParameterSelector::TOBDetIdRanges
Definition: AlignmentParameterSelector.h:170
ParameterSet
Definition: Functions.h:16
AlignmentParameterSelector::alignableTracker
const AlignableTracker * alignableTracker() const
Definition: AlignmentParameterSelector.cc:64
AlignableMuon
Constructor of the full muon geometry.
Definition: AlignableMuon.h:38
value
Definition: value.py:1
AlignmentParameterSelector::detUnitDeselected
bool detUnitDeselected(const Alignable *alignable) const
true if alignable is DetUnit deselected by Unit<Rphi/Stereo> selection
Definition: AlignmentParameterSelector.cc:569
AlignmentParameterSelector::theMinLayer
int theMinLayer
Definition: AlignmentParameterSelector.h:201
Utilities.h
AlignmentParameterSelector::theRangesEta
std::vector< double > theRangesEta
geometrical restrictions in eta, phi, r, x, y, z to be applied for next addSelection
Definition: AlignmentParameterSelector.h:110
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
AlignmentParameterSelector::theRangesX
std::vector< double > theRangesX
Definition: AlignmentParameterSelector.h:113
AlignmentParameterSelector::theRangesZ
std::vector< double > theRangesZ
Definition: AlignmentParameterSelector.h:115
AlignmentParameterSelector::addSelection
unsigned int addSelection(const std::string &name, const std::vector< char > &paramSel)
Definition: AlignmentParameterSelector.cc:312
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
AlignmentParameterSelector::TIDDetIdRanges::theModuleRanges
std::vector< int > theModuleRanges
Definition: AlignmentParameterSelector.h:160
AlignmentParameterSelector::setGeometryCuts
void setGeometryCuts(const edm::ParameterSet &pSet)
Definition: AlignmentParameterSelector.cc:96
AlignmentParameterSelector::theRangesY
std::vector< double > theRangesY
Definition: AlignmentParameterSelector.h:114
AlignmentParameterSelector::TIDDetIdRanges::theRingRanges
std::vector< int > theRingRanges
Definition: AlignmentParameterSelector.h:161
align::Alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
AlignmentParameterSelector::theTIBDetIdRanges
struct AlignmentParameterSelector::TIBDetIdRanges theTIBDetIdRanges
AlignmentParameterSelector::TECDetIdRanges::theWheelRanges
std::vector< int > theWheelRanges
Definition: AlignmentParameterSelector.h:183
AlignmentParameterSelector::addSelections
unsigned int addSelections(const edm::ParameterSet &pSet)
Definition: AlignmentParameterSelector.cc:67
AlignmentParameterSelector::theRangesR
std::vector< double > theRangesR
Definition: AlignmentParameterSelector.h:112
T
long double T
Definition: Basic3DVectorLD.h:48
AlignmentParameterSelector::TIDDetIdRanges::theSideRanges
std::vector< int > theSideRanges
Definition: AlignmentParameterSelector.h:162
AlignmentParameterSelector::TOBDetIdRanges::theSideRanges
std::vector< int > theSideRanges
Definition: AlignmentParameterSelector.h:174
AlignmentParameterSelector::theSelectedParameters
std::vector< std::vector< char > > theSelectedParameters
Definition: AlignmentParameterSelector.h:107
AlignmentParameterSelector::addAllDets
unsigned int addAllDets(const std::vector< char > &paramSel)
some helper methods
Definition: AlignmentParameterSelector.cc:871
AlignmentParameterSelector::PXFDetIdRanges::theDiskRanges
std::vector< int > theDiskRanges
Definition: AlignmentParameterSelector.h:134
AlignmentParameterSelector::clearGeometryCuts
void clearGeometryCuts()
remove all geometrical restrictions
Definition: AlignmentParameterSelector.cc:48
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
AlignmentParameterSelector::setTOBDetIdCuts
void setTOBDetIdCuts(const edm::ParameterSet &pSet)
Definition: AlignmentParameterSelector.cc:252
AlignmentParameterSelector::PXFDetIdRanges::thePanelRanges
std::vector< int > thePanelRanges
Definition: AlignmentParameterSelector.h:136
AlignmentParameterSelector::PXFDetIdRanges
Definition: AlignmentParameterSelector.h:132
AlignmentParameterSelector::addAllLayers
unsigned int addAllLayers(const std::vector< char > &paramSel)
Definition: AlignmentParameterSelector.cc:897
AlignmentParameterSelector::setPXBDetIdCuts
void setPXBDetIdCuts(const edm::ParameterSet &pSet)
Definition: AlignmentParameterSelector.cc:152
AlignmentParameterSelector::TIBDetIdRanges::theStringRanges
std::vector< int > theStringRanges
Definition: AlignmentParameterSelector.h:149
AlignmentParameterSelector::theRangesPhi
std::vector< double > theRangesPhi
Definition: AlignmentParameterSelector.h:111
AlignmentParameterSelector::theDetIds
std::vector< int > theDetIds
DetId restrictions in eta, phi, r, x, y, z to be applied for next addSelection.
Definition: AlignmentParameterSelector.h:118
AlignmentParameterSelector::TECDetIdRanges::clear
void clear()
Definition: AlignmentParameterSelector.h:188
AlignmentParameterSelector::theTracker
AlignableTracker * theTracker
Definition: AlignmentParameterSelector.h:103
AlignmentParameterSelector::AlignmentParameterSelector
AlignmentParameterSelector(AlignableTracker *aliTracker, AlignableMuon *aliMuon=nullptr, AlignableExtras *aliExtras=nullptr)
Constructor from tracker only or from tracker and muon.
Definition: AlignmentParameterSelector.cc:24
AlignmentParameterSelector
Definition: AlignmentParameterSelector.h:26
AlignmentParameterSelector::setTIBDetIdCuts
void setTIBDetIdCuts(const edm::ParameterSet &pSet)
Definition: AlignmentParameterSelector.cc:202
AlignmentParameterSelector::RphiOrStereoDetUnit
RphiOrStereoDetUnit
Definition: AlignmentParameterSelector.h:203
AlignmentParameterSelector::TIDDetIdRanges
Definition: AlignmentParameterSelector.h:158
AlignmentParameterSelector::insideRanges
bool insideRanges(T value, const std::vector< T > &ranges, bool isPhi=false) const
Definition: AlignmentParameterSelector.cc:724
AlignmentParameterSelector::outsideDetIdRanges
bool outsideDetIdRanges(const Alignable *alignable) const
true if DetId restrictions are not satisfied
Definition: AlignmentParameterSelector.cc:606
AlignmentParameterSelector::setTIDDetIdCuts
void setTIDDetIdCuts(const edm::ParameterSet &pSet)
Definition: AlignmentParameterSelector.cc:227