CMS 3D CMS Logo

AlignableModifier.h
Go to the documentation of this file.
1 #ifndef Alignment_TrackerAlignment_AlignableModifier_H
2 #define Alignment_TrackerAlignment_AlignableModifier_H
3 
4 #include <vector>
5 #include <string>
6 #include <utility>
7 
9 
13 
14 class Alignable;
15 
16 namespace CLHEP { class DRand48Engine; }
17 namespace edm { class ParameterSet; }
18 
20 {
21 
22 public:
23 
26 
29 
31  bool modify( Alignable* alignable, const edm::ParameterSet& pSet );
32 
34  bool isPropagated( const std::string& parameterName ) const;
35 
37  void moveAlignable( Alignable* alignable, bool random, bool gaussian,
38  float sigmaX, float sigmaY, float sigmaZ );
39 
41  void moveAlignableLocal( Alignable* alignable, bool random, bool gaussian,
42  float sigmaX, float sigmaY, float sigmaZ );
43 
45  void rotateAlignable( Alignable* alignable, bool random, bool gaussian,
46  float sigmaPhiX, float sigmaPhiY, float sigmaPhiZ );
47 
49  void rotateAlignableLocal( Alignable* alignable, bool random, bool gaussian,
50  float sigmaPhiX, float sigmaPhiY, float sigmaPhiZ );
51 
53  void addAlignmentPositionError( Alignable* alignable,
54  float dx, float dy, float dz );
55 
57  void addAlignmentPositionErrorLocal( Alignable* alignable,
58  float dx, float dy, float dz );
59 
61  void addAlignmentPositionErrorFromRotation( Alignable* alignable,
62  float phiX, float phiY, float phiZ );
63 
65  void addAlignmentPositionErrorFromLocalRotation( Alignable* alignable,
66  float phiX, float phiY, float phiZ );
67 
69  void addAlignmentPositionErrorFromRotation( Alignable* alignable,
71 
73  void addAlignmentPositionErrorFromLocalRotation( Alignable* alignable,
75 
77  void setDistribution( const std::string& distr );
78 
80  void setSeed( long seed );
81 
83  const std::vector<float> gaussianRandomVector( float sigmaX, float sigmaY, float sigmaZ ) const;
85  const std::vector<float> flatRandomVector( float sigmaX, float sigmaY, float sigmaZ ) const;
89  void randomise(std::vector<double> &rnd, bool gaussian) const;
90 
91 private:
92  typedef std::pair<std::string,std::vector<double> > DeformationMemberType;
93  void addDeformation(Alignable *alignable, const DeformationMemberType &deformation,
94  bool random, bool gaussian, double scale);
95 
97  CLHEP::DRand48Engine* theDRand48Engine;
98 
100  void init_();
101 
102  int m_modified; // Indicates if a modification was performed
103 
104  // All parameters (see AlignableModifier::init() for definitions)
106  bool random_, gaussian_, setError_;
107  bool setRotations_,setTranslations_;
108  long seed_;
109  double scaleError_,scale_;
110  double phiX_, phiY_, phiZ_;
111  double phiXlocal_, phiYlocal_, phiZlocal_;
112  double dX_, dY_, dZ_;
113  double dXlocal_, dYlocal_, dZlocal_;
114  DeformationMemberType deformation_;
115  double twist_, shear_;
116 
117 };
118 
119 #endif //AlignableModifier_H
TRandom random
Definition: MVATrainer.cc:138
std::string distribution_
CLHEP::DRand48Engine * theDRand48Engine
Unique random number generator.
DeformationMemberType deformation_
HLT enums.
std::pair< std::string, std::vector< double > > DeformationMemberType
void moveAlignable(Alignable *ali, AlgebraicVector diff)
Moves the alignable by the AlgebraicVector.
Definition: AlignTools.cc:81