CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PedeLabeler.h
Go to the documentation of this file.
1 #ifndef PEDELABELER_H
2 #define PEDELABELER_H
3 
16 #include <vector>
17 #include <map>
18 
20 
22 
23 /***************************************
24 ****************************************/
26 {
27  public:
28 
31  const edm::ParameterSet &config);
33  ~PedeLabeler();
34 
38  unsigned int alignableLabel(Alignable *alignable) const;
39  unsigned int alignableLabelFromParamAndInstance(Alignable *alignable,
40  unsigned int param,
41  unsigned int instance) const;
42  unsigned int lasBeamLabel(unsigned int lasBeamId) const;
43  unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const;
44  unsigned int parameterLabel(Alignable *alignable, unsigned int parNum,
46  const TrajectoryStateOnSurface &tsos) const {
47  return parameterLabel(alignableLabel(alignable), parNum);
48  }
49  bool hasSplitParameters(Alignable *alignable) const { return false; }
50  unsigned int numberOfParameterInstances(Alignable *alignable,
51  int param=-1) const { return 1; }
52 
54  unsigned int paramNumFromLabel(unsigned int paramLabel) const;
56  unsigned int alignableLabelFromLabel(unsigned int label) const;
59  Alignable* alignableFromLabel(unsigned int label) const;
62  unsigned int lasBeamIdFromLabel(unsigned int label) const;
63 
64  private:
65  typedef std::map <Alignable*, unsigned int> AlignableToIdMap;
67  typedef std::map <unsigned int, Alignable*> IdToAlignableMap;
68  typedef std::map <unsigned int, unsigned int> UintUintMap;
69 
71  unsigned int buildMap(const std::vector<Alignable*> &alis);
73  unsigned int buildReverseMap();
74 
75  // data members
80 };
81 
82 #endif
std::map< unsigned int, Alignable * > IdToAlignableMap
Definition: PedeLabeler.h:67
unsigned int alignableLabelFromParamAndInstance(Alignable *alignable, unsigned int param, unsigned int instance) const
Definition: PedeLabeler.cc:67
unsigned int lasBeamLabel(unsigned int lasBeamId) const
Definition: PedeLabeler.cc:75
static PFTauRenderPlugin instance
unsigned int paramNumFromLabel(unsigned int paramLabel) const
parameter number, 0 &lt;= .. &lt; theMaxNumParam, belonging to unique parameter label
Definition: PedeLabeler.cc:100
std::map< unsigned int, unsigned int > UintUintMap
Definition: PedeLabeler.h:68
std::map< Alignable *, unsigned int > AlignableToIdMap
Definition: PedeLabeler.h:65
PedeLabeler(const PedeLabelerBase::TopLevelAlignables &alignables, const edm::ParameterSet &config)
constructor from three Alignables (null pointers allowed )
Definition: PedeLabeler.cc:22
unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const
returns the label for a given alignable parameter number combination
Definition: PedeLabeler.cc:89
unsigned int buildReverseMap()
returns size of map
Definition: PedeLabeler.cc:197
UintUintMap theLabelToLasBeamMap
labels for las beams
Definition: PedeLabeler.h:79
AlignableToIdMap::value_type AlignableToIdPair
Definition: PedeLabeler.h:66
IdToAlignableMap theIdToAlignableMap
providing unique ID for alignable, space for param IDs
Definition: PedeLabeler.h:77
unsigned int numberOfParameterInstances(Alignable *alignable, int param=-1) const
returns the number of instances for a given parameter
Definition: PedeLabeler.h:50
AlignableToIdMap theAlignableToIdMap
Definition: PedeLabeler.h:76
Container::value_type value_type
Alignable * alignableFromLabel(unsigned int label) const
Definition: PedeLabeler.cc:117
unsigned int alignableLabel(Alignable *alignable) const
Return 32-bit unique label for alignable, 0 indicates failure.
Definition: PedeLabeler.cc:47
UintUintMap theLasBeamToLabelMap
reverse map
Definition: PedeLabeler.h:78
unsigned int alignableLabelFromLabel(unsigned int label) const
alignable label from parameter label (works also for alignable label...)
Definition: PedeLabeler.cc:111
unsigned int lasBeamIdFromLabel(unsigned int label) const
Definition: PedeLabeler.cc:138
bool hasSplitParameters(Alignable *alignable) const
returns true if the alignable has parameters that are split into various bins
Definition: PedeLabeler.h:49
unsigned int buildMap(const std::vector< Alignable * > &alis)
returns size of map
Definition: PedeLabeler.cc:155
define event information passed to algorithms
unsigned int parameterLabel(Alignable *alignable, unsigned int parNum, const AlignmentAlgorithmBase::EventInfo &eventInfo, const TrajectoryStateOnSurface &tsos) const
Definition: PedeLabeler.h:44