CMS 3D CMS Logo

PedeSteerer.h
Go to the documentation of this file.
1 #ifndef PEDESTEERER_H
2 #define PEDESTEERER_H
3 
16 #include <vector>
17 #include <map>
18 #include <set>
19 #include <string>
20 // forward ofstream:
21 #include <iosfwd>
22 
26 
27 class Alignable;
28 class AlignableTracker;
29 class AlignableMuon;
30 class AlignableExtras;
32 class PedeLabelerBase;
34 
35 /***************************************
36 ****************************************/
37 class PedeSteerer {
38 public:
41  PedeSteerer(AlignableTracker *aliTracker,
42  AlignableMuon *aliMuon,
43  AlignableExtras *aliExtras,
45  const PedeLabelerBase *labels,
47  const std::string &defaultDir,
48  bool noSteerFiles);
50  ~PedeSteerer();
51 
53  bool isNoHiera(const Alignable *ali) const;
54 
56  void buildSubSteer(AlignableTracker *aliTracker, AlignableMuon *aliMuon, AlignableExtras *aliExtras);
58  std::string buildMasterSteer(const std::vector<std::string> &binaryFiles);
60  int runPede(const std::string &masterSteer) const;
64  bool isCorrectToRefSystem(const align::Alignables &coordDefiners) const;
65 
66  double cmsToPedeFactor(unsigned int parNum) const;
68  int parameterSign() const { return myParameterSign; }
70  const std::string &directory() const { return myDirectory; }
71 
72 private:
73  typedef std::map<const Alignable *, std::vector<float> > AlignablePresigmasMap;
74 
77  bool checkParameterChoices(const align::Alignables &) const;
80  unsigned int buildNoHierarchyCollection(const align::Alignables &);
85  std::pair<unsigned int, unsigned int> fixParameters(const align::Alignables &, const std::string &file);
89  int fixParameter(Alignable *ali,
90  unsigned int iRunRange,
91  unsigned int iParam,
92  char selector,
93  std::ofstream *&filePtr,
94  const std::string &fileName);
101  void defineCoordinates(const align::Alignables &, Alignable *aliMaster, const std::string &fileName);
102 
103  unsigned int hierarchyConstraints(const align::Alignables &, const std::string &file);
104  void hierarchyConstraint(const Alignable *ali, const align::Alignables &components, std::ofstream &file) const;
105 
107  unsigned int presigmas(const std::vector<edm::ParameterSet> &cffPresi,
108  const std::string &fileName,
109  const align::Alignables &,
110  AlignableTracker *aliTracker,
111  AlignableMuon *aliMuon,
112  AlignableExtras *aliExtras);
114  unsigned int presigmasFile(const std::string &fileName,
115  const align::Alignables &,
116  const AlignablePresigmasMap &aliPresisMap);
118  std::string fileName(const std::string &addendum) const;
120  std::ofstream *createSteerFile(const std::string &name, bool addToList);
121 
122  // data members
126 
133  unsigned int theMinHieraParPerConstr;
134  unsigned int theConstrPrecision;
135 
136  std::vector<std::string> mySteeringFiles;
137 
138  std::set<const Alignable *> myNoHieraCollection;
141 };
142 
143 #endif
SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
AlignableObjectId
Allows conversion between type and name, and vice-versa.
Definition: AlignableObjectId.h:12
PedeSteerer::presigmasFile
unsigned int presigmasFile(const std::string &fileName, const align::Alignables &, const AlignablePresigmasMap &aliPresisMap)
look for active 'alis' in map of presigma values and create steering file
Definition: PedeSteerer.cc:591
PedeSteerer::cmsToPedeFactor
double cmsToPedeFactor(unsigned int parNum) const
Definition: PedeSteerer.cc:141
PedeSteerer::isCorrectToRefSystem
bool isCorrectToRefSystem(const align::Alignables &coordDefiners) const
Definition: PedeSteerer.cc:366
PedeSteerer::myNoHieraCollection
std::set< const Alignable * > myNoHieraCollection
keeps track of created 'secondary' steering files
Definition: PedeSteerer.h:137
PedeSteerer::hierarchyConstraints
unsigned int hierarchyConstraints(const align::Alignables &, const std::string &file)
Definition: PedeSteerer.cc:440
PedeSteerer::PedeSteerer
PedeSteerer(AlignableTracker *aliTracker, AlignableMuon *aliMuon, AlignableExtras *aliExtras, AlignmentParameterStore *store, const PedeLabelerBase *labels, const edm::ParameterSet &config, const std::string &defaultDir, bool noSteerFiles)
Definition: PedeSteerer.cc:53
Alignable
Definition: Alignable.h:27
PedeSteerer::correctToReferenceSystem
void correctToReferenceSystem()
Definition: PedeSteerer.cc:393
PedeSteerer::theMinHieraParPerConstr
unsigned int theMinHieraParPerConstr
min absolute value of coefficients in hierarchy constraints
Definition: PedeSteerer.h:132
PedeSteerer::fileName
std::string fileName(const std::string &addendum) const
full name with directory and 'idenitfier'
Definition: PedeSteerer.cc:658
PedeSteerer::selectCoordinateAlis
align::Alignables selectCoordinateAlis(const align::Alignables &) const
Definition: PedeSteerer.cc:304
PedeSteerer::theCoordMaster
Alignable * theCoordMaster
Alignables deselected for hierarchy constr.
Definition: PedeSteerer.h:138
PedeSteerer::fixParameter
int fixParameter(Alignable *ali, unsigned int iRunRange, unsigned int iParam, char selector, std::ofstream *&filePtr, const std::string &fileName)
Definition: PedeSteerer.cc:264
PedeSteerer::fixParameters
std::pair< unsigned int, unsigned int > fixParameters(const align::Alignables &, const std::string &file)
Definition: PedeSteerer.cc:232
PedeSteerer::hierarchyConstraint
void hierarchyConstraint(const Alignable *ali, const align::Alignables &components, std::ofstream &file) const
Definition: PedeSteerer.cc:474
PedeSteerer::runPede
int runPede(const std::string &masterSteer) const
run pede, masterSteer should be as returned from buildMasterSteer(...)
Definition: PedeSteerer.cc:784
PedeSteerer::checkParameterChoices
bool checkParameterChoices(const align::Alignables &) const
Definition: PedeSteerer.cc:205
PedeSteerer::myLabels
const PedeLabelerBase * myLabels
not the owner!
Definition: PedeSteerer.h:123
config
Definition: config.py:1
PedeSteerer::alignableObjectId_
const AlignableObjectId alignableObjectId_
pointer to labeler (not the owner)
Definition: PedeSteerer.h:124
PedeSteerer::myDirectory
std::string myDirectory
Definition: PedeSteerer.h:127
AlignableTracker
Definition: AlignableTracker.h:17
AlignableExtras
Definition: AlignableExtras.h:19
PedeSteerer::myParameterStore
const AlignmentParameterStore * myParameterStore
Definition: PedeSteerer.h:122
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PedeSteerer::buildMasterSteer
std::string buildMasterSteer(const std::vector< std::string > &binaryFiles)
construct (and return name of) master steering file from config, binaryFiles etc.
Definition: PedeSteerer.cc:746
edm::ParameterSet
Definition: ParameterSet.h:36
PedeSteerer::createSteerFile
std::ofstream * createSteerFile(const std::string &name, bool addToList)
create and open file with name, if (addToList) append to mySteeringFiles
Definition: PedeSteerer.cc:642
PedeSteerer::myParameterSign
int myParameterSign
whether or not to fill pede steering files with debug info
Definition: PedeSteerer.h:130
PedeSteerer::parameterSign
int parameterSign() const
results from pede (and start values for pede) might need a sign flip
Definition: PedeSteerer.h:67
PedeSteerer::directory
const std::string & directory() const
directory from constructor input, '/' is attached if needed
Definition: PedeSteerer.h:69
AlignableMuon
Constructor of the full muon geometry.
Definition: AlignableMuon.h:33
PedeSteerer::myNoSteerFiles
bool myNoSteerFiles
directory of all files
Definition: PedeSteerer.h:128
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
PedeSteerer::~PedeSteerer
~PedeSteerer()
Definition: PedeSteerer.cc:131
PedeLabelerBase
Definition: PedeLabelerBase.h:33
PedeSteerer::buildSubSteer
void buildSubSteer(AlignableTracker *aliTracker, AlignableMuon *aliMuon, AlignableExtras *aliExtras)
construct steering files about hierarchy, fixing etc. an keep track of their names
Definition: PedeSteerer.cc:668
Utilities.h
PedeSteerer::mySteeringFiles
std::vector< std::string > mySteeringFiles
precision for writing constraints to text file
Definition: PedeSteerer.h:135
PedeSteerer::theMinHieraConstrCoeff
double theMinHieraConstrCoeff
old pede versions (before May '07) need a sign flip...
Definition: PedeSteerer.h:131
PedeSteerer::isNoHiera
bool isNoHiera(const Alignable *ali) const
True if 'ali' was deselected from hierarchy and any ancestor (e.g. mother) has parameters.
Definition: PedeSteerer.cc:136
AlignableObjectId.h
PedeSteererWeakModeConstraints
Definition: PedeSteererWeakModeConstraints.h:55
PedeSteerer::theCoordDefiners
align::Alignables theCoordDefiners
master coordinates, must (?) be global frame
Definition: PedeSteerer.h:139
PedeSteerer::myIsSteerFileDebug
bool myIsSteerFileDebug
flag to write steering files to /dev/null
Definition: PedeSteerer.h:129
align::Alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
PedeSteerer
Definition: PedeSteerer.h:36
AlignmentParameterStore
Definition: AlignmentParameterStore.h:23
makeMuonMisalignmentScenario.components
string components
Definition: makeMuonMisalignmentScenario.py:58
PedeSteerer::theConstrPrecision
unsigned int theConstrPrecision
hierarchy constraints with less params are ignored
Definition: PedeSteerer.h:133
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
PedeSteerer::defineCoordinates
void defineCoordinates(const align::Alignables &, Alignable *aliMaster, const std::string &fileName)
Definition: PedeSteerer.cc:346
PedeSteerer::AlignablePresigmasMap
std::map< const Alignable *, std::vector< float > > AlignablePresigmasMap
Definition: PedeSteerer.h:72
ParameterSet.h
PedeSteerer::presigmas
unsigned int presigmas(const std::vector< edm::ParameterSet > &cffPresi, const std::string &fileName, const align::Alignables &, AlignableTracker *aliTracker, AlignableMuon *aliMuon, AlignableExtras *aliExtras)
interprete content of presigma VPSet 'cffPresi' and call presigmasFile
Definition: PedeSteerer.cc:542
PedeSteerer::buildNoHierarchyCollection
unsigned int buildNoHierarchyCollection(const align::Alignables &)
Definition: PedeSteerer.cc:161
PedeSteerer::myConfig
const edm::ParameterSet myConfig
Definition: PedeSteerer.h:126