CMS 3D CMS Logo

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 
23 
24 /***************************************
25 ****************************************/
26 class PedeLabeler : public PedeLabelerBase {
27 public:
31  ~PedeLabeler() override;
32 
36  unsigned int alignableLabel(Alignable *alignable) const override;
37  unsigned int alignableLabelFromParamAndInstance(Alignable *alignable,
38  unsigned int param,
39  unsigned int instance) const override;
40  unsigned int lasBeamLabel(unsigned int lasBeamId) const override;
41  unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override;
42  unsigned int parameterLabel(Alignable *alignable,
43  unsigned int parNum,
45  const TrajectoryStateOnSurface &tsos) const override {
46  return parameterLabel(alignableLabel(alignable), parNum);
47  }
48  bool hasSplitParameters(Alignable *alignable) const override { return false; }
49  unsigned int numberOfParameterInstances(Alignable *alignable, int param = -1) const override { return 1; }
50  unsigned int maxNumberOfParameterInstances() const override { return 1; }
51 
53  unsigned int paramNumFromLabel(unsigned int paramLabel) const override;
55  unsigned int alignableLabelFromLabel(unsigned int label) const override;
58  Alignable *alignableFromLabel(unsigned int label) const override;
61  unsigned int lasBeamIdFromLabel(unsigned int label) const override;
62 
63 private:
64  typedef std::map<Alignable *, unsigned int> AlignableToIdMap;
66  typedef std::map<unsigned int, Alignable *> IdToAlignableMap;
67  typedef std::map<unsigned int, unsigned int> UintUintMap;
68 
70  unsigned int buildMap(const align::Alignables &);
72  unsigned int buildReverseMap();
73 
74  // data members
79 };
80 
81 #endif
unsigned int alignableLabel(Alignable *alignable) const override
Return 32-bit unique label for alignable, 0 indicates failure.
Definition: PedeLabeler.cc:43
std::map< Alignable *, unsigned int > AlignableToIdMap
Definition: PedeLabeler.h:64
bool hasSplitParameters(Alignable *alignable) const override
returns true if the alignable has parameters that are split into various bins
Definition: PedeLabeler.h:48
static PFTauRenderPlugin instance
std::map< unsigned int, unsigned int > UintUintMap
Definition: PedeLabeler.h:67
PedeLabeler(const PedeLabelerBase::TopLevelAlignables &alignables, const edm::ParameterSet &config)
constructor from three Alignables (null pointers allowed )
Definition: PedeLabeler.cc:22
unsigned int parameterLabel(Alignable *alignable, unsigned int parNum, const AlignmentAlgorithmBase::EventInfo &eventInfo, const TrajectoryStateOnSurface &tsos) const override
Definition: PedeLabeler.h:42
unsigned int maxNumberOfParameterInstances() const override
returns the maximum number of instances for any parameter of an Alignable*
Definition: PedeLabeler.h:50
Definition: config.py:1
unsigned int alignableLabelFromParamAndInstance(Alignable *alignable, unsigned int param, unsigned int instance) const override
Definition: PedeLabeler.cc:63
unsigned int buildReverseMap()
returns size of map
Definition: PedeLabeler.cc:183
define event information passed to algorithms
UintUintMap theLabelToLasBeamMap
labels for las beams
Definition: PedeLabeler.h:78
char const * label
AlignableToIdMap::value_type AlignableToIdPair
Definition: PedeLabeler.h:65
~PedeLabeler() override
destructor
Definition: PedeLabeler.cc:39
Alignable * alignableFromLabel(unsigned int label) const override
Definition: PedeLabeler.cc:107
IdToAlignableMap theIdToAlignableMap
providing unique ID for alignable, space for param IDs
Definition: PedeLabeler.h:76
unsigned int buildMap(const align::Alignables &)
returns size of map
Definition: PedeLabeler.cc:143
AlignableToIdMap theAlignableToIdMap
Definition: PedeLabeler.h:75
std::map< unsigned int, Alignable * > IdToAlignableMap
Definition: PedeLabeler.h:66
unsigned int lasBeamLabel(unsigned int lasBeamId) const override
Definition: PedeLabeler.cc:70
UintUintMap theLasBeamToLabelMap
reverse map
Definition: PedeLabeler.h:77
unsigned int alignableLabelFromLabel(unsigned int label) const override
alignable label from parameter label (works also for alignable label...)
Definition: PedeLabeler.cc:102
unsigned int lasBeamIdFromLabel(unsigned int label) const override
Definition: PedeLabeler.cc:127
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
unsigned int paramNumFromLabel(unsigned int paramLabel) const override
parameter number, 0 <= .. < theMaxNumParam, belonging to unique parameter label
Definition: PedeLabeler.cc:92
unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override
returns the label for a given alignable parameter number combination
Definition: PedeLabeler.cc:83
eventInfo
add run, event number and lumi section
unsigned int numberOfParameterInstances(Alignable *alignable, int param=-1) const override
returns the number of instances for a given parameter
Definition: PedeLabeler.h:49