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  unsigned int maxNumberOfParameterInstances() const { return 1; }
53 
55  unsigned int paramNumFromLabel(unsigned int paramLabel) const;
57  unsigned int alignableLabelFromLabel(unsigned int label) const;
60  Alignable* alignableFromLabel(unsigned int label) const;
63  unsigned int lasBeamIdFromLabel(unsigned int label) const;
64 
65  private:
66  typedef std::map <Alignable*, unsigned int> AlignableToIdMap;
68  typedef std::map <unsigned int, Alignable*> IdToAlignableMap;
69  typedef std::map <unsigned int, unsigned int> UintUintMap;
70 
72  unsigned int buildMap(const std::vector<Alignable*> &alis);
74  unsigned int buildReverseMap();
75 
76  // data members
81 };
82 
83 #endif
std::map< unsigned int, Alignable * > IdToAlignableMap
Definition: PedeLabeler.h:68
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:69
std::map< Alignable *, unsigned int > AlignableToIdMap
Definition: PedeLabeler.h:66
~PedeLabeler()
destructor
Definition: PedeLabeler.cc:41
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:80
AlignableToIdMap::value_type AlignableToIdPair
Definition: PedeLabeler.h:67
IdToAlignableMap theIdToAlignableMap
providing unique ID for alignable, space for param IDs
Definition: PedeLabeler.h:78
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:77
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:79
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 maxNumberOfParameterInstances() const
returns the maximum number of instances for any parameter of an Alignable*
Definition: PedeLabeler.h:52
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