CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SurveyPxbDicer.h
Go to the documentation of this file.
1 #ifndef GUARD_surveypxbdicer_h
2 #define GUARD_surveypxbdicer_h
3 
4 #include <vector>
5 #include <functional>
6 #include <utility>
7 #include <fstream>
10 #include "Math/SMatrix.h"
11 #include "Math/SVector.h"
12 #include <CLHEP/Random/RandGauss.h>
13 #include <CLHEP/Random/Random.h>
15 
16 #include <iostream>
17 #include <stdexcept>
18 
22 {
23 public:
25  typedef double value_t;
26  typedef std::vector<coord_t> fidpoint_t;
27  typedef unsigned int count_t;
29  typedef std::pair<id_t,id_t> idPair_t;
30 
31  // Constructors
33  // Constructor from VPSet
34  SurveyPxbDicer(std::vector<edm::ParameterSet> pars, unsigned int seed);
35 
39  std::string doDice(const fidpoint_t &fidpointvec, const idPair_t &id, const bool rotate=false);
40  void doDice(const fidpoint_t &fidpointvec, const idPair_t &id, std::ofstream &outfile, const bool rotate=false);
41 
42 private:
46  value_t ranGauss(value_t mean, value_t sigma) {return CLHEP::RandGauss::shoot(mean,sigma);};
47 
54 
59  value_t getParByName(const std::string &name, const std::string &par, const std::vector<edm::ParameterSet>& pars);
60 
67  coord_t transform(const coord_t &x, const value_t &a0, const value_t &a1, const value_t &a2, const value_t &a3);
68 
70  struct findParByName: public std::binary_function< std::string, edm::ParameterSet, bool >
71  {
72  bool operator () ( const std::string &name, const edm::ParameterSet &parset )
73  const { return (parset.getParameter<std::string>("name") == name);}
74  };
75 
76 };
77 
78 #endif
79 
value_t mean_scale
Function object for searching for a parameter in the VPSet.
T getParameter(std::string const &) const
bool operator()(const std::string &name, const edm::ParameterSet &parset) const
value_t sigma_scale
SurveyPxbImage::id_t id_t
coord_t transform(const coord_t &x, const value_t &a0, const value_t &a1, const value_t &a2, const value_t &a3)
std::string doDice(const fidpoint_t &fidpointvec, const idPair_t &id, const bool rotate=false)
list outfile
Definition: EdgesToViz.py:91
value_t ranGauss(value_t mean, value_t sigma)
unsigned int count_t
std::vector< coord_t > fidpoint_t
SurveyPxbImage::coord_t coord_t
def rotate
Definition: svgfig.py:704
unsigned int id_t
value_t getParByName(const std::string &name, const std::string &par, const std::vector< edm::ParameterSet > &pars)
std::pair< id_t, id_t > idPair_t
Definition: DDAxes.h:10
const double par[8 *NPar][4]