CMS 3D CMS Logo

AlignmentParameterSelector.h

Go to the documentation of this file.
00001 #ifndef ALIGNMENTPARAMETERSELECTOR_H
00002 #define ALIGNMENTPARAMETERSELECTOR_H
00003 
00016 #include "Alignment/CommonAlignment/interface/Utilities.h"
00017 
00018 class AlignableTracker;
00019 class AlignableMuon;
00020 namespace edm {
00021   class ParameterSet;
00022 }
00023 
00024 class AlignmentParameterSelector {
00025  public:
00027   explicit AlignmentParameterSelector(AlignableTracker *aliTracker, AlignableMuon *aliMuon = 0);
00028 
00030   virtual ~AlignmentParameterSelector() {}
00031 
00033   const align::Alignables& selectedAlignables() const { return theSelectedAlignables; }
00035   const std::vector<std::vector<char> >& selectedParameters() const { return theSelectedParameters; }
00037   void clear();
00039   void clearGeometryCuts();
00040 
00049   unsigned int addSelections(const edm::ParameterSet &pSet);
00053   void setGeometryCuts(const edm::ParameterSet &pSet);
00056   unsigned int addSelection(const std::string &name, const std::vector<char> &paramSel);
00058   unsigned int addSelection(const std::string &name, const std::vector<char> &paramSel, 
00059                             const edm::ParameterSet &pSet);
00061   bool layerDeselected(const Alignable *alignable) const;
00063   bool detUnitDeselected(const Alignable *alignable) const;
00065   bool outsideRanges(const Alignable *alignable) const;
00068   bool insideRanges(double value, const std::vector<double> &ranges, bool isPhi = false) const;
00070   std::vector<std::string> decompose(const std::string &s, std::string::value_type delimiter) const;
00072   std::vector<char> convertParamSel(const std::string &selString) const;
00073 
00074  protected:
00076   unsigned int add(const align::Alignables &alignables, const std::vector<char> &paramSel);
00078   unsigned int addAllDets(const std::vector<char> &paramSel);
00079   unsigned int addAllRods(const std::vector<char> &paramSel);
00080   unsigned int addAllLayers(const std::vector<char> &paramSel);
00081   unsigned int addAllAlignables(const std::vector<char> &paramSel);
00082 
00083  private:
00084   AlignableTracker* theTracker;
00085   AlignableMuon*    theMuon;
00086   align::Alignables theSelectedAlignables;
00087   std::vector<std::vector<char> > theSelectedParameters;
00088 
00090   std::vector<double> theRangesEta;
00091   std::vector<double> theRangesPhi;
00092   std::vector<double> theRangesR;
00093   std::vector<double> theRangesX;
00094   std::vector<double> theRangesY;
00095   std::vector<double> theRangesZ;
00096 
00097   // further switches used in add(...)
00098   bool theOnlyDS;
00099   bool theOnlySS;
00100   bool theSelLayers;
00101   int  theMinLayer;
00102   int  theMaxLayer;
00103   enum RphiOrStereoDetUnit { Stereo, Both, Rphi};
00104   RphiOrStereoDetUnit theRphiOrStereoDetUnit;
00112   std::string setSpecials(const std::string &name);
00113 
00114 };
00115 #endif

Generated on Tue Jun 9 17:23:46 2009 for CMSSW by  doxygen 1.5.4