CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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, AlignableMuon *aliMuon = 0,
30  AlignableExtras *aliExtras = 0);
31 
34 
38  const std::vector<std::vector<char> >& selectedParameters() const { return theSelectedParameters; }
40  void clear();
42  void clearGeometryCuts();
43 
52  unsigned int addSelections(const edm::ParameterSet &pSet);
56  void setGeometryCuts(const edm::ParameterSet &pSet);
59  unsigned int addSelection(const std::string &name, const std::vector<char> &paramSel);
61  unsigned int addSelection(const std::string &name, const std::vector<char> &paramSel,
62  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> bool insideRanges(T value, const std::vector<T> &ranges,
76  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  private:
105  std::vector<std::vector<char> > theSelectedParameters;
106 
108  std::vector<double> theRangesEta;
109  std::vector<double> theRangesPhi;
110  std::vector<double> theRangesR;
111  std::vector<double> theRangesX;
112  std::vector<double> theRangesY;
113  std::vector<double> theRangesZ;
114 
116  std::vector<int> theDetIds;
117  std::vector<int> theDetIdRanges;
118  std::vector<int> theExcludedDetIds;
119  std::vector<int> theExcludedDetIdRanges;
120  struct PXBDetIdRanges {
121  std::vector<int> theLadderRanges;
122  std::vector<int> theLayerRanges;
123  std::vector<int> theModuleRanges;
124  void clear() {
125  theLadderRanges.clear(); theLayerRanges.clear();
126  theModuleRanges.clear();
127  }
129  struct PXFDetIdRanges {
130  std::vector<int> theBladeRanges;
131  std::vector<int> theDiskRanges;
132  std::vector<int> theModuleRanges;
133  std::vector<int> thePanelRanges;
134  std::vector<int> theSideRanges;
135  void clear() {
136  theBladeRanges.clear(); theDiskRanges.clear();
137  theModuleRanges.clear(); thePanelRanges.clear();
138  theSideRanges.clear();
139  }
141  struct TIBDetIdRanges {
142  std::vector<int> theLayerRanges;
143  std::vector<int> theModuleRanges;
144  std::vector<int> theStringRanges;
145  std::vector<int> theSideRanges;
146  void clear() {
147  theLayerRanges.clear(); theModuleRanges.clear();
148  theSideRanges.clear(); theStringRanges.clear();
149  }
151  struct TIDDetIdRanges {
152  std::vector<int> theDiskRanges;
153  std::vector<int> theModuleRanges;
154  std::vector<int> theRingRanges;
155  std::vector<int> theSideRanges;
156  void clear() {
157  theDiskRanges.clear(); theModuleRanges.clear();
158  theRingRanges.clear(); theSideRanges.clear();
159  }
161  struct TOBDetIdRanges {
162  std::vector<int> theLayerRanges;
163  std::vector<int> theModuleRanges;
164  std::vector<int> theRodRanges;
165  std::vector<int> theSideRanges;
166  void clear() {
167  theLayerRanges.clear(); theModuleRanges.clear();
168  theRodRanges.clear(); theSideRanges.clear();
169  }
171  struct TECDetIdRanges {
172  std::vector<int> theWheelRanges;
173  std::vector<int> thePetalRanges;
174  std::vector<int> theModuleRanges;
175  std::vector<int> theRingRanges;
176  std::vector<int> theSideRanges;
177  void clear() {
178  theWheelRanges.clear(); thePetalRanges.clear();
179  theModuleRanges.clear(); theRingRanges.clear();
180  theSideRanges.clear();
181  }
183 
184  // further switches used in add(...)
185  bool theOnlyDS;
186  bool theOnlySS;
199  std::string setSpecials(const std::string &name);
200 
201 };
202 
203 template<> bool
204 AlignmentParameterSelector::insideRanges<int>(int value, const std::vector<int> &ranges,
205  bool isPhi) const;
206 
207 #endif
bool outsideGeometricalRanges(const Alignable *alignable) const
true if geometrical restrictions in eta, phi, r, x, y, z not satisfied
void setTIDDetIdCuts(const edm::ParameterSet &pSet)
unsigned int addAllAlignables(const std::vector< char > &paramSel)
AlignmentParameterSelector(AlignableTracker *aliTracker, AlignableMuon *aliMuon=0, AlignableExtras *aliExtras=0)
Constructor from tracker only or from tracker and muon.
bool insideRanges(T value, const std::vector< T > &ranges, bool isPhi=false) const
void clearGeometryCuts()
remove all geometrical restrictions
std::vector< std::vector< char > > theSelectedParameters
Container::value_type value_type
struct AlignmentParameterSelector::PXFDetIdRanges thePXFDetIdRanges
void setGeometryCuts(const edm::ParameterSet &pSet)
void clear()
remove all selected Alignables and geometrical restrictions
std::vector< int > theDetIds
DetId restrictions in eta, phi, r, x, y, z to be applied for next addSelection.
void setPXBDetIdCuts(const edm::ParameterSet &pSet)
struct AlignmentParameterSelector::PXBDetIdRanges thePXBDetIdRanges
unsigned int addAllDets(const std::vector< char > &paramSel)
some helper methods
void setTECDetIdCuts(const edm::ParameterSet &pSet)
unsigned int addAllLayers(const std::vector< char > &paramSel)
std::vector< std::string > decompose(const std::string &s, std::string::value_type delimiter) const
Decomposing input string &#39;s&#39; into parts separated by &#39;delimiter&#39;.
struct AlignmentParameterSelector::TIBDetIdRanges theTIBDetIdRanges
struct AlignmentParameterSelector::TOBDetIdRanges theTOBDetIdRanges
unsigned int addAllRods(const std::vector< char > &paramSel)
const align::Alignables & selectedAlignables() const
vector of alignables selected so far
void setPXFDetIdCuts(const edm::ParameterSet &pSet)
std::vector< double > theRangesEta
geometrical restrictions in eta, phi, r, x, y, z to be applied for next addSelection ...
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
struct AlignmentParameterSelector::TECDetIdRanges theTECDetIdRanges
unsigned int addSelection(const std::string &name, const std::vector< char > &paramSel)
void setTOBDetIdCuts(const edm::ParameterSet &pSet)
virtual ~AlignmentParameterSelector()
Destructor.
unsigned int add(const align::Alignables &alignables, const std::vector< char > &paramSel)
adding alignables which fulfil geometrical restrictions and special switches
std::vector< char > convertParamSel(const std::string &selString) const
Converting std::string into std::vector&lt;char&gt;
unsigned int addSelections(const edm::ParameterSet &pSet)
bool outsideDetIdRanges(const Alignable *alignable) const
true if DetId restrictions are not satisfied
bool isMemberOfVector(int value, const std::vector< int > &values) const
true if value is member of vector of values
string s
Definition: asciidump.py:422
const std::vector< std::vector< char > > & selectedParameters() const
vector of selection &#39;strings&#39; for alignables, parallel to selectedAlignables()
Constructor of the full muon geometry.
Definition: AlignableMuon.h:39
struct AlignmentParameterSelector::TIDDetIdRanges theTIDDetIdRanges
bool layerDeselected(const Alignable *alignable) const
true if layer is deselected via &quot;Layers&lt;N&gt;&lt;M&gt;&quot; or &quot;DS/SS&quot;
bool detUnitDeselected(const Alignable *alignable) const
true if alignable is DetUnit deselected by Unit&lt;Rphi/Stereo&gt; selection
std::string setSpecials(const std::string &name)
void setTIBDetIdCuts(const edm::ParameterSet &pSet)